.insert(message)
.observe('click', function() { this.go(m.alarm.ajax); }.bind(this));
} else if (!Object.isUndefined(m.alarm.url)) {
- message = new Element('a', { 'href': m.alarm.url })
+ message = new Element('a', { href: m.alarm.url })
.insert(message);
}
message = new Element('div')
if (m.alarm.user) {
var select = new Element('select');
$H(Kronolith.conf.snooze).each(function(snooze) {
- select.insert(new Element('option', { 'value': snooze.key }).insert(snooze.value));
+ select.insert(new Element('option', { value: snooze.key }).insert(snooze.value));
});
message.insert(' ').insert(select);
}
if (select.getValue()) {
new Ajax.Request(
Kronolith.conf.URI_SNOOZE,
- { 'parameters': { 'alarm': m.alarm.id,
- 'snooze': select.getValue() },
- 'onSuccess': function() {
+ { parameters: { alarm: m.alarm.id,
+ snooze: select.getValue() },
+ onSuccess: function() {
this.Growler.ungrowl(growl);
}.bind(this)});
}
order.indexOf(notify.className) > order.indexOf(className)) {
notify.className = className;
}
- notify.update(Kronolith.text.alerts.interpolate({ 'count': ++this.growls }));
+ notify.update(Kronolith.text.alerts.interpolate({ count: ++this.growls }));
notify.up().show();
break;
}
if ($('kronolithView' + locCap)) {
this.viewLoading = true;
$('kronolithView' + locCap).appear({
- 'queue': 'end',
- 'afterFinish': function() {
+ queue: 'end',
+ afterFinish: function() {
if (loc == 'week' || loc == 'day') {
this._calculateRowSizes(loc + 'Sizes', 'kronolithView' + locCap);
}
this._loadTasks(this.tasktype);
if ($('kronolithView' + locCap)) {
this.viewLoading = true;
- $('kronolithView' + locCap).appear({ 'queue': 'end', 'afterFinish': function() { this.viewLoading = false; }.bind(this) });
+ $('kronolithView' + locCap).appear({ queue: 'end', afterFinish: function() { this.viewLoading = false; }.bind(this) });
}
$('kronolithLoading' + loc).insert($('kronolithLoading').remove());
this.updateMinical(this.date, loc);
default:
if ($('kronolithView' + locCap)) {
this.viewLoading = true;
- $('kronolithView' + locCap).appear({ 'queue': 'end', 'afterFinish': function() { this.viewLoading = false; }.bind(this) });
+ $('kronolithView' + locCap).appear({ queue: 'end', afterFinish: function() { this.viewLoading = false; }.bind(this) });
}
break;
}
case 'search':
var cals = [], term = locParts[0],
- query = Object.toJSON({ 'title': term });
+ query = Object.toJSON({ title: term });
this.closeView();
this.updateView(null, 'search', term);
$H(Kronolith.conf.calendars).each(function(type) {
});
this.startLoading('search', query);
this.doAction('SearchEvents',
- { 'cals': cals.toJSON(), 'query': query },
+ { cals: cals.toJSON(), query: query },
function(r) {
// Hide spinner.
this.loading--;
}, this);
}.bind(this));
this.viewLoading = true;
- $('kronolithViewAgenda').appear({ 'queue': 'end', 'afterFinish': function() { this.viewLoading = false; }.bind(this) });
+ $('kronolithViewAgenda').appear({ queue: 'end', afterFinish: function() { this.viewLoading = false; }.bind(this) });
$('kronolithLoadingagenda').insert($('kronolithLoading').remove());
this.updateMinical(this.date, 'search');
this._addHistory(fullloc);
today = Date.today(),
day, i, hourCol;
- $('kronolithViewWeek').down('caption span').innerHTML = this.setTitle(Kronolith.text.week.interpolate({ 'week': date.getRealWeek() }));
+ $('kronolithViewWeek').down('caption span').innerHTML = this.setTitle(Kronolith.text.week.interpolate({ week: date.getRealWeek() }));
for (i = 0; i < 24; i++) {
day = dates[0].clone();
day = dates[0].clone();
$('kronolithAgendaDate').innerHTML = this.setTitle(Kronolith.text.agenda + ' ' + dates[0].toString('d') + ' - ' + dates[1].toString('d'));
} else {
- $('kronolithViewAgenda').down('caption span').update(this.setTitle(Kronolith.text.searching.interpolate({ 'term': data })));
+ $('kronolithViewAgenda').down('caption span').update(this.setTitle(Kronolith.text.searching.interpolate({ term: data })));
}
// Remove old rows. Maybe we should only rebuild the calendars if
}
});
if (this.view && this.view != loc) {
- $('kronolithView' + this.view.capitalize()).fade({ 'queue': 'end' });
+ $('kronolithView' + this.view.capitalize()).fade({ queue: 'end' });
this.view = null;
}
},
}
});
if (nextRow) {
- nextRow.insert({ 'before': row.show() });
+ nextRow.insert({ before: row.show() });
} else {
body.insert(row.show());
}
_equalRowHeights: function(tbody)
{
var children = tbody.childElements();
- children.invoke('setStyle', { 'height': (100 / (children.size() - 1)) + '%' });
+ children.invoke('setStyle', { height: (100 / (children.size() - 1)) + '%' });
},
/**
tdAlign = td.getStyle('verticalAlign'),
tr2 = tr.next('tr'),
td2 = tr2.down('td').next('td'), td2Top,
- div = new Element('DIV').setStyle({ 'width': '1px', 'height': '1px' });
+ div = new Element('div').setStyle({ width: '1px', height: '1px' });
- td.insert({ 'top': div });
+ td.insert({ top: div });
tdTop = div.cumulativeOffset().top;
- td.setStyle({ 'verticalAlign': 'bottom' });
- td.insert({ 'bottom': div });
+ td.setStyle({ verticalAlign: 'bottom' });
+ td.insert({ bottom: div });
tdHeight = div.cumulativeOffset().top + parseInt(td.getStyle('lineHeight')) - tdTop;
- td.setStyle({ 'verticalAlign': tdAlign });
- td2.insert({ 'top': div });
+ td.setStyle({ verticalAlign: tdAlign });
+ td2.insert({ top: div });
td2Top = div.cumulativeOffset().top;
div.remove();
if (day.getDay() == Kronolith.conf.week_start) {
tr = new Element('tr');
tbody.insert(tr);
- td = new Element('td', { 'class': 'kronolithMinicalWeek' })
+ td = new Element('td', { className: 'kronolithMinicalWeek' })
.store('weekdate', dateString);
td.innerHTML = day.getRealWeek();
tr.insert(td);
div = this.getCalendarList(type, cal.owner);
}
if (cal.owner) {
- div.insert(new Element('SPAN', { 'class': 'kronolithCalEdit' })
+ div.insert(new Element('span', { className: 'kronolithCalEdit' })
.insert('›'));
}
- div.insert(new Element('DIV', { 'class': cal.show ? 'kronolithCalOn' : 'kronolithCalOff' })
+ div.insert(new Element('div', { className: cal.show ? 'kronolithCalOn' : 'kronolithCalOff' })
.store('calendar', id)
.store('calendarclass', type)
.setStyle({ backgroundColor: cal.bg, color: cal.fg })
});
ext.each(function(api) {
$('kronolithExternalCalendars')
- .insert(new Element('H3')
+ .insert(new Element('h3')
.insert({ bottom: extNames.get(api.key).escapeHTML() }))
- .insert(new Element('DIV', { 'id': 'kronolithExternalCalendar' + api.key, 'class': 'kronolithCalendars' }));
+ .insert(new Element('div', { id: 'kronolithExternalCalendar' + api.key, className: 'kronolithCalendars' }));
api.value.each(function(cal) {
this.insertCalendarInList('external', api.key + '/' + cal.key, cal.value, $('kronolithExternalCalendar' + api.key));
}, this);
$(id).update();
$H(Kronolith.conf.calendars.internal).each(function(cal) {
if (cal.value.edit) {
- $(id).insert(new Element('OPTION', { 'value': 'internal|' + cal.key })
- .setStyle({ 'backgroundColor': cal.value.bg, 'color': cal.value.fg })
+ $(id).insert(new Element('option', { value: 'internal|' + cal.key })
+ .setStyle({ backgroundColor: cal.value.bg, color: cal.value.fg })
.update(cal.value.name.escapeHTML()));
}
});
event.value.nodeId = 'kronolithEvent' + view + event.value.calendar + date + event.key;
_createElement = function(event) {
- var el = new Element('DIV', { 'id': event.value.nodeId, 'class': 'kronolithEvent' })
+ var el = new Element('div', { id: event.value.nodeId, className: 'kronolithEvent' })
.store('calendar', event.value.calendar)
.store('eventid', event.key);
if (!Object.isUndefined(event.value.aj)) {
case 'week':
var storage = view + 'Sizes',
div = _createElement(event),
- style = { 'backgroundColor': Kronolith.conf.calendars[calendar[0]][calendar[1]].bg,
- 'color': Kronolith.conf.calendars[calendar[0]][calendar[1]].fg };
+ style = { backgroundColor: Kronolith.conf.calendars[calendar[0]][calendar[1]].bg,
+ color: Kronolith.conf.calendars[calendar[0]][calendar[1]].fg };
if (event.value.al) {
if (view == 'day') {
}
var midnight = this.parseDate(date),
- innerDiv = new Element('DIV', { 'class': 'kronolithEventInfo' }),
+ innerDiv = new Element('div', { className: 'kronolithEventInfo' }),
draggerTop, draggerBottom;
if (event.value.fi) {
- draggerTop = new Element('DIV', { 'id': event.value.nodeId + 'top', 'class': 'kronolithDragger kronolithDraggerTop' }).setStyle(style);
+ draggerTop = new Element('div', { id: event.value.nodeId + 'top', className: 'kronolithDragger kronolithDraggerTop' }).setStyle(style);
} else {
- innerDiv.setStyle({ 'top': 0 });
+ innerDiv.setStyle({ top: 0 });
}
if (event.value.la) {
- draggerBottom = new Element('DIV', { 'id': event.value.nodeId + 'bottom', 'class': 'kronolithDragger kronolithDraggerBottom' }).setStyle(style);
+ draggerBottom = new Element('div', { id: event.value.nodeId + 'bottom', className: 'kronolithDragger kronolithDraggerBottom' }).setStyle(style);
} else {
- innerDiv.setStyle({ 'bottom': 0 });
+ innerDiv.setStyle({ bottom: 0 });
}
div.setStyle({
- 'top': (Math.round(midnight.getElapsed(event.value.start) / 60000) * this[storage].height / 60 | 0) + 'px',
- 'height': (Math.round(event.value.start.getElapsed(event.value.end) / 60000) * this[storage].height / 60 - this[storage].spacing | 0) + 'px',
- 'width': '100%'
+ top: (Math.round(midnight.getElapsed(event.value.start) / 60000) * this[storage].height / 60 | 0) + 'px',
+ height: (Math.round(event.value.start.getElapsed(event.value.end) / 60000) * this[storage].height / 60 - this[storage].spacing | 0) + 'px',
+ width: '100%'
})
.insert(innerDiv.setStyle(style));
if (draggerTop) {
width = 100 / columns;
this.dayGroups[pos].each(function(ev) {
ev.columns = columns;
- $(ev.nodeId).setStyle({ 'width': width + '%', 'left': (width * (ev.column - 1)) + '%' });
+ $(ev.nodeId).setStyle({ width: width + '%', left: (width * (ev.column - 1)) + '%' });
});
this.dayEvents.push(event.value);
case 'month':
var div = _createElement(event)
- .setStyle({ 'backgroundColor': Kronolith.conf.calendars[calendar[0]][calendar[1]].bg,
- 'color': Kronolith.conf.calendars[calendar[0]][calendar[1]].fg });
+ .setStyle({ backgroundColor: Kronolith.conf.calendars[calendar[0]][calendar[1]].bg,
+ color: Kronolith.conf.calendars[calendar[0]][calendar[1]].fg });
$('kronolithMonthDay' + date).insert(div);
if (event.value.pe) {
- div.setStyle({ 'cursor': 'move' });
+ div.setStyle({ cursor: 'move' });
new Drag('kronolithEventmonth' + event.value.calendar + date + event.key, { threshold: 5, parentElement: function() { return $('kronolithViewMonthBody'); }, snapToParent: true });
}
break;
case 'agenda':
var div = _createElement(event)
- .setStyle({ 'backgroundColor': Kronolith.conf.calendars[calendar[0]][calendar[1]].bg,
- 'color': Kronolith.conf.calendars[calendar[0]][calendar[1]].fg });
+ .setStyle({ backgroundColor: Kronolith.conf.calendars[calendar[0]][calendar[1]].bg,
+ color: Kronolith.conf.calendars[calendar[0]][calendar[1]].fg });
if (!event.value.al) {
- div.update(new Element('SPAN', { 'class': 'kronolithDate' }).update(event.value.start.toString('t')))
+ div.update(new Element('span', { className: 'kronolithDate' }).update(event.value.start.toString('t')))
.insert(' ')
- .insert(new Element('SPAN', { 'class': 'kronolithSep' }).update('·'))
+ .insert(new Element('span', { className: 'kronolithSep' }).update('·'))
.insert(' ');
}
this.createAgendaDay(date);
var calendar = event.calendar.split('|');
div.update();
if (event.ic) {
- div.insert(new Element('IMG', { 'src': event.ic }));
+ div.insert(new Element('img', { src: event.ic }));
}
div.insert(event.t.escapeHTML());
if (event.a) {
div.insert(' ')
- .insert(new Element('IMG', { 'src': Kronolith.conf.URI_IMG + 'alarm-' + Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1) + '.png', 'title': Kronolith.text.alarm + ' ' + event.a }));
+ .insert(new Element('img', { src: Kronolith.conf.URI_IMG + 'alarm-' + Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1) + '.png', title: Kronolith.text.alarm + ' ' + event.a }));
}
if (event.r) {
div.insert(' ')
- .insert(new Element('IMG', { 'src': Kronolith.conf.URI_IMG + 'recur-' + Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1) + '.png', 'title': Kronolith.text.recur[event.r] }));
+ .insert(new Element('img', { src: Kronolith.conf.URI_IMG + 'recur-' + Kronolith.conf.calendars[calendar[0]][calendar[1]].fg.substr(1) + '.png', title: Kronolith.text.recur[event.r] }));
}
return div;
},
this.startLoading('tasks:' + type + list, tasktype);
this._storeTasksCache($H(), type, list, true);
this.doAction('ListTasks',
- { 'type': type,
+ { type: type,
'sig' : tasktype,
- 'list': list },
+ list: list },
function(r) {
this._loadTasksCallback(r, tasktype, true);
}.bind(this));
if (!now.isBefore(date)) {
col.addClassName('kronolithTaskDue');
}
- col.insert(new Element('SPAN', { 'class': 'kronolithSep' }).update(' · '));
- col.insert(new Element('SPAN', { 'class': 'kronolithDate' }).update(date.toString(Kronolith.conf.date_format)));
+ col.insert(new Element('span', { className: 'kronolithSep' }).update(' · '));
+ col.insert(new Element('span', { className: 'kronolithDate' }).update(date.toString(Kronolith.conf.date_format)));
}
if (!Object.isUndefined(task.value.sd)) {
- col.insert(new Element('SPAN', { 'class': 'kronolithSep' }).update(' · '));
- col.insert(new Element('SPAN', { 'class': 'kronolithInfo' }).update(task.value.sd));
+ col.insert(new Element('span', { className: 'kronolithSep' }).update(' · '));
+ col.insert(new Element('span', { className: 'kronolithInfo' }).update(task.value.sd));
}
row.insert(col.show());
break;
}
}
- rows[--i].insert({ 'after': newRow.show() });
+ rows[--i].insert({ after: newRow.show() });
},
/**
}
if ((this.tasktype == 'complete' && !task.cp) ||
((this.tasktype == 'incomplete' || this.tasktype == 'future_incomplete') && task.cp)) {
- row.fade({ 'afterFinish': function() { row.remove(); } });
+ row.fade({ afterFinish: function() { row.remove(); } });
}
},
this.updateTasklistDropDown();
if (id) {
RedBox.loading();
- this.doAction('GetTask', { 'list': tasklist, 'id': id }, this._editTask.bind(this));
+ this.doAction('GetTask', { list: tasklist, id: id }, this._editTask.bind(this));
} else {
$('kronolithTaskId').clear();
$('kronolithTaskOldList').clear();
$('kronolithTaskList').update();
$H(Kronolith.conf.calendars.tasklists).each(function(cal) {
if (cal.value.edit) {
- $('kronolithTaskList').insert(new Element('OPTION', { 'value': cal.key.substring(6) })
- .setStyle({ 'backgroundColor': cal.value.bg, 'color': cal.value.fg })
+ $('kronolithTaskList').insert(new Element('option', { value: cal.key.substring(6) })
+ .setStyle({ backgroundColor: cal.value.bg, color: cal.value.fg })
.update(cal.value.name.escapeHTML()));
}
});
taskid = $F('kronolithTaskId');
this.startLoading('tasks:' + ($F('kronolithTaskCompleted') ? 'complete' : 'incomplete') + tasklist, this.tasktype);
this.doAction('SaveTask',
- $H($('kronolithTaskForm').serialize({ 'hash': true }))
- .merge({ 'sig': this.tasktype }),
+ $H($('kronolithTaskForm').serialize({ hash: true }))
+ .merge({ sig: this.tasktype }),
function(r) {
if (r.response.tasks && taskid) {
this._removeTask(taskid, tasklist);
this._editCalendar(calendar);
} else {
RedBox.loading();
- this.doAction('ChunkContent', { 'chunk': 'calendar' }, function(r) {
+ this.doAction('ChunkContent', { chunk: 'calendar' }, function(r) {
if (r.response.chunk) {
RedBox.showHtml(r.response.chunk);
this._editCalendar(calendar);
fields.each(function(field) {
$('kronolithCalendar' + type + field).clear();
});
- $('kronolithCalendar' + type + 'Color').setValue('#dddddd').setStyle({ 'backgroundColor': '#dddddd', 'color': '#000' });
+ $('kronolithCalendar' + type + 'Color').setValue('#dddddd').setStyle({ backgroundColor: '#dddddd', color: '#000' });
$('kronolithCalendarForm' + type).down('.kronolithCalendarDelete').hide();
if (calendar && type == 'remote') {
$('kronolithCalendarremoteUrl').setValue(calendar);
$('kronolithCalendar' + type + 'Id').setValue(calendar);
$('kronolithCalendar' + type + 'Name').setValue(info.name);
- $('kronolithCalendar' + type + 'Color').setValue(info.bg).setStyle({ 'backgroundColor': info.bg, 'color': info.fg });
+ $('kronolithCalendar' + type + 'Color').setValue(info.bg).setStyle({ backgroundColor: info.bg, color: info.fg });
switch (type) {
case 'internal':
saveCalendar: function(form)
{
var type = form.id.replace(/kronolithCalendarForm/, ''),
- data = form.serialize({ 'hash': true });
+ data = form.serialize({ hash: true });
this.doAction('SaveCalendar',
data,
if ($('kronolithIframe' + name)) {
$('kronolithIframe' + name).src = loc;
} else {
- var iframe = new Element('IFRAME', { 'id': 'kronolithIframe' + name, 'class': 'kronolithIframe', 'frameBorder': 0, 'src': loc });
+ var iframe = new Element('iframe', { id: 'kronolithIframe' + name, className: 'kronolithIframe', frameBorder: 0, src: loc });
//this._resizeIE6Iframe(iframe);
$('kronolithViewIframe').insert(iframe);
}
- $('kronolithViewIframe').appear({ 'queue': 'end' });
+ $('kronolithViewIframe').appear({ queue: 'end' });
this.view = 'iframe';
},
var cal = $F('kronolithEventCalendar'),
eventid = $F('kronolithEventId');
this.doAction('DeleteEvent',
- { 'cal': cal, 'id': eventid },
+ { cal: cal, id: eventid },
function(r) {
if (r.response.deleted) {
this._removeEvent(eventid, cal);
var tasklist = $F('kronolithTaskOldList'),
taskid = $F('kronolithTaskId');
this.doAction('DeleteTask',
- { 'list': tasklist, 'id': taskid },
+ { list: tasklist, id: taskid },
function(r) {
if (r.response.deleted) {
this._removeTask(taskid, tasklist);
if (this.Growler.toggleLog()) {
elt.update(Kronolith.text.hidelog);
} else {
- $('kronolithNotifications').update(Kronolith.text.alerts.interpolate({ 'count': this.growls }));
+ $('kronolithNotifications').update(Kronolith.text.alerts.interpolate({ count: this.growls }));
}
break;
}
tasklist = elt.up('tr.kronolithTaskRow', 0).retrieve('tasklist');
this._toggleCompletionClass(taskid);
this.doAction('ToggleCompletion',
- { 'list': tasklist, 'id': taskid },
+ { list: tasklist, id: taskid },
function(r) {
if (r.response.toggled) {
this._toggleCompletion(tasklist, taskid);
type = form.id.replace(/kronolithCalendarForm/, ''),
calendar = $F('kronolithCalendar' + type + 'Id');
this.doAction('DeleteCalendar',
- { 'type': type, 'calendar': calendar },
+ { type: type, calendar: calendar },
function(r) {
if (r.response.deleted) {
var div = this.getCalendarList(type, Kronolith.conf.calendars[type][calendar].owner).select('div').find(function(element) {
drop.insert(el);
this.startLoading(cal, start + end);
this.doAction('UpdateEvent',
- { 'cal': cal,
- 'id': eventid,
- 'view': this.view,
- 'view_start': start,
- 'view_end': end,
- 'att': $H({ start_date: drop.retrieve('date') }).toJSON() },
+ { cal: cal,
+ id: eventid,
+ view: this.view,
+ view_start: start,
+ view_end: end,
+ att: $H({ start_date: drop.retrieve('date') }).toJSON() },
function(r) {
if (r.response.events) {
this._removeEvent(eventid, cal);
if (elt.hasClassName('kronolithDragger')) {
elt = elt.up().addClassName('kronolithSelected');
} else if (elt.hasClassName('kronolithEditable')) {
- elt.addClassName('kronolithSelected').setStyle({ 'left': 0, 'width': '100%', 'zIndex': 1 });
+ elt.addClassName('kronolithSelected').setStyle({ left: 0, width: '100%', zIndex: 1 });
}
},
offset = top - drag.dragTop;
height = div.offsetHeight - offset;
div.setStyle({
- 'top': (div.offsetTop + offset) + 'px'
+ top: (div.offsetTop + offset) + 'px'
});
offset = drag.ghost.offsetTop;
drag.dragTop = top;
drag.dragBottom = top;
}
div.setStyle({
- 'height': height + 'px'
+ height: height + 'px'
});
this._calculateEventDates(event, storage, step, offset, height);
drag.destroy();
this.startLoading(event.value.calendar, start + end);
if (!Object.isUndefined(event.value.offsetTop)) {
- attributes = $H({ 'offDays': event.value.offsetDays,
- 'offMins': event.value.offsetTop / step * 10 });
+ attributes = $H({ offDays: event.value.offsetDays,
+ offMins: event.value.offsetTop / step * 10 });
} else if (div.hasClassName('kronolithDraggerTop')) {
- attributes = $H({ 'start': event.value.start });
+ attributes = $H({ start: event.value.start });
} else if (div.hasClassName('kronolithDraggerBottom')) {
- attributes = $H({ 'end': event.value.end });
+ attributes = $H({ end: event.value.end });
} else {
- attributes = $H({ 'start': event.value.start,
- 'end': event.value.end });
+ attributes = $H({ start: event.value.start,
+ end: event.value.end });
}
this.doAction(
'UpdateEvent',
- { 'cal': event.value.calendar,
- 'id': event.key,
- 'view': this.view,
- 'view_start': start,
- 'view_end': end,
- 'att': attributes.toJSON()
+ { cal: event.value.calendar,
+ id: event.key,
+ view: this.view,
+ view_start: start,
+ view_end: end,
+ att: attributes.toJSON()
},
function(r) {
if (r.response.events) {
this.doAction('ListTopTags', {}, this._topTags);
if (id) {
RedBox.loading();
- this.doAction('GetEvent', { 'cal': calendar, 'id': id, 'date': date }, this._editEvent.bind(this));
+ this.doAction('GetEvent', { cal: calendar, id: id, date: date }, this._editEvent.bind(this));
} else {
$('kronolithEventTags').autocompleter.init();
var d;
$('kronolithEventTags').autocompleter.shutdown();
this.startLoading(cal, start + end);
this.doAction('SaveEvent',
- $H($('kronolithEventForm').serialize({ 'hash': true }))
+ $H($('kronolithEventForm').serialize({ hash: true }))
.merge({
- 'view': this.view,
- 'view_start': start,
- 'view_end': end
+ view: this.view,
+ view_start: start,
+ view_end: end
}),
function(r) {
if (r.response.events && eventid) {
$('kronolithQuickinsert').fade();
this.startLoading(null, start + end);
this.doAction('QuickSaveEvent',
- $H({ 'text': text,
- 'view': this.view,
- 'view_start': start,
- 'view_end': end
+ $H({ text: text,
+ view: this.view,
+ view_start: start,
+ view_end: end
}),
function(r) {
this._loadEventsCallback(r);
$('kronolithEventTopTags').update();
return;
}
- t = new Element('DIV');
+ t = new Element('div');
r.response.tags.each(function(tag) {
- t.insert(new Element('SPAN', { 'class': 'kronolithEventTag' }).update(tag.escapeHTML()));
+ t.insert(new Element('span', { className: 'kronolithEventTag' }).update(tag.escapeHTML()));
});
$('kronolithEventTopTags').update(t);
return;
var tr = new Element('tr'), i;
this.fbLoading++;
this.doAction('GetFreeBusy',
- { 'email': attendee.e },
+ { email: attendee.e },
function(r) {
this.fbLoading--;
if (!this.fbLoading) {
}.bind(this));
tr.insert(new Element('td').writeAttribute('title', attendee.l).insert(attendee.e.escapeHTML()));
for (i = 0; i < 24; i++) {
- tr.insert(new Element('td', { 'class': 'kronolithFBUnknown' }));
+ tr.insert(new Element('td', { className: 'kronolithFBUnknown' }));
}
table.insert(tr);
}, this);
var start = Date.parseExact($F('kronolithEventStartDate'), Kronolith.conf.date_format),
end = start.clone().add(1).days(),
width = td.getWidth();
- div = new Element('div').setStyle({ 'position': 'relative' });
+ div = new Element('div').setStyle({ position: 'relative' });
td.insert(div);
$H(fb.b).each(function(busy) {
var from = new Date(), to = new Date(), left;
to.add(-1).minutes();
}
left = from.getHours() + from.getMinutes() / 60;
- div.insert(new Element('div', { 'class': 'kronolithFBBusy' }).setStyle({ 'zIndex': 1, 'top': 0, 'left': (left * width) + 'px', 'width': (((to.getHours() + to.getMinutes() / 60) - left) * width) + 'px' }));
+ div.insert(new Element('div', { className: 'kronolithFBBusy' }).setStyle({ zIndex: 1, top: 0, left: (left * width) + 'px', width: (((to.getHours() + to.getMinutes() / 60) - left) * width) + 'px' }));
});
},
if (Object.isUndefined(on)) {
on = $('kronolithEventStartTimeLabel').getStyle('visibility') == 'visible';
}
- $('kronolithEventStartTimeLabel').setStyle({ 'visibility': on ? 'hidden' : 'visible' });
- $('kronolithEventEndTimeLabel').setStyle({ 'visibility': on ? 'hidden' : 'visible' });
+ $('kronolithEventStartTimeLabel').setStyle({ visibility: on ? 'hidden' : 'visible' });
+ $('kronolithEventEndTimeLabel').setStyle({ visibility: on ? 'hidden' : 'visible' });
},
/**
this.map = new HordeMap.Map[Kronolith.conf.maps.driver](
{
- 'elt': 'kronolithEventMap',
- 'delayed': true,
- 'layers': layers,
- 'markerDragEnd': this.onMarkerDragEnd.bind(this),
- 'mapClick': this.afterClickMap.bind(this)
+ elt: 'kronolithEventMap',
+ delayed: true,
+ layers: layers,
+ markerDragEnd: this.onMarkerDragEnd.bind(this),
+ mapClick: this.afterClickMap.bind(this)
});
if ($('kronolithEventLocationLat').value) {
if (!this.mapMarker) {
this.mapMarker = this.map.addMarker(
ll,
- { 'draggable': true },
+ { draggable: true },
{
- 'context': this,
- 'dragend': this.onMarkerDragEnd
+ context: this,
+ dragend: this.onMarkerDragEnd
});
} else {
this.map.moveMarker(this.mapMarker, ll);