Merge branch 'MDL-44855-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE
This commit is contained in:
@@ -158,8 +158,9 @@ ALERT = function(config) {
|
||||
ALERT.superclass.constructor.apply(this, [config]);
|
||||
};
|
||||
Y.extend(ALERT, DIALOGUE, {
|
||||
closeEvents: [],
|
||||
_closeEvents: null,
|
||||
initializer : function() {
|
||||
this._closeEvents = [];
|
||||
this.publish('complete');
|
||||
var yes = Y.Node.create('<input type="button" id="id_yuialertconfirm-' + this.get('COUNT') + '" value="'+this.get(CONFIRMYES)+'" />'),
|
||||
content = Y.Node.create('<div class="confirmation-dialogue"></div>')
|
||||
@@ -171,7 +172,7 @@ Y.extend(ALERT, DIALOGUE, {
|
||||
this.setStdModContent(Y.WidgetStdMod.HEADER, '<h1 id="moodle-dialogue-'+this.get('COUNT')+'-header-text">'
|
||||
+ this.get(TITLE) + '</h1>', Y.WidgetStdMod.REPLACE);
|
||||
this.after('destroyedChange', function(){this.get(BASE).remove();}, this);
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
Y.on('key', this.submit, window, 'down:13', this),
|
||||
yes.on('click', this.submit, this)
|
||||
);
|
||||
@@ -179,13 +180,13 @@ Y.extend(ALERT, DIALOGUE, {
|
||||
var closeButton = this.get('boundingBox').one('.closebutton');
|
||||
if (closeButton) {
|
||||
// The close button should act exactly like the 'No' button.
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
closeButton.on('click', this.submit, this)
|
||||
);
|
||||
}
|
||||
},
|
||||
submit : function() {
|
||||
new Y.EventHandle(this.closeEvents).detach();
|
||||
new Y.EventHandle(this._closeEvents).detach();
|
||||
this.fire('complete');
|
||||
this.hide();
|
||||
this.destroy();
|
||||
@@ -219,8 +220,9 @@ CONFIRM = function(config) {
|
||||
CONFIRM.superclass.constructor.apply(this, [config]);
|
||||
};
|
||||
Y.extend(CONFIRM, DIALOGUE, {
|
||||
closeEvents: [],
|
||||
_closeEvents: null,
|
||||
initializer : function() {
|
||||
this._closeEvents = [];
|
||||
this.publish('complete');
|
||||
this.publish('complete-yes');
|
||||
this.publish('complete-no');
|
||||
@@ -237,7 +239,7 @@ Y.extend(CONFIRM, DIALOGUE, {
|
||||
+ this.get(TITLE) + '</h1>', Y.WidgetStdMod.REPLACE);
|
||||
this.after('destroyedChange', function(){this.get(BASE).remove();}, this);
|
||||
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
Y.on('key', this.submit, window, 'down:27', this, false),
|
||||
yes.on('click', this.submit, this, true),
|
||||
no.on('click', this.submit, this, false)
|
||||
@@ -246,13 +248,13 @@ Y.extend(CONFIRM, DIALOGUE, {
|
||||
var closeButton = this.get('boundingBox').one('.closebutton');
|
||||
if (closeButton) {
|
||||
// The close button should act exactly like the 'No' button.
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
closeButton.on('click', this.submit, this)
|
||||
);
|
||||
}
|
||||
},
|
||||
submit : function(e, outcome) {
|
||||
new Y.EventHandle(this.closeEvents).detach();
|
||||
new Y.EventHandle(this._closeEvents).detach();
|
||||
this.fire('complete', outcome);
|
||||
if (outcome) {
|
||||
this.fire('complete-yes');
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -158,8 +158,9 @@ ALERT = function(config) {
|
||||
ALERT.superclass.constructor.apply(this, [config]);
|
||||
};
|
||||
Y.extend(ALERT, DIALOGUE, {
|
||||
closeEvents: [],
|
||||
_closeEvents: null,
|
||||
initializer : function() {
|
||||
this._closeEvents = [];
|
||||
this.publish('complete');
|
||||
var yes = Y.Node.create('<input type="button" id="id_yuialertconfirm-' + this.get('COUNT') + '" value="'+this.get(CONFIRMYES)+'" />'),
|
||||
content = Y.Node.create('<div class="confirmation-dialogue"></div>')
|
||||
@@ -171,7 +172,7 @@ Y.extend(ALERT, DIALOGUE, {
|
||||
this.setStdModContent(Y.WidgetStdMod.HEADER, '<h1 id="moodle-dialogue-'+this.get('COUNT')+'-header-text">'
|
||||
+ this.get(TITLE) + '</h1>', Y.WidgetStdMod.REPLACE);
|
||||
this.after('destroyedChange', function(){this.get(BASE).remove();}, this);
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
Y.on('key', this.submit, window, 'down:13', this),
|
||||
yes.on('click', this.submit, this)
|
||||
);
|
||||
@@ -179,13 +180,13 @@ Y.extend(ALERT, DIALOGUE, {
|
||||
var closeButton = this.get('boundingBox').one('.closebutton');
|
||||
if (closeButton) {
|
||||
// The close button should act exactly like the 'No' button.
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
closeButton.on('click', this.submit, this)
|
||||
);
|
||||
}
|
||||
},
|
||||
submit : function() {
|
||||
new Y.EventHandle(this.closeEvents).detach();
|
||||
new Y.EventHandle(this._closeEvents).detach();
|
||||
this.fire('complete');
|
||||
this.hide();
|
||||
this.destroy();
|
||||
@@ -219,8 +220,9 @@ CONFIRM = function(config) {
|
||||
CONFIRM.superclass.constructor.apply(this, [config]);
|
||||
};
|
||||
Y.extend(CONFIRM, DIALOGUE, {
|
||||
closeEvents: [],
|
||||
_closeEvents: null,
|
||||
initializer : function() {
|
||||
this._closeEvents = [];
|
||||
this.publish('complete');
|
||||
this.publish('complete-yes');
|
||||
this.publish('complete-no');
|
||||
@@ -237,7 +239,7 @@ Y.extend(CONFIRM, DIALOGUE, {
|
||||
+ this.get(TITLE) + '</h1>', Y.WidgetStdMod.REPLACE);
|
||||
this.after('destroyedChange', function(){this.get(BASE).remove();}, this);
|
||||
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
Y.on('key', this.submit, window, 'down:27', this, false),
|
||||
yes.on('click', this.submit, this, true),
|
||||
no.on('click', this.submit, this, false)
|
||||
@@ -246,13 +248,13 @@ Y.extend(CONFIRM, DIALOGUE, {
|
||||
var closeButton = this.get('boundingBox').one('.closebutton');
|
||||
if (closeButton) {
|
||||
// The close button should act exactly like the 'No' button.
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
closeButton.on('click', this.submit, this)
|
||||
);
|
||||
}
|
||||
},
|
||||
submit : function(e, outcome) {
|
||||
new Y.EventHandle(this.closeEvents).detach();
|
||||
new Y.EventHandle(this._closeEvents).detach();
|
||||
this.fire('complete', outcome);
|
||||
if (outcome) {
|
||||
this.fire('complete-yes');
|
||||
|
||||
+10
-8
@@ -156,8 +156,9 @@ ALERT = function(config) {
|
||||
ALERT.superclass.constructor.apply(this, [config]);
|
||||
};
|
||||
Y.extend(ALERT, DIALOGUE, {
|
||||
closeEvents: [],
|
||||
_closeEvents: null,
|
||||
initializer : function() {
|
||||
this._closeEvents = [];
|
||||
this.publish('complete');
|
||||
var yes = Y.Node.create('<input type="button" id="id_yuialertconfirm-' + this.get('COUNT') + '" value="'+this.get(CONFIRMYES)+'" />'),
|
||||
content = Y.Node.create('<div class="confirmation-dialogue"></div>')
|
||||
@@ -169,7 +170,7 @@ Y.extend(ALERT, DIALOGUE, {
|
||||
this.setStdModContent(Y.WidgetStdMod.HEADER, '<h1 id="moodle-dialogue-'+this.get('COUNT')+'-header-text">'
|
||||
+ this.get(TITLE) + '</h1>', Y.WidgetStdMod.REPLACE);
|
||||
this.after('destroyedChange', function(){this.get(BASE).remove();}, this);
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
Y.on('key', this.submit, window, 'down:13', this),
|
||||
yes.on('click', this.submit, this)
|
||||
);
|
||||
@@ -177,13 +178,13 @@ Y.extend(ALERT, DIALOGUE, {
|
||||
var closeButton = this.get('boundingBox').one('.closebutton');
|
||||
if (closeButton) {
|
||||
// The close button should act exactly like the 'No' button.
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
closeButton.on('click', this.submit, this)
|
||||
);
|
||||
}
|
||||
},
|
||||
submit : function() {
|
||||
new Y.EventHandle(this.closeEvents).detach();
|
||||
new Y.EventHandle(this._closeEvents).detach();
|
||||
this.fire('complete');
|
||||
this.hide();
|
||||
this.destroy();
|
||||
@@ -217,8 +218,9 @@ CONFIRM = function(config) {
|
||||
CONFIRM.superclass.constructor.apply(this, [config]);
|
||||
};
|
||||
Y.extend(CONFIRM, DIALOGUE, {
|
||||
closeEvents: [],
|
||||
_closeEvents: null,
|
||||
initializer : function() {
|
||||
this._closeEvents = [];
|
||||
this.publish('complete');
|
||||
this.publish('complete-yes');
|
||||
this.publish('complete-no');
|
||||
@@ -235,7 +237,7 @@ Y.extend(CONFIRM, DIALOGUE, {
|
||||
+ this.get(TITLE) + '</h1>', Y.WidgetStdMod.REPLACE);
|
||||
this.after('destroyedChange', function(){this.get(BASE).remove();}, this);
|
||||
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
Y.on('key', this.submit, window, 'down:27', this, false),
|
||||
yes.on('click', this.submit, this, true),
|
||||
no.on('click', this.submit, this, false)
|
||||
@@ -244,13 +246,13 @@ Y.extend(CONFIRM, DIALOGUE, {
|
||||
var closeButton = this.get('boundingBox').one('.closebutton');
|
||||
if (closeButton) {
|
||||
// The close button should act exactly like the 'No' button.
|
||||
this.closeEvents.push(
|
||||
this._closeEvents.push(
|
||||
closeButton.on('click', this.submit, this)
|
||||
);
|
||||
}
|
||||
},
|
||||
submit : function(e, outcome) {
|
||||
new Y.EventHandle(this.closeEvents).detach();
|
||||
new Y.EventHandle(this._closeEvents).detach();
|
||||
this.fire('complete', outcome);
|
||||
if (outcome) {
|
||||
this.fire('complete-yes');
|
||||
|
||||
Reference in New Issue
Block a user