From 4a5aa6e83fa8aacfe2a11063b3f8002789cb5c87 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 2 Sep 2017 19:23:09 +0200 Subject: [PATCH] [data-content-button] A way to move a button to content frame header for small screens we place Reply button in the header when we preview a mail message we place Send button in the header when we compose a message --- skins/elastic/README.md | 2 + skins/elastic/styles/layout.less | 10 +++ skins/elastic/styles/widgets/toolbar.less | 18 +++++- skins/elastic/templates/compose.html | 2 +- .../elastic/templates/includes/mail-menu.html | 2 +- skins/elastic/ui.js | 61 +++++++++++++++---- 6 files changed, 81 insertions(+), 14 deletions(-) diff --git a/skins/elastic/README.md b/skins/elastic/README.md index c0f949088..22a93bb91 100644 --- a/skins/elastic/README.md +++ b/skins/elastic/README.md @@ -93,3 +93,5 @@ RULES: - `data-hidden-small`: Makes a menu entry/button hidden on small devices. Can be used for example for functionality not implemented or that has no sense on phones or touch devices. + - `data-content-button`: Makes the action button with this attribute to be copied + to the content frame header on small/phone screens. diff --git a/skins/elastic/styles/layout.less b/skins/elastic/styles/layout.less index 6c8786e7e..39ce8d0bc 100644 --- a/skins/elastic/styles/layout.less +++ b/skins/elastic/styles/layout.less @@ -212,6 +212,16 @@ html.iframe body { max-width: none; } + body > #layout > div > .header, + body > #layout > div > .footer { + a.button:before { + font-size: 1.75rem; + height: @layout-touch-header-height; + margin: 0; + width: 1.4em; + } + } + body > #layout > div > .header.with-search-and-toolbar { & > .header-title { margin-right: 1.5em; diff --git a/skins/elastic/styles/widgets/toolbar.less b/skins/elastic/styles/widgets/toolbar.less index e100bbd48..6acd3068e 100644 --- a/skins/elastic/styles/widgets/toolbar.less +++ b/skins/elastic/styles/widgets/toolbar.less @@ -11,7 +11,6 @@ /*** Toolbar widget ***/ - .toolbar { &.listing a, a { @@ -167,6 +166,23 @@ font-size: 1.75rem; } } + + a.button { + display: inline-block; + + &:before { + &:extend(.font-icon-class); + float: none; + } + + &.reply:before { + content: @fa-var-mail-reply; + } + + &.send:before { + content: @fa-var-paper-plane; + } + } } } diff --git a/skins/elastic/templates/compose.html b/skins/elastic/templates/compose.html index 8a1192db7..632b728f1 100644 --- a/skins/elastic/templates/compose.html +++ b/skins/elastic/templates/compose.html @@ -111,7 +111,7 @@ label="cancel" condition="env:extwin" tabindex="2" innerclass="inner" /> + label="send" title="sendmessage" tabindex="2" innerclass="inner" data-content-button="true" /> diff --git a/skins/elastic/templates/includes/mail-menu.html b/skins/elastic/templates/includes/mail-menu.html index 510083fe3..feb8b994d 100644 --- a/skins/elastic/templates/includes/mail-menu.html +++ b/skins/elastic/templates/includes/mail-menu.html @@ -2,7 +2,7 @@