Skip to content

Commit

Permalink
Indicate which attendee is the organizer.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 13, 2016
1 parent 6932d70 commit 1fe24c2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
9 changes: 5 additions & 4 deletions kronolith/js/kronolith.js
Original file line number Diff line number Diff line change
Expand Up @@ -6317,8 +6317,9 @@ KronolithCore = {
* Adds an attendee row to the free/busy table.
*
* @param object attendee An attendee object with the properties:
* - e: email address
* - l: the display name of the attendee
* - e: The email address.
* - l: The display name of the attendee.
* - o: True if this is the organizer.
*/
addAttendee: function(attendee)
{
Expand Down Expand Up @@ -6368,8 +6369,8 @@ KronolithCore = {
case 4: response = 'Tentative'; break;
}
tr.insert(new Element('td')
.writeAttribute('title', attendee.l)
.addClassName('kronolithAttendee' + response)
.writeAttribute('title', attendee.l + (attendee.o ? ' (' + Kronolith.text.organizer + ') ' : ''))
.addClassName('kronolithAttendee' + (attendee.o ? 'Organizer' : response))
.insert(attendee.e ? attendee.e.escapeHTML() : attendee.l.escapeHTML()));
for (i = 0; i < 24; i++) {
tr.insert(new Element('td', { className: 'kronolithFBUnknown' }));
Expand Down
1 change: 1 addition & 0 deletions kronolith/lib/Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ protected function _addBaseVars()
'no_parent' => _("No parent task"),
'no_tasklist_title' => _("The task list title must not be empty."),
'no_url' => _("You must specify a URL."),
'organizer' => _("Organizer"),
'prefs' => _("Preferences"),
'resources' => _("Resources"),
'searching' => sprintf(_("Events matching \"%s\""), '#{term}'),
Expand Down
17 changes: 10 additions & 7 deletions kronolith/lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -2701,6 +2701,12 @@ public function toJson(array $options = array())
if ($this->recurs()) {
$json->r = $this->recurrence->toJson();
}
if ($this->organizer) {
$json->o = $this->organizer;
$json->oy = Kronolith::isUserEmail($this->creator, $this->organizer);
} else {
$json->oy = true;
}
if (!$this->isPrivate()) {
$json->d = $this->description;
$json->u = $this->url;
Expand All @@ -2723,18 +2729,15 @@ public function toJson(array $options = array())
'a' => intval($info['attendance']),
'e' => $tmp->bare_address,
'r' => intval($info['response']),
'l' => strval($tmp)
'l' => strval($tmp),
'o' => ($this->oy && Kronolith::isUserEmail($this->creator, $tmp->bare_address)) ||
(!empty($this->organizer) && $this->organizer == $tmp->bare_address)
);
}
$json->at = $attendees;
}
}
if ($this->organizer) {
$json->o = $this->organizer;
$json->oy = Kronolith::isUserEmail($this->creator, $this->organizer);
} else {
$json->oy = true;
}

if ($this->methods) {
$json->m = $this->methods;
}
Expand Down
6 changes: 5 additions & 1 deletion kronolith/themes/default/dynamic/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ ul.horde-tags li:hover {
#kronolithEventTabResources td.kronolithAttendeeAccepted,
#kronolithEventTabAttendees td.kronolithAttendeeDeclined,
#kronolithEventTabResources td.kronolithAttendeeDeclined,
#kronolithEventTabAttendees td.kronolithAttendeeTentative {
#kronolithEventTabAttendees td.kronolithAttendeeTentative,
#kronolithEventTabAttendees td.kronolithAttendeeOrganizer {
background-position: 0 0;
background-repeat: no-repeat;
padding-left: 21px;
Expand All @@ -357,6 +358,9 @@ ul.horde-tags li:hover {
#kronolithEventTabAttendees td.kronolithAttendeeTentative {
background-image: url("../graphics/attendee-tentative.png");
}
#kronolithEventTabAttendees td.kronolithAttendeeOrganizer {
background-image: url("../graphics/organizer.png");
}

.kronolithFBFree {
position: relative;
Expand Down
Binary file added kronolith/themes/default/graphics/organizer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1fe24c2

Please sign in to comment.