diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index cc4bd5c094..694e83b2f8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2012-07-05 Juan Manuel Ramon + + * include/functions_html.php: Changed path to image in + html_print_image function if metaconsole is being using. + + * include/javascript/jquery.pandora.js: Added checks for jquery + dialog messages that avoid js warnings. + 2012-07-05 Sergio Martin * include/functions_html.php diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 144969e50a..6157e1b2a4 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1207,18 +1207,26 @@ function html_print_checkbox ($name, $value, $checked = false, $return = false, function html_print_image ($src, $return = false, $options = false, $return_src = false, $relative = false) { global $config; - /* Checks if user's skin is available */ - $isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); + // If metaconsole is in use then don't use skins + if (!defined('METACONSOLE')) { - if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { - $skin_path = enterprise_hook('skins_get_image_path', array($src)); - if ($skin_path) - $src = $skin_path; + /* Checks if user's skin is available */ + $isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); + + if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { + $skin_path = enterprise_hook('skins_get_image_path',array($src)); + if ($skin_path) + $src = $skin_path; + } + } if (!$relative) { $urlImage = ui_get_full_url(false); + if (defined('METACONSOLE')) + $urlImage .= ENTERPRISE_DIR . '/meta/'; + // path to image $src = $urlImage . $src; } diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index 8424b0db5e..6837ed68e8 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -86,23 +86,26 @@ $(document).ready (function () { return false; }); + if ($('#license_error_msg_dialog').length) { - $( "#license_error_msg_dialog" ).dialog({ - resizable: true, - draggable: true, - modal: true, - height: 280, - width: 600, - overlay: { - opacity: 0.5, - background: "black" - }, - bgiframe: jQuery.browser.msie - }); + $( "#license_error_msg_dialog" ).dialog({ + resizable: true, + draggable: true, + modal: true, + height: 280, + width: 600, + overlay: { + opacity: 0.5, + background: "black" + }, + bgiframe: jQuery.browser.msie + }); + + $("#submit-hide-license-error-msg").click (function () { + $("#license_error_msg_dialog" ).dialog('close') + }); - $("#submit-hide-license-error-msg").click (function () { - $("#license_error_msg_dialog" ).dialog('close') - }); + } $("a#dialog_license_info").click (function () { @@ -133,31 +136,38 @@ $(document).ready (function () { return false; }); - $( "#msg_change_password" ).dialog({ - resizable: true, - draggable: true, - modal: true, - height: 260, - width: 590, - overlay: { - opacity: 0.5, - background: "black" - }, - bgiframe: jQuery.browser.msie - }); + if ($('#msg_change_password').length) { - $( "#login_blocked" ).dialog({ - resizable: true, - draggable: true, - modal: true, - height: 180, - width: 400, - overlay: { - opacity: 0.5, - background: "black" - }, - bgiframe: jQuery.browser.msie - }); + $( "#msg_change_password" ).dialog({ + resizable: true, + draggable: true, + modal: true, + height: 260, + width: 590, + overlay: { + opacity: 0.5, + background: "black" + }, + bgiframe: jQuery.browser.msie + }); + } + + if ($('#login_blocked').length) { + + $( "#login_blocked" ).dialog({ + resizable: true, + draggable: true, + modal: true, + height: 180, + width: 400, + overlay: { + opacity: 0.5, + background: "black" + }, + bgiframe: jQuery.browser.msie + }); + + } });