1 !function(a,t){"use strict";var e=t.MyAMS;t.PyAMS_default={search:{updateSort:function(){var t=a('form[id="search-results"]');if(t.exists()){var e=a(this).val();a('input[name="order_by"]',t).val(e),t.submit()}},updatePageLength:function(){var t=a('form[id="search-results"]');if(t.exists()){var e=a(this).val();a('input[name="start"]',t).val(0),a('input[name="length"]',t).val(e),t.submit()}},previousPage:function(){var t=a('form[id="search-results"]');if(t.exists()){var e=a(this).parents("ol.pagination").data("ams-current-page"),n=a('input[name="length"]',t).val();a('input[name="start"]',t).val(n*(e-2)),t.submit()}},nextPage:function(){var t=a('form[id="search-results"]');if(t.exists()){var e=a(this).parents("ol.pagination").data("ams-current-page"),n=a('input[name="length"]',t).val();a('input[name="start"]',t).val(n*e),t.submit()}},gotoPage:function(){var t=a('form[id="search-results"]');if(t.exists()){var e=parseInt(a(this).text()),n=a('input[name="length"]',t).val();a('input[name="start"]',t).val(n*(e-1)),t.submit()}}}},a(document).on("click",'[data-toggle="lightbox"]',function(t){t.preventDefault(),a(this).ekkoLightbox({wrapping:!1,alwaysShowClose:!0})}),a(document).on("click","[data-ams-click-handler]",function(t){var n=a(this),i=n.data("ams-disabled-handlers");if(!0!==i&&"click"!==i&&"all"!==i){var s=n.data();if(s.amsClickHandler){!0!==s.amsStopPropagation&&!0!==s.amsClickStopPropagation||t.stopPropagation(),!0!==s.amsClickKeepDefault&&t.preventDefault();for(var r=s.amsClickHandler.split(/\s+/),o=0;o<r.length;o++){var l=e.getFunctionByName(r[o]);void 0!==l&&l.call(n,t,s.amsClickHandlerOptions)}}}}),a(document).on("change","[data-ams-change-handler]",function(t){var n=a(this);if(!n.prop("readonly")){var i=n.data("ams-disabled-handlers");if(!0!==i&&"change"!==i&&"all"!==i){var s=n.data();if(s.amsChangeHandler){!0!==s.amsStopPropagation&&!0!==s.amsChangeStopPropagation||t.stopPropagation(),!0!==s.amsChangeKeepDefault&&t.preventDefault();for(var r=s.amsChangeHandler.split(/\s+/),o=0;o<r.length;o++){var l=e.getFunctionByName(r[o]);void 0!==l&&l.call(n,t,s.amsChangeHandlerOptions)}}}}});var n=function(){var t=a(".modal >div");t.exists()&&e.dialog.close(t),e.dialog.open("/get-glossary-term.html?term="+a(this).text(),{},{shown:function(){a(".thesaurus-term").off("click").on("click",n)}})};e.require(["error","ajax","dialog"],function(){a(".thesaurus-term").off("click").on("click",n)})}(jQuery,this); |
1 !function(o,a){"use strict";var l=a.MyAMS;a.PyAMS_default={search:{updateSort:function(){var a=o('form[id="search-results"]');if(a.exists()){var t=o(this).val();o('input[name="order_by"]',a).val(t),a.submit()}},updatePageLength:function(){var a=o('form[id="search-results"]');if(a.exists()){var t=o(this).val();o('input[name="start"]',a).val(0),o('input[name="length"]',a).val(t),a.submit()}},previousPage:function(){var a=o('form[id="search-results"]');if(a.exists()){var t=o(this).parents("ol.pagination").data("ams-current-page"),e=o('input[name="length"]',a).val();o('input[name="start"]',a).val(e*(t-2)),a.submit()}},nextPage:function(){var a=o('form[id="search-results"]');if(a.exists()){var t=o(this).parents("ol.pagination").data("ams-current-page"),e=o('input[name="length"]',a).val();o('input[name="start"]',a).val(e*t),a.submit()}},gotoPage:function(){var a=o('form[id="search-results"]');if(a.exists()){var t=parseInt(o(this).text()),e=o('input[name="length"]',a).val();o('input[name="start"]',a).val(e*(t-1)),a.submit()}}}},o(document).on("click",'[data-toggle="lightbox"]',function(a){a.preventDefault(),o(this).ekkoLightbox({wrapping:!1,alwaysShowClose:!0})}),o(document).on("click","[data-ams-click-handler]",function(a){var t=o(this),e=t.data("ams-disabled-handlers");if(!0!==e&&"click"!==e&&"all"!==e){var n=t.data();if(n.amsClickHandler){!0!==n.amsStopPropagation&&!0!==n.amsClickStopPropagation||a.stopPropagation(),!0!==n.amsClickKeepDefault&&a.preventDefault();for(var i=n.amsClickHandler.split(/\s+/),s=0;s<i.length;s++){var r=l.getFunctionByName(i[s]);void 0!==r&&r.call(t,a,n.amsClickHandlerOptions)}}}}),o(document).on("change","[data-ams-change-handler]",function(a){var t=o(this);if(!t.prop("readonly")){var e=t.data("ams-disabled-handlers");if(!0!==e&&"change"!==e&&"all"!==e){var n=t.data();if(n.amsChangeHandler){!0!==n.amsStopPropagation&&!0!==n.amsChangeStopPropagation||a.stopPropagation(),!0!==n.amsChangeKeepDefault&&a.preventDefault();for(var i=n.amsChangeHandler.split(/\s+/),s=0;s<i.length;s++){var r=l.getFunctionByName(i[s]);void 0!==r&&r.call(t,a,n.amsChangeHandlerOptions)}}}}});var t=function(){var a=o(".modal >div");a.exists()&&l.dialog.close(a),l.dialog.open("/get-glossary-term.html?term="+o(this).text(),{},{shown:function(){o(".thesaurus-term").off("click").on("click",t)}})};l.require(["error","ajax","dialog"],function(){o(".thesaurus-term").off("click").on("click",t)})}(jQuery,this); |