How to implement nested list view in angular material design - angular-material

Is there a way to create a nested list view component such as the below one which is implemented in jquery mobile ?
https://demos.jquerymobile.com/1.2.0/docs/lists/lists-ul.html

I used up angular material tab component styles to create UI of a nested list. You can find the demo here.
http://codepen.io/ramanathanMuthuraman/pen/rLpBxQ
HTML
<div ng-app="appName">
<div ng-controller="MainController as vm">
<md-toolbar class="site-content-toolbar">
<h2 class="md-toolbar-item md-breadcrumb md-headline">
<span class="md-padding">{{vm.title}}</span>
</h2>
</md-toolbar>
<md-divider></md-divider>
<md-content class="md-tabs">
<div ng-class="vm.isDrilldownView?'md-left':'md-active'" class="md-tab-content dynamic-height">
<div ng-class="{'md-left':vm.isDrilldownView}" ng-if="!vm.isDrilldownView">
<md-list>
<md-list-item ng-click="vm.nextView(employee)" ng-repeat="employee in vm.employeeList
" class="md-3-line">
<div class="md-list-item-text " layout="column">
<h3>{{ employee.employeeID }}</h3>
<h4>{{ employee.name }}</h4>
<p>{{ employee.overallScore }}</p>
</div>
<md-button class="md-primary md-raised">></md-button>
<md-divider></md-divider>
</md-list-item>
</md-list>
</div>
</div>
<div ng-class="vm.isDrilldownView?'md-active':'md-right'" class="md-tab-content dynamic-height">
<div class="drilldownView" ng-if="vm.isDrilldownView">
<md-whiteframe class="md-whiteframe-1dp md-padding" layout="column" layout-align="center">
<h5 flex>ID: {{ vm.employee.employeeID}}</h5>
<h5 flex>Name: {{ vm.employee.name }}</h5>
<h5 flex>Overall Score :{{ vm.employee.overallScore }}</h5>
</md-whiteframe>
<div layout="row" layout-align="center" flex>
<md-button ng-click="vm.prevView()" class="md-primary md-raised">< BACK</md-button>
</div>
</md-content>
</div>
JS
(function() {
angular
.module("appName", ['ngMaterial'])
.controller("MainController", MainController);
function MainController() {
var vm = this;
vm.title = "View Summary";
vm.isDrilldownView = false;
vm.employeeList = [{
"employeeID": "1",
"name": "Thomas",
"overallScore": 80
}, {
"employeeID": 2,
"name": "Maya",
"overallScore": 80
}];
vm.nextView = function(employee) {
vm.isDrilldownView = true;
employee.individualScore = [{
"name": "Goal Score",
"value": "100"
}, {
"name": "Performance",
"value": "100"
}, {
"name": "Attendance",
"value": "100"
}, {
"name": "Skill set",
"value": "100"
}];
vm.employee = employee;
};
vm.prevView = function() {
vm.isDrilldownView = false;
};
};
})();
CSS
.md-tabs {
overflow: visible;
}
.md-tab-content {
width: 100%;
height: 100%;
overflow: auto;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) .2s;
}
.md-tab-content.md-left:not(.md-active) {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
animation: 1s md-tab-content-hide;
opacity: 0;
}
.md-tab-content.md-right:not(.md-active) {
-webkit-transform: translateX(100%);
transform: translateX(100%);
animation: 1s md-tab-content-hide;
opacity: 0;
}

Related

Flickity Slider – Slides out of alignment

I'm struggling to work out why the slides within a Flickity Slider are out of alignment?
Gif of slider being out of position
Technically the slider is working. So this must be either a option I haven't implemented or CSS.
Javascript
var Flickity = require("flickity");
require("flickity-fade");
var mediaChoiceCarousel = new Flickity("#media-choice-carousel", {
autoPlay: true,
autoPlay: 4500,
adaptiveHeight: false,
pageDots: false,
prevNextButtons: false,
cellAlign: "left",
wrapAround: true,
contain: true
});
HTML
<div id="media-choice-carousel" class="carousel carousel-ratiowide">
<div class="slide">
<picture class="ratio-wide">
<img src="###" alt="###" />
</picture>
</div>
<div class="slide">
<div class="video-wrapper">
<iframe></iframe>
</div>
</div>
</div>
Would love to see other options, but I think I may of sorted it…
.carousel {
overflow: hidden;
&::after {
content: "flickity";
display: none;
}
.flickity-cell.is-selected {
position: absolute;
inset: 0;
}
}

Why does my CSS code renders incorrectly on iOS/MacOS?

We developed a web app on Vue 3 and it displays perfectly on every browser except on iOS and Mac OS devices.
This is worse if you're using Safari, however some issues occur even on Chrome for Mac.
This problem causes forms to always be shown blank, without displaying a placeholder or user input. It also makes several other elements to misalign.
We even tried making a new form and removing all stylesheets, but the problem persists.
Here is the code for one of the forms:
<template>
<div>
<form class="contactus" #submit.prevent="saveMessage">
<div class="row">
<h1 class="titleFormAbout">
{{ $t("contactus.componentForm.text1") }}
</h1>
</div>
<p style="margin-bottom: 30px;">{{ $t("contactus.componentForm.text9") }}</p>
<input type="text" class="form-control formContact" :placeholder="$t('contactus.componentForm.text2')" id="name" required />
<input type="email" class="form-control formContact" :placeholder="$t('contactus.componentForm.text3')" id="email" required />
<vue-tel-input
v-model="phone"
id="phone"
class="formControl formContact"
></vue-tel-input>
<br />
<textarea
class="form-control formContact"
name=""
id="message"
rows="10"
:placeholder="$t('contactus.componentForm.text5')"
required
></textarea>
<br />
<vue-recaptcha
style="margin-bottom: 14px"
#validate="validated"
/>
<div class="row">
<div class="col-6">
<input
class="form-control "
type="Submit"
id="submitButton"
:value="$t('contactus.componentForm.text6')"
disabled
/>
</div>
<div class="col-6">
<button class="form-control clear" #click="clearForm" >
{{ $t("contactus.buttonClear") }}
</button>
</div>
</div>
<br />
<div class="alert" id="Response" role="alert"></div>
</form>
</div>
</template>
<script>
import axios from "axios";
import VueRecaptcha from "../forms/vue-recaptcha.vue";
const hostName = location.port =="" ?location.protocol + "//" + location.host:'http://'+location.hostname+':3000';
export default {
components: {
VueRecaptcha,
},
data() {
return {
config: {
headers: {
//'Content-Type': 'application/x-www-form-urlencoded'
"Content-Type": "multipart/form-data",
},
},
};
},
methods: {
validated(){
const htmlElement=document.getElementById('submitButton');
htmlElement.classList.add('submit');
htmlElement.disabled=false;
},
clearForm() {
document.getElementById("name").value = "";
document.getElementById("email").value = "";
document.getElementsByName("telephone")[0].value = "";
document.getElementById("message").value= "";
},
saveMessage() {
//alert(document.getElementsByClassName("highlighted")[0].getElementsByTagName('span')[0].innerHTML)
const responseBox = document.getElementById("Response");
const params = new FormData();
const countryPhone = document.getElementsByClassName("highlighted");
var countryPhoneid = "+52";
if (countryPhone.length > 0) {
countryPhoneid =
countryPhone[0].getElementsByTagName("span")[0].innerHTML;
}
params.append("name", document.getElementById("name").value);
params.append("email", document.getElementById("email").value);
params.append("phone",countryPhoneid + " " + document.getElementsByName("telephone")[0].value);
params.append("message", document.getElementById("message").value);
axios
.post(hostName + "/api/contact", params, this.config)
.then((response) => {
responseBox.innerHTML = this.$t("contactus.componentForm.text7");
responseBox.classList.add("alert-success");
setTimeout(() => {
responseBox.classList.remove("alert-success");
}, 5000);
console.log(response);
})
.catch((err) => {
responseBox.innerHTML = this.$t("contactus.componentForm.text8");
responseBox.classList.add("alert-danger");
setTimeout(() => {
responseBox.classList.remove("alert-danger");
}, 5000);
console.log(err);
});
responseBox.hidden = false;
setTimeout(() => {
responseBox.hidden = true;
}, 5000);
document.getElementById("name").value = "";
document.getElementById("email").value = "";
document.getElementsByName("telephone")[0].value = "";
document.getElementById("message").value = "";
},
},
mounted() {
document.getElementsByName("telephone")[0].placeholder=this.$t('contactus.componentForm.text10');
const listcountry = document.getElementsByClassName("vti__dropdown-list");
listcountry[0].getElementsByTagName("li")[137].classList.add("highlighted");
document.getElementsByName("telephone")[0].required = true;
document
.getElementsByName("telephone")[0]
.addEventListener("input", (textin) => {
const telephone = document.getElementsByName("telephone")[0];
//console.log(parseInt(textin.data));
//console.log(Number.isInteger(textin.data));<
if (Number.isInteger(parseInt(textin.data))) {
// console.log(telephone.value);
} else {
telephone.value = telephone.value.slice(
0,
telephone.value.length - 1
);
}
});
},
};
</script>
<style>
.contactus .submit {
background: #008b9e;
color: white;
font-weight: bold;
}
.contactus .formContact{
border: 2px solid #BAD1FF;
margin-top: 2vh;
margin-bottom: 2vh;
}
.contactus .clear {
background: rgba(0, 0, 0, 0.25);
font-weight: bold;
}
.contactus .titleFormAbout {
margin-top: 20px;
margin-bottom: 20px;
text-align: left;
color: #00a8c6;
font-weight: bolder;
margin-left: 12px;
text-transform: none;
}
form.contactus {
padding-left: 5vw;
padding-right: 5vw;
}
.contactus form li {
color: black;
}
.contactus .alet {
text-align: center;
}
.contactus .contactus p{
text-align: justify;
}
</style>
Here you can see the type of behaviour we're getting:
On iOS/MacOS:
The same elements on Windows/Android devices:
Can anyone please tell me if this is a common issue and if there's a solution? We have been stuck with this problem for two weeks and we're losing our minds.
Thanks.

