File Editor
Directories:
.. (Back)
Files:
class-sinatra-customizer-control-sortable.php
sortable.css
sortable.js
sortable.min.css
sortable.min.js
Create New File
Create
Edit File: sortable.min.js
!function($){"use strict";wp.customize.controlConstructor["sinatra-sortable"]=wp.customize.Control.extend({ready:function(){var control=this;control.params.sortable&&control.container.find("ul").sortable({items:"> .sinatra-sortable-item",intersect:"pointer",axis:"y",update:function(){control.update()}}),control.container.on("click",".dashicons-visibility",(function(){$(this).closest(".sinatra-sortable-item").toggleClass("invisible"),control.update()}))},update:function(){var $item,items=this.container.find(".sinatra-sortable-item"),new_val={};_.isEmpty(items)||_.each(items,(function(item){$item=$(item),new_val[$item.data("value")]=!$item.hasClass("invisible")})),this.setting.set({}),this.setting.set(new_val)}})}(jQuery);
Save Changes
Rename File
Rename