Simple Page Ordering - Version 2.3.1

Version Description

  • Bug fix: Prevent rows with hidden columns from jumping around while dragging
Download this release

Release Info

Developer helen
Plugin Icon 128x128 Simple Page Ordering
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3 to 2.3.1

assets/js/simple-page-ordering.min.js CHANGED
@@ -1 +1 @@
1
- function update_simple_ordering_callback(e){if("children"!==e){var t=jQuery.parseJSON(e),r=t.new_pos;for(var n in r)if("next"!==n){var i=document.getElementById("inline_"+n);if(null!==i&&r.hasOwnProperty(n)){var a=i.querySelector(".menu_order");if(void 0!==r[n].menu_order){null!==a&&(a.innerHTML=r[n].menu_order);var l=i.querySelector(".post_parent");null!==l&&(l.innerHTML=r[n].post_parent);var o=null,s=i.querySelector(".post_title");null!==s&&(o=s.innerHTML);for(var d=0;d<r[n].depth;)o="&mdash; "+o,d++;var u=i.parentNode.querySelector(".row-title");null!==u&&null!==o&&(u.innerHTML=o)}else null!==a&&(a.innerHTML=r[n])}}t.next?jQuery.post(ajaxurl,{action:"simple_page_ordering",id:t.next.id,previd:t.next.previd,nextid:t.next.nextid,start:t.next.start,excluded:JSON.stringify(t.next.excluded)},update_simple_ordering_callback):(jQuery(".spo-updating-row").removeClass("spo-updating-row").find(".check-column").removeClass("spinner is-active"),sortable_post_table.removeClass("spo-updating").sortable("enable"))}else window.location.reload()}var sortable_post_table=jQuery(".wp-list-table tbody");sortable_post_table.sortable({items:"> tr",cursor:"move",axis:"y",containment:"table.widefat",cancel:".inline-edit-row",distance:2,opacity:.8,tolerance:"pointer",start:function(e,t){"undefined"!=typeof inlineEditPost&&inlineEditPost.revert(),t.placeholder.height(t.item.height())},helper:function(e,t){for(var r=t.children(),n=0;n<r.length;n++){var i=jQuery(r[n]);i.width(i.width())}return t},stop:function(e,t){t.item.children().css("width","")},update:function(e,t){sortable_post_table.sortable("disable").addClass("spo-updating"),t.item.addClass("spo-updating-row"),t.item.find(".check-column").addClass("spinner is-active");var r=t.item[0].id.substr(5),n=!1,i=t.item.prev();i.length>0&&(n=i.attr("id").substr(5));var a=!1,l=t.item.next();l.length>0&&(a=l.attr("id").substr(5)),jQuery.post(ajaxurl,{action:"simple_page_ordering",id:r,previd:n,nextid:a},update_simple_ordering_callback);for(var o=document.querySelectorAll("tr.iedit"),s=o.length;s--;)0==s%2?jQuery(o[s]).addClass("alternate"):jQuery(o[s]).removeClass("alternate")}});
1
+ function update_simple_ordering_callback(e){if("children"!==e){var t=jQuery.parseJSON(e),r=t.new_pos;for(var n in r)if("next"!==n){var i=document.getElementById("inline_"+n);if(null!==i&&r.hasOwnProperty(n)){var a=i.querySelector(".menu_order");if(void 0!==r[n].menu_order){null!==a&&(a.innerHTML=r[n].menu_order);var l=i.querySelector(".post_parent");null!==l&&(l.innerHTML=r[n].post_parent);var o=null,s=i.querySelector(".post_title");null!==s&&(o=s.innerHTML);for(var d=0;d<r[n].depth;)o="&mdash; "+o,d++;var p=i.parentNode.querySelector(".row-title");null!==p&&null!==o&&(p.innerHTML=o)}else null!==a&&(a.innerHTML=r[n])}}t.next?jQuery.post(ajaxurl,{action:"simple_page_ordering",id:t.next.id,previd:t.next.previd,nextid:t.next.nextid,start:t.next.start,excluded:JSON.stringify(t.next.excluded)},update_simple_ordering_callback):(jQuery(".spo-updating-row").removeClass("spo-updating-row").find(".check-column").removeClass("spinner is-active"),sortable_post_table.removeClass("spo-updating").sortable("enable"))}else window.location.reload()}var sortable_post_table=jQuery(".wp-list-table tbody");sortable_post_table.sortable({items:"> tr",cursor:"move",axis:"y",containment:"table.widefat",cancel:".inline-edit-row",distance:2,opacity:.8,tolerance:"pointer",start:function(e,t){"undefined"!=typeof inlineEditPost&&inlineEditPost.revert(),t.placeholder.height(t.item.height()),t.placeholder.empty()},helper:function(e,t){for(var r=t.children(),n=0;n<r.length;n++){var i=jQuery(r[n]);i.width(i.width())}return t},stop:function(e,t){t.item.children().css("width","")},update:function(e,t){sortable_post_table.sortable("disable").addClass("spo-updating"),t.item.addClass("spo-updating-row"),t.item.find(".check-column").addClass("spinner is-active");var r=t.item[0].id.substr(5),n=!1,i=t.item.prev();i.length>0&&(n=i.attr("id").substr(5));var a=!1,l=t.item.next();l.length>0&&(a=l.attr("id").substr(5)),jQuery.post(ajaxurl,{action:"simple_page_ordering",id:r,previd:n,nextid:a},update_simple_ordering_callback);for(var o=document.querySelectorAll("tr.iedit"),s=o.length;s--;)0==s%2?jQuery(o[s]).addClass("alternate"):jQuery(o[s]).removeClass("alternate")}});
assets/js/src/simple-page-ordering.js CHANGED
@@ -77,6 +77,7 @@ sortable_post_table.sortable({
77
  inlineEditPost.revert();
78
  }
79
  ui.placeholder.height(ui.item.height());
 
80
  },