Programmatically sort jquery-ui sortable?

I have a bunch of divs inside a display:flex parent div. The parent div is sortable with jquery-ui's sortable function.
As well as allowing the user to sort, I would like to add some buttons that do an animated sort.
For example, with this HTML:
<div class="sortable">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
<div id="div4"></div>
<div id="div5"></div>
</div>
I would like a button that when pressed would animate moving div1 to be between div4 and div5, moving smoothly (in fact, a little erratically as if it were being moved by hand would be even better) and shifting all the divs it passes, so it looks as if it were being moved by hand.
Is this possible using jquery-ui's sortable(), or am I better off building a custom solution?
Consider the following example.
$(function() {
function arrange(obj, pre) {
obj = $(obj);
var t = $("[id^='div']:eq(" + pre + ")");
obj.animate({
top: t.position().top + "px"
}, {
duration: 1000,
step: function(i) {
$(this).position({
my: "left top",
at: "left bottom",
of: t,
});
},
complete: function() {
obj.detach().css("top", "").insertAfter(t);
}
});
}
$(".sortable").sortable().disableSelection();
$("#arrange").click(function() {
arrange($("#div1"), 3);
});
});
.sortable {
list-style-type: none;
margin: 0;
padding: 0;
position: relative;
}
.sortable div {
margin: 0 3px 3px 3px;
padding: 0.4em;
height: 18px;
}
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<div class="sortable">
<div id="div1" class="ui-state-default">Item 1</div>
<div id="div2" class="ui-state-default">Item 2</div>
<div id="div3" class="ui-state-default">Item 3</div>
<div id="div4" class="ui-state-default">Item 4</div>
<div id="div5" class="ui-state-default">Item 5</div>
</div>
<button class="btn" id="arrange">Arrange</button>
Built from https://css-tricks.com/jquery-ui-position-function/
Update
$(function() {
function swap(a, b, ms) {
console.log("Swap:", a.attr("id"), "with", b.attr("id"));
a.animate({
top: b.position().top + "px"
}, {
duration: ms,
step: function(i) {
$(this).position({
my: "left top",
at: "left bottom",
of: b,
});
},
complete: function() {
a.detach().css("top", "").insertAfter(b);
}
});
}
function arrangeAfter(a, b) {
var n = a.next();
for (var c = parseInt(n.attr("id").slice(-1)); n.index() <= b.index(); c++) {
swap(a, n, 400);
n = $("#div" + (c + 1));
}
}
$(".sortable").sortable().disableSelection();
$("#arrange").click(function() {
arrangeAfter($("#div1"), $("#div4"));
});
});
.sortable {
list-style-type: none;
margin: 0;
padding: 0;
position: relative;
}
.sortable div {
margin: 0 3px 3px 3px;
padding: 0.4em;
height: 18px;
}
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<div class="sortable">
<div id="div1" class="ui-state-default">Item 1</div>
<div id="div2" class="ui-state-default">Item 2</div>
<div id="div3" class="ui-state-default">Item 3</div>
<div id="div4" class="ui-state-default">Item 4</div>
<div id="div5" class="ui-state-default">Item 5</div>
</div>
<button class="btn" id="arrange">Arrange</button> <button class="btn" id="reset">Reset</button>

