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
|
|
|
});};
|
2016-09-22 11:12:19 +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
|
|
|
});};
|
2016-09-22 11:12:19 +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.enable = function () {
|
|
|
|
return $(this).removeAttr ("disabled");
|
|
|
|
};
|
2016-09-22 11:12:19 +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.disable = function () {
|
|
|
|
return $(this).attr ("disabled", "disabled");
|
|
|
|
};
|
2016-09-22 11:12:19 +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.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
|
|
|
};
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2009-02-11 17:55:04 +01:00
|
|
|
$.fn.showMessage = function (msg) {
|
|
|
|
return $(this).hide ().empty ()
|
2018-12-27 19:16:56 +01:00
|
|
|
// here, previously .text (msg)
|
|
|
|
.html (msg)
|
2009-02-11 17:55:04 +01:00
|
|
|
.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 () {
|
2017-05-16 10:42:41 +02:00
|
|
|
jQuery.post ("ajax.php",
|
2018-10-25 14:01:12 +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
|
2018-10-25 14:01:12 +02:00
|
|
|
}).show ();
|
|
|
|
},
|
2009-03-26 16:55:30 +01:00
|
|
|
"html"
|
|
|
|
);
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
return false;
|
2009-02-19 22:34:27 +01:00
|
|
|
});
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-04-10 09:57:54 +02:00
|
|
|
$("a.show_systemalert_dialog").click (function () {
|
2018-10-25 14:01:12 +02:00
|
|
|
$('body').append( "<div id='opacidad' style='position:fixed;background:black;z-index:1'></div>" );
|
|
|
|
$("#opacidad").css('opacity', 0.5);
|
|
|
|
|
2017-05-16 10:42:41 +02:00
|
|
|
jQuery.post ("ajax.php",
|
2018-10-25 14:01:12 +02:00
|
|
|
{
|
2018-10-25 15:42:20 +02:00
|
|
|
"page": "operation/system_alert"},
|
|
|
|
function (data, status) {
|
2018-10-25 16:40:45 +02:00
|
|
|
$("#alert_messages").show();
|
2018-10-25 15:42:20 +02:00
|
|
|
$("#alert_messages").empty ().append (data);
|
|
|
|
$("#alert_messages").css('opacity', 1);
|
2018-10-25 14:01:12 +02:00
|
|
|
|
2018-02-08 16:51:58 +01:00
|
|
|
},
|
|
|
|
"html"
|
|
|
|
);
|
2011-06-16 21:26:45 +02:00
|
|
|
});
|
2016-11-18 17:19:33 +01:00
|
|
|
|
|
|
|
$("a.modalpopup").click (function () {
|
2018-02-08 16:51:58 +01:00
|
|
|
var elem = $(this).attr("id");
|
2018-10-25 14:01:12 +02:00
|
|
|
$('body').append( "<div id='opacidad' style='position:fixed;background:black;z-index:1'></div>" );
|
|
|
|
$("#opacidad").css('opacity', 0.5);
|
2018-10-25 15:42:20 +02:00
|
|
|
|
2018-02-08 16:51:58 +01:00
|
|
|
jQuery.post ("ajax.php",
|
2018-10-25 14:01:12 +02:00
|
|
|
{
|
2018-10-25 15:42:20 +02:00
|
|
|
"page": "general/alert_enterprise",
|
|
|
|
"message": elem
|
2018-10-25 14:01:12 +02:00
|
|
|
},
|
2018-02-08 16:51:58 +01:00
|
|
|
function (data, status) {
|
2018-10-25 16:40:45 +02:00
|
|
|
$("#alert_messages").show();
|
2018-10-25 15:42:20 +02:00
|
|
|
$("#alert_messages").empty ().append (data);
|
|
|
|
$("#alert_messages").css('opacity', 1);
|
2018-10-25 14:01:12 +02:00
|
|
|
},
|
|
|
|
"html"
|
|
|
|
);
|
2018-10-25 15:42:20 +02:00
|
|
|
return false;
|
2018-10-25 14:01:12 +02:00
|
|
|
});
|
2016-09-19 16:20:18 +02:00
|
|
|
|
2018-10-25 14:01:12 +02:00
|
|
|
// Creacion de ventana modal y botones
|
2016-09-28 13:26:58 +02:00
|
|
|
$(".publienterprise").click (function () {
|
2018-02-08 16:51:58 +01:00
|
|
|
var elem = $(this).attr("id");
|
2018-10-25 14:01:12 +02:00
|
|
|
$('body').append( "<div id='opacidad' style='position:fixed;background:black;z-index:1'></div>" );
|
|
|
|
$("#opacidad").css('opacity', 0.5);
|
|
|
|
|
2017-05-16 10:42:41 +02:00
|
|
|
jQuery.post ("ajax.php",
|
2016-09-19 16:20:18 +02:00
|
|
|
{
|
2018-10-25 15:42:20 +02:00
|
|
|
"page": "general/alert_enterprise",
|
|
|
|
"message": elem
|
2017-05-16 10:42:41 +02:00
|
|
|
},
|
2016-10-03 19:37:59 +02:00
|
|
|
function (data, status) {
|
2018-10-25 16:40:45 +02:00
|
|
|
$("#alert_messages").show();
|
2018-10-25 15:42:20 +02:00
|
|
|
$("#alert_messages").empty ().append (data);
|
|
|
|
$("#alert_messages").css('opacity', 1);
|
2016-10-03 19:37:59 +02:00
|
|
|
},
|
2018-10-25 15:42:20 +02:00
|
|
|
"html"
|
|
|
|
);
|
|
|
|
return false;
|
2018-10-25 14:01:12 +02:00
|
|
|
});
|
2018-02-08 16:51:58 +01:00
|
|
|
|
2016-10-03 19:37:59 +02:00
|
|
|
|
|
|
|
$(".publienterprisehide").click (function () {
|
2018-10-25 15:42:20 +02:00
|
|
|
var elem = $(this).attr("id");
|
2018-10-25 14:01:12 +02:00
|
|
|
$('body').append( "<div id='opacidad' style='position:fixed;background:black;z-index:1'></div>" );
|
|
|
|
$("#opacidad").css('opacity', 0.5);
|
2018-10-25 15:42:20 +02:00
|
|
|
|
2017-05-16 10:42:41 +02:00
|
|
|
jQuery.post ("ajax.php",
|
2016-10-03 19:37:59 +02:00
|
|
|
{
|
2017-05-16 10:42:41 +02:00
|
|
|
"page": "general/alert_enterprise",
|
2018-10-25 15:42:20 +02:00
|
|
|
"message": elem
|
2017-05-16 10:42:41 +02:00
|
|
|
},
|
2016-09-19 16:20:18 +02:00
|
|
|
function (data, status) {
|
2018-10-25 16:40:45 +02:00
|
|
|
$("#alert_messages").show();
|
2018-10-25 15:42:20 +02:00
|
|
|
$("#alert_messages").empty ().append (data);
|
|
|
|
$("#alert_messages").css('opacity', 1);
|
|
|
|
},
|
|
|
|
"html"
|
|
|
|
);
|
2016-09-19 16:20:18 +02:00
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
if ($('#license_error_msg_dialog').length) {
|
2013-10-02 12:08:45 +02:00
|
|
|
if (typeof(process_login_ok) == "undefined")
|
|
|
|
process_login_ok = 0;
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-10-02 12:19:07 +02:00
|
|
|
if (typeof(show_error_license) == "undefined")
|
|
|
|
show_error_license = 0;
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-10-02 12:19:07 +02:00
|
|
|
if (process_login_ok || show_error_license) {
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-10-02 12:08:45 +02:00
|
|
|
$( "#license_error_msg_dialog" ).dialog({
|
|
|
|
dialogClass: "no-close",
|
2013-11-05 16:17:44 +01:00
|
|
|
closeOnEscape: false,
|
2017-11-10 10:13:24 +01:00
|
|
|
resizable: false,
|
2013-10-02 12:08:45 +02:00
|
|
|
draggable: true,
|
|
|
|
modal: true,
|
2017-11-10 10:13:24 +01:00
|
|
|
height: 450,
|
|
|
|
width: 850,
|
2013-10-02 12:08:45 +02:00
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
|
|
|
},
|
|
|
|
open: function() {
|
|
|
|
setTimeout(function(){
|
|
|
|
$("#spinner_ok").hide();
|
|
|
|
$("#ok_buttom").show();
|
|
|
|
},
|
2013-10-16 12:47:28 +02:00
|
|
|
30000
|
2013-10-02 12:08:45 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-10-02 12:08:45 +02:00
|
|
|
$("#submit-hide-license-error-msg").click (function () {
|
|
|
|
$("#license_error_msg_dialog" ).dialog('close')
|
|
|
|
});
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-10-02 12:08:45 +02:00
|
|
|
}
|
2012-07-05 11:31:12 +02:00
|
|
|
}
|
2016-09-22 11:12:19 +02:00
|
|
|
|
|
|
|
|
2014-09-30 11:57:11 +02:00
|
|
|
if ($('#msg_change_password').length) {
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
$( "#msg_change_password" ).dialog({
|
2017-03-15 10:12:18 +01:00
|
|
|
resizable: false,
|
2014-09-30 11:57:11 +02:00
|
|
|
draggable: true,
|
|
|
|
modal: true,
|
2017-03-15 10:12:18 +01:00
|
|
|
height: 350,
|
|
|
|
width: 620,
|
2014-09-30 11:57:11 +02:00
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
|
|
|
}
|
2012-07-05 11:31:12 +02:00
|
|
|
});
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
}
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
if ($('#login_blocked').length) {
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
$( "#login_blocked" ).dialog({
|
2017-03-15 10:12:18 +01:00
|
|
|
resizable: true,
|
|
|
|
draggable: true,
|
|
|
|
modal: true,
|
|
|
|
height: 200,
|
|
|
|
width: 520,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($('#login_correct_pass').length) {
|
|
|
|
|
|
|
|
$( "#login_correct_pass" ).dialog({
|
|
|
|
resizable: true,
|
|
|
|
draggable: true,
|
|
|
|
modal: true,
|
|
|
|
height: 200,
|
|
|
|
width: 520,
|
|
|
|
overlay: {
|
|
|
|
opacity: 0.5,
|
|
|
|
background: "black"
|
|
|
|
}
|
2012-07-05 11:31:12 +02:00
|
|
|
});
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2012-07-05 11:31:12 +02:00
|
|
|
}
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-03-04 13:51:22 +01:00
|
|
|
forced_title_callback();
|
2016-11-21 16:25:11 +01:00
|
|
|
|
|
|
|
|
2018-10-25 14:01:12 +02:00
|
|
|
$(document).on("scroll", function(){
|
2018-02-28 19:02:54 +01:00
|
|
|
|
|
|
|
if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){
|
|
|
|
if($('#head').css('position') =='fixed'){
|
|
|
|
if($('#menu').css('position') =='fixed'){
|
2018-10-25 14:01:12 +02:00
|
|
|
$('#menu').css('top','80px');
|
|
|
|
} else {
|
|
|
|
$('#menu').css('top','60px');
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if($('#menu').css('position') =='fixed'){
|
|
|
|
$('#menu').css('top','20px');
|
|
|
|
} else {
|
|
|
|
$('#menu').css('top','80px');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2018-02-28 19:02:54 +01:00
|
|
|
if($('#head').css('position') =='fixed'){
|
|
|
|
if($('#menu').css('position') =='fixed'){
|
2018-10-25 14:01:12 +02:00
|
|
|
$('#menu').css('top','80px');
|
|
|
|
} else {
|
|
|
|
$('#menu').css('top','60px');
|
2018-02-28 19:02:54 +01:00
|
|
|
}
|
2018-10-25 14:01:12 +02:00
|
|
|
} else {
|
|
|
|
if($('#menu').css('position') =='fixed'){
|
|
|
|
$('#menu').css('top','80px');
|
|
|
|
} else {
|
|
|
|
$('#menu').css('top','80px');
|
|
|
|
}
|
|
|
|
}
|
2016-11-21 16:25:11 +01:00
|
|
|
}
|
2018-02-28 19:02:54 +01:00
|
|
|
|
|
|
|
// if((document.documentElement.scrollTop != 0 || document.body.scrollTop != 0) && $('#menu').css('position') =='fixed'){
|
|
|
|
// if($('#head').css('position') =='fixed'){
|
|
|
|
// $('#menu').css('top','80px');
|
|
|
|
// }
|
|
|
|
// else{
|
|
|
|
// $('#menu').css('top','20px');
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// else{
|
|
|
|
// if($('#head').css('position') =='fixed'){
|
|
|
|
// if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){
|
|
|
|
// $('#menu').css('top','60px');
|
|
|
|
// }else{
|
|
|
|
// $('#menu').css('top','80px');
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
// else{
|
|
|
|
// $('#menu').css('top','60px');
|
|
|
|
// }
|
|
|
|
// }
|
2018-10-25 14:01:12 +02:00
|
|
|
});
|
2017-02-10 10:18:53 +01:00
|
|
|
|
2018-10-25 14:01:12 +02:00
|
|
|
$("#alert_messages").draggable();
|
|
|
|
$("#alert_messages").css({'left':+parseInt(screen.width/2)-parseInt($("#alert_messages").css('width'))/2+'px'});
|
2016-11-21 16:25:11 +01:00
|
|
|
|
2013-03-04 13:51:22 +01:00
|
|
|
});
|
2012-04-23 13:20:28 +02:00
|
|
|
|
2018-10-25 14:01:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-04 13:51:22 +01:00
|
|
|
function forced_title_callback() {
|
2013-02-26 17:10:02 +01:00
|
|
|
// Forced title code
|
2016-05-18 15:30:44 +02:00
|
|
|
$('body').on('mouseenter', '.forced_title', function() {
|
2013-04-10 09:57:54 +02:00
|
|
|
///////////////////////////////////////////
|
|
|
|
// Put the layer in the left-top corner to fill it
|
|
|
|
///////////////////////////////////////////
|
|
|
|
$('#forced_title_layer').css('left', 0);
|
|
|
|
$('#forced_title_layer').css('top', 0);
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
///////////////////////////////////////////
|
|
|
|
// Get info of the image
|
|
|
|
///////////////////////////////////////////
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
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);
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
///////////////////////////////////////////
|
|
|
|
// Put title in the layer
|
|
|
|
///////////////////////////////////////////
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2014-12-30 12:36:19 +01:00
|
|
|
// If the '.forced_title' element has 'use_title_for_force_title' = 1
|
|
|
|
// into their 'data' prop, the element title will be used for the
|
|
|
|
// content.
|
|
|
|
if ($(this).data("use_title_for_force_title")) {
|
2015-06-19 14:42:18 +02:00
|
|
|
var title = $(this).data("title");
|
2014-12-30 12:36:19 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
var title = $('#forced_title_'+img_id).html();
|
|
|
|
}
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
$('#forced_title_layer').html(title);
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-04-15 16:32:50 +02:00
|
|
|
///////////////////////////////////////////
|
2013-02-26 17:10:02 +01:00
|
|
|
// Get info of the layer
|
|
|
|
///////////////////////////////////////////
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
var layer_width = $('#forced_title_layer').width();
|
|
|
|
var layer_height = $('#forced_title_layer').height();
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
///////////////////////////////////////////
|
|
|
|
// Obtain the new position of the layer
|
|
|
|
///////////////////////////////////////////
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
// Jquery doesnt know the padding of the layer
|
|
|
|
var layer_padding = 4;
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
// Deduct padding of both sides
|
2013-04-10 09:57:54 +02:00
|
|
|
var layer_top = img_top - layer_height - (layer_padding * 2) - 5;
|
2013-04-15 16:32:50 +02:00
|
|
|
if (layer_top < 0) {
|
2013-02-26 17:10:02 +01:00
|
|
|
layer_top = img_top + img_height + (layer_padding * 2);
|
|
|
|
}
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
// Deduct padding of one side
|
|
|
|
var layer_left = img_left_mid - (layer_width / 2) - layer_padding;
|
2013-04-15 16:32:50 +02:00
|
|
|
if (layer_left < 0) {
|
2013-02-26 17:10:02 +01:00
|
|
|
layer_left = 0;
|
|
|
|
}
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-04-10 09:57:54 +02:00
|
|
|
var real_layer_width = layer_width + (layer_padding * 2) + 5;
|
|
|
|
var layer_right = layer_left + real_layer_width;
|
|
|
|
var screen_width = $(window).width();
|
2013-04-15 16:32:50 +02:00
|
|
|
if (screen_width < layer_right) {
|
2013-04-10 09:57:54 +02:00
|
|
|
layer_left = screen_width - real_layer_width;
|
|
|
|
}
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
///////////////////////////////////////////
|
|
|
|
// Set the layer position and show
|
|
|
|
///////////////////////////////////////////
|
2016-09-22 11:12:19 +02:00
|
|
|
|
2013-02-26 17:10:02 +01:00
|
|
|
$('#forced_title_layer').css('left', layer_left);
|
|
|
|
$('#forced_title_layer').css('top', layer_top);
|
|
|
|
$('#forced_title_layer').show();
|
2016-05-18 15:30:44 +02:00
|
|
|
});
|
|
|
|
$('body').on('mouseout', '.forced_title', function () {
|
2013-03-01 11:00:42 +01:00
|
|
|
$('#forced_title_layer').hide().empty();
|
2013-02-26 17:10:02 +01:00
|
|
|
});
|
2013-03-04 13:51:22 +01:00
|
|
|
}
|
2018-02-08 16:51:58 +01:00
|
|
|
|