Event.on(showBtn, "click", function() {
- // Lazy Dialog Creation - Wait to create the Dialog, and setup document click listeners, until the first time the button is clicked.
+ function resetHandler() {
+ calendar.cfg.setProperty("pagedate", calendar.today);
+ calendar.render();
+ }
+
+ function closeHandler() {
+ dialog.hide();
+ }
+
+ // Lazy Dialog Creation - Wait to create the Dialog, and setup document click listeners,
+ // until the first time the button is clicked.
if (!dialog) {
// Hide Calendar if we click anywhere in the document other than the calendar
}
});
- function resetHandler() {
- calendar.cfg.setProperty("pagedate", calendar.today);
- calendar.render();
- }
-
- function closeHandler() {
- dialog.hide();
- }
-
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.str.attendance.caltoday, handler: resetHandler, isDefault:true},
+ {text: M.str.attendance.calclose, handler: closeHandler}],
draggable:false,
close:false
});
-M.mod_attendance = {}
+M.mod_attendance = {};
M.mod_attendance.init_manage = function(Y) {
Y.on('click', function(e) {
if (e.target.get('checked')) {
- checkall();
+ Y.all('input.attendancesesscheckbox').each(function() {
+ this.set('checked', 'checked');
+ });
} else {
- checknone();
+ Y.all('input.attendancesesscheckbox').each(function() {
+ this.set('checked', '');
+ });
}
}, '#cb_selector' );
};
$table->data[$sess->id][] = $dta['time'];
$table->data[$sess->id][] = $sess->description;
$table->data[$sess->id][] = $dta['actions'];
- $table->data[$sess->id][] = html_writer::checkbox('sessid[]', $sess->id, false);
+ $table->data[$sess->id][] = html_writer::checkbox('sessid[]', $sess->id, false, '', array('class' => 'attendancesesscheckbox'));
}
return html_writer::table($table);