Browse Source

Fix some eslint warnings.

MOODLE_34_STABLE
Dan Marsden 8 years ago
parent
commit
eb2065d752
  1. 11
      calendar.js

11
calendar.js

@ -13,12 +13,17 @@ YUI().use('yui2-container', 'yui2-calendar', function(Y) {
var showBtn = Dom.get("show"); var showBtn = Dom.get("show");
Event.on(showBtn, "click", function() { Event.on(showBtn, "click", function() {
/**
* Reset handler and set current day.
*/
function resetHandler() { function resetHandler() {
calendar.cfg.setProperty("pagedate", calendar.today); calendar.cfg.setProperty("pagedate", calendar.today);
calendar.render(); calendar.render();
} }
/**
* Close dialog.
*/
function closeHandler() { function closeHandler() {
dialog.hide(); dialog.hide();
} }
@ -39,8 +44,8 @@ YUI().use('yui2-container', 'yui2-calendar', function(Y) {
dialog = new YAHOO.widget.Dialog("attcalendarcontainer", { dialog = new YAHOO.widget.Dialog("attcalendarcontainer", {
visible: false, visible: false,
context: ["show", "tl", "bl"], context: ["show", "tl", "bl"],
buttons: [{text: M.str.attendance.caltoday, handler: resetHandler, isDefault: true}, buttons: [{text: M.util.get_string('caltoday', 'attendance'), handler: resetHandler, isDefault: true},
{text: M.str.attendance.calclose, handler: closeHandler}], {text: M.util.get_string('calclose', 'attendance'), handler: closeHandler}],
draggable: false, draggable: false,
close: false close: false
}); });

Loading…
Cancel
Save