asp.net mvc core knockout.js multiple nested containers not binding properly

This is the code of the testing application i am creating.
<style>
#scroll-wrapper {
margin: 5px;
max-height: 250px;
overflow: auto;
vertical-align: top;
}
#thumbnails {
vertical-align: top;
padding-bottom: 10px;
max-height: 500px;
min-width: 100px;
overflow-y: hidden;
overflow-x: scroll;
white-space: nowrap;
}
.thumbnail-container {
display: inline-block;
position: relative;
line-height: 5px;
margin: 3px;
margin-bottom: 15px !important;
}
#abc {
overflow-y: scroll;
overflow-x: hidden;
height: 200px;
}
<form method="post">
<div data-bind="foreach: lists" id="thumbnails">
<div class="thumbnail-container">
<span data-bind="text:listname"></span><br /><br /><br /><br /><br />
<div id="abc">
<ul class="list-group" data-bind="foreach: cardlists">
<li class="list-group-item">
<span data-bind="text: cardname"></span>
Del
</li>
</ul>
Add Card<br />
<div data-bind="visible: $parent.showRenderTimes">
<input type="text" data-bind="value: $parent.cardtext" /><br /><br /><br />
<input type="button" value="Add" data-bind="click: $parent.addcard" />
<input type="button" value="Cancel" data-bind="click: $parent.cancelcard" />
</div>
</div>
</div>
</div>
<p>
<span id="addVar" data-bind="click: addList">Add List</span>
</p>
<p class="alignRight">
<input type="submit" value="Check">
</p>
</form>
<script type="text/javascript">
var initialData = [
{
listname: "list1",containername :"container1", cardlists: [
{ cardname: "car1111111" },
{ cardname: "caddsdf" }]
},
{
listname: "list2",containername :"container2", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
},
{
listname: "list3", containername: "container3", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
},
{
listname: "list4", containername: "container4", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
},
{
listname: "list5", containername: "container5", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
},
{
listname: "list6", containername: "container6", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
},
{
listname: "list7", containername: "container7", cardlists: [
{ cardname: "card 3" },
{ cardname: "card 4" },
{ cardname: "card 5" },
{ cardname: "card 6" },
{ cardname: "card 7" },
{ cardname: "card 8" },
{ cardname: "card 9" },
{ cardname: "card 10" },
{ cardname: "card 11" }]
},
{
listname: "list6", containername: "container8", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
},
{
listname: "list6", containername: "container9", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
},
{
listname: "list6", containername: "container10", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
},
{
listname: "list6", containername: "container11", cardlists: [
{ cardname: "card 1" },
{ cardname: "card 2" }]
}
];
var ListModal = function(lists) {
var self = this;
self.showRenderTimes = ko.observable(false);
self.cardtext = ko.observable("ff");
self.lists = ko.observableArray(ko.utils.arrayMap(lists, function (list) {
return { listname: list.listname, containername:list.containername, cardlists: ko.observableArray(list.cardlists) };
}));
self.addList = function() {
self.lists.push({
listname: "abc",
containername:"container5",
cardlists: ko.observableArray([
{
cardname: "Bungle"
},
{
cardname: "George"
},
{
cardname: "Zippy"
}
])
});
};
self.addcard = function (lists) {
lists.cardlists.push({
cardname: self.cardtext
});
self.showRenderTimes(false);
};
self.cancelcard = function () {
self.showRenderTimes(false);
};
self.showhideaddcard = function (lists) {
self.showRenderTimes(true);
};
self.removecard = function (cardlist) {
$.each(self.lists(), function () { this.cardlists.remove(cardlist) })
};
self.save = function ()
{
};
};
ko.applyBindings(new ListModal(initialData));
</script>
The code generate this view
Now what should happened that when i click for example third add card in the picture only that textbox should appear but it is opening all the add card textboxes in the application.
apparently the binding is not correct. can someone correct my binding so when i press the no 3 containers add card only no 3 textbox appears. I have the idea that maybe div abc is the problem but i am not able to correct it.
The bindings are working correctly. The problem is that you have only a single parent observable that stores the visible state for all your add-card sections. Naturally if each section is bound to the same showRenderTimes observable then they'll all be hidden/visible at the same time. You need to create an observable for each list that stores its visibility status.
You could move showRenderTimes from the parent ListModal to the individual lists:
self.lists = ko.observableArray(ko.utils.arrayMap(lists, function (list) {
return { listname: list.listname, containername:list.containername, cardlists: ko.observableArray(list.cardlists), showRenderTimes: ko.observable(false) };
}));
Then you'll need to update the bindings that use it to remove the $parent context:
<!--<div data-bind="visible: $parent.showRenderTimes">-->
<div data-bind="visible: showRenderTimes">
And your showHideAddCard and cancelCard functions modify the variable on the list that was clicked and so become:
self.cancelcard = function (list) {
list.showRenderTimes(false);
};
self.showhideaddcard = function (list) {
list.showRenderTimes(true);
};
Example jsFiddle