81
  helper: function(e, ui) {
82
  var children = ui.children();
77
  inlineEditPost.revert();
78
  }
79
  ui.placeholder.height(ui.item.height());
80
+ ui.placeholder.empty();
81
  },
82
  helper: function(e, ui) {
83
  var children = ui.children();
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Simple Page Ordering ===
2
- Contributors: jakemgold, 10up, thinkoomph
3
  Donate link: http://10up.com/plugins/simple-page-ordering-wordpress/
4
  Tags: order, re-order, ordering, pages, page, manage, menu_order, hierarchical, ajax, drag-and-drop, admin
5
  Requires at least: 3.8
6
  Tested up to: 4.9.4
7
- Stable tag: 2.3
8
 
9
  Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.
10
 
@@ -81,6 +81,9 @@ This feature is already built into WordPress natively, but a bit tucked away. If
81
 
82
  == Changelog ==
83
 
 
 
 
84
  = 2.3 =
85
  * Avoid exceeding PHP's max input variables, which could cause incorrectly assigned page order
86
  * Fix a malformed URL that would take you to posts instead of pages
1
  === Simple Page Ordering ===
2
+ Contributors: 10up, jakemgold, welcher, helen, thinkoomph
3
  Donate link: http://10up.com/plugins/simple-page-ordering-wordpress/
4
  Tags: order, re-order, ordering, pages, page, manage, menu_order, hierarchical, ajax, drag-and-drop, admin
5
  Requires at least: 3.8
6
  Tested up to: 4.9.4
7
+ Stable tag: 2.3.1
8
 
9
  Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.
10
 
81
 
82
  == Changelog ==
83
 
84
+ = 2.3.1 =
85
+ * Bug fix: Prevent rows with hidden columns from jumping around while dragging
86
+
87
  = 2.3 =
88
  * Avoid exceeding PHP's max input variables, which could cause incorrectly assigned page order
89
  * Fix a malformed URL that would take you to posts instead of pages
simple-page-ordering.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple Page Ordering
4
  Plugin URI: http://10up.com/plugins/simple-page-ordering-wordpress/
5
  Description: Order your pages and hierarchical post types using drag and drop on the built in page list. For further instructions, open the "Help" tab on the Pages screen.
6
- Version: 2.3
7
  Author: Jake Goldman, 10up
8
  Author URI: http://10up.com
9
  License: GPLv2 or later
3
  Plugin Name: Simple Page Ordering
4
  Plugin URI: http://10up.com/plugins/simple-page-ordering-wordpress/
5
  Description: Order your pages and hierarchical post types using drag and drop on the built in page list. For further instructions, open the "Help" tab on the Pages screen.
6
+ Version: 2.3.1
7
  Author: Jake Goldman, 10up
8
  Author URI: http://10up.com
9
  License: GPLv2 or later