Use iframe loader for loading frame content on Prev/Next button use

pull/5742/merge
Aleksander Machniak 7 years ago
parent 68e3350c3f
commit 1efc77481b

@ -84,8 +84,6 @@ a:hover {
color: @color-link-hover;
}
@import "layout";
/*** Font-icons ***/
@ -137,87 +135,12 @@ a:hover {
animation: fa-spin 2s infinite linear;
}
/*** Common sizing variables ***/
@listing-line-height: 2.5rem;
@listing-touch-line-height: 3.6rem;
/*** Common UI elements ***/
.hidden,
.voice {
display: none !important;
}
#rcmdraglayer {
min-width: 260px;
width: auto !important;
width: 260px;
background: @color-drag-layer-background;
z-index: 250;
color: @color-drag-layer;
white-space: nowrap;
opacity: .92;
}
.listbox .scroller {
width: 100%;
overflow-x: hidden;
overflow-y: auto;
}
#folder-selector {
overflow-y: auto;
li a.virtual {
opacity: .2;
}
}
#layout > .content .watermark {
background: url(../images/watermark.jpg) center no-repeat;
width: 100%;
height: 100%;
}
.noselect {
user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
}
.iframe-loader {
width: 100%;
height: 100%;
position: absolute;
top: 0;
background-color: rgba(255, 255, 255, .95);
display: flex;
align-items: center;
justify-content: center;
.spinner {
position: relative;
display: inline-block;
width: 7rem;
height: 7rem;
overflow: hidden;
text-indent: -999em;
color: @color-spinner-circle;
border: 1rem solid;
border-color: currentColor @color-spinner-item currentColor currentColor;
border-radius: 50%;
-webkit-animation: fa-spin 1s infinite linear;
animation: fa-spin 1s infinite linear;
}
}
@import "layout";
/*** Widgets ***/
@import "widgets/common";
@import "widgets/buttons";
@import "widgets/jqueryui";
@import "widgets/dialogs";

@ -0,0 +1,94 @@
/**
* Roundcube webmail styles for the Elastic skin
*
* Copyright (c) 2017, The Roundcube Dev Team
*
* The contents are subject to the Creative Commons Attribution-ShareAlike
* License. It is allowed to copy, distribute, transmit and to adapt the work
* by keeping credits to the original authors in the README.md file.
* See http://creativecommons.org/licenses/by-sa/3.0/ for details.
*/
/*** Common sizing variables ***/
@listing-line-height: 2.5rem;
@listing-touch-line-height: 3.6rem;
/*** Common UI elements ***/
.hidden,
.voice {
display: none !important;
}
#rcmdraglayer {
min-width: 260px;
width: auto !important;
width: 260px;
background: @color-drag-layer-background;
z-index: 250;
color: @color-drag-layer;
white-space: nowrap;
opacity: .92;
}
.listbox .scroller {
width: 100%;
overflow-x: hidden;
overflow-y: auto;
}
#folder-selector {
overflow-y: auto;
li a.virtual {
opacity: .2;
}
}
#layout > .content .watermark {
background: url(../images/watermark.jpg) center no-repeat;
width: 100%;
height: 100%;
}
.noselect {
user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
}
.iframe-loader {
width: 100%;
position: absolute;
top: 0;
bottom: 0;
background-color: rgba(255, 255, 255, .95);
display: flex;
align-items: center;
justify-content: center;
.spinner {
position: relative;
display: inline-block;
width: 7rem;
height: 7rem;
overflow: hidden;
text-indent: -999em;
color: @color-spinner-circle;
border: 1rem solid;
border-color: currentColor @color-spinner-item currentColor currentColor;
border-radius: 50%;
-webkit-animation: fa-spin 1s infinite linear;
animation: fa-spin 1s infinite linear;
}
}
.footer.toolbar + .iframe-loader {
top: @layout-header-height;
bottom: @layout-header-height;
}

@ -646,7 +646,7 @@ function rcube_elastic_ui()
}
}
// TODO: Add "message X of Y" text between buttons
// TODO: Add "message X of Y" text between buttons?
if (!env.frame_nav) {
env.frame_nav = $('<div class="footer toolbar content-frame-navigation">')
@ -657,6 +657,7 @@ function rcube_elastic_ui()
}
var prev, next, found = false,
frame = $('#' + rcmail.env.contentframe),
next_button = $('a.button.next', env.frame_nav).off('click').addClass('disabled'),
prev_button = $('a.button.prev', env.frame_nav).off('click').addClass('disabled'),
span = $('span', env.frame_nav).text('');
@ -665,6 +666,8 @@ function rcube_elastic_ui()
found = true;
next_button.removeClass('disabled').on('click', function() {
env.content_lock = true;
iframe_loader(frame);
if (next) {
list.select(next);
}
@ -679,6 +682,8 @@ function rcube_elastic_ui()
found = true;
prev_button.removeClass('disabled').on('click', function() {
env.content_lock = true;
iframe_loader(frame);
if (prev) {
list.select(prev);
}
@ -1023,6 +1028,12 @@ function rcube_elastic_ui()
*/
function message_displayed(p)
{
if (p.type == 'loading' && $('.iframe-loader:visible').length) {
// hide original message object, we don't need two "loaders"
rcmail.hide_message(p.object);
return;
}
alert_style(p.object, p.type);
$(p.object).attr('role', 'alert');
$('a', p.object).addClass('alert-link');

Loading…
Cancel
Save