diff -r bcd694fda81d -r 4ee52103327c src/pyams_skin/resources/js/myams-container.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_skin/resources/js/myams-container.min.js Wed Oct 17 17:55:33 2018 +0200 @@ -0,0 +1,1 @@ +!function(a,t){var e=t.MyAMS,n=e;e.container={changeOrder:function(t,e){a('input[name="'+a(this).data("ams-input-name")+'"]',a(this)).val(e.join(";"))},deleteElement:function(){return function(){var t=a(this);e.skin.bigBox({title:n.i18n.WARNING,content:'  '+n.i18n.DELETE_WARNING,status:"info",buttons:n.i18n.BTN_OK_CANCEL},function(a){if(a===n.i18n.BTN_OK){var s=t.parents("tr").first(),i=s.parents("table").first(),r=s.data("ams-location")||i.data("ams-location")||"";r&&(r+="/");var f=s.data("ams-delete-target")||i.data("ams-delete-target")||"delete-element.json",c=s.data("ams-element-name");e.ajax.post(r+f,{object_name:c},function(a,t){"success"===a.status?(i.hasClass("datatable")?i.dataTable().fnDeleteRow(s[0]):s.remove(),a.handle_json&&e.ajax.handleJSON(a)):e.ajax.handleJSON(a)})}})}},switchElementVisibility:function(){return function(){var t=a(this),e=t.parents("td").first(),s=t.parents("tr").first(),i=s.parents("table");a("i",t).attr("class","fa fa-fw fa-spinner fa-pulse"),n.ajax.post(i.data("ams-location")+"/"+(e.data("ams-attribute-switcher")||i.data("ams-attribute-switcher")),{object_name:s.data("ams-element-name")},function(e,n){e.visible?a("i",t).attr("class","fa fa-fw fa-eye"):a("i",t).attr("class","fa fa-fw fa-eye-slash text-danger")})}},switchElementAttribute:function(){return function(){var t=a(this),e=t.parents("td").first(),s=e.data("ams-switcher-attribute-name"),i=t.parents("tr").first(),r=i.parents("table");a("i",t).attr("class","fa fa-fw fa-spinner fa-pulse"),n.ajax.post(r.data("ams-location")+"/"+(e.data("ams-attribute-switcher")||r.data("ams-attribute-switcher")),{object_name:i.data("ams-element-name")},function(e,n){e[s]||e.on?a("i",t).attr("class",r.data("ams-"+s+"-icon-on")||"fa fa-fw fa-check-square-o"):a("i",t).attr("class",r.data("ams-"+s+"-icon-off")||"fa fa-fw fa-check-square txt-color-silver opacity-75")})}}}}(jQuery,this);