mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-74110 forms: disable calendar link when date selector disabled.
This commit is contained in:
parent
0d0f09bc7f
commit
ec89abc5bf
4 changed files with 16 additions and 16 deletions
|
@ -360,14 +360,14 @@ CALENDAR.prototype = {
|
|||
}
|
||||
},
|
||||
toggle_calendar_image: function() {
|
||||
// If the enable checkbox is det checked, disable the image.
|
||||
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
|
||||
if (!this.enablecheckbox.get('checked')) {
|
||||
this.calendarimage.set('disabled', 'disabled');
|
||||
this.calendarimage.setStyle('cursor', 'default');
|
||||
this.calendarimage.addClass('disabled');
|
||||
this.calendarimage.setAttribute('tabindex', -1);
|
||||
this.release_calendar();
|
||||
} else {
|
||||
this.calendarimage.set('disabled', false);
|
||||
this.calendarimage.setStyle('cursor', null);
|
||||
this.calendarimage.removeClass('disabled');
|
||||
this.calendarimage.setAttribute('tabindex', 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -360,14 +360,14 @@ CALENDAR.prototype = {
|
|||
}
|
||||
},
|
||||
toggle_calendar_image: function() {
|
||||
// If the enable checkbox is det checked, disable the image.
|
||||
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
|
||||
if (!this.enablecheckbox.get('checked')) {
|
||||
this.calendarimage.set('disabled', 'disabled');
|
||||
this.calendarimage.setStyle('cursor', 'default');
|
||||
this.calendarimage.addClass('disabled');
|
||||
this.calendarimage.setAttribute('tabindex', -1);
|
||||
this.release_calendar();
|
||||
} else {
|
||||
this.calendarimage.set('disabled', false);
|
||||
this.calendarimage.setStyle('cursor', null);
|
||||
this.calendarimage.removeClass('disabled');
|
||||
this.calendarimage.setAttribute('tabindex', 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
10
lib/form/yui/src/dateselector/js/calendar.js
vendored
10
lib/form/yui/src/dateselector/js/calendar.js
vendored
|
@ -152,14 +152,14 @@ CALENDAR.prototype = {
|
|||
}
|
||||
},
|
||||
toggle_calendar_image: function() {
|
||||
// If the enable checkbox is det checked, disable the image.
|
||||
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
|
||||
if (!this.enablecheckbox.get('checked')) {
|
||||
this.calendarimage.set('disabled', 'disabled');
|
||||
this.calendarimage.setStyle('cursor', 'default');
|
||||
this.calendarimage.addClass('disabled');
|
||||
this.calendarimage.setAttribute('tabindex', -1);
|
||||
this.release_calendar();
|
||||
} else {
|
||||
this.calendarimage.set('disabled', false);
|
||||
this.calendarimage.setStyle('cursor', null);
|
||||
this.calendarimage.removeClass('disabled');
|
||||
this.calendarimage.setAttribute('tabindex', 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue