summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-10-23 08:48:15 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-30 16:31:11 (GMT)
commitde7ff3a25e736bf53682339b4a2d7ead15d86920 (patch)
tree351655bf53c4338468aba350852fdac2247468fe /plugins
parentcdc9a2a45450d90cbade9049daf75d375830f1c2 (diff)
downloadroundcubemail-plugins-kolab-de7ff3a25e736bf53682339b4a2d7ead15d86920.tar.gz
Show all event attendees in a new popup dialog (#2397)roundcubemail-plugins-kolab-3.0.3
Diffstat (limited to 'plugins')
-rw-r--r--plugins/calendar/calendar_ui.js26
-rw-r--r--plugins/calendar/skins/classic/calendar.css21
-rw-r--r--plugins/calendar/skins/classic/templates/calendar.html2
-rw-r--r--plugins/calendar/skins/larry/calendar.css22
-rw-r--r--plugins/calendar/skins/larry/templates/calendar.html2
5 files changed, 53 insertions, 20 deletions
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index a73cba5..1f63383 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -320,7 +320,7 @@ function rcube_calendar_ui(settings)
// list event attendees
if (calendar.attendees && event.attendees) {
- var data, dispname, organizer = false, rsvp = false, html = '';
+ var data, dispname, organizer = false, rsvp = false, line, morelink, html = '',overflow = '';
for (var j=0; j < event.attendees.length; j++) {
data = event.attendees[j];
dispname = Q(data.name || data.email);
@@ -331,12 +331,16 @@ function rcube_calendar_ui(settings)
else if ((data.status == 'NEEDS-ACTION' || data.status == 'TENTATIVE') && settings.identity.emails.indexOf(';'+data.email) >= 0)
rsvp = data.status.toLowerCase();
}
- html += '<span class="attendee ' + String(data.role == 'ORGANIZER' ? 'organizer' : data.status).toLowerCase() + '">' + dispname + '</span> ';
+
+ line = '<span class="attendee ' + String(data.role == 'ORGANIZER' ? 'organizer' : data.status).toLowerCase() + '">' + dispname + '</span> ';
+ if (morelink)
+ overflow += line;
+ else
+ html += line;
// stop listing attendees
if (j == 7 && event.attendees.length >= 7) {
- html += ' <em>' + rcmail.gettext('andnmore', 'calendar').replace('$nr', event.attendees.length - j - 1) + '</em>';
- break;
+ morelink = $('<a href="#more" class="morelink"></a>').html(rcmail.gettext('andnmore', 'calendar').replace('$nr', event.attendees.length - j - 1));
}
}
@@ -345,6 +349,20 @@ function rcube_calendar_ui(settings)
.children('.event-text')
.html(html)
.find('a.mailtolink').click(function(e) { rcmail.redirect(rcmail.url('mail/compose', { _to:this.href.substr(7) })); return false; });
+
+ // display all attendees in a popup when clicking the "more" link
+ if (morelink) {
+ $('#event-attendees .event-text').append(morelink);
+ morelink.click(function(e){
+ rcmail.show_popup_dialog(
+ '<div id="all-event-attendees" class="event-attendees">' + html + overflow + '</div>',
+ rcmail.gettext('tabattendees','calendar'),
+ null,
+ { width:450, modal:false });
+ $('#all-event-attendees a.mailtolink').click(function(e) { rcmail.redirect(rcmail.url('mail/compose', { _to:this.href.substr(7) })); return false; });
+ return false;
+ })
+ }
}
$('#event-rsvp')[(rsvp?'show':'hide')]();
diff --git a/plugins/calendar/skins/classic/calendar.css b/plugins/calendar/skins/classic/calendar.css
index 117c2ce..f1e413e 100644
--- a/plugins/calendar/skins/classic/calendar.css
+++ b/plugins/calendar/skins/classic/calendar.css
@@ -369,37 +369,44 @@ a.miniColors-trigger {
margin: 0.5em 0;
}
-#event-attendees span.attendee {
+.event-attendees span.attendee {
padding-right: 18px;
margin-right: 0.5em;
background: url(images/attendee-status.gif) right 0 no-repeat;
}
-#event-attendees span.attendee a.mailtolink {
+.event-attendees span.attendee a.mailtolink {
text-decoration: none;
white-space: nowrap;
}
-#event-attendees span.attendee a.mailtolink:hover {
+.event-attendees span.attendee a.mailtolink:hover {
text-decoration: underline;
}
-#event-attendees span.accepted {
+.event-attendees span.accepted {
background-position: right -20px;
}
-#event-attendees span.declined {
+.event-attendees span.declined {
background-position: right -40px;
}
-#event-attendees span.tentative {
+.event-attendees span.tentative {
background-position: right -60px;
}
-#event-attendees span.organizer {
+.event-attendees span.organizer {
background-position: right -80px;
}
+#all-event-attendees span.attendee {
+ display: block;
+ margin-bottom: 4px;
+ padding-bottom: 3px;
+ border-bottom: 1px solid #ddd;
+}
+
/* jQuery UI overrides */
#eventshow h1 {
diff --git a/plugins/calendar/skins/classic/templates/calendar.html b/plugins/calendar/skins/classic/templates/calendar.html
index 80255ff..ddb91e1 100644
--- a/plugins/calendar/skins/classic/templates/calendar.html
+++ b/plugins/calendar/skins/classic/templates/calendar.html
@@ -59,7 +59,7 @@
<h5 class="label"><roundcube:label name="calendar.alarms" /></h5>
<div class="event-text"></div>
</div>
- <div class="event-section" id="event-attendees">
+ <div class="event-section event-attendees" id="event-attendees">
<h5 class="label"><roundcube:label name="calendar.tabattendees" /></h5>
<div class="event-text"></div>
</div>
diff --git a/plugins/calendar/skins/larry/calendar.css b/plugins/calendar/skins/larry/calendar.css
index 2484e61..a8c3dc1 100644
--- a/plugins/calendar/skins/larry/calendar.css
+++ b/plugins/calendar/skins/larry/calendar.css
@@ -419,37 +419,45 @@ a.miniColors-trigger {
outline: none;
}
-#event-attendees span.attendee {
+.event-attendees span.attendee {
padding-right: 18px;
margin-right: 0.5em;
background: url(images/attendee-status.gif) right 0 no-repeat;
}
-#event-attendees span.attendee a.mailtolink {
+.event-attendees span.attendee a.mailtolink {
text-decoration: none;
white-space: nowrap;
+ outline: none;
}
-#event-attendees span.attendee a.mailtolink:hover {
+.event-attendees span.attendee a.mailtolink:hover {
text-decoration: underline;
}
-#event-attendees span.accepted {
+.event-attendees span.accepted {
background-position: right -20px;
}
-#event-attendees span.declined {
+.event-attendees span.declined {
background-position: right -40px;
}
-#event-attendees span.tentative {
+.event-attendees span.tentative {
background-position: right -60px;
}
-#event-attendees span.organizer {
+.event-attendees span.organizer {
background-position: right -80px;
}
+#all-event-attendees span.attendee {
+ display: block;
+ margin-bottom: 0.4em;
+ padding-bottom: 0.3em;
+ border-bottom: 1px solid #ddd;
+}
+
.calendarmain .fc-view-table td.fc-list-header,
#attendees-freebusy-table h3.boxtitle,
#schedule-freebusy-times thead th,
diff --git a/plugins/calendar/skins/larry/templates/calendar.html b/plugins/calendar/skins/larry/templates/calendar.html
index 289c8b0..1c390df 100644
--- a/plugins/calendar/skins/larry/templates/calendar.html
+++ b/plugins/calendar/skins/larry/templates/calendar.html
@@ -73,7 +73,7 @@
<h5 class="label"><roundcube:label name="calendar.alarms" /></h5>
<div class="event-text"></div>
</div>
- <div class="event-section" id="event-attendees">
+ <div class="event-section event-attendees" id="event-attendees">
<h5 class="label"><roundcube:label name="calendar.tabattendees" /></h5>
<div class="event-text"></div>
</div>