mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 11:29:12 +02:00
* include/functions_ui.php: Added require_css_file(), require_javascript_file() and require_jquery_file() to add CSS, javascript and jQuery files to the header easily without changing config object. A path parameter is addded to allow the use on enterprise code. * include/functions_db.php: Added get_db_value_filter(), get_db_all_rows_filter() and process_sql_delete(). Fixed delete_agent() style and use these functions. Added process_page_head() from functions_ui.php and changed a bit the config javascript object part. * include/functions_custom_graphs.php: Get results indexed by id on get_user_custom_graphs(). * include/functions.php: Moved process_page_head to functions_ui.php. * godmode/agentes/manage_delete.php: New interface to perform massive agents deletion. * godmode/menu.php: Added new option to massive agents deletion. * general/main_menu.php, godmode/agentes/manage_config.php, godmode/agentes/module_manager_editor.php, godmode/agentes/planned_downtime.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/configure_alert_compound.php, godmode/alerts/configure_alert_template.php, godmode/reporting/map_builder.php, operation/agentes/networkmap.php, operation/reporting/reporting_viewer.php, operation/visual_console/render_view.php: Use new functions in include CSS and javascript files. * index.php: Bit of style when printing the header so the HTML can be readed easily in a editor. * include/javascript/pandora.js: Added a variable to determine the enterprise directory. * include/styles/pandora.css: Added style for manage_delete.php git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
53 lines
1.4 KiB
JavaScript
53 lines
1.4 KiB
JavaScript
var ENTERPRISE_DIR = 'enterprise';
|
|
|
|
/* Function to hide/unhide a specific Div id */
|
|
function toggleDiv (divid){
|
|
if (document.getElementById(divid).style.display == 'none') {
|
|
document.getElementById(divid).style.display = 'block';
|
|
} else {
|
|
document.getElementById(divid).style.display = 'none';
|
|
}
|
|
}
|
|
|
|
function winopeng (url, wid) {
|
|
open (url, wid,"width=570,height=310,status=no,toolbar=no,menubar=no,scrollbar=no");
|
|
// WARNING !! Internet Explorer DOESNT SUPPORT "-" CARACTERS IN WINDOW HANDLE VARIABLE
|
|
status =wid;
|
|
}
|
|
|
|
function pandora_help (help_id) {
|
|
open ("general/pandora_help.php?id="+help_id, "pandorahelp", "width=650,height=500,status=0,toolbar=0,menubar=0,scrollbars=1,location=0");
|
|
}
|
|
|
|
/**
|
|
* Decode HTML entities into characters. Useful when receiving something from AJAX
|
|
*
|
|
* @param str String to convert
|
|
*
|
|
* @retval str with entities decoded
|
|
*/
|
|
function html_entity_decode (str) {
|
|
if (! str)
|
|
return "";
|
|
var ta = document.createElement ("textarea");
|
|
ta.innerHTML = str.replace (/</g, "<").replace (/>/g,">");
|
|
return ta.value;
|
|
}
|
|
|
|
/**
|
|
* Function to search an element in an array.
|
|
*
|
|
* Extends the array object to use it like a method in an array object. Example:
|
|
* <code>
|
|
a = Array (4, 7, 9);
|
|
alert (a.in_array (4)); // true
|
|
alert (a.in_array (5)); // false
|
|
*/
|
|
Array.prototype.in_array = function () {
|
|
for (var j in this) {
|
|
if(this[j] == arguments[0])
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|