|
@ -14,12 +14,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(); |
|
|
} |
|
|
} |
|
@ -40,8 +45,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 |
|
|
}); |
|
|
}); |
|
|