Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New filter when moving pages #338

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/Form/Listeners/Sort.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ private function updateOrder()
$order = $this->post_update_repo->updateOrder($posts, 0, $filtered);
if ( $order ){
if ( $this->integrations->plugins->wpml->installed ) $this->integrations->plugins->wpml->syncPostOrder($posts);
apply_filters('nestedpages_update_order', $this->data['changed_parent_id']);
$this->response = ['status' => 'success', 'message' => __('Page order successfully updated.','wp-nested-pages') ];
} else {
$this->response = ['status'=>'error', 'message'=> __('There was an error updating the page order.','wp-nested-pages') ];
}
}
}
}
11 changes: 6 additions & 5 deletions assets/js/lib/nestedpages.nesting.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ NestedPages.Nesting = function()
plugin.formatter.setNestedMargins();
}, 100
);
plugin.syncNesting();
plugin.syncNesting(false, null, ui.item[0].id.replace("menuItem_", ""));
},
});
}
Expand Down Expand Up @@ -77,7 +77,7 @@ NestedPages.Nesting = function()
plugin.formatter.setNestedMargins();
}, 100
);
plugin.syncNesting();
plugin.syncNesting(false, null, ui.item[0].id.replace("menuItem_", ""));
},
});
});
Expand All @@ -91,7 +91,7 @@ NestedPages.Nesting = function()


// Sync Nesting
plugin.syncNesting = function(manual, callback)
plugin.syncNesting = function(manual, callback, changedParentID = null)
{
var list,
filtered;
Expand Down Expand Up @@ -120,7 +120,8 @@ NestedPages.Nesting = function()
list : list,
post_type : NestedPages.jsData.posttype,
syncmenu : syncmenu,
filtered : filtered
filtered : filtered,
changed_parent_id : changedParentID
},
success: function(data, callback){
plugin.initializeSortable();
Expand Down Expand Up @@ -166,4 +167,4 @@ NestedPages.Nesting = function()
return currentItem;
}
}
}
}
2 changes: 1 addition & 1 deletion assets/js/nestedpages.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/nestedpages.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/nestedpages.settings.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"devDependencies": {
"gulp": "4.0.2",
"gulp": "^4.0.2",
"gulp-autoprefixer": "7.0.1",
"gulp-concat": "^2.6.1",
"gulp-livereload": "4.0.2",
Expand Down