Fixed backward compatibility for custom menus where the hovering wouldn't be the default behavior (fixes #1293)

This commit is contained in:
Djamil Legato
2016-05-19 10:53:53 -07:00
parent ef69ed3ea8
commit aeec19f349
4 changed files with 53 additions and 53 deletions
+1
View File
@@ -4,6 +4,7 @@
1. [Common](#common)
3. [](#bugfix)
- Fixed `Warning: Zend OPcache API is restricted by "restrict_api" configuration directive`
- Fixed backward compatibility for custom menus where the hovering wouldn't be the default behavior (#1293)
2. [Joomla](#joomla)
3. [](#bugfix)
- Fixed media manager not rendering correctly in frontend editor (#986)
+3 -2
View File
@@ -48,10 +48,11 @@ var Menu = new prime({
this.active = null;
this.location = [];
var mainContainer = $(this.selectors.mainContainer);
var mainContainer = $(this.selectors.mainContainer),
gHoverExpand = mainContainer.data('g-hover-expand');
if (!mainContainer) { return; }
this.hoverExpand = mainContainer.data('g-hover-expand') === 'true';
this.hoverExpand = gHoverExpand === null || gHoverExpand === 'true';
if (hasTouchEvents || !this.hoverExpand) {
mainContainer.addClass(this.states.touchEvents);
}
+3 -2
View File
@@ -73,10 +73,11 @@ var Menu = new prime({
this.active = null;
this.location = [];
var mainContainer = $(this.selectors.mainContainer);
var mainContainer = $(this.selectors.mainContainer),
gHoverExpand = mainContainer.data('g-hover-expand');
if (!mainContainer) { return; }
this.hoverExpand = mainContainer.data('g-hover-expand') === 'true';
this.hoverExpand = gHoverExpand === null || gHoverExpand === 'true';
if (hasTouchEvents || !this.hoverExpand) {
mainContainer.addClass(this.states.touchEvents);
}
+2 -5
View File
@@ -27276,8 +27276,6 @@ module.exports = parse
moved = true;
_dispatchEvent(this, rootEl, 'over', dragEl, rootEl, evt, evt.target);
if (activeGroup && !options.disabled &&
(isOwner
? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
@@ -27504,7 +27502,6 @@ module.exports = parse
newIndex = oldIndex;
}
this.originalEvent = evt;
_dispatchEvent(this, rootEl, 'end', dragEl, rootEl, oldIndex, newIndex);
// Save sorting
@@ -27843,7 +27840,7 @@ module.exports = parse
var lastEl = el.lastElementChild,
rect = lastEl.getBoundingClientRect();
return ((evt.clientY - (rect.top + rect.height) > 5) || (evt.clientX - rect.right > 5)) && lastEl; // min delta
return ((evt.clientY - (rect.top + rect.height) > 5) || (evt.clientX - (rect.right + rect.width) > 5)) && lastEl; // min delta
}
@@ -27948,7 +27945,7 @@ module.exports = parse
// Export
Sortable.version = '1.3.0';
Sortable.version = '1.4.2';
return Sortable;
});