From 517daf9128cc7b5192954ad605f8b2e44c605510 Mon Sep 17 00:00:00 2001 From: Denis K Date: Tue, 29 Nov 2016 17:04:15 +0300 Subject: [PATCH 1/9] Update libi.io url --- README.rst | 2 +- docs/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 700c6ca1..3df0f8da 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,7 @@ and applications without the provisions of the AGPLv3. * Home page: http://jet.geex-arts.com/ * **Live Demo**: http://demo.jet.geex-arts.com/admin/ * Documentation: http://jet.readthedocs.org/ -* libi.io http://libi.io/library/1683 +* libi.io http://libi.io/library/1683/django-jet * PyPI: https://pypi.python.org/pypi/django-jet * Support: support@jet.geex-arts.com diff --git a/docs/index.rst b/docs/index.rst index 950de235..f0bbcee8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -38,7 +38,7 @@ Resources * Home page: http://jet.geex-arts.com/ * **Live Demo**: http://demo.jet.geex-arts.com/admin/ -* libi.io http://libi.io/library/1683 +* libi.io http://libi.io/library/1683/django-jet * PyPI: https://pypi.python.org/pypi/django-jet * Support: support@jet.geex-arts.com From 75b1a2970223b6d87dbfd276c315b899c3a2bd10 Mon Sep 17 00:00:00 2001 From: Denis K Date: Tue, 29 Nov 2016 17:04:38 +0300 Subject: [PATCH 2/9] Fix select class name override --- jet/static/jet/js/src/layout-updaters/toolbar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jet/static/jet/js/src/layout-updaters/toolbar.js b/jet/static/jet/js/src/layout-updaters/toolbar.js index 39563404..68594c85 100644 --- a/jet/static/jet/js/src/layout-updaters/toolbar.js +++ b/jet/static/jet/js/src/layout-updaters/toolbar.js @@ -29,13 +29,15 @@ ToolbarUpdater.prototype = { if ($element.prop('tagName') == 'H3') { filterName = $element.text(); } else if ($element.prop('tagName') == 'UL') { - var $select = $(''); var $items = $element.find('li'); $.each($element.prop('attributes'), function() { $select.attr(this.name, this.value); }); + $select.addClass('changelist-filter-select'); + if ($items.filter('.selected').length > 1) { $select.attr('multiple', true); } From 0bff67913586edf089778de68daff59128014a98 Mon Sep 17 00:00:00 2001 From: Denis K Date: Tue, 29 Nov 2016 17:05:09 +0300 Subject: [PATCH 3/9] Fix m2m ajax filters --- jet/templatetags/jet_tags.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jet/templatetags/jet_tags.py b/jet/templatetags/jet_tags.py index 65a71f43..439a6fbf 100644 --- a/jet/templatetags/jet_tags.py +++ b/jet/templatetags/jet_tags.py @@ -125,7 +125,8 @@ def jet_is_checkbox(field): @register.filter def jet_select2_lookups(field): - if hasattr(field, 'field') and isinstance(field.field, ModelChoiceField): + if hasattr(field, 'field') and \ + (isinstance(field.field, ModelChoiceField) or isinstance(field.field, ModelMultipleChoiceField)): qs = field.field.queryset model = qs.model From dea1f96d28b07566a7174f43cf8fdd8b1173bfb2 Mon Sep 17 00:00:00 2001 From: Denis K Date: Tue, 29 Nov 2016 17:05:17 +0300 Subject: [PATCH 4/9] Build js --- jet/static/jet/js/build/bundle.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jet/static/jet/js/build/bundle.min.js b/jet/static/jet/js/build/bundle.min.js index 3cd7a02d..59dde303 100644 --- a/jet/static/jet/js/build/bundle.min.js +++ b/jet/static/jet/js/build/bundle.min.js @@ -1,5 +1,5 @@ !function t(e,i,n){function o(r,a){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[r]={exports:{}};e[r][0].call(u.exports,function(t){var i=e[r][1][t];return o(i?i:t)},u,u.exports,t,e,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r form > div"),e=t.find("> .module"),i=t.find("> .inline-group");return n().add(e).add(i)},getHashSelector:function(t){if(void 0==t)return null;var e=t.match(/^(#(\/tab\/(.+)\/)?)?$/i);return null==e?null:void 0!=e[3]?e[3]:""},showTab:function(t,e){var i=this.$changeform.find(".changeform-tabs-item"),n=this.getContentWrappers(),o=this.getHashSelector(t);if(e||null!=o){null!=o&&0!=o.length||(o=this.getHashSelector(i.first().find(".changeform-tabs-item-link").attr("href")));var s=n.filter("."+o),r=i.find('.changeform-tabs-item-link[href="#/tab/'+o+'/"]').closest(".changeform-tabs-item");i.removeClass("selected"),r.addClass("selected"),n.removeClass("selected"),s.addClass("selected")}},initTabs:function(){var t=this;n(window).on("hashchange",function(){t.showTab(location.hash,!1)}),this.showTab(location.hash,!0)},updateErrorState:function(){var t=this.$changeform.find(".changeform-tabs-item"),e=this.getContentWrappers(),i=this;t.each(function(){var t=n(this),o=i.getHashSelector(t.find(".changeform-tabs-item-link").attr("href"));if(o){var s=e.filter("."+o);s.find(".form-row.errors").length&&t.addClass("errors")}})},run:function(){try{this.initTabs(),this.updateErrorState()}catch(t){console.error(t,t.stack)}}},n(document).ready(function(){n(".change-form").each(function(){new o(n(this)).run()})})},{jquery:69}],2:[function(t,e,i){var n=t("jquery"),o=t("../utils/translate"),s=function(t){this.$changeForm=t};s.prototype={changeDetected:!1,onWindowBeforeUnload:function(){return o("Warning: you have unsaved changes")},onFormInputChanged:function(t){t.off("change",this.onFormInputChanged),self.changeDetected||n(window).bind("beforeunload",this.onWindowBeforeUnload),this.changeDetected=!0},initUnsavedChangesWarning:function(t){var e=this,i=t.find("#content-main form");if(0!=i.length){var o=i.find("input, textarea, select");n(document).on("submit","form",function(){n(window).off("beforeunload",e.onWindowBeforeUnload)}),o.on("change",n.proxy(this.onFormInputChanged,this,o))}},run:function(){try{this.initUnsavedChangesWarning(this.$changeForm)}catch(t){console.error(t,t.stack)}}},n(document).ready(function(){n(".change-form").each(function(){new s(n(this)).run()})})},{"../utils/translate":37,jquery:69}],3:[function(t,e,i){var n=t("jquery"),o=function(t){this.$changelist=t};o.prototype={updateFixedHeaderVisibility:function(t,e){n(window).scrollTop()>e.offset().top?t.closest("table").show():t.closest("table").hide()},updateFixedHeaderWidth:function(t,e){var i=e.find("th"),o=t.find("th");i.each(function(t){o.eq(t).css("width",n(this).width())})},initFixedHeader:function(t){var e=t.find("#result_list thead");if(0!=e.length){var i=e.clone(),o=n("").addClass("helper").append(i);o.find(".action-checkbox-column").empty(),o.appendTo(document.body),n(window).on("scroll",n.proxy(this.updateFixedHeaderVisibility,this,o,e)),n(window).on("resize",n.proxy(this.updateFixedHeaderWidth,this,i,e)),this.updateFixedHeaderWidth(i,e)}},updateFixedFooter:function(t,e){if(n(window).scrollTop()+n(window).height()").attr("for",e).insertAfter(t)},addLabelToCheckboxes:function(){var t=this;n('input[type="checkbox"]').each(function(){var e=n(this);void 0!=e.attr("id")&&0!=n('label[for="'+e.attr("id")+'"]').length||t.addLabelToCheckbox(e)})},run:function(){try{this.addLabelToCheckboxes()}catch(t){console.error(t,t.stack)}}},n(document).ready(function(){(new o).run()})},{jquery:69}],5:[function(t,e,i){var n=t("jquery"),o=function(t){this.$inline=t,this.prefix=t.data("inline-prefix"),this.verboseName=t.data("inline-verbose-name"),this.deleteText=t.data("inline-delete-text")};o.prototype={updateLabels:function(t){var e=this,i=t.find(".inline-navigation-item");t.find(".inline-related").each(function(t){var o=n(this),s=o.find(".inline_label"),r=s.html().replace(/(#\d+)/g,"#"+(t+1)),a=i.eq(t),l=o.hasClass("has_original")?r:e.verboseName+" "+r;s.html(r),a.html(l)})},updateFormIndex:function(t,e){var i=new RegExp("("+this.prefix+"-(\\d+|__prefix__))"),o=this.prefix+"-"+e;t.find("*").each(function(){var t=n(this);n.each(["for","id","name"],function(){var e=this;t.attr(e)&&t.attr(e,t.attr(e).replace(i,o))})}),t.hasClass("empty-form")||t.attr("id",this.prefix+"-"+e)},updateFormsIndexes:function(t){var e=this,i=t.find(".inline-navigation-item");t.find(".inline-related").each(function(t){var o=n(this);e.updateFormIndex(o,t),i.eq(t).attr("data-inline-related-id",o.attr("id"))})},updateTotalForms:function(t){var e=t.find('[name="'+this.prefix+'-TOTAL_FORMS"]'),i=t.find('[name="'+this.prefix+'-MAX_NUM_FORMS"]'),n=parseInt(t.find(".inline-related").length),o=i.val()?parseInt(i.val()):1/0;e.val(n),t.find(".add-row").toggle(o>=n)},addNavigationItem:function(t,e){var i=t.find(".inline-navigation-item.empty");return i.clone().removeClass("empty").attr("data-inline-related-id",e.attr("id")).insertBefore(i)},openNavigationItem:function(t,e){t.find(".inline-related").removeClass("selected").filter("#"+e.attr("data-inline-related-id")).addClass("selected"),t.find(".inline-navigation-item").removeClass("selected"),e.addClass("selected")},removeItem:function(t,e){e.remove(),t.find('.inline-navigation-item[data-inline-related-id="'+e.attr("id")+'"]').remove()},openFirstNavigationItem:function(t){var e=t.find(".inline-navigation-item:not(.empty)").first();void 0!=e&&(this.openNavigationItem(t,e),this.scrollNavigationToTop(t))},addItemDeleteButton:function(t){t.children(":first").append(''+this.deleteText+"")},scrollNavigationToTop:function(t){var e=t.find(".inline-navigation-content");e.stop().animate({scrollTop:0})},scrollNavigationToBottom:function(t){var e=t.find(".inline-navigation-content");e.stop().animate({scrollTop:e.prop("scrollHeight")})},initAdding:function(t){var e=this;t.find(".add-row a").on("click",function(i){i.preventDefault();var n=t.find(".inline-related.empty-form"),o=parseInt(t.find(".inline-related").length)-1,s=n.clone(!0).removeClass("empty-form").insertBefore(n);e.updateTotalForms(t),e.updateFormIndex(s,o),e.updateFormIndex(n,o+1);var r=e.addNavigationItem(t,s);e.updateLabels(t),e.openNavigationItem(t,r),e.addItemDeleteButton(s),e.scrollNavigationToBottom(t)})},initDeletion:function(t){var e=this;t.on("click",".inline-deletelink",function(i){i.preventDefault();var o=n(this).closest(".inline-related");e.removeItem(t,o),e.updateFormsIndexes(t),e.updateLabels(t),e.updateTotalForms(t),e.openFirstNavigationItem(t)}),t.find(".inline-related").each(function(){var e=n(this);e.find(".delete input").on("change",function(){t.find('.inline-navigation-item[data-inline-related-id="'+e.attr("id")+'"]').toggleClass("delete",n(this).is(":checked"))})})},initNavigation:function(t){var e=this;t.on("click",".inline-navigation-item",function(i){i.preventDefault(),e.openNavigationItem(t,n(this))}),e.openFirstNavigationItem(t)},run:function(){var t=this.$inline;try{this.initAdding(t),this.initDeletion(t),this.initNavigation(t)}catch(e){console.error(e,e.stack)}}},e.exports=o},{jquery:69}],6:[function(t,e,i){t("./../utils/jquery-slidefade");var n=t("jquery"),o=t("../utils/translate");t("jquery-ui/ui/core"),t("jquery-ui/ui/widget"),t("jquery-ui/ui/mouse"),t("jquery-ui/ui/draggable"),t("jquery-ui/ui/droppable"),t("jquery-ui/ui/sortable"),t("jquery-ui/ui/resizable"),t("jquery-ui/ui/button"),t("jquery-ui/ui/dialog");var s=function(t){this.$dashboard=t};s.prototype={initTools:function(t){t.find(".dashboard-tools-toggle").on("click",function(e){e.preventDefault(),t.find(".dashboard-tools").toggleClass("visible")});var e=t.find("#add-dashboard-module-form");e.find(".add-dashboard-link").on("click",function(t){var i=e.find('[name="type"]'),o=e.find('[name="module"] option:selected').data("type");o&&(i.val(o),n.ajax({url:e.attr("action"),method:e.attr("method"),dataType:"json",data:e.serialize(),success:function(t){t.error||(document.location=t.success_url)}})),t.preventDefault()}),t.find(".reset-dashboard-link").on("click",function(e){var i={},s=function(){var e=t.find("#reset-dashboard-form");n.ajax({url:e.attr("action"),method:e.attr("method"),dataType:"json",data:e.serialize(),success:function(t){t.error||location.reload()}})};i[o("Yes")]=function(){s(),n(this).dialog("close")},i[o("Cancel")]=function(){n(this).dialog("close")},t.find("#reset-dashboard-dialog").dialog({resizable:!1,modal:!0,buttons:i}),e.preventDefault()})},updateDashboardModules:function(t){var e=t.find("#update-dashboard-modules-form"),i=[];t.find(".dashboard-column").each(function(){var t=n(this),e=t.closest(".dashboard-column-wrapper").index();t.find(".dashboard-item").each(function(){var t=n(this),o=t.index(),s=t.data("module-id");i.push({id:s,column:e,order:o})})}),e.find('[name="modules"]').val(JSON.stringify(i)),n.ajax({url:e.attr("action"),method:e.attr("method"),dataType:"json",data:e.serialize()})},initModulesDragAndDrop:function(t){var e=this;t.find(".dashboard-column").droppable({activeClass:"active",hoverClass:"hovered",tolerance:"pointer",accept:".dashboard-item"}).sortable({items:".dashboard-item.draggable",handle:".dashboard-item-header",tolerance:"pointer",connectWith:".dashboard-column",cursor:"move",placeholder:"dashboard-item placeholder",forcePlaceholderSize:!0,update:function(i,n){e.updateDashboardModules(t)}})},initCollapsibleModules:function(t){var e=t.find("#update-dashboard-module-collapse-form");t.find(".dashboard-item.collapsible").each(function(){var t=n(this),i=t.find(".dashboard-item-collapse"),o=t.find(".dashboard-item-content"),s=t.data("module-id");i.on("click",function(i){i.preventDefault(),o.slideFadeToggle(200,"swing",function(){var i=0==o.is(":visible");i?t.addClass("collapsed"):t.removeClass("collapsed"),e.find('[name="id"]').val(s),e.find('[name="collapsed"]').val(i?"true":"false"),n.ajax({url:e.attr("action"),method:e.attr("method"),dataType:"json",data:e.serialize()})})})})},initDeletableModules:function(t){var e=t.find("#remove-dashboard-module-form");t.find(".dashboard-item.deletable").each(function(){var i=n(this),s=i.find(".dashboard-item-remove"),r=i.data("module-id");s.on("click",function(s){s.preventDefault();var a={},l=function(){i.fadeOut(200,"swing",function(){e.find('[name="id"]').val(r),n.ajax({url:e.attr("action"),method:e.attr("method"),dataType:"json",data:e.serialize()})})};a[o("Delete")]=function(){l(),n(this).dialog("close")},a[o("Cancel")]=function(){n(this).dialog("close")},t.find("#module-remove-dialog").dialog({resizable:!1,modal:!0,buttons:a})})})},initAjaxModules:function(t){t.find(".dashboard-item.ajax").each(function(){var t=n(this),e=t.find(".dashboard-item-content"),i=t.data("ajax-url");n.ajax({url:i,dataType:"json",success:function(t){if(t.error)return void e.empty();var i=e.height();e.html(t.html);var n=e.height();e.height(i),e.animate({height:n},250,"swing",function(){e.height("auto")})},error:function(){e.empty()}})})},updateModuleChildrenFormsetLabels:function(t){t.find(".inline-related").each(function(t){n(this).find(".inline_label").text("#"+(t+1))})},updateModuleChildrenFormsetFormIndex:function(t,e){var i="children",o=new RegExp("("+i+"-(\\d+|__prefix__))"),s=i+"-"+e;t.find("fieldset.module *").each(function(){var t=n(this);n.each(["for","id","name"],function(){var e=this;t.attr(e)&&t.attr(e,t.attr(e).replace(o,s))})})},updateModuleChildrenFormsetFormsIndexes:function(t){var e=this,i=parseInt(t.find(".inline-related.has_original").length);t.find(".inline-related.last-related").each(function(t){e.updateModuleChildrenFormsetFormIndex(n(this),i+t)})},updateModuleChildrenFormsetTotalForms:function(t){var e=t.find('[name="children-TOTAL_FORMS"]'),i=parseInt(t.find(".inline-related").length);e.val(i)},initModuleChildrenFormsetUpdate:function(t){if(t.hasClass("change-form")){var e=this,i=t.find(".inline-group");i.find(".add-row a").on("click",function(t){t.preventDefault();var n=i.find(".inline-related.empty-form"),o=n.clone(!0).removeClass("empty-form").insertBefore(n);e.updateModuleChildrenFormsetLabels(i),e.updateModuleChildrenFormsetFormIndex(n,parseInt(i.find(".inline-related").length)-1),e.updateModuleChildrenFormsetFormIndex(o,parseInt(i.find(".inline-related").length)-2),e.updateModuleChildrenFormsetTotalForms(i)}),i.find(".inline-deletelink").on("click",function(t){t.preventDefault(),n(this).closest(".inline-related").remove(),e.updateModuleChildrenFormsetFormsIndexes(i),e.updateModuleChildrenFormsetLabels(i),e.updateModuleChildrenFormsetTotalForms(i)})}},run:function(){var t=this.$dashboard;try{this.initTools(t),this.initModulesDragAndDrop(t),this.initCollapsibleModules(t),this.initDeletableModules(t),this.initAjaxModules(t),this.initModuleChildrenFormsetUpdate(t)}catch(e){console.error(e,e.stack)}t.addClass("initialized")}},n(document).ready(function(){n(".dashboard.jet").each(function(){new s(n(this)).run()})})},{"../utils/translate":37,"./../utils/jquery-slidefade":36,jquery:69,"jquery-ui/ui/button":55,"jquery-ui/ui/core":56,"jquery-ui/ui/dialog":58,"jquery-ui/ui/draggable":59,"jquery-ui/ui/droppable":60,"jquery-ui/ui/mouse":61,"jquery-ui/ui/resizable":63,"jquery-ui/ui/sortable":64,"jquery-ui/ui/widget":66}],7:[function(t,e,i){var n=t("jquery");t("jquery-ui/ui/core"),t("jquery-ui/ui/datepicker"),t("timepicker");var o=function(){};o.prototype={removeInputTextNode:function(t){if(0!=t.length){var e=t.get(0).previousSibling;3==e.nodeType&&n(e).remove()}},updateDatetimeLayout:function(){var t=this;n(".form-row .datetime").each(function(){var e=n(this),i=e.find(".vDateField"),o=e.find(".vTimeField");t.removeInputTextNode(i),t.removeInputTextNode(o),i.nextAll("br").first().remove()})},djangoDateTimeFormatToJs:function(t){return t.toLowerCase().replace(/%\w/g,function(t){return t=t.replace(/%/,""),t+t})},initDateWidgets:function(){var t=this;n(".form-row .vDateField").each(function(){var e=n(this),i=n("").addClass("icon-calendar"),o=n("").attr("href","#").addClass("vDateField-link").append(i).insertAfter(e);e.datepicker({dateFormat:t.djangoDateTimeFormatToJs(DATE_FORMAT),showButtonPanel:!0,nextText:"",prevText:""}),o.on("click",function(t){e.datepicker("widget").is(":visible")?e.datepicker("hide"):e.datepicker("show"),t.preventDefault()})});var e=n.datepicker._gotoToday;n.datepicker._gotoToday=function(t){e.call(this,t),this._selectDate(t)}},initTimeWidgets:function(){n(".form-row .vTimeField").each(function(){var t=n(this),e=n("").addClass("icon-clock"),i=n("").attr("href","#").addClass("vTimeField-link").append(e).insertAfter(t);t.timepicker({showPeriodLabels:!1,showCloseButton:!0,showNowButton:!0}),i.on("click",function(e){t.datepicker("widget").is(":visible")?t.datepicker("hide"):t.timepicker("show"),e.preventDefault()})})},run:function(){try{this.updateDatetimeLayout(),this.initDateWidgets(),this.initTimeWidgets()}catch(t){console.error(t,t.stack)}}},n(document).ready(function(){(new o).run()})},{jquery:69,"jquery-ui/ui/core":56,"jquery-ui/ui/datepicker":57,timepicker:92}],8:[function(t,e,i){var n=t("jquery"),o=function(t){this.$toolbar=t};o.prototype={initFiltersInteraction:function(t){t.find(".changelist-filter-select").each(function(){var t=n(this),e=t.attr("multiple");e&&t.data("previous-options",t.find("option:selected")),t.on("change",function(){var t=n(this),i=t.find("option:selected");e&&(t.data("previous-options").lengthi.length&&(i=t.data("previous-options").filter(function(t,e){return 0==i.filter(function(t,i){return e==i}).length})),t.data("previous-options",t.find("option:selected")));var o=i.data("url"),s=t.data("queryset--lookup");o?document.location=i.data("url"):s&&(document.location="?"+s+"="+i.val())})})},run:function(){try{this.initFiltersInteraction(this.$toolbar)}catch(t){console.error(t,t.stack)}}},n(document).ready(function(){n("#toolbar").each(function(){new o(n(this)).run()})})},{jquery:69}],9:[function(t,e,i){var n=t("jquery"),o=t("./compact-inline"),s=function(t){this.$inline=t};s.prototype={initAddRow:function(t){t.find(".add-row a").on("click",function(){var e=t.find(".inline-related:not(.empty-form)").last();t.trigger("inline-group-row:added",[e])})},run:function(){var t=this.$inline;try{t.hasClass("compact")&&new o(t).run(),this.initAddRow(t)}catch(e){console.error(e,e.stack)}t.addClass("initialized")}},n(document).ready(function(){n(".inline-group").each(function(){new s(n(this)).run()})})},{"./compact-inline":5,jquery:69}],10:[function(t,e,i){var n=t("jquery"),o=t("../utils/window-storage"),s=function(){this.windowStorage=new o("relatedWindows")};s.prototype={updateLinks:function(t){t.find("~ .change-related, ~ .delete-related, ~ .add-another").each(function(){var e=n(this),i=e.data("href-template");if(void 0!=i){var o=t.val();o?e.attr("href",i.replace("__fk__",o)):e.removeAttr("href")}})},initLinksForRow:function(t){if(!t.data("related-popups-links-initialized")){var e=this;t.find("select").each(function(){var t=n(this);e.updateLinks(t),t.find("~ .add-related, ~ .change-related, ~ .delete-related, ~ .add-another").each(function(){var i=n(this);i.on("click",function(n){n.preventDefault();var o=i.attr("href");void 0!=o&&(o.indexOf("_popup")==-1&&(o+=o.indexOf("?")==-1?"?_popup=1":"&_popup=1"),e.showPopup(t,o))})})}).on("change",function(){e.updateLinks(n(this))}),t.find("input").each(function(){var t=n(this);t.find("~ .related-lookup").each(function(){var i=n(this);i.on("click",function(n){n.preventDefault();var o=i.attr("href");o+=o.indexOf("?")==-1?"?_popup=1":"&_popup=1",e.showPopup(t,o)})})}),t.data("related-popups-links-initialized",!0)}},initLinks:function(){var t=this;n(".form-row").each(function(){t.initLinksForRow(n(this))}),n(".inline-group").on("inline-group-row:added",function(e,i){i.find(".form-row").each(function(){t.initLinksForRow(n(this))})})},initPopupBackButton:function(){var t=this;n(".related-popup-back").on("click",function(e){e.preventDefault(),t.closePopup()})},showPopup:function(t,e){var i=n(window.top.document),o=i.find(".related-popup-container"),s=o.find(".loading-indicator"),r=i.find("body"),a=n("
").addClass("related-popup").data("input",t),l=n("