aristath/kirki

View on GitHub
packages/kirki-framework/control-sortable/dist/control.js

Summary

Maintainability
A
0 mins
Test Coverage
wp.customize.controlConstructor["kirki-sortable"]=wp.customize.Control.extend({ready:function(){var i=this;jQuery(i.container.find("ul.sortable").first()).sortable({update:function(){i.setting.set(i.getNewVal())}}).disableSelection().find("li").each((function(){jQuery(this).find("i.visibility").click((function(){jQuery(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")}))})).click((function(){i.setting.set(i.getNewVal())}))},getNewVal:function(){var i=jQuery(this.container.find("li")),t=[];return _.each(i,(function(i){jQuery(i).hasClass("invisible")||t.push(jQuery(i).data("value"))})),t}});
//# sourceMappingURL=control.js.map