|
|
@ -120,13 +120,11 @@ function rcube_elastic_ui()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// menu/sidebar/list button
|
|
|
|
// menu/sidebar/list button
|
|
|
|
buttons.menu.on('click', function() { show_menu(); return false; });
|
|
|
|
buttons.menu.on('click', function() { app_menu(true); return false; });
|
|
|
|
buttons.back_sidebar.on('click', function() { show_sidebar(); return false; });
|
|
|
|
buttons.back_sidebar.on('click', function() { show_sidebar(); return false; });
|
|
|
|
buttons.back_list.on('click', function() { show_list(); return false; });
|
|
|
|
buttons.back_list.on('click', function() { show_list(); return false; });
|
|
|
|
buttons.back_content.on('click', function() { show_content(true); return false; });
|
|
|
|
buttons.back_content.on('click', function() { show_content(true); return false; });
|
|
|
|
|
|
|
|
|
|
|
|
$('body').on('click', function() { if (mode == 'phone') layout.menu.addClass('hidden'); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set content frame title in parent window (exclude ext-windows and dialog frames)
|
|
|
|
// Set content frame title in parent window (exclude ext-windows and dialog frames)
|
|
|
|
if (is_framed && !rcmail.env.extwin && !parent.$('.ui-dialog:visible').length) {
|
|
|
|
if (is_framed && !rcmail.env.extwin && !parent.$('.ui-dialog:visible').length) {
|
|
|
|
if (title = $('h1.voice:first').text()) {
|
|
|
|
if (title = $('h1.voice:first').text()) {
|
|
|
@ -268,7 +266,7 @@ function rcube_elastic_ui()
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// buttons that should be hidden on small screen devices
|
|
|
|
// buttons that should be hidden on small screen devices
|
|
|
|
$('a[data-hidden],button[data-hidden]').each(function() {
|
|
|
|
$('[data-hidden]').each(function() {
|
|
|
|
var parent = $(this).parent('li'),
|
|
|
|
var parent = $(this).parent('li'),
|
|
|
|
sizes = $(this).data('hidden').split(',');
|
|
|
|
sizes = $(this).data('hidden').split(',');
|
|
|
|
|
|
|
|
|
|
|
@ -1305,15 +1303,13 @@ function rcube_elastic_ui()
|
|
|
|
function screen_resize_phone()
|
|
|
|
function screen_resize_phone()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
screen_resize_small_all();
|
|
|
|
screen_resize_small_all();
|
|
|
|
|
|
|
|
app_menu(false);
|
|
|
|
layout.menu.addClass('hidden');
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function screen_resize_small()
|
|
|
|
function screen_resize_small()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
screen_resize_small_all();
|
|
|
|
screen_resize_small_all();
|
|
|
|
|
|
|
|
app_menu(true);
|
|
|
|
layout.menu.removeClass('hidden');
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function screen_resize_normal()
|
|
|
|
function screen_resize_normal()
|
|
|
@ -1330,8 +1326,7 @@ function rcube_elastic_ui()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
layout.content.removeClass('hidden');
|
|
|
|
layout.content.removeClass('hidden');
|
|
|
|
layout.menu.removeClass('hidden');
|
|
|
|
app_menu(true);
|
|
|
|
|
|
|
|
|
|
|
|
screen_resize_small_none();
|
|
|
|
screen_resize_small_none();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -1455,15 +1450,26 @@ function rcube_elastic_ui()
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// show menu widget
|
|
|
|
// show menu widget
|
|
|
|
function show_menu()
|
|
|
|
function app_menu(show)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var show = true;
|
|
|
|
if (show) {
|
|
|
|
|
|
|
|
|
|
|
|
if (mode == 'phone') {
|
|
|
|
if (mode == 'phone') {
|
|
|
|
show = layout.menu.is(':visible') ? false : true;
|
|
|
|
$('<div id="menu-overlay" class="popover-overlay">').appendTo('body');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!env.menu_initialized) {
|
|
|
|
|
|
|
|
env.menu_initialized = true;
|
|
|
|
|
|
|
|
$('a', layout.menu).on('click', function(e) { if (mode == 'phone') app_menu(); });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
layout.menu.addClass('popover');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
layout.menu[show ? 'removeClass' : 'addClass']('hidden');
|
|
|
|
layout.menu.removeClass('hidden');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
$('#menu-overlay').remove();
|
|
|
|
|
|
|
|
layout.menu.addClass('hidden').removeClass('popover');
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|