Improve error template plus some small improvements here and there

pull/5742/merge
Aleksander Machniak 7 years ago
parent 41ebae1dfb
commit 239a590a29

@ -32,6 +32,7 @@ button.btn {
&:before {
&:extend(.font-icon-class);
}
&.yes:before,
&.submit:before,
&.save:before {
content: @fa-var-check;
@ -67,6 +68,7 @@ button.btn {
&.attach:before {
content: @fa-var-paperclip;
}
&.no:before,
&.close:before,
&.cancel:before {
content: @fa-var-close;

@ -146,7 +146,7 @@ font.bold {
display: flex;
flex-direction: column;
height: 22rem;
margin-bottom: .25rem;
margin-bottom: .5rem;
border: 1px solid @color-table-border;
& > .content {
@ -286,6 +286,10 @@ table.table {
label {
margin: 0;
}
fieldset.tab-pane & thead th {
border: 0;
}
}
html.touch {
@ -301,5 +305,6 @@ html.touch {
.table {
thead th {
border-width: 1px;
white-space: nowrap;
}
}

@ -87,6 +87,10 @@
color: @color-list-deleted;
}
span.secondary {
color: @color-list-secondary;
}
/* Focus indicator */
/* because of border-collapse, we make the left border twice what we want it to be - half will be hidden to the left */
@media screen and (min-width: @screen-width-large) {

@ -138,6 +138,15 @@
font-weight: normal;
}
h3 {
font-weight: bold;
font-size: 1.2rem;
}
p {
margin: 1rem 0;
}
&.boxerror,
&.boxinformation,
&.boxwarning {

@ -5,14 +5,16 @@
<div class="content selected" role="main">
<div class="header">
<a class="button icon menu-button" href="#menu"><span class="inner"><roundcube:label name="menu" /></span></a>
<a class="button icon back-list-button" href="#back"><span class="inner"><roundcube:label name="back" /></span></a>
</div>
<div class="frame-content scroller">
<roundcube:else />
<div class="content selected" role="main">
<div class="frame-content scroller">
<roundcube:endif />
$__page_content
</div>
</div>
<roundcube:include file="includes/footer.html" />

@ -24,6 +24,9 @@
<link rel="stylesheet" type="text/css" href="/styles/styles.css">
<roundcube:link rel="stylesheet" type="text/css" href="/styles/print.css" condition="env:action == 'print'" />
<roundcube:endif />
<roundcube:if condition="template:name == 'error'" />
<script src="program/js/jquery.min.js" type="text/javascript"></script>
<roundcube:endif />
</head>
<body class="task-<roundcube:exp expression="env:task ?: 'error'">">
<roundcube:if condition="!env:framed || env:extwin" />

@ -54,6 +54,7 @@ function rcube_elastic_ui()
this.register_content_buttons = register_content_buttons;
this.menu_hide = menu_hide;
this.menu_toggle = menu_toggle;
this.popup_init = popup_init;
this.about_dialog = about_dialog;
this.headers_dialog = headers_dialog;
this.spellmenu = spellmenu;
@ -67,7 +68,6 @@ function rcube_elastic_ui()
this.smart_field_reset = smart_field_reset;
this.form_errors = form_errors;
this.switch_nav_list = switch_nav_list;
this.popup_init = popup_init;
// Initialize layout
@ -141,7 +141,7 @@ function rcube_elastic_ui()
}
// Add content frame toolbar in the footer, for content buttons and navigation
if (!is_framed && layout.content.length) {
if (!is_framed && layout.content.length && rcmail.env.task) {
env.frame_nav = $('<div class="footer toolbar content-frame-navigation hide-nav-buttons">')
.append($('<a class="button prev">')
.append($('<span class="inner"></span>').text(rcmail.gettext('previous'))))
@ -220,7 +220,7 @@ function rcube_elastic_ui()
var data, name = RegExp.$1,
button = find_button(this.id);
if (data = button.data) {
if (button && (data = button.data)) {
if (data.sel) {
data.sel += ' button ' + name;
data.sel = data.sel.replace('button-selected', 'selected');
@ -232,9 +232,10 @@ function rcube_elastic_ui()
rcmail.buttons[button.command][button.index] = data;
rcmail.init_button(button.command, data);
$(this).addClass('button ' + name);
$('.button-inner', this).addClass('inner');
}
$(this).addClass('button ' + name);
$('.button-inner', this).addClass('inner');
}
});
@ -2731,31 +2732,39 @@ function rcube_elastic_ui()
};
}
/**
* Elastic version of show_menu as we don't need e.g. menu positioning from core
* TODO: keyboard navigation in menus
*/
rcmail.show_menu = function(prop, show, event)
{
var name = typeof prop == 'object' ? prop.menu : prop,
obj = $('#' + name);
if (window.rcmail) {
/**
* Elastic version of show_menu as we don't need e.g. menu positioning from core
* TODO: keyboard navigation in menus
*/
rcmail.show_menu = function(prop, show, event)
{
var name = typeof prop == 'object' ? prop.menu : prop,
obj = $('#' + name);
if (typeof prop == 'string') {
prop = {menu: name};
}
if (typeof prop == 'string') {
prop = {menu: name};
// just delegate the action to rcube_elastic_ui
return rcmail.triggerEvent(show === false ? 'menu-close' : 'menu-open', {name: name, obj: obj, props: prop, originalEvent: event});
}
// just delegate the action to rcube_elastic_ui
return rcmail.triggerEvent(show === false ? 'menu-close' : 'menu-open', {name: name, obj: obj, props: prop, originalEvent: event});
}
/**
* Elastic version of hide_menu as we don't need e.g. menus stack handling
*/
rcmail.hide_menu = function(name, event)
{
// delegate to rcube_elastic_ui
return rcmail.triggerEvent('menu-close', {name: name, props: {menu: name}, originalEvent: event});
}
/**
* Elastic version of hide_menu as we don't need e.g. menus stack handling
*/
rcmail.hide_menu = function(name, event)
{
// delegate to rcube_elastic_ui
return rcmail.triggerEvent('menu-close', {name: name, props: {menu: name}, originalEvent: event});
var UI = new rcube_elastic_ui();
}
else {
// rcmail does not exists e.g. on the error template inside a frame
// we fake the engine a little
var rcmail = parent.rcmail;
var rcube_webmail = parent.rcube_webmail;
var UI = new rcube_elastic_ui();
}
var UI = new rcube_elastic_ui();

Loading…
Cancel
Save