Elastic: Various improvements in Tasks

This commit is contained in:
Aleksander Machniak 2018-03-25 17:01:38 +00:00
parent a1e090b1f1
commit 715621e316
13 changed files with 70 additions and 31 deletions

View file

@ -971,7 +971,7 @@ function rcube_calendar_ui(settings)
if (data === false || !data.length || !event) {
// display 'unavailable' message
$('<div class="notfound-message event-dialog-message warning">' + rcmail.gettext('objectchangelognotavailable','calendar') + '</div>')
$('<div class="notfound-message dialog-message warning">' + rcmail.gettext('objectchangelognotavailable','calendar') + '</div>')
.insertBefore($dialog.find('.changelog-table').hide());
return;
}

View file

@ -150,9 +150,9 @@
<roundcube:object name="plugin.filedroparea" id="event-panel-attachments" />
</fieldset>
</form>
<roundcube:object name="plugin.edit_recurrence_sync" id="edit-recurrence-syncstart" class="event-dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_attendees_notify" id="edit-attendees-notify" class="event-dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_recurring_warning" class="event-dialog-message edit-recurring-warning" style="display:none" />
<roundcube:object name="plugin.edit_recurrence_sync" id="edit-recurrence-syncstart" class="dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_attendees_notify" id="edit-attendees-notify" class="dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_recurring_warning" class="dialog-message edit-recurring-warning" style="display:none" />
<roundcube:object name="plugin.attachments_form" id="event-attachment-form" mode="smart" />
<div id="edit-localchanges-warning" class="event-dialog-message" style="display:none"><roundcube:label name="calendar.localchangeswarning" /></div>
<div id="edit-localchanges-warning" class="dialog-message" style="display:none"><roundcube:label name="calendar.localchangeswarning" /></div>
</div>

View file

@ -979,7 +979,7 @@ td.topalign {
padding: 0 0.5em 0.5em 0.5em;
}
.event-dialog-message,
.dialog-message,
.event-update-confirm .message {
margin-top: 0.5em;
padding: 0.8em;
@ -987,7 +987,7 @@ td.topalign {
background-color: #fef893;
}
.event-dialog-message .message,
.dialog-message .message,
.event-update-confirm .message {
margin-bottom: 0.5em;
}
@ -1000,13 +1000,13 @@ td.topalign {
padding-left: 30px;
}
.event-dialog-message span.ui-icon,
.dialog-message span.ui-icon,
.event-update-confirm span.ui-icon {
float: left;
margin: 0 7px 20px 0;
}
.event-dialog-message label,
.dialog-message label,
.event-update-confirm label {
min-width: 3em;
padding-right: 1em;

View file

@ -158,7 +158,7 @@
<div class="event-text"></div>
</div>
<roundcube:object name="plugin.event_rsvp_buttons" id="event-rsvp" class="event-dialog-message" style="display:none" />
<roundcube:object name="plugin.event_rsvp_buttons" id="event-rsvp" class="dialog-message" style="display:none" />
</div>
<div id="eventoptionsmenu" class="popupmenu" aria-hidden="true">

View file

@ -128,9 +128,9 @@
</div>
</form>
<roundcube:object name="plugin.edit_recurrence_sync" id="edit-recurrence-syncstart" class="event-dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_attendees_notify" id="edit-attendees-notify" class="event-dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_recurring_warning" class="event-dialog-message edit-recurring-warning" style="display:none" />
<roundcube:object name="plugin.edit_recurrence_sync" id="edit-recurrence-syncstart" class="dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_attendees_notify" id="edit-attendees-notify" class="dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_recurring_warning" class="dialog-message edit-recurring-warning" style="display:none" />
<roundcube:object name="plugin.attachments_form" id="edit-attachment-form" mode="smart" />
<div id="edit-localchanges-warning" class="event-dialog-message" style="display:none"><roundcube:label name="calendar.localchangeswarning" /></div>
<div id="edit-localchanges-warning" class="dialog-message" style="display:none"><roundcube:label name="calendar.localchangeswarning" /></div>
</div>

View file

@ -75,6 +75,7 @@
.rsvp-buttons {
width: 100%;
padding-top: .25rem;
}
.itip-reply-controls {
@ -83,6 +84,11 @@
& > label {
display: inline;
label {
line-height: 1;
margin-right: .25rem;
}
}
a {
@ -304,8 +310,8 @@
height: 2em;
&:before {
line-height: 2;
height: 2em;
line-height: 1.8;
margin: 0;
}
}
}
@ -554,7 +560,6 @@
}
}
#alarm-display {
h3 {
font-size: 1.2rem;
@ -607,3 +612,23 @@
#alarm-snooze-dropdown a:before {
.font-icon-regular(@fa-var-clock);
}
.dialog-message {
margin: 0;
opacity: .95;
width: 100%;
padding: .75em;
margin-top: .25em;
color: @color-message;
background-color: @color-message-warning-background;
& > label {
margin: 0;
display: block;
label:before {
line-height: 1.25;
margin-right: .25rem;
}
}
}

View file

