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