a few more skinning improvements

dev_contacts
PhilW 6 years ago
parent 0d819ea65e
commit 494614a5d4

@ -1,7 +1,7 @@
<roundcube:object name="swipeenv" param="menuname" val="messagelistmenu" />
<roundcube:object name="swipeenv" param="listselection_class" val="withselection" />
<div id="swipeoptions-menu" class="popupmenu propform" role="dialog" aria-labelledby="aria-label-listoptions" data-options-menuid="listoptions-menu">
<fieldset class="swipe">
<div id="swipeoptions-menu" data-options-menuid="listoptions-menu">
<fieldset class="swipe-menu">
<legend><roundcube:label name="swipe.swipeactions" /></legend>
<roundcube:if condition="!in_array('swipe_actions.messagelist.left', (array)config:dont_override)" />
<div class="form-group row swipeoptions-left">

@ -5,7 +5,7 @@
@import (reference) "../../../../skins/elastic/styles/variables";
@import (reference) "../../../../skins/elastic/styles/mixins";
#listoptions-menu > fieldset.swipe {
#listoptions-menu > fieldset.swipe-menu {
margin-top: 1.5rem;
}

@ -1 +1 @@
#listoptions-menu>fieldset.swipe{margin-top:1.5rem}#swipe-action{position:absolute;background-color:#f1f3f4;color:#161b1d;display:flex;align-items:center;border-collapse:collapse}#swipe-action.checkmail,#swipe-action.select,#swipe-action.deselect{background-color:#8b9fa7;color:#fff}#swipe-action.delete,#swipe-action.junk{background-color:#ff5552;color:#fff}#swipe-action.flagged,#swipe-action.unflagged,#swipe-action.read,#swipe-action.unread{background-color:#37beff;color:#fff}#swipe-action.forward,#swipe-action.reply,#swipe-action.replyall,#swipe-action.notjunk{background-color:#41b849;color:#fff}#swipe-action.move,#swipe-action.archive{background-color:#ffd452;color:#fff}#swipe-action>div.left{position:absolute;right:.5em}#swipe-action>div.down{margin:0 auto}#swipe-action>div.down>span::before{width:auto;float:none;margin:0;margin-bottom:.2em;padding:0}#swipe-action>div>span{line-height:100%;font-size:1.2em}#swipe-action>div>span::before{font-size:1.25em;display:block;float:left;margin:0 .25rem 0 0;width:1.18em;height:1em;font-family:'Icons';font-style:normal;font-weight:900;text-decoration:inherit;text-align:center;speak:none;font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding:0 1.25em 0 .5em}#swipe-action>div>span.checkmail::before{content:"\f021"}#swipe-action>div>span.delete::before{content:"\f2ed"}#swipe-action>div>span.flagged::before{content:"\f024"}#swipe-action>div>span.forward::before{content:"\f064"}#swipe-action>div>span.unflagged::before{content:"\f024";font-weight:400}#swipe-action>div>span.move::before{content:"\f0b2"}#swipe-action>div>span.read::before{content:"\f111";font-weight:400}#swipe-action>div>span.unread::before{content:"\f111"}#swipe-action>div>span.reply::before{content:"\f3e5"}#swipe-action>div>span.replyall::before{content:"\f122"}#swipe-action>div>span.select::before{content:"\f14a";font-weight:400}#swipe-action>div>span.deselect::before{content:"\f0c8";font-weight:400}#swipe-action>div>span.archive::before{content:"\f187"}#swipe-action>div>span.junk::before{content:"\f06d"}#swipe-action>div>span.notjunk::before{content:"\f01c"}.swipe-active,.swipe-active>td{background-color:#fff}#messagelist-content{overscroll-behavior:contain}#messagelist.swipe-active{display:block;height:100%}
#listoptions-menu>fieldset.swipe-menu{margin-top:1.5rem}#swipe-action{position:absolute;background-color:#f1f3f4;color:#161b1d;display:flex;align-items:center;border-collapse:collapse}#swipe-action.checkmail,#swipe-action.select,#swipe-action.deselect{background-color:#8b9fa7;color:#fff}#swipe-action.delete,#swipe-action.junk{background-color:#ff5552;color:#fff}#swipe-action.flagged,#swipe-action.unflagged,#swipe-action.read,#swipe-action.unread{background-color:#37beff;color:#fff}#swipe-action.forward,#swipe-action.reply,#swipe-action.replyall,#swipe-action.notjunk{background-color:#41b849;color:#fff}#swipe-action.move,#swipe-action.archive{background-color:#ffd452;color:#fff}#swipe-action>div.left{position:absolute;right:.5em}#swipe-action>div.down{margin:0 auto}#swipe-action>div.down>span::before{width:auto;float:none;margin:0;margin-bottom:.2em;padding:0}#swipe-action>div>span{line-height:100%;font-size:1.2em}#swipe-action>div>span::before{font-size:1.25em;display:block;float:left;margin:0 .25rem 0 0;width:1.18em;height:1em;font-family:'Icons';font-style:normal;font-weight:900;text-decoration:inherit;text-align:center;speak:none;font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding:0 1.25em 0 .5em}#swipe-action>div>span.checkmail::before{content:"\f021"}#swipe-action>div>span.delete::before{content:"\f2ed"}#swipe-action>div>span.flagged::before{content:"\f024"}#swipe-action>div>span.forward::before{content:"\f064"}#swipe-action>div>span.unflagged::before{content:"\f024";font-weight:400}#swipe-action>div>span.move::before{content:"\f0b2"}#swipe-action>div>span.read::before{content:"\f111";font-weight:400}#swipe-action>div>span.unread::before{content:"\f111"}#swipe-action>div>span.reply::before{content:"\f3e5"}#swipe-action>div>span.replyall::before{content:"\f122"}#swipe-action>div>span.select::before{content:"\f14a";font-weight:400}#swipe-action>div>span.deselect::before{content:"\f0c8";font-weight:400}#swipe-action>div>span.archive::before{content:"\f187"}#swipe-action>div>span.junk::before{content:"\f06d"}#swipe-action>div>span.notjunk::before{content:"\f01c"}.swipe-active,.swipe-active>td{background-color:#fff}#messagelist-content{overscroll-behavior:contain}#messagelist.swipe-active{display:block;height:100%}

