Circolari 2024

 
 
jQuery(document).ready(function(){ jQuery("#phModalPlay").on("hidden.bs.modal", function (e) { jQuery("#phModalPlay iframe").attr("src", jQuery("#phModalPlay iframe").attr("src")); jQuery("audio").each(function(){this.pause();this.currentTime = 0;}); jQuery("video").each(function(){this.pause();this.currentTime = 0;}); }); jQuery(".pd-modal-button").on("click", function () { var $target = jQuery(this).data("target"); var $href = jQuery(this).data("href"); var $body = $target + "Body"; var $dialog = $target + "Dialog"; var $height = jQuery(this).data("height"); var $width = jQuery(this).data("width"); var $heightD= jQuery(this).data("height-dialog"); var $widthD = jQuery(this).data("width-dialog"); var $type = jQuery(this).data("type"); jQuery($body).css("height", $height); jQuery($target).css("width", $width); jQuery($body).css("overflow-y", "auto"); jQuery($dialog).css("height", $heightD); jQuery($dialog).css("width", $widthD); if ($type == "image") { jQuery($body).html(''); } else if ($type == "document") { $widthD = $widthD -50; $heightD = $heightD -40; jQuery($body).html(''); } else { jQuery($body).load($href, function (response, status, xhr) { if (status == "success") { /*jQuery($target).modal({ show: true });*/ } }); } }); }); jQuery(function($) { SqueezeBox.initialize({}); initSqueezeBox(); $(document).on('subform-row-add', initSqueezeBox); function initSqueezeBox(event, container) { SqueezeBox.assign($(container || document).find('a.pd-modal-button').get(), { parse: 'rel' }); } }); window.jModalClose = function () { SqueezeBox.close(); }; // Add extra modal close functionality for tinyMCE-based editors document.onreadystatechange = function () { if (document.readyState == 'interactive' && typeof tinyMCE != 'undefined' && tinyMCE) { if (typeof window.jModalClose_no_tinyMCE === 'undefined') { window.jModalClose_no_tinyMCE = typeof(jModalClose) == 'function' ? jModalClose : false; jModalClose = function () { if (window.jModalClose_no_tinyMCE) window.jModalClose_no_tinyMCE.apply(this, arguments); tinyMCE.activeEditor.windowManager.close(); }; } if (typeof window.SqueezeBoxClose_no_tinyMCE === 'undefined') { if (typeof(SqueezeBox) == 'undefined') SqueezeBox = {}; window.SqueezeBoxClose_no_tinyMCE = typeof(SqueezeBox.close) == 'function' ? SqueezeBox.close : false; SqueezeBox.close = function () { if (window.SqueezeBoxClose_no_tinyMCE) window.SqueezeBoxClose_no_tinyMCE.apply(this, arguments); tinyMCE.activeEditor.windowManager.close(); }; } } }; jQuery(function($){ initTooltips(); $("body").on("subform-row-add", initTooltips); function initTooltips (event, container) { container = container || document;$(container).find(".hasTooltip").tooltip({"html": true,"container": "body"});} }); jQuery(document).ready(function(){WFMediaBox.init({"base":"\/","theme":"standard","mediafallback":0,"mediaselector":"audio,video","width":"","height":"","lightbox":0,"shadowbox":0,"icons":1,"overlay":1,"overlay_opacity":0.8,"overlay_color":"#000000","transition_speed":500,"close":2,"scrolling":"fixed","labels":{"close":"Close","next":"Next","previous":"Previous","cancel":"Cancel","numbers_count":"{{current}} of {{total}}"}});}); jQuery(function ($) { initChosen(); $("body").on("subform-row-add", initChosen); function initChosen(event, container) { container = container || document; $(container).find(".advancedSelect").chosen({"disable_search_threshold":10,"search_contains":true,"allow_single_deselect":true,"placeholder_text_multiple":"Scrivi o seleziona alcune opzioni","placeholder_text_single":"Seleziona un'opzione","no_results_text":"Nessun risultato"}); } }); jQuery(document).ready(function() { var value, searchword = jQuery('#mod-finder-searchword411'); // Get the current value. value = searchword.val(); // If the current value equals the default value, clear it. searchword.on('focus', function () { var el = jQuery(this); if (el.val() === 'Cerca...') { el.val(''); } }); // If the current value is empty, set the previous value. searchword.on('blur', function () { var el = jQuery(this); if (!el.val()) { el.val(value); } }); jQuery('#mod-finder-searchform411').on('submit', function (e) { e.stopPropagation(); var advanced = jQuery('#mod-finder-advanced411'); // Disable select boxes with no value selected. if (advanced.length) { advanced.find('select').each(function (index, el) { var el = jQuery(el); if (!el.val()) { el.attr('disabled', 'disabled'); } }); } }); var suggest = jQuery('#mod-finder-searchword411').autocomplete({ serviceUrl: '/component/finder/?task=suggestions.suggest&format=json&tmpl=component', paramName: 'q', minChars: 1, maxHeight: 400, width: 300, zIndex: 9999, deferRequestBy: 500 });});