mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
2014-05-21 Sergio Martin <sergio.martin@artica.es>
* general/main_menu.php godmode/setup/setup_visuals.php include/styles/pandora.css include/functions_config.php: Added autohidden menu feature git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9977 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
30a5366f8f
commit
014fe85f17
@ -1,3 +1,11 @@
|
|||||||
|
2014-05-21 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* general/main_menu.php
|
||||||
|
godmode/setup/setup_visuals.php
|
||||||
|
include/styles/pandora.css
|
||||||
|
include/functions_config.php: Added autohidden menu
|
||||||
|
feature
|
||||||
|
|
||||||
2014-05-21 Vanessa Gil <vanessa.gil@artica.es>
|
2014-05-21 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
* images/dot_blue.png
|
* images/dot_blue.png
|
||||||
|
@ -20,8 +20,18 @@ if (! isset ($config["id_user"])) {
|
|||||||
exit ();
|
exit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$autohidden_menu = 0;
|
||||||
|
|
||||||
|
if (isset ($config["autohidden_menu"]) && $config["autohidden_menu"]) {
|
||||||
|
$autohidden_menu = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($autohidden_menu) {
|
||||||
|
$menu_container_id = 'menu_container';
|
||||||
|
}
|
||||||
|
|
||||||
// Menu container prepared to autohide menu
|
// Menu container prepared to autohide menu
|
||||||
echo '<div id="menu_container_old">';
|
echo '<div id="' . $menu_container_id . '">';
|
||||||
|
|
||||||
echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
|
echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
|
||||||
require ("operation/menu.php");
|
require ("operation/menu.php");
|
||||||
@ -49,6 +59,9 @@ ui_require_jquery_file ('cookie');
|
|||||||
?>
|
?>
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
/* <![CDATA[ */
|
/* <![CDATA[ */
|
||||||
|
|
||||||
|
var autohidden_menu = <?php echo $autohidden_menu; ?>;
|
||||||
|
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
$("img.toggle").click (function () {
|
$("img.toggle").click (function () {
|
||||||
$(this).siblings ("ul").toggle ();
|
$(this).siblings ("ul").toggle ();
|
||||||
@ -63,13 +76,13 @@ $(document).ready( function() {
|
|||||||
function handlerIn() {
|
function handlerIn() {
|
||||||
handsIn = 1;
|
handsIn = 1;
|
||||||
if(openTime == 0) {
|
if(openTime == 0) {
|
||||||
$('#menu_container').animate({"left": "+=140px"}, 200);
|
show_menu();
|
||||||
openTime = new Date().getTime();
|
openTime = new Date().getTime();
|
||||||
|
|
||||||
// Close in 1 second if is not closed manually
|
// Close in 1 second if is not closed manually
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if(openTime > 0 && handsIn == 0) {
|
if(openTime > 0 && handsIn == 0) {
|
||||||
$('#menu_container').animate({"left": "-=140px"}, 100);
|
hide_menu();
|
||||||
openTime = 0;
|
openTime = 0;
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@ -81,10 +94,41 @@ $(document).ready( function() {
|
|||||||
var openedTime = new Date().getTime() - openTime;
|
var openedTime = new Date().getTime() - openTime;
|
||||||
|
|
||||||
if(openedTime > 1000) {
|
if(openedTime > 1000) {
|
||||||
$('#menu_container').animate({"left": "-=140px"}, 100);
|
hide_menu();
|
||||||
openTime = 0;
|
openTime = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function show_menu () {
|
||||||
|
$('#menu_container').animate({"left": "+=140px"}, 200);
|
||||||
|
show_menu_pretty();
|
||||||
|
}
|
||||||
|
|
||||||
|
function show_menu_pretty() {
|
||||||
|
$('div.menu ul li').css('background-position', '');
|
||||||
|
$('ul.submenu li a, li.menu_icon a, li.links a').css('visibility', '');
|
||||||
|
$('.titop').css('color', 'white');
|
||||||
|
$('.bg3').css('color', 'white');
|
||||||
|
$('.bg4').css('color', 'white');
|
||||||
|
}
|
||||||
|
|
||||||
|
function hide_menu () {
|
||||||
|
$('#menu_container').animate({"left": "-=140px"}, 100);
|
||||||
|
hide_menu_pretty();
|
||||||
|
}
|
||||||
|
|
||||||
|
function hide_menu_pretty() {
|
||||||
|
$('div.menu li').css('background-position', '140px 3px');
|
||||||
|
$('ul.submenu li a, li.menu_icon a, li.links a').css('visibility', 'hidden');
|
||||||
|
$('.titop').css('color', $('.titop').css('background-color'));
|
||||||
|
$('.bg3').css('color', $('.bg3').css('background-color'));
|
||||||
|
$('.bg4').css('color', $('.bg4').css('background-color'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (autohidden_menu) {
|
||||||
|
$('#main').css('margin-left', '40px');
|
||||||
|
hide_menu_pretty();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
|
@ -302,6 +302,11 @@ $table->data[$row][1] = html_print_select($arraySelectIcon, "gis_default_icon",
|
|||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
|
// For 5.1 Autohidden menu feature
|
||||||
|
|
||||||
|
$table->data['autohidden'][0] = __('Autohidden menu');
|
||||||
|
$table->data['autohidden'][1] = html_print_checkbox('autohidden_menu', 1, $config['autohidden_menu'], true);
|
||||||
|
|
||||||
// Juanma (07/05/2014) New feature: Table for custom front page for reports
|
// Juanma (07/05/2014) New feature: Table for custom front page for reports
|
||||||
|
|
||||||
$table->data[$row][0] = __('Custom report front page') . ui_print_help_tip(__('Custom report front page. It will be applied to all reports and templates by default.'), true);
|
$table->data[$row][0] = __('Custom report front page') . ui_print_help_tip(__('Custom report front page. It will be applied to all reports and templates by default.'), true);
|
||||||
@ -480,7 +485,6 @@ $(document).ready (function () {
|
|||||||
|
|
||||||
// Juanma (06/05/2014) New feature: Custom front page for reports
|
// Juanma (06/05/2014) New feature: Custom front page for reports
|
||||||
var custom_report = $('#checkbox-custom_report_front').prop('checked');
|
var custom_report = $('#checkbox-custom_report_front').prop('checked');
|
||||||
console.log(custom_report);
|
|
||||||
display_custom_report_front(custom_report);
|
display_custom_report_front(custom_report);
|
||||||
|
|
||||||
$("#checkbox-custom_report_front").click( function() {
|
$("#checkbox-custom_report_front").click( function() {
|
||||||
|
@ -424,6 +424,8 @@ function config_update_config () {
|
|||||||
$error_update[] = __('GIS Labels');
|
$error_update[] = __('GIS Labels');
|
||||||
if (!config_update_value ('gis_default_icon', get_parameter ('gis_default_icon')))
|
if (!config_update_value ('gis_default_icon', get_parameter ('gis_default_icon')))
|
||||||
$error_update[] = __('Default icon in GIS');
|
$error_update[] = __('Default icon in GIS');
|
||||||
|
if (!config_update_value ('autohidden_menu', get_parameter('autohidden_menu')))
|
||||||
|
$error_update[] = __('Autohidden menu');
|
||||||
|
|
||||||
$interval_values = get_parameter ('interval_values');
|
$interval_values = get_parameter ('interval_values');
|
||||||
|
|
||||||
@ -1149,6 +1151,10 @@ function config_process_config () {
|
|||||||
config_update_value ('custom_report_front_footer', '');
|
config_update_value ('custom_report_front_footer', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config['autohidden_menu'])) {
|
||||||
|
config_update_value ('autohidden_menu', 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Finally, check if any value was overwritten in a form */
|
/* Finally, check if any value was overwritten in a form */
|
||||||
config_update_config();
|
config_update_config();
|
||||||
}
|
}
|
||||||
|
@ -265,6 +265,12 @@ div#main_help div.databox p{
|
|||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div#menu_container {
|
||||||
|
-moz-border-top-right-radius: 6px;
|
||||||
|
-webkit-border-top-right-radius: 6px;
|
||||||
|
border-top-right-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
div#menu {
|
div#menu {
|
||||||
width: 165px;
|
width: 165px;
|
||||||
float: left;
|
float: left;
|
||||||
@ -2095,10 +2101,7 @@ div#main {
|
|||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
/*CLASSIC STYLE*/
|
|
||||||
margin-left: 182px;
|
margin-left: 182px;
|
||||||
/*AUTOHIDDEN MENU*/
|
|
||||||
/*margin-left: 40px;*/
|
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
background: #ECECEC;
|
background: #ECECEC;
|
||||||
min-width: 720px;
|
min-width: 720px;
|
||||||
@ -2892,6 +2895,7 @@ td.empty_field {
|
|||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#shortcut_bar {
|
#shortcut_bar {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user