Bootstrap 3 column class interfering with jquery-ui droppable div

I'm using jQuery-UI v1.11.2 in order to create some draggable and droppable divs, and Boostrap 3.1.1 as well.
I'd like to know why a Boostrap column class is interfering with the draggable "hint".
In other words, as I drag an image from my Gallery div to my Dashboard div, the Dashboard div comes in FRONT of the image hint. Then once I DROP my image on the Dashboard div, the image re-appears.
If I remove the col-md-8 class from the Dashboard div, this problem goes away.
Here are two screen shots to demonstrate:
1) WITHOUT the Bootstrap column class on the right div (image hint looks good)
2) With the Bootstrap column class on the right div (image hint disappears)
Here's the HTML code :
<section id="gadgets-view" class="mainbar" data-ng-controller="gadgets">
<div class="container-fluid">
<div class="row-fluid">
<!-- based on http://jqueryui.com/droppable/#photo-manager -->
<div class="ui-widget ui-helper-clearfix col-md-4"> <-- GALLERY OF WIDGETS -->
<ul id="gallery" class="gallery ui-helper-reset ui-helper-clearfix">
<li class="ui-widget-content ui-corner-tr">
<h5 class="ui-widget-header">Tree Grid</h5>
<img src="images/treegrid.jpg" alt="Hierarchy Grid" width="96" height="72">
</li>
<li class="ui-widget-content ui-corner-tr">
<h5 class="ui-widget-header">Area Chart</h5>
<img src="images/chart_area.jpg" alt="Area Chart" width="96" height="72">
</li>
<li class="ui-widget-content ui-corner-tr">
<h5 class="ui-widget-header">Bar Chart</h5>
<img src="images/chart_bar.png" alt="Bar Chart" width="96" height="72">
</li>
<li class="ui-widget-content ui-corner-tr">
<h5 class="ui-widget-header">Column Chart</h5>
<img src="images/chart_column.png" alt="Column Chart" width="96" height="72">
</li>
<li class="ui-widget-content ui-corner-tr">
<h5 class="ui-widget-header">Line Chart</h5>
<img src="images/chart_line.png" alt="Line Chart" width="96" height="72">
</li>
</ul>
</div>
<div class="col-md-8">
<div id="dashboard" class="ui-widget-content ui-state-default "> <-- DROPPABLE DASHBOARD -->
<h4 class=""><span class="ui-icon ui-icon-image"></span>Dashboard</h4>
</div>
<div>
</div>
</div>
</section>
The CSS :
<style>
.ui-widget-header{
font-size: 65%;
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
}
.ui-state-highlight {
border: 2px dashed #d3d3d3; /* override to show dashed border when dragging */
}
#gallery {
float: left;
width: 75%;
min-height: 12em;
}
.gallery.custom-state-active {
background: #eee;
}
.gallery li {
list-style: none;
float: left;
width: 96px;
padding: 0.4em;
margin: 0 0.4em 0.4em 0;
text-align: center;
}
.gallery li h5 {
margin: 0 0 0.4em;
cursor: move;
}
.gallery li a {
float: right;
}
.gallery li a.ui-icon-zoomin {
float: left;
}
.gallery li img {
width: 100%;
cursor: move;
}
#dashboard {
float: left;
width: 45%;
height:500px;
padding: 1%;
}
#dashboard h4 {
line-height: 25px;
margin: 0 0 0.4em;
}
#dashboard h4 .ui-icon {
float: left;
}
#dashboard .gallery h5 {
display: none;
}
The JavaScript to create drag/drop areas :
<script>
$(function () {
// there's the gallery and the dashboard
var $gallery = $("#gallery"),
$dashboard = $("#dashboard");
// let the gallery items be draggable
$("li", $gallery).draggable({
cancel: "a.ui-icon", // clicking an icon won't initiate dragging
revert: "invalid", // when not dropped, the item will revert back to its initial position
containment: "document",
helper: "clone",
cursor: "move"
});
// let the dashboard be droppable, accepting the gallery items
$dashboard.droppable({
accept: "#gallery > li",
activeClass: "ui-state-highlight",
drop: function (event, ui) {
debugger;
deleteImage(ui.draggable);
}
});
// let the gallery be droppable as well, accepting items from the dashboard
$gallery.droppable({
accept: "#dashboard li",
activeClass: "custom-state-active",
drop: function (event, ui) {
recycleImage(ui.draggable);
}
});
// image deletion function
var recycle_icon = "<a href='link/to/recycle/script/when/we/have/js/off' title='Remove gadget' class='ui-icon ui-icon-minus'></a>";
function deleteImage($item) {
$item.fadeOut(function () {
var $list = $("ul", $dashboard).length ?
$("ul", $dashboard) :
$("<ul class='gallery ui-helper-reset'/>").appendTo($dashboard);
//$item.find("a.ui-icon-dashboard").remove(); // DO NOT REMOVE ORIGINAL WIDGET ICON - 11/19/2014 BM:
$item.append(recycle_icon).appendTo($list).fadeIn(function () {
//$item.animate({ width: "48px" }).find("img").animate({ height: "36px" });
$item.animate().find("img").animate();
});
});
}
// image recycle function
var dashboard_icon = "<a href='link/to/dashboard/script/when/we/have/js/off' title='Add this gadget' class='ui-icon ui-icon-plus'</a>";
function recycleImage($item) {
$item.fadeOut(function () {
$item
.find("a.ui-icon-refresh")
.remove()
.end()
.css("width", "96px")
.append(dashboard_icon)
.find("img")
.css("height", "72px")
.end()
.appendTo($gallery)
.fadeIn();
});
}
// image preview function, demonstrating the ui.dialog used as a modal window
function viewLargerImage($link) {
var src = $link.attr("href"),
title = $link.siblings("img").attr("alt"),
$modal = $("img[src$='" + src + "']");
if ($modal.length) {
$modal.dialog("open");
} else {
var img = $("<img alt='" + title + "' width='384' height='288' style='display: none; padding: 8px;' />")
.attr("src", src).appendTo("body");
setTimeout(function () {
img.dialog({
title: title,
width: 400,
modal: true
});
}, 1);
}
}
// resolve the icons behavior with event delegation
$("ul.gallery > li").click(function (event) {
var $item = $(this),
$target = $(event.target);
if ($target.is("a.ui-icon-dashboard")) {
deleteImage($item);
} else if ($target.is("a.ui-icon-zoomin")) {
viewLargerImage($target);
} else if ($target.is("a.ui-icon-refresh")) {
recycleImage($item);
}
return false;
});
});
I found the problem you describe (but i did not found a relation with the Bootstrap Grid Classes).
For my the problem seems to be related to the z-index and can be solved by adding the following style rules at the end of your CSS code:
.ui-draggable-handle {
z-index: 1;
}

Resources