var gadjo_js = gadjo_js || {}; (function () { if (gadjo_js.loaded) return gadjo_js.loaded = true; var $ = jQuery; var popup_script_loaded = {}; var deferred_timeout = function (duration) { var dfd = $.Deferred(); setTimeout(function () { dfd.resolve(); }, duration); return dfd.promise(); } window.displayPopup = function(event) { /* Opens the target link into a dialog box * * The target link is extracted from the @href attribute for anchors or * from the @data-url attribute for other tags. * * The dialog title is extracted from "#appbar h2" (this selector can be * changed with a @data-title-selector attribute on the anchor tag). * * The dialog content is extracted from "form" (this selector can be * changed with a @data-selector attribute). * * Buttons (both