Elastic: Some improvements in Tasks

This commit is contained in:
Aleksander Machniak 2018-03-27 15:33:18 +00:00
parent 563262d110
commit f35d4fc14f
6 changed files with 38 additions and 15 deletions

View file

@ -337,7 +337,7 @@ html.touch #tasklist {
.description {
display: block;
white-space: pre;
white-space: pre-wrap;
}
.title {

View file

@ -390,8 +390,23 @@ button.btn.print:before {
padding: .5em 1em;
background-color: @color-black-shade-bg;
button {
margin-right: 1rem;
}
.prop {
margin-left: .5rem;
display: inline-block;
vertical-align: middle;
label {
margin: 0;
}
label:before {
line-height: 1.25;
margin-right: .25rem;
}
}
@media print {

View file

@ -102,6 +102,7 @@ $labels['import'] = 'Import';
$labels['importtasks'] = 'Import Tasks';
$labels['viewactions'] = 'View actions';
$labels['focusview'] = 'View only this list';
$labels['activate'] = 'Activate';
// date words
$labels['on'] = 'on';

View file

@ -3,7 +3,7 @@
<div class="print-config">
<button class="btn btn-primary print" onclick="window.print()"><roundcube:label name='print' /></button>
<span class="prop">
<input type="checkbox" id="propdescription" checked="checked" onclick="$('#tasklist .description')[this.checked ? 'show' : 'hide']()" />
<input type="checkbox" id="propdescription" checked="checked" class="pretty-checkbox" onclick="$('#tasklist .description')[this.checked ? 'show' : 'hide']()" />
<label for="propdescription"><roundcube:label name="tasklist.printdescriptions" /></label>
</span>
</div>

View file

@ -1685,7 +1685,7 @@ function rcube_tasklist_ui(settings)
if (!task_draghelper)
task_draghelper = $('<div id="rcmdraglayer" class="taskitem-draghelper">');
var title = $(e.target).parents('li').first().find('.title').text();
var title = $(e.target).parents('li').first().find('.title:first').text();
task_draghelper.html(Q(title) || '&#x2714');
@ -2573,7 +2573,7 @@ function rcube_tasklist_ui(settings)
// activate the first tab
$('#taskedit:not([data-notabs])').tabs('option', 'active', 0); // Larry
if (elastic && $.tab)
if ($('#taskedit').data('notabs'))
$('#taskedit li.nav-item:first-child a').tab('show'); // Elastic
// define dialog buttons
@ -2722,12 +2722,12 @@ function rcube_tasklist_ui(settings)
me.dialog_resize($dialog.get(0), $dialog.height(), 580);
}
title.select();
// Elastic
editform.removeClass('hidden').parents('.watermark').addClass('formcontainer');
$('#taskedit').parent().trigger('loaded');
title.select();
// show nav buttons on mobile (elastic)
$('.content-frame-navigation > .buttons > :not(.disabled)').show();
}

View file

@ -253,8 +253,8 @@ class tasklist_ui
}
$classes = array('tasklist');
$title = $prop['title'] ?: ($prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ?
html_entity_decode($prop['name'], ENT_COMPAT, RCUBE_CHARSET) : '');
$title = $prop['title'] ?: ($prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ?
html_entity_decode($prop['name'], ENT_COMPAT, RCUBE_CHARSET) : '');
if ($prop['virtual'])
$classes[] = 'virtual';
@ -267,15 +267,22 @@ class tasklist_ui
if (!$activeonly || $prop['active']) {
$label_id = 'tl:' . $id;
$chbox = html::tag('input', array(
'type' => 'checkbox',
'name' => '_list[]',
'value' => $id,
'checked' => $prop['active'],
'title' => $this->plugin->gettext('activate'),
'aria-labelledby' => $label_id
));
return html::div(join(' ', $classes),
html::a(array('class' => 'listname', 'title' => $title, 'href' => '#', 'id' => $label_id), $prop['listname'] ?: $prop['name']) .
($prop['virtual'] ? '' :
html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id)) .
html::span('actions',
($prop['removable'] ? html::a(array('href' => '#', 'class' => 'remove', 'title' => $this->plugin->gettext('removelist')), ' ') : '') .
html::a(array('href' => '#', 'class' => 'quickview', 'title' => $this->plugin->gettext('focusview'), 'role' => 'checkbox', 'aria-checked' => 'false'), ' ') .
(isset($prop['subscribed']) ? html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->plugin->gettext('tasklistsubscribe'), 'role' => 'checkbox', 'aria-checked' => $prop['subscribed'] ? 'true' : 'false'), ' ') : '')
)
($prop['virtual'] ? '' : $chbox . html::span('actions',
($prop['removable'] ? html::a(array('href' => '#', 'class' => 'remove', 'title' => $this->plugin->gettext('removelist')), ' ') : '')
. html::a(array('href' => '#', 'class' => 'quickview', 'title' => $this->plugin->gettext('focusview'), 'role' => 'checkbox', 'aria-checked' => 'false'), ' ')
. (isset($prop['subscribed']) ? html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->plugin->gettext('tasklistsubscribe'), 'role' => 'checkbox', 'aria-checked' => $prop['subscribed'] ? 'true' : 'false'), ' ') : '')
)
)
);
}