From d51cbff33432b4ff0b4f5718b41a15fe7e53e15e Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 2 Oct 2013 10:08:45 +0000 Subject: [PATCH] 2013-10-02 Miguel de Dios * include/javascript/jquery.pandora.js, index.php, general/login_page.php: fixed the show the warning trial enterprise message when fail login. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8841 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++ pandora_console/general/login_page.php | 2 +- .../include/javascript/jquery.pandora.js | 55 ++++++++++--------- pandora_console/index.php | 8 ++- 4 files changed, 42 insertions(+), 29 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e25ab6f9aa..a547d91b3f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-10-02 Miguel de Dios + + * include/javascript/jquery.pandora.js, index.php, + general/login_page.php: fixed the show the warning trial enterprise + message when fail login. + 2013-10-01 Sergio Martin * include/styles/menu.css: Fixed menus item height to diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index bd80609f8b..2bbd7c020b 100644 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -104,7 +104,7 @@ echo ' html_print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login login_password"', false, true); echo ''; echo ''; break; case 'logout': diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index aa9dd519c3..44fdf90db6 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -85,32 +85,37 @@ $(document).ready (function () { }); if ($('#license_error_msg_dialog').length) { + if (typeof(process_login_ok) == "undefined") + process_login_ok = 0; - $( "#license_error_msg_dialog" ).dialog({ - dialogClass: "no-close", - resizable: true, - draggable: true, - modal: true, - height: 350, - width: 650, - overlay: { - opacity: 0.5, - background: "black" - }, - open: function() { - setTimeout(function(){ - $("#spinner_ok").hide(); - $("#ok_buttom").show(); - }, - 10000 - ); - } - }); - - $("#submit-hide-license-error-msg").click (function () { - $("#license_error_msg_dialog" ).dialog('close') - }); - + if (process_login_ok) { + + $( "#license_error_msg_dialog" ).dialog({ + dialogClass: "no-close", + resizable: true, + draggable: true, + modal: true, + height: 350, + width: 610, + overlay: { + opacity: 0.5, + background: "black" + }, + open: function() { + setTimeout(function(){ + $("#spinner_ok").hide(); + $("#ok_buttom").show(); + }, + 10000 + ); + } + }); + + $("#submit-hide-license-error-msg").click (function () { + $("#license_error_msg_dialog" ).dialog('close') + }); + + } } diff --git a/pandora_console/index.php b/pandora_console/index.php index 97e4fe8ebb..3cb1b33182 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -68,7 +68,7 @@ session_start (); require_once ("include/config.php"); // If metaconsole activated, redirect to it -if($config['metaconsole'] == 1 && $config['enterprise_installed'] == 1) { +if ($config['metaconsole'] == 1 && $config['enterprise_installed'] == 1) { header ("Location: " . $config['homeurl'] . "enterprise/meta"); } @@ -239,6 +239,8 @@ elseif (! isset ($config['id_user']) && isset ($_GET["login"])) { //login ok and password has not expired $process_login = true; + echo ""; + unset ($_GET["sec2"]); $_GET["sec"] = "general/logon_ok"; $home_page =''; @@ -585,7 +587,7 @@ require('include/php_to_js_values.php'); (function() { var oShow = jQuery.fn.show; var oHide = jQuery.fn.hide; - + jQuery.fn.show = function () { var rv = oShow.apply(this, arguments); adjustFooter(); @@ -611,7 +613,7 @@ require('include/php_to_js_values.php'); var h = $('#foot').height(); // new top value for div#foot var t = (ulim + $('#foot').outerHeight() > wh) ? ulim : wh - $('#foot').outerHeight(); - + if ($('#foot').position().top != t) { $('#foot').css({ position: "absolute", top: t, left: $('#foot').offset().left}); $('#foot').height(h);