+ = sprintf(__('Select a taxonomy to sort %s.', 'reorder-post-within-categories'), $post_type_detail->labels->name); ?> +
+ + + + += sprintf(__('First of all, you need to save your settings for ReOrder Posts in Categories.', 'reorder-post-within-categories'), admin_url('options-general.php?page=reorder-posts-within-categories.php')); ?>
++ = __("Data reset complete.", "reorder-post-within-categories"); ?> = __("All manually ranked order data has been deleted inclusing settings options.", "reorder-post-within-categories"); ?> +
++ = __("Old custom table deleted.", "reorder-post-within-categories"); ?> = __("The previous version 1.x custom table used for storing manually ranked orders has been deleted.", "reorder-post-within-categories"); ?> +
++ = __("Options saved.", "reorder-post-within-categories"); ?> = __("A sub-menu is now placed under each post type menu in your dashboard to access the sorting page.", "reorder-post-within-categories"); ?> +
+new Sortable(example1, { + animation: 150, + ghostClass: 'blue-background-class' +});+
Try dragging from one list to another. The item you drag will be cloned and the clone will stay in the original list.
+new Sortable(example3Left, { + group: { + name: 'shared', + pull: 'clone' // To clone: set pull to 'clone' + }, + animation: 150 +}); + +new Sortable(example3Right, { + group: { + name: 'shared', + pull: 'clone' + }, + animation: 150 +});+
Try sorting the list on the left. It is not possible because it has it's sort
option set to false. However, you can still drag from the list on the left to the list on the right.
new Sortable(example4Left, { + group: { + name: 'shared', + pull: 'clone', + put: false // Do not allow items to be put into this list + }, + animation: 150, + sort: false // To disable sorting: set sort to false +}); + +new Sortable(example4Right, { + group: 'shared', + animation: 150 +});+
new Sortable(example5, { + handle: '.handle', // handle's class + animation: 150 +});+
Try dragging the item with a red background. It cannot be done, because that item is filtered out using the filter
option.
new Sortable(example6, { + filter: '.filtered', // 'filtered' class is not draggable + animation: 150 +});+
Try modifying the inputs below to affect the swap thresholds. You can see the swap zones of the squares colored in dark blue, while the "dead zones" (that do not cause a swap) are colored in light blue.
+new Sortable(example7, { + swapThreshold: 1, + animation: 150 +});+
NOTE: When using nested Sortables with animation, it is recommended that the fallbackOnBody
option is set to true.
It is also always recommended that either the invertSwap
option is set to true, or the swapThreshold
option is lower than the default value of 1 (eg 0.65
).
// Loop through each nested sortable element +for (var i = 0; i < nestedSortables.length; i++) { + new Sortable(nestedSortables[i], { + group: 'nested', + animation: 150, + fallbackOnBody: true, + swapThreshold: 0.65 + }); +}+
The MultiDrag plugin allows for multiple items to be dragged at a time. You can click to "select" multiple items, and then drag them as one item.
+new Sortable(multiDragDemo, { + multiDrag: true, // Enable multi-drag + selectedClass: 'selected', // The class applied to the selected items + animation: 150 +});+
The Swap plugin changes the behaviour of Sortable to allow for items to be swapped with eachother rather than sorted.
+new Sortable(swapDemo, { + swap: true, // Enable swap plugin + swapClass: 'highlight', // The class applied to the hovered swap item + animation: 150 +});+
=h&&(c+=2);f>=k&&(w+=2)}}finally{g&&(g.style.display=a)}}catch(y){D.console&&console.log(y&&y.stack||y)}}var D="undefined"!==typeof window? +window:{},B=["break,continue,do,else,for,if,return,while"],F=[[B,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],H=[F,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"], +O=[F,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],P=[F,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"], +F=[F,"abstract,async,await,constructor,debugger,enum,eval,export,from,function,get,import,implements,instanceof,interface,let,null,of,set,undefined,var,with,yield,Infinity,NaN"],Q=[B,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],R=[B,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"], +B=[B,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,W=/\S/,X=x({keywords:[H,P,O,F,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",Q,R,B],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}), +I={};t(X,["default-code"]);t(G([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^