Version Description
- Bug fix: hierarchical custom post types without page-attributes was still broken - doh!
- Bug fix: extreme edge case where post columns did not include the post title now supported
Download this release
Release Info
Developer | jakemgold |
Plugin | ![]() |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- readme.txt +9 -5
- simple-page-ordering.dev.js +11 -5
- simple-page-ordering.js +1 -1
- simple-page-ordering.php +1 -1
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.4
|
6 |
Tested up to: 3.6
|
7 |
-
Stable tag: 2.1.
|
8 |
|
9 |
Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.
|
10 |
|
@@ -75,10 +75,14 @@ This feature is already built into WordPress natively, but a bit tucked away. If
|
|
75 |
1. Processing indicator
|
76 |
|
77 |
|
78 |
-
== Changelog ==
|
79 |
-
|
80 |
-
= 2.1.
|
81 |
-
* Bug fix: custom post types
|
|
|
|
|
|
|
|
|
82 |
|
83 |
= 2.1 =
|
84 |
* UI refinements: Better "spinner" positioning (and HiDPI), translucent row when moving, improved appearance of "drop" placeholder, wait till row dragged by at least 5px to start sorting
|
4 |
Tags: order, re-order, ordering, pages, page, manage, menu_order, hierarchical, ajax, drag-and-drop, admin
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 3.6
|
7 |
+
Stable tag: 2.1.2
|
8 |
|
9 |
Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.
|
10 |
|
75 |
1. Processing indicator
|
76 |
|
77 |
|
78 |
+
== Changelog ==
|
79 |
+
|
80 |
+
= 2.1.2 =
|
81 |
+
* Bug fix: hierarchical custom post types without page-attributes was still broken - doh!
|
82 |
+
* Bug fix: extreme edge case where post columns did not include the post title now supported
|
83 |
+
|
84 |
+
= 2.1.1 =
|
85 |
+
* Bug fix: custom post types with page-attributes or hierarchical properties, but not both, breaking ordering
|
86 |
|
87 |
= 2.1 =
|
88 |
* UI refinements: Better "spinner" positioning (and HiDPI), translucent row when moving, improved appearance of "drop" placeholder, wait till row dragged by at least 5px to start sorting
|
simple-page-ordering.dev.js
CHANGED
@@ -13,8 +13,9 @@ function update_simple_ordering_callback(response) {
|
|
13 |
|
14 |
var inline_key = document.getElementById('inline_' + key);
|
15 |
if ( null !== inline_key && new_pos.hasOwnProperty(key) ) {
|
|
|
|
|
16 |
if ( undefined !== new_pos[key]['menu_order'] ) {
|
17 |
-
var dom_menu_order = inline_key.querySelector('.menu_order');
|
18 |
if ( null !== dom_menu_order )
|
19 |
dom_menu_order.innerHTML = new_pos[key]['menu_order'];
|
20 |
|
@@ -22,16 +23,21 @@ function update_simple_ordering_callback(response) {
|
|
22 |
if ( null !== dom_post_parent )
|
23 |
dom_post_parent.innerHTML = new_pos[key]['post_parent'];
|
24 |
|
25 |
-
var post_title =
|
|
|
|
|
|
|
26 |
|
27 |
var dashes = 0;
|
28 |
while (dashes < new_pos[key]['depth']) {
|
29 |
post_title = '— ' + post_title;
|
30 |
dashes++;
|
31 |
}
|
32 |
-
inline_key.parentNode.querySelector('.row-title')
|
33 |
-
|
34 |
-
|
|
|
|
|
35 |
}
|
36 |
}
|
37 |
}
|
13 |
|
14 |
var inline_key = document.getElementById('inline_' + key);
|
15 |
if ( null !== inline_key && new_pos.hasOwnProperty(key) ) {
|
16 |
+
var dom_menu_order = inline_key.querySelector('.menu_order');
|
17 |
+
|
18 |
if ( undefined !== new_pos[key]['menu_order'] ) {
|
|
|
19 |
if ( null !== dom_menu_order )
|
20 |
dom_menu_order.innerHTML = new_pos[key]['menu_order'];
|
21 |
|
23 |
if ( null !== dom_post_parent )
|
24 |
dom_post_parent.innerHTML = new_pos[key]['post_parent'];
|
25 |
|
26 |
+
var post_title = null;
|
27 |
+
var dom_post_title = inline_key.querySelector('.post_title');
|
28 |
+
if ( null !== dom_post_title )
|
29 |
+
post_title = dom_post_title.innerHTML;
|
30 |
|
31 |
var dashes = 0;
|
32 |
while (dashes < new_pos[key]['depth']) {
|
33 |
post_title = '— ' + post_title;
|
34 |
dashes++;
|
35 |
}
|
36 |
+
var dom_row_title = inline_key.parentNode.querySelector('.row-title');
|
37 |
+
if ( null !== dom_row_title && null !== post_title )
|
38 |
+
dom_row_title.innerHTML = post_title;
|
39 |
+
} else if ( null !== dom_menu_order ) {
|
40 |
+
dom_menu_order.innerHTML = new_pos[key];
|
41 |
}
|
42 |
}
|
43 |
}
|
simple-page-ordering.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function update_simple_ordering_callback(e){if("children"===e){window.location.reload();return}var t=jQuery.parseJSON(e);var n=t.new_pos;for(var r in n){if("next"===r)continue;var i=document.getElementById("inline_"+r);if(null!==i&&n.hasOwnProperty(r)){if(undefined!==n[r]["menu_order"]){
|
1 |
+
function update_simple_ordering_callback(e){if("children"===e){window.location.reload();return}var t=jQuery.parseJSON(e);var n=t.new_pos;for(var r in n){if("next"===r)continue;var i=document.getElementById("inline_"+r);if(null!==i&&n.hasOwnProperty(r)){var s=i.querySelector(".menu_order");if(undefined!==n[r]["menu_order"]){if(null!==s)s.innerHTML=n[r]["menu_order"];var o=i.querySelector(".post_parent");if(null!==o)o.innerHTML=n[r]["post_parent"];var u=null;var a=i.querySelector(".post_title");if(null!==a)u=a.innerHTML;var f=0;while(f<n[r]["depth"]){u="— "+u;f++}var l=i.parentNode.querySelector(".row-title");if(null!==l&&null!==u)l.innerHTML=u}else if(null!==s){s.innerHTML=n[r]}}}if(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:t.next["excluded"]},update_simple_ordering_callback)}else{jQuery(document.querySelector(".spo-updating-row")).removeClass("spo-updating-row");sortable_post_table.removeClass("spo-updating").sortable("enable")}}var sortable_post_table=jQuery(document.querySelector(".wp-list-table tbody"));sortable_post_table.sortable({items:"> tr",cursor:"move",axis:"y",containment:"table.widefat",scrollSensitivity:40,cancel:".inline-edit-row",distance:5,opacity:.85,forceHelperSize:true,update:function(e,t){sortable_post_table.sortable("disable").addClass("spo-updating");t.item.addClass("spo-updating-row");var n=t.item[0].id.substr(5);var r=false;var i=t.item.prev();if(i.length>0){r=i.attr("id").substr(5)}var s=false;var o=t.item.next();if(o.length>0){s=o.attr("id").substr(5)}jQuery.post(ajaxurl,{action:"simple_page_ordering",id:n,previd:r,nextid:s},update_simple_ordering_callback);var u=document.querySelectorAll("tr.iedit"),a=u.length;while(a--){if(a%2==0){jQuery(u[a]).addClass("alternate")}else{jQuery(u[a]).removeClass("alternate")}}}})
|
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.1.
|
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.1.2
|
7 |
Author: Jake Goldman, 10up
|
8 |
Author URI: http://10up.com
|
9 |
License: GPLv2 or later
|