mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
New development. Display lateral menus whit left click.
This commit is contained in:
parent
86b3cfe4cc
commit
0acf4f41eb
@ -74,6 +74,7 @@ var fixed_header = <?php echo json_encode((bool)$config_fixed_header); ?>;
|
|||||||
var id_user = "<?php echo $config['id_user']; ?>";
|
var id_user = "<?php echo $config['id_user']; ?>";
|
||||||
var cookie_name = id_user + '-pandora_menu_state';
|
var cookie_name = id_user + '-pandora_menu_state';
|
||||||
var cookie_name_encoded = btoa(cookie_name);
|
var cookie_name_encoded = btoa(cookie_name);
|
||||||
|
var click_display = "<?php echo $config["click_display"]; ?>";
|
||||||
|
|
||||||
var menuState = $.cookie(cookie_name_encoded);
|
var menuState = $.cookie(cookie_name_encoded);
|
||||||
if (!menuState) {
|
if (!menuState) {
|
||||||
@ -251,18 +252,17 @@ $(document).ready( function() {
|
|||||||
handsIn = 0;
|
handsIn = 0;
|
||||||
handsIn2 = 0;
|
handsIn2 = 0;
|
||||||
|
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --INI
|
||||||
|
if(!click_display){
|
||||||
$('.menu_icon').mouseenter(function() {
|
$('.menu_icon').mouseenter(function() {
|
||||||
table_hover = $(this);
|
table_hover = $(this);
|
||||||
handsIn = 1;
|
handsIn = 1;
|
||||||
openTime = new Date().getTime();
|
openTime = new Date().getTime();
|
||||||
$("ul#sub"+table_hover[0].id).show();
|
$("ul#sub"+table_hover[0].id).show();
|
||||||
//$('div#menu').offset().top;
|
|
||||||
//$('div#menu').css('overflow','visible');
|
|
||||||
if( typeof(table_noHover) != 'undefined')
|
if( typeof(table_noHover) != 'undefined')
|
||||||
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
|
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
|
||||||
$("ul#sub"+table_noHover[0].id).hide();
|
$("ul#sub"+table_noHover[0].id).hide();
|
||||||
}).mouseleave(function() {
|
}).mouseleave(function() {
|
||||||
//$('div#menu').css('overflow', 'hidden');
|
|
||||||
table_noHover = $(this);
|
table_noHover = $(this);
|
||||||
handsIn = 0;
|
handsIn = 0;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
@ -274,6 +274,30 @@ $(document).ready( function() {
|
|||||||
}, 3500);
|
}, 3500);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.menu_icon').on("click", function() {
|
||||||
|
if( typeof(table_hover) != 'undefined'){
|
||||||
|
$("ul#sub"+table_hover[0].id).hide();
|
||||||
|
}
|
||||||
|
table_hover = $(this);
|
||||||
|
handsIn = 1;
|
||||||
|
openTime = new Date().getTime();
|
||||||
|
$("ul#sub"+table_hover[0].id).show();
|
||||||
|
}).mouseleave(function() {
|
||||||
|
table_noHover = $(this);
|
||||||
|
handsIn = 0;
|
||||||
|
setTimeout(function() {
|
||||||
|
opened = new Date().getTime() - openTime;
|
||||||
|
if(opened > 5000 && handsIn == 0) {
|
||||||
|
openTime = 6000;
|
||||||
|
$("ul#sub"+table_hover[0].id).hide();
|
||||||
|
}
|
||||||
|
}, 5500);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --END
|
||||||
|
|
||||||
- $('.has_submenu').mouseenter(function() {
|
- $('.has_submenu').mouseenter(function() {
|
||||||
table_hover2 = $(this);
|
table_hover2 = $(this);
|
||||||
@ -296,6 +320,8 @@ $(document).ready( function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --INI
|
||||||
|
if(!click_display){
|
||||||
$('#container').click(function() {
|
$('#container').click(function() {
|
||||||
openTime = 4000;
|
openTime = 4000;
|
||||||
if( typeof(table_hover) != 'undefined')
|
if( typeof(table_hover) != 'undefined')
|
||||||
@ -307,6 +333,20 @@ $(document).ready( function() {
|
|||||||
$('ul.submenu').css('left', '44px');
|
$('ul.submenu').css('left', '44px');
|
||||||
$('div#title_menu').hide();
|
$('div#title_menu').hide();
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
$('#main').click(function() {
|
||||||
|
openTime = 4000;
|
||||||
|
if( typeof(table_hover) != 'undefined')
|
||||||
|
$("ul#sub"+table_hover[0].id).hide();
|
||||||
|
if( typeof(table_hover2) != 'undefined')
|
||||||
|
$("ul#sub"+table_hover2[0].id).hide();
|
||||||
|
$('#menu').css('width', '45px');
|
||||||
|
$('li.menu_icon').removeClass( " no_hidden_menu");
|
||||||
|
$('ul.submenu').css('left', '44px');
|
||||||
|
$('div#title_menu').hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --END
|
||||||
|
|
||||||
$('div.menu>ul>li>ul>li>a').click(function() {
|
$('div.menu>ul>li>ul>li>a').click(function() {
|
||||||
openTime = 4000;
|
openTime = 4000;
|
||||||
|
@ -99,6 +99,19 @@ $table_behaviour->data[$row][0] = __('Display text when proc modules have state
|
|||||||
$table_behaviour->data[$row][1] = html_print_input_text ('render_proc_fail', $config["render_proc_fail"], '', 25, 25, true);
|
$table_behaviour->data[$row][1] = html_print_input_text ('render_proc_fail', $config["render_proc_fail"], '', 25, 25, true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --INI
|
||||||
|
$table_behaviour->data[$row][0] = __('Display lateral menus with click').
|
||||||
|
ui_print_help_tip(__('If you check this option, the lateral menus display with left click. Otherwise it will show by placing the mouse over'), true);
|
||||||
|
$table_behaviour->data[$row][1] = __('Yes') . ' ' .
|
||||||
|
html_print_radio_button ('click_display', 1, '',
|
||||||
|
$config["click_display"], true) .
|
||||||
|
' ';
|
||||||
|
$table_behaviour->data[$row][1] .= __('No') . ' ' .
|
||||||
|
html_print_radio_button ('click_display', 0, '',
|
||||||
|
$config["click_display"], true);
|
||||||
|
$row++;
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --END
|
||||||
|
|
||||||
echo "<fieldset>";
|
echo "<fieldset>";
|
||||||
echo "<legend>" . __('Behaviour configuration') . "</legend>";
|
echo "<legend>" . __('Behaviour configuration') . "</legend>";
|
||||||
html_print_table ($table_behaviour);
|
html_print_table ($table_behaviour);
|
||||||
|
@ -498,7 +498,10 @@ function config_update_config () {
|
|||||||
$error_update[] = __('Display text proc modules have state is ok');
|
$error_update[] = __('Display text proc modules have state is ok');
|
||||||
if (!config_update_value ('render_proc_fail', (string) get_parameter('render_proc_fail', __('Fail') )))
|
if (!config_update_value ('render_proc_fail', (string) get_parameter('render_proc_fail', __('Fail') )))
|
||||||
$error_update[] = __('Display text when proc modules have state critical');
|
$error_update[] = __('Display text when proc modules have state critical');
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --INI
|
||||||
|
if (!config_update_value ('click_display', (bool) get_parameter('click_display', false)))
|
||||||
|
$error_update[] = __('Display data of proc modules in other format');
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --END
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -1389,7 +1392,11 @@ function config_process_config () {
|
|||||||
if (!isset($config["render_proc_fail"])) {
|
if (!isset($config["render_proc_fail"])) {
|
||||||
config_update_value ('render_proc_fail', __('Fail') );
|
config_update_value ('render_proc_fail', __('Fail') );
|
||||||
}
|
}
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --INI
|
||||||
|
if (!isset($config["click_display"])) {
|
||||||
|
config_update_value ('click_display', 0);
|
||||||
|
}
|
||||||
|
//Daniel maya 02/06/2016 Display menu with click --END
|
||||||
if (!isset($config['command_snapshot'])) {
|
if (!isset($config['command_snapshot'])) {
|
||||||
config_update_value ('command_snapshot', 1);
|
config_update_value ('command_snapshot', 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user