@ -414,12 +414,12 @@ $(document).ready(function() {
rcmail.set_list_options = function(cols, sort_col, sort_order, threads, layout) {
var post = {};
$.each(['left', 'right', 'down'], function() {
var fieldtype = rcmail.env['swipe_input_' + this];
var option_input = $('.swipeoptions-' + this).find('select,input').first();
if (fieldtype == 'radio') {
if ($(option_input).is('input[type="radio"]')) {
selector = 'input[name="swipe_' + this + '"]:checked';
}
else if (fieldtype == 'select') {
else if ($(option_input).is('select')) {
selector = 'select[name="swipe_' + this + '"]';
selector += $(selector).length > 1 ? ':visible' : '';
}
@ -443,26 +443,27 @@ $(document).ready(function() {
// add swipe options to list options menu
rcmail.addEventListener('menu-open', function(p) {
if (p.name == rcmail.env.swipe_menuname) {
if (!rcmail.message_list.draggable) {
if (!rcmail.message_list.draggable && $('.swipe-menu').find('select,input').length > 0) {
// set form values
$.each(['left', 'right', 'down'], function() {
var fieldtype = rcmail.env['swipe_input_' + this];
if (fieldtype == 'radio') {
var option_input = $('.swipeoptions-' + this).find('select,input').first();
if ($(option_input).is('input[type="radio"]')) {
selector = '#swipeoptions-' + this + '-' + rcmail.env.swipe_actions[this];
selector += $(selector).length > 1 ? ':visible' : '';
$(selector).prop('checked', true);
}
else if (fieldtype == 'select') {
else if ($(option_input).is('select')) {
selector = 'select[name="swipe_' + this + '"]';
selector += $(selector).length > 1 ? ':visible' : '';
$(selector).val(rcmail.env.swipe_actions[this]);
}
});
$('fieldset.swipe').show();
$('.swipe-menu').show();
}
else {
$('fieldset.swipe').hide();
$('.swipe-menu').hide();
}
}
});

@ -98,7 +98,6 @@ class swipe extends rcube_plugin
$swipe_actions = $this->actions[$args['source']][$args['axis']];
$args['id'] = 'swipeoptions-' . $args['direction'];
$args['name'] = 'swipe_' . $args['direction'];
$this->rcube->output->set_env('swipe_input_' . $args['direction'], $args['type']);
// Allow other plugins to interact with the action list
$data = rcube::get_instance()->plugins->exec_hook('swipe_actions_list', array('actions' => $swipe_actions, 'source' => $args['source'], 'axis' => $args['axis']));
@ -125,13 +124,19 @@ class swipe extends rcube_plugin
$radio = new html_radiobutton(array('name' => $args['name'], 'id' => $fieldid, 'class' => $val, 'value' => $val));
$radio = $radio->show($this->config[$args['direction']]);
if (isset($args['innertag']))
$text = html::tag($args['innertag'], null, $text);
if (isset($args['innertag'])) {
$text = html::tag($args['innertag'], null, $text);
}
if (isset($args['spacer'])) {
$text = $args['spacer'] . $text;
}
$radio = html::label($fieldid, $radio . $text);
if (isset($args['outertag']))
$radio = html::tag($args['outertag'], null, $radio);
if (isset($args['outertag'])) {
$radio = html::tag($args['outertag'], null, $radio);
}
$field .= $radio;
}

Loading…
Cancel
Save