*/
updateCalendarList: function()
{
- var my = 0, shared = 0, ext = $H(), extNames = $H(),
- remote, holidays, api, div;
+ var ext = $H(), extNames = $H();
$H(Kronolith.conf.calendars.internal).each(function(cal) {
- if (cal.value.owner) {
- my++;
- } else {
- shared++;
- }
this.insertCalendarInList('internal', cal.key, cal.value);
}, this);
- if (my) {
- $('kronolithMyCalendars').show();
- } else {
- $('kronolithMyCalendars').hide();
- }
- if (shared) {
- $('kronolithSharedCalendars').show();
- } else {
- $('kronolithSharedCalendars').hide();
- }
if (Kronolith.conf.tasks) {
- my = 0;
- shared = 0;
$H(Kronolith.conf.calendars.tasklists).each(function(cal) {
- if (cal.value.owner) {
- my++;
- } else {
- shared++;
- }
this.insertCalendarInList('tasklists', cal.key, cal.value);
}, this);
- if (my) {
- $('kronolithMyTasklists').show();
- } else {
- $('kronolithMyTasklists').hide();
- }
- if (shared) {
- $('kronolithSharedTasklists').show();
- } else {
- $('kronolithSharedTasklists').hide();
- }
}
$H(Kronolith.conf.calendars.external).each(function(cal) {
}, this);
}, this);
- remote = $H(Kronolith.conf.calendars.remote);
- remote.each(function(cal) {
+ $H(Kronolith.conf.calendars.remote).each(function(cal) {
this.insertCalendarInList('remote', cal.key, cal.value);
}, this);
- if (remote.size()) {
- $('kronolithRemoteCalendars').show();
- } else {
- $('kronolithRemoteCalendars').hide();
- }
- holidays = $H(Kronolith.conf.calendars.holiday);
- holidays.each(function(cal) {
+ $H(Kronolith.conf.calendars.holiday).each(function(cal) {
this.insertCalendarInList('holiday', cal.key, cal.value);
}, this);
- if (holidays.size()) {
- $('kronolithHolidayCalendars').show();
- } else {
- $('kronolithHolidayCalendars').hide();
- }
},
/**
<span><?php echo _("My Calendars") ?></span>
</h3>
- <div id="kronolithMyCalendars" class="kronolithCalendars" style="display:none">
+ <div id="kronolithMyCalendars" class="kronolithCalendars">
</div>
<?php if ($GLOBALS['registry']->hasInterface('tasks')): ?>
<span><?php echo _("My Task Lists") ?></span>
</h3>
- <div id="kronolithMyTasklists" class="kronolithCalendars" style="display:none">
+ <div id="kronolithMyTasklists" class="kronolithCalendars">
</div>
<?php endif; ?>
</h3>
<div class="kronolithDialogInfo"><?php echo _("No items to display") ?></div>
- <div id="kronolithSharedCalendars" class="kronolithCalendars" style="display:none">
+ <div id="kronolithSharedCalendars" class="kronolithCalendars">
</div>
<?php if ($GLOBALS['registry']->hasInterface('tasks')): ?>
</h3>
<div class="kronolithDialogInfo"><?php echo _("No items to display") ?></div>
- <div id="kronolithSharedTasklists" class="kronolithCalendars" style="display:none">
+ <div id="kronolithSharedTasklists" class="kronolithCalendars">
</div>
<?php endif; ?>
</h3>
<div class="kronolithDialogInfo"><?php echo _("No items to display") ?></div>
- <div id="kronolithRemoteCalendars" class="kronolithCalendars" style="display:none">
+ <div id="kronolithRemoteCalendars" class="kronolithCalendars">
</div>
<h3>
<span><?php echo _("Holidays") ?></span>
</h3>
- <div id="kronolithHolidayCalendars" class="kronolithCalendars" style="display:none">
+ <div id="kronolithHolidayCalendars" class="kronolithCalendars">
</div>
</div>