2009-04-20 16:00:27 +02:00
|
|
|
(function($) {
|
2009-02-02 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php: Agent module editions
rewritten. The interface should be clearer now and SNMP walking much
more faster, since it's done with AJAX. Some cleanup might be needed
yet.
* godmode/agentes/module_manager_editor_common.php: Added to
repository. Common part for agent module editors.
* images/edit.png, images/spinner.gif: Added to repository.
* include/javascript/jquery.form.js: Added to repository. jQuery form
plugin.
* include/javascript/jquery.pandora.js: Added to repository. Special
Pandora addons for jQuery library.
* include/javascript/pandora.js: Added an extension to Array
javascript objects to check if an array has an element.
* include/styles/pandora.css: Added styling for new module editors.
* include/functions_db.php: Added get_moduletype_description().
* index.php: Added Pandora jQuery extensions.
* pandoradb.sql, pandoradb_migrate_20_to_21.sql: Removed alert_text
useless field from talert_templates.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1417 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-02 16:40:31 +01:00
|
|
|
$.fn.check = function () {
|
|
|
|
return this.each (function () {
|
|
|
|
this.checked = true;
|
2010-10-25 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/jquery.pandora.controls.js,
include/javascript/tiny_mce/plugins/media/js/media.js,
include/javascript/tiny_mce/plugins/table/editor_plugin.js,
include/javascript/tiny_mce/plugins/table/js/cell.js,
include/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js,
include/javascript/tiny_mce/themes/advanced/js/color_picker.js,
include/javascript/tiny_mce/themes/advanced/js/image.js,
include/javascript/jquery.pandora.js,
include/javascript/jquery.tablesorter.js,
include/javascript/OpenLayers/OpenLayers.js,
include/javascript/jquery.form.js, include/javascript/jquery.timeentry.js,
include/javascript/jquery.countdown.js,
godmode/reporting/visual_console_builder.editor.js: fixed end of lines that
it haven't semicolon end char.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3461 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-25 18:06:37 +02:00
|
|
|
});};
|
2009-02-02 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php: Agent module editions
rewritten. The interface should be clearer now and SNMP walking much
more faster, since it's done with AJAX. Some cleanup might be needed
yet.
* godmode/agentes/module_manager_editor_common.php: Added to
repository. Common part for agent module editors.
* images/edit.png, images/spinner.gif: Added to repository.
* include/javascript/jquery.form.js: Added to repository. jQuery form
plugin.
* include/javascript/jquery.pandora.js: Added to repository. Special
Pandora addons for jQuery library.
* include/javascript/pandora.js: Added an extension to Array
javascript objects to check if an array has an element.
* include/styles/pandora.css: Added styling for new module editors.
* include/functions_db.php: Added get_moduletype_description().
* index.php: Added Pandora jQuery extensions.
* pandoradb.sql, pandoradb_migrate_20_to_21.sql: Removed alert_text
useless field from talert_templates.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1417 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-02 16:40:31 +01:00
|
|
|
|
|
|
|
$.fn.uncheck = function () {
|
|
|
|
return this.each (function () {
|
|
|
|
this.checked = false;
|
2010-10-25 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/jquery.pandora.controls.js,
include/javascript/tiny_mce/plugins/media/js/media.js,
include/javascript/tiny_mce/plugins/table/editor_plugin.js,
include/javascript/tiny_mce/plugins/table/js/cell.js,
include/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js,
include/javascript/tiny_mce/themes/advanced/js/color_picker.js,
include/javascript/tiny_mce/themes/advanced/js/image.js,
include/javascript/jquery.pandora.js,
include/javascript/jquery.tablesorter.js,
include/javascript/OpenLayers/OpenLayers.js,
include/javascript/jquery.form.js, include/javascript/jquery.timeentry.js,
include/javascript/jquery.countdown.js,
godmode/reporting/visual_console_builder.editor.js: fixed end of lines that
it haven't semicolon end char.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3461 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-25 18:06:37 +02:00
|
|
|
});};
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
|
2009-02-02 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php: Agent module editions
rewritten. The interface should be clearer now and SNMP walking much
more faster, since it's done with AJAX. Some cleanup might be needed
yet.
* godmode/agentes/module_manager_editor_common.php: Added to
repository. Common part for agent module editors.
* images/edit.png, images/spinner.gif: Added to repository.
* include/javascript/jquery.form.js: Added to repository. jQuery form
plugin.
* include/javascript/jquery.pandora.js: Added to repository. Special
Pandora addons for jQuery library.
* include/javascript/pandora.js: Added an extension to Array
javascript objects to check if an array has an element.
* include/styles/pandora.css: Added styling for new module editors.
* include/functions_db.php: Added get_moduletype_description().
* index.php: Added Pandora jQuery extensions.
* pandoradb.sql, pandoradb_migrate_20_to_21.sql: Removed alert_text
useless field from talert_templates.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1417 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-02 16:40:31 +01:00
|
|
|
$.fn.enable = function () {
|
|
|
|
return $(this).removeAttr ("disabled");
|
|
|
|
};
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
|
2009-02-02 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php: Agent module editions
rewritten. The interface should be clearer now and SNMP walking much
more faster, since it's done with AJAX. Some cleanup might be needed
yet.
* godmode/agentes/module_manager_editor_common.php: Added to
repository. Common part for agent module editors.
* images/edit.png, images/spinner.gif: Added to repository.
* include/javascript/jquery.form.js: Added to repository. jQuery form
plugin.
* include/javascript/jquery.pandora.js: Added to repository. Special
Pandora addons for jQuery library.
* include/javascript/pandora.js: Added an extension to Array
javascript objects to check if an array has an element.
* include/styles/pandora.css: Added styling for new module editors.
* include/functions_db.php: Added get_moduletype_description().
* index.php: Added Pandora jQuery extensions.
* pandoradb.sql, pandoradb_migrate_20_to_21.sql: Removed alert_text
useless field from talert_templates.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1417 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-02 16:40:31 +01:00
|
|
|
$.fn.disable = function () {
|
|
|
|
return $(this).attr ("disabled", "disabled");
|
|
|
|
};
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
|
2009-02-02 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php: Agent module editions
rewritten. The interface should be clearer now and SNMP walking much
more faster, since it's done with AJAX. Some cleanup might be needed
yet.
* godmode/agentes/module_manager_editor_common.php: Added to
repository. Common part for agent module editors.
* images/edit.png, images/spinner.gif: Added to repository.
* include/javascript/jquery.form.js: Added to repository. jQuery form
plugin.
* include/javascript/jquery.pandora.js: Added to repository. Special
Pandora addons for jQuery library.
* include/javascript/pandora.js: Added an extension to Array
javascript objects to check if an array has an element.
* include/styles/pandora.css: Added styling for new module editors.
* include/functions_db.php: Added get_moduletype_description().
* index.php: Added Pandora jQuery extensions.
* pandoradb.sql, pandoradb_migrate_20_to_21.sql: Removed alert_text
useless field from talert_templates.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1417 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-02 16:40:31 +01:00
|
|
|
$.fn.pulsate = function () {
|
2009-03-26 16:55:30 +01:00
|
|
|
var i = 0;
|
|
|
|
for (i = 0; i <= 2; i++) {
|
|
|
|
$(this).fadeOut ("slow").fadeIn ("slow");
|
2009-02-19 22:34:27 +01:00
|
|
|
}
|
2009-02-02 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/module_manager_editor_wmi.php: Agent module editions
rewritten. The interface should be clearer now and SNMP walking much
more faster, since it's done with AJAX. Some cleanup might be needed
yet.
* godmode/agentes/module_manager_editor_common.php: Added to
repository. Common part for agent module editors.
* images/edit.png, images/spinner.gif: Added to repository.
* include/javascript/jquery.form.js: Added to repository. jQuery form
plugin.
* include/javascript/jquery.pandora.js: Added to repository. Special
Pandora addons for jQuery library.
* include/javascript/pandora.js: Added an extension to Array
javascript objects to check if an array has an element.
* include/styles/pandora.css: Added styling for new module editors.
* include/functions_db.php: Added get_moduletype_description().
* index.php: Added Pandora jQuery extensions.
* pandoradb.sql, pandoradb_migrate_20_to_21.sql: Removed alert_text
useless field from talert_templates.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1417 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-02 16:40:31 +01:00
|
|
|
};
|
2009-02-11 17:55:04 +01:00
|
|
|
|
|
|
|
$.fn.showMessage = function (msg) {
|
|
|
|
return $(this).hide ().empty ()
|
|
|
|
.text (msg)
|
|
|
|
.slideDown ();
|
|
|
|
};
|
2009-04-20 16:00:27 +02:00
|
|
|
}) (jQuery);
|
|
|
|
|
|
|
|
$(document).ready (function () {
|
2009-03-26 16:55:30 +01:00
|
|
|
$("a#show_messages_dialog").click (function () {
|
|
|
|
jQuery.get ("ajax.php",
|
2012-03-28 16:54:27 +02:00
|
|
|
{"page": "operation/messages/message_list"},
|
2009-03-26 16:55:30 +01:00
|
|
|
function (data, status) {
|
|
|
|
$("#dialog_messages").hide ()
|
|
|
|
.empty ()
|
|
|
|
.append (data)
|
|
|
|
.dialog ({
|
|
|
|
title: $("a#show_messages_dialog").attr ("title"),
|
|
|
|
resizable: false,
|
|
|
|
modal: true,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
|
|
|
},
|
|
|
|
width: 700,
|
|
|
|
height: 300
|
|
|
|
})
|
|
|
|
.show ();
|
|
|
|
},
|
|
|
|
"html"
|
|
|
|
);
|
2009-02-19 22:34:27 +01:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
return false;
|
2009-02-19 22:34:27 +01:00
|
|
|
});
|
2012-04-23 13:20:28 +02:00
|
|
|
|
2011-06-16 21:26:45 +02:00
|
|
|
$("a#show_systemalert_dialog").click (function () {
|
|
|
|
jQuery.get ("ajax.php",
|
|
|
|
{"page": "operation/system_alert"},
|
|
|
|
function (data, status) {
|
|
|
|
$("#alert_messages").hide ()
|
|
|
|
.empty ()
|
|
|
|
.append (data)
|
|
|
|
.dialog ({
|
|
|
|
title: $("a#show_systemalert_dialog").attr ("title"),
|
|
|
|
resizable: true,
|
2012-04-23 13:20:28 +02:00
|
|
|
draggable: true,
|
2011-06-16 21:26:45 +02:00
|
|
|
modal: true,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
|
|
|
},
|
|
|
|
width: 700,
|
|
|
|
height: 300
|
|
|
|
})
|
|
|
|
.show ();
|
|
|
|
},
|
|
|
|
"html"
|
|
|
|
);
|
|
|
|
return false;
|
|
|
|
});
|
2012-04-02 16:40:55 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
if ($('#license_error_msg_dialog').length) {
|
2012-04-26 22:46:38 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
$( "#license_error_msg_dialog" ).dialog({
|
|
|
|
resizable: true,
|
|
|
|
draggable: true,
|
|
|
|
modal: true,
|
|
|
|
height: 280,
|
|
|
|
width: 600,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
2013-02-26 17:31:40 +01:00
|
|
|
}
|
2012-07-05 11:31:12 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
$("#submit-hide-license-error-msg").click (function () {
|
|
|
|
$("#license_error_msg_dialog" ).dialog('close')
|
|
|
|
});
|
2012-04-02 16:40:55 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
}
|
2012-04-02 16:40:55 +02:00
|
|
|
|
|
|
|
|
2012-04-12 16:43:26 +02:00
|
|
|
$("a#dialog_license_info").click (function () {
|
2013-01-28 14:14:27 +01:00
|
|
|
var ajax_doc = "ajax.php";
|
|
|
|
if($('#hidden-metaconsole_activated').val() == 1) {
|
|
|
|
ajax_doc = "../../" + ajax_doc;
|
|
|
|
}
|
|
|
|
|
|
|
|
jQuery.get (ajax_doc,
|
2012-04-12 16:43:26 +02:00
|
|
|
{"page": "extensions/update_manager",
|
|
|
|
"get_license_info": "1"},
|
|
|
|
function (data, status) {
|
|
|
|
$("#dialog_show_license").hide ()
|
|
|
|
.empty ()
|
|
|
|
.append (data)
|
|
|
|
.dialog ({
|
|
|
|
title: $("a#dialog_license_info").attr ("title"),
|
|
|
|
resizable: false,
|
2013-02-26 17:31:40 +01:00
|
|
|
draggable: true,
|
2012-04-12 16:43:26 +02:00
|
|
|
modal: true,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
|
|
|
},
|
|
|
|
width: 500,
|
2012-04-18 10:08:04 +02:00
|
|
|
height: 190
|
2012-04-12 16:43:26 +02:00
|
|
|
})
|
|
|
|
.show ();
|
|
|
|
},
|
|
|
|
"html"
|
|
|
|
);
|
|
|
|
return false;
|
|
|
|
});
|
2012-05-17 13:08:11 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
if ($('#msg_change_password').length) {
|
2012-05-17 13:08:11 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
$( "#msg_change_password" ).dialog({
|
|
|
|
resizable: true,
|
|
|
|
draggable: true,
|
|
|
|
modal: true,
|
|
|
|
height: 260,
|
|
|
|
width: 590,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
2013-02-26 17:31:40 +01:00
|
|
|
}
|
2012-07-05 11:31:12 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2012-05-17 13:08:11 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
if ($('#login_blocked').length) {
|
2013-02-26 17:31:40 +01:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
$( "#login_blocked" ).dialog({
|
|
|
|
resizable: true,
|
|
|
|
draggable: true,
|
|
|
|
modal: true,
|
|
|
|
height: 180,
|
|
|
|
width: 400,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
2013-02-26 17:31:40 +01:00
|
|
|
}
|
2012-07-05 11:31:12 +02:00
|
|
|
});
|
2013-02-26 17:31:40 +01:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
}
|
2012-04-23 13:20:28 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
// Forced title code
|
|
|
|
$('IMG.forced_title').hover(function() {
|
|
|
|
///////////////////////////////////////////
|
|
|
|
// Get info of the image
|
|
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
var img_top = $(this).offset().top;
|
|
|
|
var img_width = $(this).width();
|
|
|
|
var img_height = $(this).height();
|
|
|
|
var img_id = $(this).attr('id');
|
|
|
|
var img_left_mid = $(this).offset().left + (img_width / 2);
|
|
|
|
|
|
|
|
///////////////////////////////////////////
|
|
|
|
// Put title in the layer
|
|
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
var title = $('#forced_title_'+img_id).html();
|
|
|
|
$('#forced_title_layer').html(title);
|
|
|
|
|
|
|
|
///////////////////////////////////////////
|
|
|
|
// Get info of the layer
|
|
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
var layer_width = $('#forced_title_layer').width();
|
|
|
|
var layer_height = $('#forced_title_layer').height();
|
|
|
|
|
|
|
|
///////////////////////////////////////////
|
|
|
|
// Obtain the new position of the layer
|
|
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
// Jquery doesnt know the padding of the layer
|
|
|
|
var layer_padding = 4;
|
|
|
|
|
|
|
|
// Deduct padding of both sides
|
|
|
|
var layer_top = img_top - layer_height - (layer_padding * 2);
|
|
|
|
if(layer_top < 0) {
|
|
|
|
layer_top = img_top + img_height + (layer_padding * 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deduct padding of one side
|
|
|
|
var layer_left = img_left_mid - (layer_width / 2) - layer_padding;
|
|
|
|
if(layer_left < 0) {
|
|
|
|
layer_left = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////
|
|
|
|
// Set the layer position and show
|
|
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
$('#forced_title_layer').css('left', layer_left);
|
|
|
|
$('#forced_title_layer').css('top', layer_top);
|
|
|
|
$('#forced_title_layer').show();
|
|
|
|
},
|
|
|
|
function () {
|
2013-03-01 11:00:42 +01:00
|
|
|
$('#forced_title_layer').hide().empty();
|
2013-02-26 17:10:02 +01:00
|
|
|
});
|
2012-04-26 22:46:38 +02:00
|
|
|
});
|