Merge branch 'MDL-45226-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Dan Poltawski 2014-04-23 10:39:26 +08:00
commit 98bb800209
7 changed files with 14 additions and 8 deletions

View File

@ -359,8 +359,10 @@ $CFG->yui3version = '3.15.0';
// If we need to patch a YUI modules between official YUI releases, the yuipatchlevel will need to be manually
// incremented here. The module will also need to be listed in the yuipatchedmodules.
// When upgrading to a subsequent version of YUI, these should be reset back to 0 and an empty array.
$CFG->yuipatchlevel = 0;
$CFG->yuipatchlevel = 1;
$CFG->yuipatchedmodules = array(
'dd-drag',
'dd-gestures',
);
// Store settings from config.php in array in $CFG - we can use it later to detect problems and overrides.

View File

@ -765,6 +765,9 @@ YUI.add('dd-drag', function (Y, NAME) {
* @param {EventFacade} ev The Event
*/
_handleMouseDownEvent: function(ev) {
if (this.validClick(ev)) {
ev.preventDefault();
}
this.fire(EV_MOUSE_DOWN, { ev: ev });
},
/**

File diff suppressed because one or more lines are too long

View File

@ -764,6 +764,9 @@ YUI.add('dd-drag', function (Y, NAME) {
* @param {EventFacade} ev The Event
*/
_handleMouseDownEvent: function(ev) {
if (this.validClick(ev)) {
ev.preventDefault();
}
this.fire(EV_MOUSE_DOWN, { ev: ev });
},
/**

View File

@ -54,8 +54,7 @@ YUI.add('dd-gestures', function (Y, NAME) {
this._createPG();
this._active = true;
Y.one(Y.config.doc).on('gesturemove', Y.throttle(Y.bind(DDM._move, DDM), DDM.get('throttleTime')), {
standAlone: true,
preventDefault: true
standAlone: true
});
};

View File

@ -5,4 +5,4 @@ Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("dd-gestures",function(e,t){e.DD.Drag.START_EVENT="gesturemovestart",e.DD.Drag.prototype._prep=function(){this._dragThreshMet=!1;var t=this.get("node"),n=e.DD.DDM;t.addClass(n.CSS_PREFIX+"-draggable"),t.on(e.DD.Drag.START_EVENT,e.bind(this._handleMouseDownEvent,this),{minDistance:this.get("clickPixelThresh"),minTime:this.get("clickTimeThresh")}),t.on("gesturemoveend",e.bind(this._handleMouseUp,this),{standAlone:!0}),t.on("dragstart",e.bind(this._fixDragStart,this))};var n=e.DD.Drag.prototype._unprep;e.DD.Drag.prototype._unprep=function(){var e=this.get("node");n.call(this),e.detachAll("gesturemoveend")},e.DD.DDM._setupListeners=function(){var t=e.DD.DDM;this._createPG(),this._active=!0,e.one(e.config.doc).on("gesturemove",e.throttle(e.bind(t._move,t),t.get("throttleTime")),{standAlone:!0,preventDefault:!0})}},"3.15.0",{requires:["dd-drag","event-synthetic","event-gestures"]});
YUI.add("dd-gestures",function(e,t){e.DD.Drag.START_EVENT="gesturemovestart",e.DD.Drag.prototype._prep=function(){this._dragThreshMet=!1;var t=this.get("node"),n=e.DD.DDM;t.addClass(n.CSS_PREFIX+"-draggable"),t.on(e.DD.Drag.START_EVENT,e.bind(this._handleMouseDownEvent,this),{minDistance:this.get("clickPixelThresh"),minTime:this.get("clickTimeThresh")}),t.on("gesturemoveend",e.bind(this._handleMouseUp,this),{standAlone:!0}),t.on("dragstart",e.bind(this._fixDragStart,this))};var n=e.DD.Drag.prototype._unprep;e.DD.Drag.prototype._unprep=function(){var e=this.get("node");n.call(this),e.detachAll("gesturemoveend")},e.DD.DDM._setupListeners=function(){var t=e.DD.DDM;this._createPG(),this._active=!0,e.one(e.config.doc).on("gesturemove",e.throttle(e.bind(t._move,t),t.get("throttleTime")),{standAlone:!0})}},"3.15.0",{requires:["dd-drag","event-synthetic","event-gestures"]});

View File

@ -52,8 +52,7 @@ YUI.add('dd-gestures', function (Y, NAME) {
this._createPG();
this._active = true;
Y.one(Y.config.doc).on('gesturemove', Y.throttle(Y.bind(DDM._move, DDM), DDM.get('throttleTime')), {
standAlone: true,
preventDefault: true
standAlone: true
});
};