Commit 574d6e8e by Don Mitchell

Simple zIndex rather than fancy stack works best.

parent 63d269ac
......@@ -87,7 +87,7 @@ $(document).ready(function() {
$('.unit').draggable({
axis: 'y',
handle: '.drag-handle',
stack: '.unit, .id-holder',
zIndex: 999,
start: initiateHesitate,
drag: checkHoverState,
stop: removeHesitate,
......@@ -98,7 +98,7 @@ $(document).ready(function() {
$('.id-holder').draggable({
axis: 'y',
handle: '.section-item .drag-handle',
stack: '.id-holder',
zIndex: 999,
start: initiateHesitate,
drag: checkHoverState,
stop: removeHesitate,
......@@ -339,7 +339,7 @@ function removeHesitate(event, ui) {
function expandSection(event) {
$(event.delegateTarget).removeClass('collapsed', 400);
// don't descend to icon's on children (which aren't under first child) only to this element's icon
$(event.delegateTarget).children().first().find('.expand-collapse-icon').removeClass('expand', 400).addClass('collapse', 400);
$(event.delegateTarget).children().first().find('.expand-collapse-icon').removeClass('expand', 400).addClass('collapse');
}
function onUnitReordered(event, ui) {
......
......@@ -18,7 +18,7 @@ CMS.HesitateEvent = function(executeOnTimeOut, cancelSelector, onlyOnce) {
this.timeoutEventId = null;
this.originalEvent = null;
this.onlyOnce = (onlyOnce === true);
}
};
CMS.HesitateEvent.DURATION = 800;
......@@ -28,17 +28,16 @@ CMS.HesitateEvent.prototype.trigger = function(event) {
function() { event.data.fireEvent(event); },
CMS.HesitateEvent.DURATION);
event.data.originalEvent = event;
// is it wrong to bind to the below v $(event.currentTarget)?
$(event.data.originalEvent.delegateTarget).on(event.data.cancelSelector, event.data, event.data.untrigger);
}
}
};
CMS.HesitateEvent.prototype.fireEvent = function(event) {
event.data.timeoutEventId = null;
$(event.data.originalEvent.delegateTarget).off(event.data.cancelSelector, event.data.untrigger);
if (event.data.onlyOnce) $(event.data.originalEvent.delegateTarget).off(event.data.originalEvent.type, event.data.trigger);
event.data.executeOnTimeOut(event.data.originalEvent);
}
};
CMS.HesitateEvent.prototype.untrigger = function(event) {
if (event.data.timeoutEventId) {
......@@ -46,4 +45,4 @@ CMS.HesitateEvent.prototype.untrigger = function(event) {
$(event.data.originalEvent.delegateTarget).off(event.data.cancelSelector, event.data.untrigger);
}
event.data.timeoutEventId = null;
}
\ No newline at end of file
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment