}, this);
$H(Kronolith.conf.calendars.holiday).each(function(cal) {
- this.insertCalendarInList('holiday', cal.key, cal.value);
+ if (cal.value.show) {
+ this.insertCalendarInList('holiday', cal.key, cal.value);
+ }
}, this);
},
$('kronolithCalendarremoteId').setValue(calendar);
}
break;
+ case 'holiday':
+ $('kronolithCalendarholidayDriver').update();
+ $H(Kronolith.conf.calendars.holiday).each(function(calendar) {
+ calendar = calendar.value;
+ if (calendar.show) {
+ return;
+ }
+ $('kronolithCalendarholidayDriver').insert(
+ new Element('option', { value: calendar.name })
+ .setStyle({ color: calendar.fg, backgroundColor: calendar.bg })
+ .insert(calendar.name)
+ );
+ });
+ break;
}
$('kronolithCalendar' + type + 'Id').clear();
var color = '#', i;
this.colorPicker.hide();
}
var data = form.serialize({ hash: true });
+
+ if (data.type == 'holiday') {
+ this.insertCalendarInList('holiday', data.driver, Kronolith.conf.calendars.holiday[data.driver]);
+ this.toggleCalendar('holiday', data.driver);
+ form.down('.kronolithCalendarSave').enable();
+ this.closeRedBox();
+ this.go(this.lastLocation);
+ return;
+ }
+
if (data.name.empty()) {
this.showNotifications([ { type: 'horde.warning', message: data.type == 'tasklists' ? Kronolith.text.no_tasklist_title : Kronolith.text.no_calendar_title }]);
$('kronolithCalendar' + data.type + 'Name').focus();
</form>
+<?php if (!empty($GLOBALS['conf']['holidays']['enable']) && class_exists('Date_Holidays')): ?>
+<form id="kronolithCalendarFormholiday" action="">
+<input type="hidden" name="type" value="holiday" />
+<input id="kronolithCalendarholidayId" type="hidden" name="calendar" />
+<input id="kronolithCalendarholidayColor" type="hidden" name="color" />
+<input class="kronolithColorPicker" type="hidden" />
+
+<div class="kronolithCalendarDiv" id="kronolithCalendarholiday1">
+<div>
+ <label><?php echo _("Holidays") ?>:<br />
+ <select id="kronolithCalendarholidayDriver" name="driver">
+ </select>
+ </label>
+</div>
+
+<div class="kronolithFormActions">
+ <input type="button" value="<?php echo _("Save") ?>" class="kronolithCalendarSave button ok" />
+ <input type="button" value="<?php echo _("Delete") ?>" class="kronolithCalendarDelete button ko" />
+ <span class="kronolithSeparator"><?php echo _("or") ?></span> <a class="kronolithFormCancel"><?php echo _("Cancel") ?></a>
+</div>
+</div>
+
+</form>
+<?php endif ?>
+
</div>