Merge branch 'MDL-47739-master' of git://github.com/FMCorz/moodle

This commit is contained in:
Sam Hemelryk 2014-10-21 14:44:01 +13:00
commit 7a126c94a4
4 changed files with 11 additions and 8 deletions

View File

@ -320,13 +320,14 @@ CALENDAR.prototype = {
M.form.dateselector.calendar.on('selectionChange', this.set_selects_from_date, this, true);
},
release_calendar: function(e) {
var wasOwner = M.form.dateselector.currentowner === this;
M.form.dateselector.panel.hide();
M.form.dateselector.calendar.detach('selectionChange', this.set_selects_from_date);
M.form.dateselector.calendar.hide();
M.form.dateselector.currentowner = null;
// Put the focus back to the image calendar that we clicked.
if (e === null || typeof e === "undefined" || e.type !== "click") {
// Put the focus back to the image calendar that we clicked, only if it was visible.
if (wasOwner && (e === null || typeof e === "undefined" || e.type !== "click")) {
this.calendarimage.focus();
}
},

File diff suppressed because one or more lines are too long

View File

@ -320,13 +320,14 @@ CALENDAR.prototype = {
M.form.dateselector.calendar.on('selectionChange', this.set_selects_from_date, this, true);
},
release_calendar: function(e) {
var wasOwner = M.form.dateselector.currentowner === this;
M.form.dateselector.panel.hide();
M.form.dateselector.calendar.detach('selectionChange', this.set_selects_from_date);
M.form.dateselector.calendar.hide();
M.form.dateselector.currentowner = null;
// Put the focus back to the image calendar that we clicked.
if (e === null || typeof e === "undefined" || e.type !== "click") {
// Put the focus back to the image calendar that we clicked, only if it was visible.
if (wasOwner && (e === null || typeof e === "undefined" || e.type !== "click")) {
this.calendarimage.focus();
}
},

View File

@ -140,13 +140,14 @@ CALENDAR.prototype = {
M.form.dateselector.calendar.on('selectionChange', this.set_selects_from_date, this, true);
},
release_calendar: function(e) {
var wasOwner = M.form.dateselector.currentowner === this;
M.form.dateselector.panel.hide();
M.form.dateselector.calendar.detach('selectionChange', this.set_selects_from_date);
M.form.dateselector.calendar.hide();
M.form.dateselector.currentowner = null;
// Put the focus back to the image calendar that we clicked.
if (e === null || typeof e === "undefined" || e.type !== "click") {
// Put the focus back to the image calendar that we clicked, only if it was visible.
if (wasOwner && (e === null || typeof e === "undefined" || e.type !== "click")) {
this.calendarimage.focus();
}
},