summaryrefslogtreecommitdiff
path: root/plugins/calendar
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-11 11:34:38 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-11 11:34:38 (GMT)
commit2ad5eeb5707c7fc486c5d72251cdd26882796031 (patch)
tree8063cc27306fb81f36d4fc8911833903421e0efe /plugins/calendar
parent6f97b9ff71fb384e19572bd7403e7d391e4e319f (diff)
downloadroundcubemail-plugins-kolab-2ad5eeb5707c7fc486c5d72251cdd26882796031.tar.gz
Fix JS syntax to be compliant with IE < 9 (new is a reserved word)
Diffstat (limited to 'plugins/calendar')
-rw-r--r--plugins/calendar/calendar_ui.js36
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 9dd4014..f3f41dd 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -1162,8 +1162,8 @@ function rcube_calendar_ui(settings)
// special case: title
if (prop == 'title') {
- $('.event-title', $dialog).addClass('event-text-old').text(change.old || '--');
- $('.event-title-new', $dialog).text(change.new || '--').show();
+ $('.event-title', $dialog).addClass('event-text-old').text(change['old'] || '--');
+ $('.event-title-new', $dialog).text(change['new'] || '--').show();
}
// no display container for this property
@@ -1179,40 +1179,40 @@ function rcube_calendar_ui(settings)
// format dates
if (['start','end','changed'].indexOf(prop) >= 0) {
- if (change.old) change.old_ = me.format_datetime(parseISO8601(change.old));
- if (change.new) change.new_ = me.format_datetime(parseISO8601(change.new));
+ if (change['old']) change.old_ = me.format_datetime(parseISO8601(change['old']));
+ if (change['new']) change.new_ = me.format_datetime(parseISO8601(change['new']));
}
// render description text
else if (prop == 'description') {
// TODO: show real text diff
- if (!change.diff_ && change.old) change.old_ = text2html(change.old);
- if (!change.diff_ && change.new) change.new_ = text2html(change.new);
+ if (!change.diff_ && change['old']) change.old_ = text2html(change['old']);
+ if (!change.diff_ && change['new']) change.new_ = text2html(change['new']);
html = true;
}
// format attendees struct
else if (prop == 'attendees') {
- if (change.old) change.old_ = event_attendee_html(change.old);
- if (change.new) change.new_ = event_attendee_html($.extend({}, change.old || {}, change.new));
+ if (change['old']) change.old_ = event_attendee_html(change['old']);
+ if (change['new']) change.new_ = event_attendee_html($.extend({}, change['old'] || {}, change['new']));
html = true;
}
// localize priority values
else if (prop == 'priority') {
var priolabels = [ '', rcmail.gettext('highest'), rcmail.gettext('high'), '', '', rcmail.gettext('normal'), '', '', rcmail.gettext('low'), rcmail.gettext('lowest') ];
- if (change.old) change.old_ = change.old + ' ' + (priolabels[change.old] || '');
- if (change.new) change.new_ = change.new + ' ' + (priolabels[change.new] || '');
+ if (change['old']) change.old_ = change['old'] + ' ' + (priolabels[change['old']] || '');
+ if (change['new']) change.new_ = change['new'] + ' ' + (priolabels[change['new']] || '');
}
// localize status
else if (prop == 'status') {
var status_lc = String(event.status).toLowerCase();
- if (change.old) change.old_ = rcmail.gettext(String(change.old).toLowerCase(), 'calendar');
- if (change.new) change.new_ = rcmail.gettext(String(change.new).toLowerCase(), 'calendar');
+ if (change['old']) change.old_ = rcmail.gettext(String(change['old']).toLowerCase(), 'calendar');
+ if (change['new']) change.new_ = rcmail.gettext(String(change['new']).toLowerCase(), 'calendar');
}
// format attachments struct
if (prop == 'attachments') {
- if (change.old) event_show_attachments([change.old], row.children('.event-text-old'), event, false);
+ if (change['old']) event_show_attachments([change['old']], row.children('.event-text-old'), event, false);
else row.children('.event-text-old').text('--');
- if (change.new) event_show_attachments([$.extend({}, change.old || {}, change.new)], row.children('.event-text-new'), event, false);
+ if (change['new']) event_show_attachments([$.extend({}, change['old'] || {}, change['new'])], row.children('.event-text-new'), event, false);
else row.children('.event-text-new').text('--');
// remove click handler as we're currentyl not able to display the according attachment contents
$('.attachmentslist li a', row).unbind('click').removeAttr('href');
@@ -1224,11 +1224,11 @@ function rcube_calendar_ui(settings)
else {
if (!html) {
// escape HTML characters
- change.old_ = Q(change.old_ || change.old || '--')
- change.new_ = Q(change.new_ || change.new || '--')
+ change.old_ = Q(change.old_ || change['old'] || '--')
+ change.new_ = Q(change.new_ || change['new'] || '--')
}
- row.children('.event-text-old').html(change.old_ || change.old || '--');
- row.children('.event-text-new').html(change.new_ || change.new || '--');
+ row.children('.event-text-old').html(change.old_ || change['old'] || '--');
+ row.children('.event-text-new').html(change.new_ || change['new'] || '--');
}
// display index number