Skip to content

Commit

Permalink
Improve event form design.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jan 15, 2015
1 parent 8e97cb1 commit 1641f52
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 127 deletions.
18 changes: 9 additions & 9 deletions kronolith/js/kronolith.js
Expand Up @@ -3132,7 +3132,7 @@ KronolithCore = {
HordeImple.AutoCompleter.kronolithCalendarinternalTags.reset();
// Fall through.
case 'tasklists':
$('kronolithCalendar' + type + 'LinkExport').up('span').hide();
$('kronolithCalendar' + type + 'LinkExport').up('li').hide();
break;
case 'remote':
if (calendar) {
Expand Down Expand Up @@ -3185,7 +3185,7 @@ KronolithCore = {
case 'tasklists':
$('kronolithCalendar' + type + 'Description').setValue(info.desc);
if ($('kronolithCalendar' + type + 'LinkExport')) {
$('kronolithCalendar' + type + 'LinkExport').up('span').show();
$('kronolithCalendar' + type + 'LinkExport').up('li').show();
$('kronolithCalendar' + type + 'Export').href = type == 'internal'
? Kronolith.conf.URI_CALENDAR_EXPORT.interpolate({ calendar: calendar })
: Kronolith.conf.tasks.URI_TASKLIST_EXPORT.interpolate({ tasklist: calendar.substring(6) });
Expand Down Expand Up @@ -5697,7 +5697,7 @@ KronolithCore = {
this.duration = 60;
$('kronolithEventEndDate').setValue(d.toString(Kronolith.conf.date_format));
$('kronolithEventEndTime').setValue(d.toString(Kronolith.conf.time_format));
$('kronolithEventLinkExport').up('span').hide();
$('kronolithEventLinkExport').up('li').hide();
$('kronolithEventSaveAsNew').hide();
$('kronolithEventUrlDisplay').hide();
$('kronolithEventUrl').show();
Expand Down Expand Up @@ -5990,7 +5990,7 @@ KronolithCore = {
$('kronolithEventStatus').setValue(ev.x);
$('kronolithEventDescription').setValue(ev.d);
$('kronolithEventPrivate').setValue(ev.pv);
$('kronolithEventLinkExport').up('span').show();
$('kronolithEventLinkExport').up('li').show();
$('kronolithEventExport').href = Kronolith.conf.URI_EVENT_EXPORT.interpolate({ id: ev.id, calendar: ev.c, type: ev.ty });

/* Alarm */
Expand Down Expand Up @@ -6520,15 +6520,15 @@ KronolithCore = {
var prefix = 'kronolith' + (event ? 'Event' : 'Task');
if (recur == 'Exception') {
if (!$(prefix + 'RepeatException').visible()) {
$(prefix + 'TabRecur').select('div').invoke('hide');
$(prefix + 'TabRecur').select('p').invoke('hide');
$(prefix + 'RepeatException').show();
}
} else if (recur != 'None') {
var div = $(prefix + 'Repeat' + recur),
length = $(prefix + 'RepeatLength');
this.lastRecurType = recur;
if (!div.visible()) {
$(prefix + 'TabRecur').select('div').invoke('hide');
$(prefix + 'TabRecur').select('p').invoke('hide');
div.show();
length.show();
$(prefix + 'RepeatType').show();
Expand All @@ -6549,18 +6549,18 @@ KronolithCore = {

if (length.down('input[name=recur_end_type][value=date]').checked) {
$(prefix + 'RecurDate').enable();
$(prefix + 'RecurPicker').setStyle({ visibility: 'visible' });
$(prefix + 'RecurPicker').show()
} else {
$(prefix + 'RecurDate').disable();
$(prefix + 'RecurPicker').setStyle({ visibility: 'hidden' });
$(prefix + 'RecurPicker').hide()
}
if (length.down('input[name=recur_end_type][value=count]').checked) {
$(prefix + 'RecurCount').enable();
} else {
$(prefix + 'RecurCount').disable();
}
} else {
$(prefix + 'TabRecur').select('div').invoke('hide');
$(prefix + 'TabRecur').select('p').invoke('hide');
$(prefix + 'RepeatType').show();
}
},
Expand Down

0 comments on commit 1641f52

Please sign in to comment.