@ -223,11 +223,12 @@
right: .25rem;
bottom: 0;
top: auto;
line-height: 2em;
padding: 0 .2em 0 0;
cursor: pointer;
z-index: 1;
line-height: 1.8;
line-height: 1;
height: 1.5em;
font-size: 1.15em;
}
.actions {

View file

@ -121,6 +121,6 @@
<roundcube:object name="plugin.filedroparea" id="taskedit-attachments-droparea" />
</fieldset>
</form>
<roundcube:object name="plugin.edit_attendees_notify" id="edit-attendees-notify" class="task-dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_attendees_notify" id="edit-attendees-notify" class="dialog-message" style="display:none" />
<roundcube:object name="plugin.attachments_form" id="taskedit-attachment-form" mode="smart" />
</div>

View file

@ -1189,14 +1189,14 @@ label.block {
width: 20em;
}
.task-dialog-message {
.dialog-message {
margin-top: 0.5em;
padding: 0.8em;
border: 1px solid #ffdf0e;
background-color: #fef893;
}
.task-dialog-message .message,
.dialog-message .message,
.task-update-confirm .message {
margin-bottom: 0.5em;
}

View file

@ -235,7 +235,7 @@
<span class="task-text"></span>
</div>
<roundcube:object name="plugin.task_rsvp_buttons" id="task-rsvp" class="task-dialog-message" style="display:none" />
<roundcube:object name="plugin.task_rsvp_buttons" id="task-rsvp" class="dialog-message" style="display:none" />
</div>
<roundcube:if condition="env:tasklist_driver == 'kolab' && config:kolab_bonnie_api" />

View file

@ -107,6 +107,6 @@
<roundcube:object name="plugin.filedroparea" id="taskedit-panel-attachments" />
</div>
</form>
<roundcube:object name="plugin.edit_attendees_notify" id="edit-attendees-notify" class="task-dialog-message" style="display:none" />
<roundcube:object name="plugin.edit_attendees_notify" id="edit-attendees-notify" class="dialog-message" style="display:none" />
<roundcube:object name="plugin.attachments_form" id="taskedit-attachment-form" mode="smart" />
</div>

View file

@ -1094,7 +1094,10 @@ function rcube_tasklist_ui(settings)
cache = {},
activetags = {},
msgbox = $('#listmessagebox').hide(),
list = $(rcmail.gui_objects.resultlist).html('');
list = $(rcmail.gui_objects.resultlist);
selected = $('.taskhead.selected', list).parent().attr('rel');
list.html('');
for (var i=0; i < listindex.length; i++) {
id = listindex[i];
@ -1128,6 +1131,10 @@ function rcube_tasklist_ui(settings)
msgbox.html(rcmail.gettext('notasksfound','tasklist')).show();
rcmail.display_message(rcmail.gettext('notasksfound','tasklist'), 'voice');
}
else if (selected) {
// mark back the selected task
$('li[rel="' + selected + '"] > .taskhead').addClass('selected');
}
}
/**
@ -1402,6 +1409,12 @@ function rcube_tasklist_ui(settings)
rcmail.set_busy(false, null, saving_lock);
$('button.ui-button:ui-button').button('option', 'disabled', false);
saving_lock = null;
// Elastic
if (!$('.selected', rcmail.gui_objects.resultlist).length) {
$('#taskedit').parents('.watermark').removeClass('formcontainer');
rcmail.triggerEvent('show-list');
}
}
}
@ -2254,7 +2267,7 @@ function rcube_tasklist_ui(settings)
if (data === false || !data.length || !rec) {
// display 'unavailable' message
$('<div class="notfound-message task-dialog-message warning">' + rcmail.gettext('objectchangelognotavailable','tasklist') + '</div>')
$('<div class="notfound-message dialog-message warning">' + rcmail.gettext('objectchangelognotavailable','tasklist') + '</div>')
.insertBefore($dialog.find('.changelog-table').hide());
return;
}
@ -2853,14 +2866,14 @@ function rcube_tasklist_ui(settings)
}
if (me.is_attendee(rec)) {
html += '<div class="task-dialog-message">' +
'<label><input class="confirm-attendees-decline" type="checkbox" checked="checked" value="1" name="_decline" />&nbsp;' +
html += '<div class="dialog-message">' +
'<label><input class="confirm-attendees-decline pretty-checkbox" type="checkbox" checked="checked" value="1" name="_decline" />&nbsp;' +
rcmail.gettext('itipdeclinetask', 'tasklist') +
'</label></div>';
}
else if (me.has_attendees(rec) && me.is_organizer(rec)) {
html += '<div class="task-dialog-message">' +
'<label><input class="confirm-attendees-notify" type="checkbox" checked="checked" value="1" name="_notify" />&nbsp;' +
html += '<div class="dialog-message">' +
'<label><input class="confirm-attendees-notify pretty-checkbox" type="checkbox" checked="checked" value="1" name="_notify" />&nbsp;' +
rcmail.gettext('sendcancellation', 'tasklist') +
'</label></div>';
}

View file

@ -470,7 +470,7 @@ class tasklist_ui
*/
function edit_attendees_notify($attrib = array())
{
$checkbox = new html_checkbox(array('name' => '_notify', 'id' => 'edit-attendees-donotify', 'value' => 1));
$checkbox = new html_checkbox(array('name' => '_notify', 'id' => 'edit-attendees-donotify', 'value' => 1, 'class' => 'pretty-checkbox'));
return html::div($attrib, html::label(null, $checkbox->show(1) . ' ' . $this->plugin->gettext('sendnotifications')));
}