Version Description
- Clone/Duplicate functionality added - click the "clone" button in a row to clone/duplicate a post or page
- Bug fix when attempting to trash Advanced Custom Field field groups (Thanks to Ben Plum)
- Javascript rewritten for more future-friendly updates and feature builds
- Draft filter added to list
- Tested and confirmed WordPress 4.3 compatibility
Download this release
Release Info
Developer | kylephillips |
Plugin | Nested Pages |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.15 to 1.4.0
- app/Activation/Dependencies.php +2 -1
- app/Entities/Listing/Listing.php +1 -0
- app/Entities/Post/PostCloner.php +116 -0
- app/Entities/Post/PostTrashActions.php +3 -1
- app/Form/FormActionFactory.php +2 -1
- app/Form/Handlers/ClonePostHandler.php +56 -0
- app/NestedPages.php +1 -1
- app/Views/forms/clone-form.php +70 -0
- app/Views/listing.php +2 -1
- app/Views/partials/row.php +4 -0
- app/Views/partials/tool-list.php +4 -0
- assets/css/nestedpages.css +1 -1
- assets/js/lib/jquery.mjs.nestedSortable.js +462 -224
- assets/js/lib/nestedpages-factory.js +187 -0
- assets/js/lib/{nestedpages.js → nestedpages-old.js} +0 -49
- assets/js/lib/nestedpages-responsive.js +55 -0
- assets/js/lib/nestedpages.clone.js +86 -0
- assets/js/lib/nestedpages.formatter.js +115 -0
- assets/js/lib/nestedpages.menu-toggle.js +101 -0
- assets/js/lib/nestedpages.nesting.js +88 -0
- assets/js/lib/nestedpages.new-link.js +157 -0
- assets/js/lib/nestedpages.new-page.js +258 -0
- assets/js/lib/nestedpages.page-toggle.js +70 -0
- assets/js/lib/nestedpages.quickedit-link.js +215 -0
- assets/js/lib/nestedpages.quickedit-post.js +501 -0
- assets/js/lib/nestedpages.sync-menu-setting.js +51 -0
- assets/js/lib/nestedpages.trash.js +86 -0
- assets/js/nestedpages.min.js +1970 -1
- languages/nestedpages-da_DK.mo +0 -0
- languages/nestedpages-da_DK.po +152 -92
- languages/nestedpages.mo +0 -0
- languages/nestedpages.pot +176 -104
- nestedpages.php +1 -1
- readme.txt +8 -1
app/Activation/Dependencies.php
CHANGED
@@ -121,7 +121,8 @@ class Dependencies {
|
|
121 |
'add_page' => __('Add Page', 'nestedpages'),
|
122 |
'add_pages' => __('Add Pages', 'nestedpages'),
|
123 |
'add_multiple' => __('Add Multiple', 'nestedpages'),
|
124 |
-
'trash_confirm' => __('Are you sure you would like to empty the trash? This action is not reversable.', 'nestedpages')
|
|
|
125 |
);
|
126 |
$syncmenu = ( get_option('nestedpages_menusync') == 'sync' ) ? true : false;
|
127 |
$localized_data['syncmenu'] = $syncmenu;
|
121 |
'add_page' => __('Add Page', 'nestedpages'),
|
122 |
'add_pages' => __('Add Pages', 'nestedpages'),
|
123 |
'add_multiple' => __('Add Multiple', 'nestedpages'),
|
124 |
+
'trash_confirm' => __('Are you sure you would like to empty the trash? This action is not reversable.', 'nestedpages'),
|
125 |
+
'hidden' => __('Hidden', 'nestedpages')
|
126 |
);
|
127 |
$syncmenu = ( get_option('nestedpages_menusync') == 'sync' ) ? true : false;
|
128 |
$localized_data['syncmenu'] = $syncmenu;
|
app/Entities/Listing/Listing.php
CHANGED
@@ -282,6 +282,7 @@ class Listing {
|
|
282 |
|
283 |
// Published?
|
284 |
if ( $this->post->status == 'publish' ) echo ' published';
|
|
|
285 |
|
286 |
// Hidden in Nested Pages?
|
287 |
if ( $this->post->np_status == 'hide' ) echo ' np-hide';
|
282 |
|
283 |
// Published?
|
284 |
if ( $this->post->status == 'publish' ) echo ' published';
|
285 |
+
if ( $this->post->status == 'draft' ) echo ' draft';
|
286 |
|
287 |
// Hidden in Nested Pages?
|
288 |
if ( $this->post->np_status == 'hide' ) echo ' np-hide';
|
app/Entities/Post/PostCloner.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NestedPages\Entities\Post;
|
4 |
+
|
5 |
+
class PostCloner
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* Original Post ID
|
9 |
+
* @var int
|
10 |
+
*/
|
11 |
+
private $original_id;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Original Post Object
|
15 |
+
* @var int
|
16 |
+
*/
|
17 |
+
private $original_post;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The New Post ID
|
21 |
+
* @var int
|
22 |
+
*/
|
23 |
+
private $new_id;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The New Post
|
27 |
+
* @var object
|
28 |
+
*/
|
29 |
+
private $new_post;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Clone Options
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
private $clone_options = array();
|
36 |
+
|
37 |
+
/**
|
38 |
+
* New Posts
|
39 |
+
* @var array of post IDs
|
40 |
+
*/
|
41 |
+
private $new_posts;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Clone the post
|
45 |
+
* @var int $id
|
46 |
+
*/
|
47 |
+
public function clonePost($id, $quantity = 1, $status = 'publish', $author = null)
|
48 |
+
{
|
49 |
+
$this->original_id = $id;
|
50 |
+
$this->original_post = get_post( $id );
|
51 |
+
$this->clone_options['quantity'] = $quantity;
|
52 |
+
$this->clone_options['status'] = $status;
|
53 |
+
$this->clone_options['author'] = $author;
|
54 |
+
$this->loopClone();
|
55 |
+
return $this->new_posts;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Clone Post for quantity specified
|
60 |
+
*/
|
61 |
+
private function loopClone()
|
62 |
+
{
|
63 |
+
for ( $i = 0; $i < $this->clone_options['quantity']; $i++ ){
|
64 |
+
$this->clonePostData();
|
65 |
+
$this->cloneTaxonomies();
|
66 |
+
$this->cloneMeta();
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Clone the standard post data
|
72 |
+
*/
|
73 |
+
private function clonePostData()
|
74 |
+
{
|
75 |
+
$args = array(
|
76 |
+
'comment_status' => $this->original_post->comment_status,
|
77 |
+
'ping_status' => $this->original_post->ping_status,
|
78 |
+
'post_author' => $this->clone_options['author'],
|
79 |
+
'post_content' => $this->original_post->post_content,
|
80 |
+
'post_excerpt' => $this->original_post->post_excerpt,
|
81 |
+
'post_name' => $this->original_post->post_name,
|
82 |
+
'post_parent' => $this->original_post->post_parent,
|
83 |
+
'post_password' => $this->original_post->post_password,
|
84 |
+
'post_status' => $this->clone_options['status'],
|
85 |
+
'post_title' => $this->original_post->post_title,
|
86 |
+
'post_type' => $this->original_post->post_type,
|
87 |
+
'to_ping' => $this->original_post->to_ping,
|
88 |
+
'menu_order' => $this->original_post->menu_order
|
89 |
+
);
|
90 |
+
$this->new_id = wp_insert_post($args);
|
91 |
+
$this->new_posts[] = $this->new_id;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Clone the taxonomies
|
96 |
+
*/
|
97 |
+
private function cloneTaxonomies()
|
98 |
+
{
|
99 |
+
$taxonomies = get_object_taxonomies($this->original_post->post_type);
|
100 |
+
foreach ($taxonomies as $taxonomy) {
|
101 |
+
$post_terms = wp_get_object_terms($this->original_id, $taxonomy, array('fields' => 'slugs'));
|
102 |
+
wp_set_object_terms($this->new_id, $post_terms, $taxonomy, false);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Clone the custom fields
|
108 |
+
*/
|
109 |
+
private function cloneMeta()
|
110 |
+
{
|
111 |
+
$meta = get_post_meta($this->original_id);
|
112 |
+
foreach($meta as $key => $value){
|
113 |
+
add_post_meta($this->new_id, $key, $value[0]);
|
114 |
+
}
|
115 |
+
}
|
116 |
+
}
|
app/Entities/Post/PostTrashActions.php
CHANGED
@@ -76,7 +76,9 @@ class PostTrashActions {
|
|
76 |
{
|
77 |
$visible_pages = $this->user_repo->getVisiblePages();
|
78 |
$visible_pages = $visible_pages[$post_type];
|
79 |
-
|
|
|
|
|
80 |
$child_pages = array();
|
81 |
|
82 |
$children = new \WP_Query(array('post_type'=>$post_type, 'posts_per_page'=>-1, 'post_parent'=>$post_id));
|
76 |
{
|
77 |
$visible_pages = $this->user_repo->getVisiblePages();
|
78 |
$visible_pages = $visible_pages[$post_type];
|
79 |
+
|
80 |
+
if ( !isset($visible_pages[$post_type]) ) return;
|
81 |
+
|
82 |
$child_pages = array();
|
83 |
|
84 |
$children = new \WP_Query(array('post_type'=>$post_type, 'posts_per_page'=>-1, 'post_parent'=>$post_id));
|
app/Form/FormActionFactory.php
CHANGED
@@ -39,7 +39,8 @@ class FormActionFactory {
|
|
39 |
'wp_ajax_npnewChild',
|
40 |
'admin_post_npListingSort',
|
41 |
'wp_ajax_npEmptyTrash',
|
42 |
-
'admin_post_npSearch'
|
|
|
43 |
);
|
44 |
$this->setHandlers();
|
45 |
}
|
39 |
'wp_ajax_npnewChild',
|
40 |
'admin_post_npListingSort',
|
41 |
'wp_ajax_npEmptyTrash',
|
42 |
+
'admin_post_npSearch',
|
43 |
+
'wp_ajax_npclonePost'
|
44 |
);
|
45 |
$this->setHandlers();
|
46 |
}
|
app/Form/Handlers/ClonePostHandler.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NestedPages\Form\Handlers;
|
4 |
+
|
5 |
+
use NestedPages\Entities\Post\PostCloner;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Clone an existing post
|
9 |
+
*/
|
10 |
+
class ClonePostHandler extends BaseHandler
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Post ID/status/author to Clone
|
14 |
+
*/
|
15 |
+
protected $data;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Cloner Object
|
19 |
+
*/
|
20 |
+
private $cloner;
|
21 |
+
|
22 |
+
public function __construct()
|
23 |
+
{
|
24 |
+
parent::__construct();
|
25 |
+
$this->cloner = new PostCloner;
|
26 |
+
$this->setPostID();
|
27 |
+
$this->clonePost();
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Set the Post ID to Clone
|
32 |
+
*/
|
33 |
+
private function setPostID()
|
34 |
+
{
|
35 |
+
if ( !isset($_POST['parent_id']) ){
|
36 |
+
return $this->sendResponse(array('status' => 'error', 'message' => __('Post Not Found', 'nestedapges')));
|
37 |
+
}
|
38 |
+
$this->data['post_id'] = intval(sanitize_text_field($_POST['parent_id']));
|
39 |
+
$this->data['status'] = sanitize_text_field($_POST['status']);
|
40 |
+
$this->data['author'] = intval(sanitize_text_field($_POST['author']));
|
41 |
+
$this->data['quantity'] = intval(sanitize_text_field($_POST['quantity']));
|
42 |
+
$this->data['post_type'] = sanitize_text_field($_POST['posttype']);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Clone the post
|
47 |
+
*/
|
48 |
+
private function clonePost()
|
49 |
+
{
|
50 |
+
$new_posts = $this->cloner->clonePost($this->data['post_id'], $this->data['quantity'], $this->data['status'], $this->data['author']);
|
51 |
+
return wp_send_json(array(
|
52 |
+
'status' => 'success',
|
53 |
+
'posts' => $this->post_repo->postArray($new_posts, $this->data['post_type'])
|
54 |
+
));
|
55 |
+
}
|
56 |
+
}
|
app/NestedPages.php
CHANGED
@@ -12,7 +12,7 @@ class NestedPages {
|
|
12 |
$np_env = 'live';
|
13 |
|
14 |
global $np_version;
|
15 |
-
$np_version = '1.
|
16 |
|
17 |
if ( is_admin() ) $app = new NestedPages\Bootstrap;
|
18 |
}
|
12 |
$np_env = 'live';
|
13 |
|
14 |
global $np_version;
|
15 |
+
$np_version = '1.4.0';
|
16 |
|
17 |
if ( is_admin() ) $app = new NestedPages\Bootstrap;
|
18 |
}
|
app/Views/forms/clone-form.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Modal Form for cloning posts
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
<div class="np-modal fade nestedpages np-modal-form" id="np-clone-modal">
|
7 |
+
<div class="modal-dialog">
|
8 |
+
<div class="modal-content clone-modal">
|
9 |
+
<h3><?php _e('Clone', 'nestedpages'); ?> <span data-clone-parent></span></h3>
|
10 |
+
|
11 |
+
<div class="modal-body">
|
12 |
+
|
13 |
+
<div class="form-control">
|
14 |
+
<label for="clone-quantity"><?php _e('Number of Copies', 'nestedpages'); ?></label>
|
15 |
+
<select id="clone-quantity" data-clone-quantity>
|
16 |
+
<option value="1" selected="">1</option>
|
17 |
+
<?php
|
18 |
+
for ( $i = 2; $i < 11; $i++ ){
|
19 |
+
echo '<option value="' . $i . '">' . $i . '</option>';
|
20 |
+
}
|
21 |
+
?>
|
22 |
+
</select>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<div class="form-control">
|
26 |
+
<label><?php _e( 'Status' ); ?></label>
|
27 |
+
<select name="_status" data-clone-status>
|
28 |
+
<?php if ( $can_publish ) : ?>
|
29 |
+
<option value="publish"><?php _e( 'Published' ); ?></option>
|
30 |
+
<?php endif; ?>
|
31 |
+
<option value="pending"><?php _e( 'Pending Review' ); ?></option>
|
32 |
+
<option value="draft"><?php _e( 'Draft' ); ?></option>
|
33 |
+
</select>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<?php
|
37 |
+
$authors_dropdown = '';
|
38 |
+
if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) :
|
39 |
+
$users_opt = array(
|
40 |
+
'hide_if_only_one_author' => false,
|
41 |
+
'who' => 'authors',
|
42 |
+
'name' => 'post_author',
|
43 |
+
'id' => 'post_author',
|
44 |
+
'class'=> 'authors',
|
45 |
+
'multi' => 1,
|
46 |
+
'echo' => 0
|
47 |
+
);
|
48 |
+
|
49 |
+
if ( $authors = wp_dropdown_users( $users_opt ) ) :
|
50 |
+
$authors_dropdown = '<div class="form-control" data-clone-author><label>' . __( 'Author' ) . '</label>';
|
51 |
+
$authors_dropdown .= $authors;
|
52 |
+
$authors_dropdown .= '</div>';
|
53 |
+
endif;
|
54 |
+
echo $authors_dropdown;
|
55 |
+
endif;
|
56 |
+
?>
|
57 |
+
</div><!-- .modal-body -->
|
58 |
+
|
59 |
+
</div><!-- /.modal-content -->
|
60 |
+
<div class="modal-footer">
|
61 |
+
<button type="button" class="button modal-close" data-dismiss="modal">
|
62 |
+
<?php _e('Cancel'); ?>
|
63 |
+
</button>
|
64 |
+
<a accesskey="s" class="button-primary alignright" data-confirm-clone>
|
65 |
+
<?php _e( 'Clone', 'nestedpages' ); ?>
|
66 |
+
</a>
|
67 |
+
<span class="np-qe-loading np-link-loading" data-clone-loading></span>
|
68 |
+
</div>
|
69 |
+
</div><!-- /.modal-dialog -->
|
70 |
+
</div><!-- /.modal -->
|
app/Views/listing.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
</h2>
|
22 |
|
23 |
<?php if ( $this->confirmation->getMessage() ) : ?>
|
24 |
-
<div id="message" class="updated"><p><?php echo $this->confirmation->getMessage(); ?></p></div>
|
25 |
<?php endif; ?>
|
26 |
|
27 |
<div class="nestedpages-top-toggles">
|
@@ -66,5 +66,6 @@
|
|
66 |
</div><!-- .wrap -->
|
67 |
|
68 |
<?php include( NestedPages\Helpers::view('forms/empty-trash-modal') ); ?>
|
|
|
69 |
<?php include( NestedPages\Helpers::view('forms/link-form') ); ?>
|
70 |
<?php include( NestedPages\Helpers::view('forms/bulk-add') ); ?>
|
21 |
</h2>
|
22 |
|
23 |
<?php if ( $this->confirmation->getMessage() ) : ?>
|
24 |
+
<div id="message" class="updated notice is-dismissible"><p><?php echo $this->confirmation->getMessage(); ?></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>
|
25 |
<?php endif; ?>
|
26 |
|
27 |
<div class="nestedpages-top-toggles">
|
66 |
</div><!-- .wrap -->
|
67 |
|
68 |
<?php include( NestedPages\Helpers::view('forms/empty-trash-modal') ); ?>
|
69 |
+
<?php include( NestedPages\Helpers::view('forms/clone-form') ); ?>
|
70 |
<?php include( NestedPages\Helpers::view('forms/link-form') ); ?>
|
71 |
<?php include( NestedPages\Helpers::view('forms/bulk-add') ); ?>
|
app/Views/partials/row.php
CHANGED
@@ -89,6 +89,10 @@
|
|
89 |
|
90 |
<?php endif; ?>
|
91 |
|
|
|
|
|
|
|
|
|
92 |
<?php if ( !$user = wp_check_post_lock($this->post->id) || !$this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) ) : ?>
|
93 |
<a href="#"
|
94 |
class="np-btn np-quick-edit"
|
89 |
|
90 |
<?php endif; ?>
|
91 |
|
92 |
+
<?php if ( current_user_can('edit_pages') && current_user_can('edit_posts') ) : ?>
|
93 |
+
<a href="#" class="np-btn clone-post" data-id="<?php echo get_the_id(); ?>" data-parentname="<?php echo $this->post->title; ?>"><?php _e('Clone', 'nestedpages'); ?></a>
|
94 |
+
<?php endif; ?>
|
95 |
+
|
96 |
<?php if ( !$user = wp_check_post_lock($this->post->id) || !$this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) ) : ?>
|
97 |
<a href="#"
|
98 |
class="np-btn np-quick-edit"
|
app/Views/partials/tool-list.php
CHANGED
@@ -9,6 +9,10 @@
|
|
9 |
<li>
|
10 |
<a href="#published" class="np-toggle-publish"><?php _e('Published'); ?></a> |
|
11 |
</li>
|
|
|
|
|
|
|
|
|
12 |
|
13 |
<li>
|
14 |
<a href="#show" class="np-toggle-hidden"><?php _e('Show Hidden', 'nestedpages'); ?> </a>
|
9 |
<li>
|
10 |
<a href="#published" class="np-toggle-publish"><?php _e('Published'); ?></a> |
|
11 |
</li>
|
12 |
+
|
13 |
+
<li>
|
14 |
+
<a href="#draft" class="np-toggle-publish"><?php _e('Draft'); ?></a> |
|
15 |
+
</li>
|
16 |
|
17 |
<li>
|
18 |
<a href="#show" class="np-toggle-hidden"><?php _e('Show Hidden', 'nestedpages'); ?> </a>
|
assets/css/nestedpages.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body{-webkit-animation-delay:0.1s;-webkit-animation-name:fontfix;-webkit-animation-duration:0.1s;-webkit-animation-iteration-count:1;-webkit-animation-timing-function:linear;}@-webkit-keyframes fontfix{from{opacity:1;}to{opacity:1;}}@font-face{font-family:'nestedpages';src:url('fonts/nestedpages.eot');}@font-face{font-family:'nestedpages';src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMggjB2gAAAC8AAAAYGNtYXDw7eamAAABHAAAAFRnYXNwAAAAEA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AAAAAAAACgAUAB4AMgBMAF4AfACKAJgAsgD6ATgBsAI+Au4DxARIBKAF/Ab6B4AILAiaAAAAAQAAABgA7wAHAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABABYAAAABAAAAAAACAA4AYwABAAAAAAADABYALAABAAAAAAAEABYAcQABAAAAAAAFABYAFgABAAAAAAAGAAsAQgABAAAAAAAKADQAhwADAAEECQABABYAAAADAAEECQACAA4AYwADAAEECQADABYALAADAAEECQAEABYAcQADAAEECQAFABYAFgADAAEECQAGABYATQADAAEECQAKADQAhwBuAGUAcwB0AGUAZABwAGEAZwBlAHMAVgBlAHIAcwBpAG8AbgAgADEALgAwAG4AZQBzAHQAZQBkAHAAYQBnAGUAc25lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAcwBSAGUAZwB1AGwAYQByAG4AZQBzAHQAZQBkAHAAYQBnAGUAcwBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');font-weight:normal;font-style:normal;}[class^="np-icon-"],[class*=" np-icon-"]{font-family:'nestedpages';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.np-icon-no:before{content:"\e601";}.np-icon-yes:before{content:"\e602";}.np-icon-menu:before{content:"\e603";}.np-icon-arrow-down:before{content:"\e604";}.np-icon-arrow-right:before{content:"\e605";}.np-icon-sub-menu:before{content:"\e600";}.np-icon-arrows-alt:before{content:"\f0b2";}.np-icon-pencil:before{content:"\e608";}.np-icon-bubble:before{content:"\e607";}.np-icon-lock:before{content:"\e609";}.np-icon-remove:before{content:"\e60a";}.np-icon-list:before{content:"\e60d";}.np-icon-menu2:before{content:"\e606";}.np-icon-link:before{content:"\e612";}.np-icon-eye:before{content:"\e60b";}.np-icon-eye-blocked:before{content:"\e60c";}.np-icon-mail:before{content:"\e60e";}.np-icon-github:before{content:"\e60f";}.np-icon-wordpress:before{content:"\e610";}.np-icon-linkedin:before{content:"\e611";}.np-btn,.np-toggle-edit{text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:3px 8px;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0, 0, 0, 0.08);-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.np-btn:hover,.np-toggle-edit:hover{background-color:#0074a2;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25),0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25),0 1px 0 rgba(0, 0, 0, 0.08);border-color:#0074a2;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.np-btn-half{float:left;width:47%;padding:3px 0px;text-align:center;}.np-btn-half.btn-right{float:right;}.np-btn-trash{background-color:#e14d43;border-color:#e14d43;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3),0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3),0 1px 0 rgba(0, 0, 0, 0.08);color:#ffffff;}.np-btn-trash:hover{background-color:#ba251e;border-color:#ba251e;}.np-toggle-edit{display:none;float:right;margin-right:10px;}.np-toggle-edit.active{background-color:#0074a2;color:#ffffff;-webkit-box-shadow:none;box-shadow:none;border-color:#0074a2;}@media (max-width: 767px){.np-toggle-edit{display:inline-block;}}.np-quickedit-error{border-left:4px solid #dd3d36;padding:4px 0 4px 8px;margin-bottom:10px;background-color:#f9f9f9;}.modal-open{overflow:hidden;}.np-modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:99999;-webkit-overflow-scrolling:touch;outline:0;}.np-modal .modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:0.85;z-index:9999;}.np-modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform 0.3s ease-out;-o-transition:-o-transform 0.3s ease-out;transition:transform 0.3s ease-out;}.np-modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0);}.np-modal .modal-open .modal{overflow-x:hidden;overflow-y:auto;}.np-modal .modal-dialog{position:relative;width:auto;margin:10px auto 0px auto;max-width:500px;z-index:9999;}.np-modal .modal-content{position:relative;background-color:#ffffff;-webkit-box-shadow:0 3px 9px rgba(0, 0, 0, 0.5);box-shadow:0 3px 9px rgba(0, 0, 0, 0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0;}.np-modal .modal-header{padding:8px;background-color:#ebebeb;}.np-modal .modal-header .sr-only{display:none;}.np-modal .modal-header .close{margin-top:-2px;}.np-modal .modal-title{margin:0;}.np-modal .modal-body{position:relative;padding:10px;}.np-modal .modal-body.new-child{padding:0;}.np-modal .modal-footer{padding:10px;text-align:right;background-color:#404040;zoom:1;}.np-modal .modal-footer:before,.np-modal .modal-footer:after{content:" ";display:table;}.np-modal .modal-footer:after{clear:both;}.np-modal .modal-footer .modal-close{float:left;}.np-modal .modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll;}.np-trash-modal{text-align:center;}.np-trash-modal .modal-body{padding-bottom:30px;}.np-trash-modal .button-primary{margin-left:10px;}.np-inline-overlay{position:fixed;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.4);z-index:998;top:0;right:0;bottom:0;left:0;opacity:0;-webkit-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;}.np-inline-overlay.active{opacity:1;-webkit-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;}.np-inline-modal{position:relative;z-index:999;background-color:#ffffff;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0px 0px 4px 0px rgba(0, 0, 0, 0.5);box-shadow:0px 0px 4px 0px rgba(0, 0, 0, 0.5);}.nestedpages-listing-title{float:left;}.nestedpages .updated{clear:both;}.nestedpages-toggleall{float:right;}.np-toggle-publish{color:#999999;}.np-toggle-publish.active{color:#333;font-weight:bold;}.np-sync-menu-cont{float:right;margin:5px 15px 0px 0px;}#nested-loading{display:none;float:right;width:30px;margin:0px 20px 0 0;}.nestedpages-top-toggles{zoom:1;padding-top:10px;}.nestedpages-top-toggles:before,.nestedpages-top-toggles:after{content:" ";display:table;}.nestedpages-top-toggles:after{clear:both;}.np-tabs{background-color:#ebebeb;padding:0px;}.np-tabs ul{text-align:left;list-style-type:none;margin:0;padding:0;}.np-tabs ul li{display:inline-block;margin:0;}.np-tabs ul li a{display:block;text-decoration:none;padding:5px 10px;}.np-tabs ul li a.active{position:relative;color:#333;background-color:#ffffff;}.nestedpages-datepicker.ui-datepicker{background-color:#ffffff;font-size:90%;-webkit-box-shadow:0px 0px 3px 0px rgba(0, 0, 0, 0.4);box-shadow:0px 0px 3px 0px rgba(0, 0, 0, 0.4);-webkit-border-radius:3px;border-radius:3px;padding:0;width:auto;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev{position:absolute;color:#ffffff;top:0px;right:0px;cursor:pointer;display:block;width:35px;height:35px;font-size:0;background:url('../images/datepicker-arrow-next.png');background-position:center;opacity:1;-webkit-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next:hover,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev:hover{opacity:0.5;-webkit-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar{margin:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev{right:auto;left:0px;background:url('../images/datepicker-arrow-prev.png');}.nestedpages-datepicker.ui-datepicker .ui-datepicker-header{padding:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-title{background-color:#1a1a1a;text-align:center;color:#ffffff;height:35px;line-height:35px;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;margin:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar{border-collapse:collapse;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar table{width:auto;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar th,.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td{text-align:center;width:30px;height:30px;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar th{background-color:#e6e6e6;text-transform:uppercase;font-size:11px;letter-spacing:1px;padding:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td{border-top:1px solid #ebebeb;border-left:1px solid #ebebeb;padding:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td:first-child{border-left:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a{text-align:center;padding:0;text-decoration:none;color:#333;display:block;background-color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;width:30px;height:30px;line-height:30px;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a.ui-state-active{background-color:#1a1a1a;color:#ffffff;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a:hover{background-color:#333;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages-tools{zoom:1;clear:both;clear:both;margin:20px 0px 5px 0px;}.nestedpages-tools:before,.nestedpages-tools:after{content:" ";display:table;}.nestedpages-tools:after{clear:both;}.nestedpages-tools .subsubsub{margin:0;}.nestedpages-tools .np-tools-primary{clear:left;padding-top:8px;}.nestedpages-tools .select{float:left;margin-left:5px;}.nestedpages-tools .select.first{margin-left:0;}.nestedpages-tools .np-tools-sort{float:left;}.nestedpages-tools .np-tools-search{float:right;}.wppages-handle-expand{float:left;background-color:#f2f2f2;font-size:18px;width:46px;height:46px;margin-right:5px;text-align:center;border-right:1px solid #e1e1e1;}.wppages-handle-expand div{background-color:#ffffff;border:1px solid #e1e1e1;width:24px;height:24px;line-height:24px;-webkit-border-radius:15px;border-radius:15px;margin-top:9px;cursor:pointer;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.wppages-handle-expand div:hover{background-color:#0074a2;border-color:#0074a2;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages{clear:both;-webkit-border-radius:4px;border-radius:4px;}.nestedpages .ui-sortable-placeholder{display:block !important;position:relative;min-height:46px;border:0;border:1px dashed #0074a2 !important;background-color:#effaff;margin:0;}.nestedpages .ui-sortable-helper{opacity:0.8;-webkit-box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.5);box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.5);}.nestedpages ol{list-style-type:none;clear:both;margin:0;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.06);box-shadow:0 1px 1px rgba(0, 0, 0, 0.06);border:1px solid #e5e5e5;-webkit-border-radius:3px;border-radius:3px;}.nestedpages ol a{text-decoration:none;}.nestedpages ol .page-link{line-height:26px;}.nestedpages ol .page-link .edit-indicator{margin-left:10px;display:none;}.nestedpages ol .page-link .edit-indicator i{font-size:12px;margin-right:3px;}.nestedpages ol .page-link:hover .edit-indicator{display:inline-block;}.nestedpages ol .locked{color:#333;margin-left:20px;}.nestedpages ol .locked em{font-style:normal;}.nestedpages ol .status{color:#999999;margin:0px 10px;}.nestedpages ol .np-icon-eye-blocked{color:#999999;}.nestedpages ol .nav-status{color:#b3b3b3;}.nestedpages ol .np-hide{display:none;}.nestedpages ol .np-seo-indicator{display:block;float:right;width:12px;height:12px;-webkit-border-radius:8px;border-radius:8px;background-color:#999999;margin:6px 10px 0 0;}.nestedpages ol .np-seo-indicator.good{background-color:#7ad03a;}.nestedpages ol .np-seo-indicator.ok{background-color:#ffba00;}.nestedpages ol .np-seo-indicator.poor{background-color:#ee7c1b;}.nestedpages ol .np-seo-indicator.bad{background-color:#dd3d36;}.nestedpages ol .np-seo-indicator.warn{background-color:maroon;}.nestedpages ol .np-seo-indicator.wrong{background-color:red;}.nestedpages ol .np-seo-indicator.noindex{background-color:#1e8cbe;}.nestedpages ol li{margin:0;border-top:1px solid #e1e1e1;background-color:#0074a2;}.nestedpages ol li.first{border:0;}.nestedpages ol li:first-child{border:0;}.nestedpages ol li.no-border{border:0;}.nestedpages ol ol{display:none;-webkit-border-radius:0;border-radius:0;list-style-type:none;border:0;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid #e1e1e1;}.nestedpages .child-toggle{float:left;margin:-10px 10px 0 0;width:46px;height:46px;background-color:#f0f0f0;text-align:center;}.nestedpages .child-toggle a{display:inline-block;margin-top:7px;width:28px;height:28px;background-color:#ffffff;border:1px solid #e1e1e1;-webkit-border-radius:20px;border-radius:20px;font-size:20px;line-height:30px;color:#333;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages .child-toggle a i{line-height:26px;}.nestedpages .child-toggle a:hover{background-color:#0074a2;color:#ffffff;border-color:#0074a2;}.nestedpages .handle{display:inline-block;cursor:move;font-size:20px;color:#b3b3b3;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;position:relative;top:3px;}.nestedpages .handle:hover{-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;color:#0074a2;}.nestedpages .np-icon-sub-menu{display:none;color:#999999;position:relative;left:2px;}.nestedpages .handle,.nestedpages .np-icon-sub-menu{width:30px;height:46px;line-height:36px;margin-top:-10px;}.nestedpages li ol .row .np-icon-sub-menu{display:inline-block;}.nestedpages li ol .row .handle{display:none;}.nestedpages li ol .row:hover .np-icon-sub-menu{display:none;}.nestedpages li ol .row:hover .handle{display:inline-block;}.nestedpages .row{background-color:#ffffff;display:block;padding:10px 0px 0px 0px;height:36px;zoom:1;}.nestedpages .row:before,.nestedpages .row:after{content:" ";display:table;}.nestedpages .row:after{clear:both;}.nestedpages .row:hover{background-color:#f0f0f0;}.nestedpages .row.np-updated{background-color:#e9f7df;-webkit-transition:background-color 400ms ease;-o-transition:background-color 400ms ease;transition:background-color 400ms ease;}.nestedpages .row.np-updated-show{background-color:#ffffff;-webkit-transition:background-color 400ms ease;-o-transition:background-color 400ms ease;transition:background-color 400ms ease;}.nestedpages .row.non-hierarchical{padding-left:15px;}.nestedpages ol li ol .row-inner{padding-left:76px;}.nestedpages ol li ol li ol .row-inner{padding-left:96px;}.nestedpages ol li ol li ol li ol .row-inner{padding-left:116px;}.nestedpages ol li ol li ol li ol li ol .row-inner{padding-left:136px;}.nestedpages ol li ol li ol li ol li ol li ol .row-inner{padding-left:156px;}.nestedpages .np-post-columns{float:right;margin:3px 20px 0px 0px;zoom:1;}.nestedpages .np-post-columns:before,.nestedpages .np-post-columns:after{content:" ";display:table;}.nestedpages .np-post-columns:after{clear:both;}.nestedpages .np-post-columns ul li{background:transparent;color:#808080;border:0;float:left;margin-left:8px;padding-left:8px;border-left:1px solid #cccccc;}.nestedpages .np-post-columns ul li:first-child{margin-left:0;padding-left:0;border:0;}.nestedpages .action-buttons{display:none;float:right;margin:0 10px 0 0;}.nestedpages .action-buttons a{margin:0 0 0 -5px;}.nestedpages .action-buttons a.np-btn-trash{margin-left:4px;}.np-search{float:right;}@media (min-width: 768px){.nestedpages .row:hover .action-buttons{display:block;}.nestedpages .row:hover .np-post-columns{display:none;}}@media (max-width: 767px){.nestedpages ol .page-link{line-height:24px;}.nestedpages ol .page-link:hover span{display:none;}.nestedpages ol .locked em{display:none;}.nestedpages .child-toggle{background:transparent;}.nestedpages .row{height:auto;}.nestedpages .action-buttons{display:none;background-color:#0074a2;float:none;margin:0;padding:8px;}.nestedpages .action-buttons a{margin-left:5px;}}.nestedpages .quick-edit .form-interior,.nestedpages .new-child .form-interior{padding:10px;}.nestedpages .quick-edit h3,.nestedpages .new-child h3{margin:0 0 8px 0;font-size:14px;}.nestedpages .quick-edit h3 span,.nestedpages .new-child h3 span{float:right;font-size:12px;}.nestedpages .quick-edit h3 span em,.nestedpages .new-child h3 span em{font-weight:normal;font-style:normal;color:#808080;}.nestedpages .quick-edit .fields,.nestedpages .new-child .fields{margin-bottom:10px;background:url('../images/border.png') repeat-y;background-position:center;zoom:1;}.nestedpages .quick-edit .fields:before,.nestedpages .quick-edit .fields:after,.nestedpages .new-child .fields:before,.nestedpages .new-child .fields:after{content:" ";display:table;}.nestedpages .quick-edit .fields:after,.nestedpages .new-child .fields:after{clear:both;}.nestedpages .quick-edit .left,.nestedpages .new-child .left{float:left;width:48%;}.nestedpages .quick-edit .right,.nestedpages .new-child .right{float:right;width:48%;}.nestedpages .quick-edit label,.nestedpages .new-child label{font-style:oblique;}.nestedpages .quick-edit .buttons,.nestedpages .new-child .buttons{clear:both;zoom:1;background-color:#404040;padding:8px;}.nestedpages .quick-edit .buttons:before,.nestedpages .quick-edit .buttons:after,.nestedpages .new-child .buttons:before,.nestedpages .new-child .buttons:after{content:" ";display:table;}.nestedpages .quick-edit .buttons:after,.nestedpages .new-child .buttons:after{clear:both;}.nestedpages .quick-edit .form-control,.nestedpages .new-child .form-control{clear:both;zoom:1;margin-bottom:5px;}.nestedpages .quick-edit .form-control:before,.nestedpages .quick-edit .form-control:after,.nestedpages .new-child .form-control:before,.nestedpages .new-child .form-control:after{content:" ";display:table;}.nestedpages .quick-edit .form-control:after,.nestedpages .new-child .form-control:after{clear:both;}.nestedpages .quick-edit .form-control input[type='text'],.nestedpages .quick-edit .form-control input[type='password'],.nestedpages .quick-edit .form-control select,.nestedpages .new-child .form-control input[type='text'],.nestedpages .new-child .form-control input[type='password'],.nestedpages .new-child .form-control select{float:right;width:75%;}.nestedpages .quick-edit .form-control label,.nestedpages .new-child .form-control label{float:left;width:20%;}.nestedpages .quick-edit .form-control.password label,.nestedpages .new-child .form-control.password label{width:25%;}.nestedpages .quick-edit .form-control.password input[type="text"],.nestedpages .new-child .form-control.password input[type="text"]{float:left;width:35%;}.nestedpages .quick-edit .form-control.password .private,.nestedpages .new-child .form-control.password .private{float:right;width:35%;margin-top:4px;}.nestedpages .quick-edit .form-control.password .private label,.nestedpages .new-child .form-control.password .private label{width:auto;float:none;}.nestedpages .quick-edit .form-control.np-datepicker-container .datetime,.nestedpages .new-child .form-control.np-datepicker-container .datetime{float:right;width:75%;}.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container,.nestedpages .new-child .form-control.np-datepicker-container .np-time-container{float:left;width:45%;margin:0;position:relative;}.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container input[type="text"],.nestedpages .new-child .form-control.np-datepicker-container .np-time-container input[type="text"]{float:left;width:55%;}.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container select,.nestedpages .new-child .form-control.np-datepicker-container .np-time-container select{float:right;width:35%;}.nestedpages .quick-edit .form-control.np-datepicker-container .np_datepicker,.nestedpages .new-child .form-control.np-datepicker-container .np_datepicker{float:left;width:45%;margin:0;}.nestedpages .quick-edit .form-control.np-datepicker-container span,.nestedpages .new-child .form-control.np-datepicker-container span{float:left;width:10%;display:block;text-align:center;padding-top:3px;}.nestedpages .quick-edit .comments,.nestedpages .new-child .comments{float:right;width:75%;margin-bottom:10px;zoom:1;}.nestedpages .quick-edit .comments:before,.nestedpages .quick-edit .comments:after,.nestedpages .new-child .comments:before,.nestedpages .new-child .comments:after{content:" ";display:table;}.nestedpages .quick-edit .comments:after,.nestedpages .new-child .comments:after{clear:both;}.nestedpages .quick-edit .dates,.nestedpages .new-child .dates{float:right;width:75%;margin-bottom:6px;}.nestedpages .quick-edit .dates select,.nestedpages .new-child .dates select{width:25%;}.nestedpages .quick-edit .dates input,.nestedpages .new-child .dates input{width:12%;}.nestedpages .quick-edit .np-toggle-options,.nestedpages .new-child .np-toggle-options{background-color:#f2f2f2;padding:5px;}.nestedpages .quick-edit .np-taxonomies,.nestedpages .quick-edit .np-menuoptions,.nestedpages .new-child .np-taxonomies,.nestedpages .new-child .np-menuoptions{display:none;clear:both;background-color:#f9f9f9;padding:8px;zoom:1;margin-top:5px;}.nestedpages .quick-edit .np-taxonomies:before,.nestedpages .quick-edit .np-taxonomies:after,.nestedpages .quick-edit .np-menuoptions:before,.nestedpages .quick-edit .np-menuoptions:after,.nestedpages .new-child .np-taxonomies:before,.nestedpages .new-child .np-taxonomies:after,.nestedpages .new-child .np-menuoptions:before,.nestedpages .new-child .np-menuoptions:after{content:" ";display:table;}.nestedpages .quick-edit .np-taxonomies:after,.nestedpages .quick-edit .np-menuoptions:after,.nestedpages .new-child .np-taxonomies:after,.nestedpages .new-child .np-menuoptions:after{clear:both;}.nestedpages .quick-edit .np-taxonomy,.nestedpages .new-child .np-taxonomy{float:left;width:30%;margin-right:3.33%;}.nestedpages .quick-edit .np-taxonomy .title,.nestedpages .new-child .np-taxonomy .title{font-weight:bold;margin-bottom:4px;display:block;}.nestedpages .quick-edit .np-taxonomy li,.nestedpages .new-child .np-taxonomy li{background-color:#ffffff;border:0;}.nestedpages .quick-edit .np-taxonomy textarea,.nestedpages .new-child .np-taxonomy textarea{width:100%;height:6.5em;}.nestedpages .quick-edit .np-menuoptions,.nestedpages .new-child .np-menuoptions{padding:15px;}.nestedpages .quick-edit .np-menuoptions label,.nestedpages .quick-edit .np-menuoptions input[type="text"],.nestedpages .new-child .np-menuoptions label,.nestedpages .new-child .np-menuoptions input[type="text"]{display:block;float:none;width:100%;}.nestedpages .quick-edit .np-menuoptions .menuoptions-left,.nestedpages .new-child .np-menuoptions .menuoptions-left{float:left;width:47%;}.nestedpages .quick-edit .np-menuoptions .menuoptions-right,.nestedpages .new-child .np-menuoptions .menuoptions-right{float:right;width:47%;padding-top:18px;}.nestedpages .quick-edit .np-menuoptions .menuoptions-right label,.nestedpages .new-child .np-menuoptions .menuoptions-right label{margin-bottom:10px;}.nestedpages .quick-edit .np-hide-options,.nestedpages .new-child .np-hide-options{display:none;background-color:#f0f0f0;-webkit-border-radius:3px;border-radius:3px;clear:both;padding:6px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}.nestedpages .quick-edit .np-hide-options p,.nestedpages .new-child .np-hide-options p{margin:0;}.nestedpages .quick-edit .np-hide-options label,.nestedpages .new-child .np-hide-options label{display:block;margin-top:4px;font-style:normal;}.nestedpages .quick-edit .new-page-titles,.nestedpages .new-child .new-page-titles{display:block;border:0;}.nestedpages .quick-edit .new-page-titles li,.nestedpages .new-child .new-page-titles li{background:transparent;border:0;padding:4px;zoom:1;}.nestedpages .quick-edit .new-page-titles li:before,.nestedpages .quick-edit .new-page-titles li:after,.nestedpages .new-child .new-page-titles li:before,.nestedpages .new-child .new-page-titles li:after{content:" ";display:table;}.nestedpages .quick-edit .new-page-titles li:after,.nestedpages .new-child .new-page-titles li:after{clear:both;}.nestedpages .quick-edit .new-page-titles li:nth-child(even),.nestedpages .new-child .new-page-titles li:nth-child(even){background-color:#f0f0f0;}.nestedpages .quick-edit .new-page-titles li label,.nestedpages .new-child .new-page-titles li label{margin-top:7px;}.nestedpages .quick-edit .new-page-titles .form-control,.nestedpages .new-child .new-page-titles .form-control{float:right;width:90%;clear:none;}.nestedpages .quick-edit .new-page-titles .np-icon-menu,.nestedpages .new-child .new-page-titles .np-icon-menu{float:left;margin-top:0px;height:auto;line-height:26px;}.nestedpages .quick-edit .new-page-titles .new-child-row div,.nestedpages .new-child .new-page-titles .new-child-row div{float:right;width:75%;margin:2px;zoom:1;}.nestedpages .quick-edit .new-page-titles .new-child-row div:before,.nestedpages .quick-edit .new-page-titles .new-child-row div:after,.nestedpages .new-child .new-page-titles .new-child-row div:before,.nestedpages .new-child .new-page-titles .new-child-row div:after{content:" ";display:table;}.nestedpages .quick-edit .new-page-titles .new-child-row div:after,.nestedpages .new-child .new-page-titles .new-child-row div:after{clear:both;}.nestedpages .quick-edit .new-page-titles .new-child-row div input[type='text'],.nestedpages .new-child .new-page-titles .new-child-row div input[type='text']{float:left;width:80%;}.nestedpages .quick-edit .new-page-titles .new-child-row div a,.nestedpages .new-child .new-page-titles .new-child-row div a{float:right;}.np-modal.nestedpages .new-child .right .form-control input[type='text'],.np-modal.nestedpages .new-child .right .form-control input[type='password'],.np-modal.nestedpages .new-child .right .form-control select{float:none;width:100%;}.np-modal.nestedpages .new-child .right .form-control label{float:none;width:100%;}.np-modal.nestedpages .new-child .new-page-titles .form-control{width:85%;}.np-modal.nestedpages .new-child .new-page-titles .form-control div{width:100%;}.np-modal.nestedpages .new-child .left label{display:none;}.np-qe-loading{display:none;float:right;width:25px;height:25px;margin:2px 10px 0 0;background:url('../images/loading-white.gif') no-repeat;}@media (max-width: 767px){.nestedpages .quick-edit .fields{background:transparent;}.nestedpages .quick-edit .left,.nestedpages .quick-edit .right{float:none;width:100%;}.nestedpages .quick-edit .form-control{margin-bottom:10px;}.nestedpages .quick-edit .form-control input[type='text'],.nestedpages .quick-edit .form-control input[type='password'],.nestedpages .quick-edit .form-control select{float:none;width:100%;}.nestedpages .quick-edit .form-control label{display:block;float:none;width:100%;margin-bottom:4px;}.nestedpages .quick-edit .form-control.np-datepicker-container .datetime{float:none;width:100%;}.nestedpages .quick-edit .comments{float:none;width:100%;}.nestedpages .quick-edit .dates{float:none;width:100%;margin-bottom:6px;}}.np-modal-form .form-interior{zoom:1;background:url('../images/border.png') repeat-y;background-position:center;padding:5px 0;}.np-modal-form .form-interior:before,.np-modal-form .form-interior:after{content:" ";display:table;}.np-modal-form .form-interior:after{clear:both;}.np-modal-form .form-control{zoom:1;margin-bottom:10px;}.np-modal-form .form-control:before,.np-modal-form .form-control:after{content:" ";display:table;}.np-modal-form .form-control:after{clear:both;}.np-modal-form .checkbox{margin-bottom:10px;}.np-modal-form .left{float:left;width:45%;}.np-modal-form .right{float:right;width:45%;padding-top:18px;}.np-modal-form label{display:block;}.np-modal-form input[type="text"],.np-modal-form select{width:100%;}.np-modal-form .buttons{clear:both;}.nestedpages-settings-table{border:1px solid #d9d9d9;border-collapse:collapse;}.nestedpages-settings-table thead th{background-color:#d9d9d9;padding:5px;}.nestedpages-settings-table tbody tr td{padding:5px;border-left:1px solid #e0e0e0;}.nestedpages-settings-table tbody tr td:first-child{border:0;}.nestedpages-settings-table tbody tr:nth-child(odd) td{background-color:#ffffff;}.nestedpages-settings-table i{font-size:20px;}
|
1 |
+
body{-webkit-animation-delay:0.1s;-webkit-animation-name:fontfix;-webkit-animation-duration:0.1s;-webkit-animation-iteration-count:1;-webkit-animation-timing-function:linear;}@-webkit-keyframes fontfix{from{opacity:1;}to{opacity:1;}}@font-face{font-family:'nestedpages';src:url('fonts/nestedpages.eot');}@font-face{font-family:'nestedpages';src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMggjB2gAAAC8AAAAYGNtYXDw7eamAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZrIqLaoAAAF4AAARNGhlYWQCOg/3AAASrAAAADZoaGVhA+IB+QAAEuQAAAAkaG10eCkAA2cAABMIAAAAYGxvY2EhfhzgAAATaAAAADJtYXhwACAA8QAAE5wAAAAgbmFtZXH7qkgAABO8AAABaXBvc3QAAwAAAAAVKAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADwsgHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEAEAAAAAMAAgAAgAEAAEAIOYS8LL//f//AAAAAAAg5gDwsv/9//8AAf/jGgQPZQADAAEAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAE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AAYAFgBNAAMAAQQJAAoANACHAG4AZQBzAHQAZQBkAHAAYQBnAGUAcwBWAGUAcgBzAGkAbwBuACAAMQAuADAAbgBlAHMAdABlAGQAcABhAGcAZQBzbmVzdGVkcGFnZXMAbgBlAHMAdABlAGQAcABhAGcAZQBzAFIAZQBnAHUAbABhAHIAbgBlAHMAdABlAGQAcABhAGcAZQBzAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABWUAAsAAAAAFUgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgCCMHaGNtYXAAAAFoAAAAVAAAAFTw7eamZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAETQAABE0siotqmhlYWQAABL4AAAANgAAADYCOg/3aGhlYQAAEzAAAAAkAAAAJAPiAflobXR4AAATVAAAAGAAAABgKQADZ2xvY2EAABO0AAAAMgAAADIhfhzgbWF4cAAAE+gAAAAgAAAAIAAgAPFuYW1lAAAUCAAAAWkAAAFpcfuqSHBvc3QAABV0AAAAIAAAACAAAwAAAAMCAAGQAAUAAAFMAWYAAABHAUwBZgAAAPUAGQCEAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8LIB4P/g/+AB4AAgAAAAAQAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABABAAAAADAAIAAIABAABACDmEvCy//3//wAAAAAAIOYA8LL//f//AAH/4xoED2UAAwABAAAAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAzAEYBzQF6AAkAADczNRcHNSE1MxVm54CA/uYzxk1mZ03ntA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wB1AGwAYQByAG4AZQBzAHQAZQBkAHAAYQBnAGUAcwBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');font-weight:normal;font-style:normal;}[class^="np-icon-"],[class*=" np-icon-"]{font-family:'nestedpages';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.np-icon-no:before{content:"\e601";}.np-icon-yes:before{content:"\e602";}.np-icon-menu:before{content:"\e603";}.np-icon-arrow-down:before{content:"\e604";}.np-icon-arrow-right:before{content:"\e605";}.np-icon-sub-menu:before{content:"\e600";}.np-icon-arrows-alt:before{content:"\f0b2";}.np-icon-pencil:before{content:"\e608";}.np-icon-bubble:before{content:"\e607";}.np-icon-lock:before{content:"\e609";}.np-icon-remove:before{content:"\e60a";}.np-icon-list:before{content:"\e60d";}.np-icon-menu2:before{content:"\e606";}.np-icon-link:before{content:"\e612";}.np-icon-eye:before{content:"\e60b";}.np-icon-eye-blocked:before{content:"\e60c";}.np-icon-mail:before{content:"\e60e";}.np-icon-github:before{content:"\e60f";}.np-icon-wordpress:before{content:"\e610";}.np-icon-linkedin:before{content:"\e611";}.np-btn,.np-toggle-edit{text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:3px 8px;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0, 0, 0, 0.08);-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.np-btn:hover,.np-toggle-edit:hover{background-color:#0074a2;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25),0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25),0 1px 0 rgba(0, 0, 0, 0.08);border-color:#0074a2;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.np-btn-half{float:left;width:47%;padding:3px 0px;text-align:center;}.np-btn-half.btn-right{float:right;}.np-btn-trash{background-color:#e14d43;border-color:#e14d43;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3),0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3),0 1px 0 rgba(0, 0, 0, 0.08);color:#ffffff;}.np-btn-trash:hover{background-color:#ba251e;border-color:#ba251e;}.np-toggle-edit{display:none;float:right;margin-right:10px;}.np-toggle-edit.active{background-color:#0074a2;color:#ffffff;-webkit-box-shadow:none;box-shadow:none;border-color:#0074a2;}@media (max-width: 767px){.np-toggle-edit{display:inline-block;}}.np-quickedit-error{border-left:4px solid #dd3d36;padding:4px 0 4px 8px;margin-bottom:10px;background-color:#f9f9f9;}.modal-open{overflow:hidden;}.np-modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:99999;-webkit-overflow-scrolling:touch;outline:0;}.np-modal .modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:0.85;z-index:9999;}.np-modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform 0.3s ease-out;-o-transition:-o-transform 0.3s ease-out;transition:transform 0.3s ease-out;}.np-modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0);}.np-modal .modal-open .modal{overflow-x:hidden;overflow-y:auto;}.np-modal .modal-dialog{position:relative;width:auto;margin:10px auto 0px auto;max-width:500px;z-index:9999;}.np-modal .modal-content{position:relative;background-color:#ffffff;-webkit-box-shadow:0 3px 9px rgba(0, 0, 0, 0.5);box-shadow:0 3px 9px rgba(0, 0, 0, 0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0;}.np-modal .modal-header{padding:8px;background-color:#ebebeb;}.np-modal .modal-header .sr-only{display:none;}.np-modal .modal-header .close{margin-top:-2px;}.np-modal .modal-title{margin:0;}.np-modal .modal-body{position:relative;padding:10px;}.np-modal .modal-body.new-child{padding:0;}.np-modal .modal-footer{padding:10px;text-align:right;background-color:#404040;zoom:1;}.np-modal .modal-footer:before,.np-modal .modal-footer:after{content:" ";display:table;}.np-modal .modal-footer:after{clear:both;}.np-modal .modal-footer .modal-close{float:left;}.np-modal .modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll;}.clone-modal h3{margin:0;padding:8px;background-color:#e5e5e5;}.clone-modal .form-control{margin:0 !important;padding:5px 10px;}.np-trash-modal{text-align:center;}.np-trash-modal .modal-body{padding-bottom:30px;}.np-trash-modal .button-primary{margin-left:10px;}.np-inline-overlay{position:fixed;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.4);z-index:998;top:0;right:0;bottom:0;left:0;opacity:0;-webkit-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;}.np-inline-overlay.active{opacity:1;-webkit-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;}.np-inline-modal{position:relative;z-index:999;background-color:#ffffff;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0px 0px 4px 0px rgba(0, 0, 0, 0.5);box-shadow:0px 0px 4px 0px rgba(0, 0, 0, 0.5);}.nestedpages-listing-title{float:left;}.nestedpages .updated{clear:both;}.nestedpages-toggleall{float:right;}.np-toggle-publish{color:#999999;}.np-toggle-publish.active{color:#333;font-weight:bold;}.np-sync-menu-cont{float:right;margin:5px 15px 0px 0px;}#nested-loading{display:none;float:right;width:30px;margin:0px 20px 0 0;}.nestedpages-top-toggles{zoom:1;padding-top:10px;}.nestedpages-top-toggles:before,.nestedpages-top-toggles:after{content:" ";display:table;}.nestedpages-top-toggles:after{clear:both;}.np-tabs{background-color:#ebebeb;padding:0px;}.np-tabs ul{text-align:left;list-style-type:none;margin:0;padding:0;}.np-tabs ul li{display:inline-block;margin:0;}.np-tabs ul li a{display:block;text-decoration:none;padding:5px 10px;}.np-tabs ul li a.active{position:relative;color:#333;background-color:#ffffff;}.nestedpages-datepicker.ui-datepicker{background-color:#ffffff;font-size:90%;-webkit-box-shadow:0px 0px 3px 0px rgba(0, 0, 0, 0.4);box-shadow:0px 0px 3px 0px rgba(0, 0, 0, 0.4);-webkit-border-radius:3px;border-radius:3px;padding:0;width:auto;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev{position:absolute;color:#ffffff;top:0px;right:0px;cursor:pointer;display:block;width:35px;height:35px;font-size:0;background:url('../images/datepicker-arrow-next.png');background-position:center;opacity:1;-webkit-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next:hover,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev:hover{opacity:0.5;-webkit-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar{margin:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev{right:auto;left:0px;background:url('../images/datepicker-arrow-prev.png');}.nestedpages-datepicker.ui-datepicker .ui-datepicker-header{padding:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-title{background-color:#1a1a1a;text-align:center;color:#ffffff;height:35px;line-height:35px;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;margin:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar{border-collapse:collapse;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar table{width:auto;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar th,.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td{text-align:center;width:30px;height:30px;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar th{background-color:#e6e6e6;text-transform:uppercase;font-size:11px;letter-spacing:1px;padding:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td{border-top:1px solid #ebebeb;border-left:1px solid #ebebeb;padding:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td:first-child{border-left:0;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a{text-align:center;padding:0;text-decoration:none;color:#333;display:block;background-color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;width:30px;height:30px;line-height:30px;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a.ui-state-active{background-color:#1a1a1a;color:#ffffff;}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a:hover{background-color:#333;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages-tools{zoom:1;clear:both;clear:both;margin:20px 0px 5px 0px;}.nestedpages-tools:before,.nestedpages-tools:after{content:" ";display:table;}.nestedpages-tools:after{clear:both;}.nestedpages-tools .subsubsub{margin:0;}.nestedpages-tools .np-tools-primary{clear:left;padding-top:8px;}.nestedpages-tools .select{float:left;margin-left:5px;}.nestedpages-tools .select.first{margin-left:0;}.nestedpages-tools .np-tools-sort{float:left;}.nestedpages-tools .np-tools-search{float:right;}.wppages-handle-expand{float:left;background-color:#f2f2f2;font-size:18px;width:46px;height:46px;margin-right:5px;text-align:center;border-right:1px solid #e1e1e1;}.wppages-handle-expand div{background-color:#ffffff;border:1px solid #e1e1e1;width:24px;height:24px;line-height:24px;-webkit-border-radius:15px;border-radius:15px;margin-top:9px;cursor:pointer;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.wppages-handle-expand div:hover{background-color:#0074a2;border-color:#0074a2;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages{clear:both;-webkit-border-radius:4px;border-radius:4px;}.nestedpages .ui-sortable-placeholder{display:block !important;position:relative;min-height:46px;border:0;border:1px dashed #0074a2 !important;background-color:#effaff;margin:0;}.nestedpages .ui-sortable-helper{opacity:0.8;-webkit-box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.5);box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.5);}.nestedpages ol{list-style-type:none;clear:both;margin:0;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.06);box-shadow:0 1px 1px rgba(0, 0, 0, 0.06);border:1px solid #e5e5e5;-webkit-border-radius:3px;border-radius:3px;}.nestedpages ol a{text-decoration:none;}.nestedpages ol .page-link{line-height:26px;}.nestedpages ol .page-link .edit-indicator{margin-left:10px;display:none;}.nestedpages ol .page-link .edit-indicator i{font-size:12px;margin-right:3px;}.nestedpages ol .page-link:hover .edit-indicator{display:inline-block;}.nestedpages ol .locked{color:#333;margin-left:20px;}.nestedpages ol .locked em{font-style:normal;}.nestedpages ol .status{color:#999999;margin:0px 10px;}.nestedpages ol .np-icon-eye-blocked{color:#999999;}.nestedpages ol .nav-status{color:#b3b3b3;}.nestedpages ol .np-hide{display:none;}.nestedpages ol .np-seo-indicator{display:block;float:right;width:12px;height:12px;-webkit-border-radius:50%;border-radius:50%;background-color:#999999;margin:6px 10px 0 0;}.nestedpages ol .np-seo-indicator.good{background-color:#7ad03a;}.nestedpages ol .np-seo-indicator.ok{background-color:#ffba00;}.nestedpages ol .np-seo-indicator.poor{background-color:#ee7c1b;}.nestedpages ol .np-seo-indicator.bad{background-color:#dd3d36;}.nestedpages ol .np-seo-indicator.warn{background-color:maroon;}.nestedpages ol .np-seo-indicator.wrong{background-color:red;}.nestedpages ol .np-seo-indicator.noindex{background-color:#1e8cbe;}.nestedpages ol li{margin:0;border-top:1px solid #e1e1e1;background-color:#0074a2;}.nestedpages ol li.first{border:0;}.nestedpages ol li:first-child{border:0;}.nestedpages ol li.no-border{border:0;}.nestedpages ol ol{display:none;-webkit-border-radius:0;border-radius:0;list-style-type:none;border:0;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid #e1e1e1;}.nestedpages .child-toggle{float:left;margin:0px 10px 0 0;width:46px;height:46px;background-color:#f0f0f0;text-align:center;}.nestedpages .child-toggle a{display:inline-block;margin-top:7px;width:28px;height:28px;background-color:#ffffff;border:1px solid #e1e1e1;-webkit-border-radius:20px;border-radius:20px;font-size:20px;line-height:30px;color:#333;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages .child-toggle a i{line-height:26px;}.nestedpages .child-toggle a:hover{background-color:#0074a2;color:#ffffff;border-color:#0074a2;}.nestedpages .handle{display:inline-block;cursor:move;font-size:20px;color:#b3b3b3;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;position:relative;top:3px;}.nestedpages .handle:hover{-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;color:#0074a2;}.nestedpages .np-icon-sub-menu{display:none;color:#999999;position:relative;left:2px;}.nestedpages .handle,.nestedpages .np-icon-sub-menu{width:30px;line-height:36px;margin-top:-10px;}.nestedpages li ol .row .np-icon-sub-menu{display:inline-block;}.nestedpages li ol .row .handle{display:none;}.nestedpages li ol .row:hover .np-icon-sub-menu{display:none;}.nestedpages li ol .row:hover .handle{display:inline-block;}.nestedpages .row{background-color:#ffffff;display:block;zoom:1;}.nestedpages .row:before,.nestedpages .row:after{content:" ";display:table;}.nestedpages .row:after{clear:both;}.nestedpages .row:hover{background-color:#f0f0f0;}.nestedpages .row.np-updated{background-color:#e9f7df;-webkit-transition:background-color 400ms ease;-o-transition:background-color 400ms ease;transition:background-color 400ms ease;}.nestedpages .row.np-updated-show{background-color:#ffffff;-webkit-transition:background-color 400ms ease;-o-transition:background-color 400ms ease;transition:background-color 400ms ease;}.nestedpages .row.non-hierarchical{padding-left:15px;padding-bottom:10px;}.nestedpages .row-inner{padding-top:10px;}.nestedpages ol li ol .row-inner{padding-left:76px;}.nestedpages ol li ol li ol .row-inner{padding-left:96px;}.nestedpages ol li ol li ol li ol .row-inner{padding-left:116px;}.nestedpages ol li ol li ol li ol li ol .row-inner{padding-left:136px;}.nestedpages ol li ol li ol li ol li ol li ol .row-inner{padding-left:156px;}.nestedpages .np-post-columns{float:right;margin:3px 20px 0px 0px;zoom:1;}.nestedpages .np-post-columns:before,.nestedpages .np-post-columns:after{content:" ";display:table;}.nestedpages .np-post-columns:after{clear:both;}.nestedpages .np-post-columns ul li{background:transparent;color:#808080;border:0;float:left;margin-left:8px;padding-left:8px;border-left:1px solid #cccccc;}.nestedpages .np-post-columns ul li:first-child{margin-left:0;padding-left:0;border:0;}.nestedpages .action-buttons{display:none;float:right;margin:0 10px 0 0;}.nestedpages .action-buttons a{margin:0 0 0 -5px;}.nestedpages .action-buttons a.np-btn-trash{margin-left:4px;}.np-search{float:right;}@media (min-width: 768px){.nestedpages .row:hover .action-buttons{display:block;}.nestedpages .row:hover .np-post-columns{display:none;}}@media (max-width: 767px){.nestedpages ol .page-link{line-height:24px;}.nestedpages ol .page-link:hover span{display:none;}.nestedpages ol .locked em{display:none;}.nestedpages .child-toggle{background:transparent;}.nestedpages .row{height:auto;}.nestedpages .action-buttons{display:none;background-color:#0074a2;float:none;margin:0;padding:8px;}.nestedpages .action-buttons a{margin-left:5px;}}.nestedpages .quick-edit .form-interior,.nestedpages .new-child .form-interior{padding:10px;}.nestedpages .quick-edit h3,.nestedpages .new-child h3{margin:0 0 8px 0;font-size:14px;}.nestedpages .quick-edit h3 span,.nestedpages .new-child h3 span{float:right;font-size:12px;}.nestedpages .quick-edit h3 span em,.nestedpages .new-child h3 span em{font-weight:normal;font-style:normal;color:#808080;}.nestedpages .quick-edit .fields,.nestedpages .new-child .fields{margin-bottom:10px;background:url('../images/border.png') repeat-y;background-position:center;zoom:1;}.nestedpages .quick-edit .fields:before,.nestedpages .quick-edit .fields:after,.nestedpages .new-child .fields:before,.nestedpages .new-child .fields:after{content:" ";display:table;}.nestedpages .quick-edit .fields:after,.nestedpages .new-child .fields:after{clear:both;}.nestedpages .quick-edit .left,.nestedpages .new-child .left{float:left;width:48%;}.nestedpages .quick-edit .right,.nestedpages .new-child .right{float:right;width:48%;}.nestedpages .quick-edit label,.nestedpages .new-child label{font-style:oblique;}.nestedpages .quick-edit .buttons,.nestedpages .new-child .buttons{clear:both;zoom:1;background-color:#404040;padding:8px;}.nestedpages .quick-edit .buttons:before,.nestedpages .quick-edit .buttons:after,.nestedpages .new-child .buttons:before,.nestedpages .new-child .buttons:after{content:" ";display:table;}.nestedpages .quick-edit .buttons:after,.nestedpages .new-child .buttons:after{clear:both;}.nestedpages .quick-edit .form-control,.nestedpages .new-child .form-control{clear:both;zoom:1;margin-bottom:5px;}.nestedpages .quick-edit .form-control:before,.nestedpages .quick-edit .form-control:after,.nestedpages .new-child .form-control:before,.nestedpages .new-child .form-control:after{content:" ";display:table;}.nestedpages .quick-edit .form-control:after,.nestedpages .new-child .form-control:after{clear:both;}.nestedpages .quick-edit .form-control input[type='text'],.nestedpages .quick-edit .form-control input[type='password'],.nestedpages .quick-edit .form-control select,.nestedpages .new-child .form-control input[type='text'],.nestedpages .new-child .form-control input[type='password'],.nestedpages .new-child .form-control select{float:right;width:75%;}.nestedpages .quick-edit .form-control label,.nestedpages .new-child .form-control label{float:left;width:20%;}.nestedpages .quick-edit .form-control.password label,.nestedpages .new-child .form-control.password label{width:25%;}.nestedpages .quick-edit .form-control.password input[type="text"],.nestedpages .new-child .form-control.password input[type="text"]{float:left;width:35%;}.nestedpages .quick-edit .form-control.password .private,.nestedpages .new-child .form-control.password .private{float:right;width:35%;margin-top:4px;}.nestedpages .quick-edit .form-control.password .private label,.nestedpages .new-child .form-control.password .private label{width:auto;float:none;}.nestedpages .quick-edit .form-control.np-datepicker-container .datetime,.nestedpages .new-child .form-control.np-datepicker-container .datetime{float:right;width:75%;}.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container,.nestedpages .new-child .form-control.np-datepicker-container .np-time-container{float:left;width:45%;margin:0;position:relative;}.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container input[type="text"],.nestedpages .new-child .form-control.np-datepicker-container .np-time-container input[type="text"]{float:left;width:55%;}.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container select,.nestedpages .new-child .form-control.np-datepicker-container .np-time-container select{float:right;width:35%;}.nestedpages .quick-edit .form-control.np-datepicker-container .np_datepicker,.nestedpages .new-child .form-control.np-datepicker-container .np_datepicker{float:left;width:45%;margin:0;}.nestedpages .quick-edit .form-control.np-datepicker-container span,.nestedpages .new-child .form-control.np-datepicker-container span{float:left;width:10%;display:block;text-align:center;padding-top:3px;}.nestedpages .quick-edit .comments,.nestedpages .new-child .comments{float:right;width:75%;margin-bottom:10px;zoom:1;}.nestedpages .quick-edit .comments:before,.nestedpages .quick-edit .comments:after,.nestedpages .new-child .comments:before,.nestedpages .new-child .comments:after{content:" ";display:table;}.nestedpages .quick-edit .comments:after,.nestedpages .new-child .comments:after{clear:both;}.nestedpages .quick-edit .dates,.nestedpages .new-child .dates{float:right;width:75%;margin-bottom:6px;}.nestedpages .quick-edit .dates select,.nestedpages .new-child .dates select{width:25%;}.nestedpages .quick-edit .dates input,.nestedpages .new-child .dates input{width:12%;}.nestedpages .quick-edit .np-toggle-options,.nestedpages .new-child .np-toggle-options{background-color:#f2f2f2;padding:5px;}.nestedpages .quick-edit .np-taxonomies,.nestedpages .quick-edit .np-menuoptions,.nestedpages .new-child .np-taxonomies,.nestedpages .new-child .np-menuoptions{display:none;clear:both;background-color:#f9f9f9;padding:8px;zoom:1;margin-top:5px;}.nestedpages .quick-edit .np-taxonomies:before,.nestedpages .quick-edit .np-taxonomies:after,.nestedpages .quick-edit .np-menuoptions:before,.nestedpages .quick-edit .np-menuoptions:after,.nestedpages .new-child .np-taxonomies:before,.nestedpages .new-child .np-taxonomies:after,.nestedpages .new-child .np-menuoptions:before,.nestedpages .new-child .np-menuoptions:after{content:" ";display:table;}.nestedpages .quick-edit .np-taxonomies:after,.nestedpages .quick-edit .np-menuoptions:after,.nestedpages .new-child .np-taxonomies:after,.nestedpages .new-child .np-menuoptions:after{clear:both;}.nestedpages .quick-edit .np-taxonomy,.nestedpages .new-child .np-taxonomy{float:left;width:30%;margin-right:3.33%;}.nestedpages .quick-edit .np-taxonomy .title,.nestedpages .new-child .np-taxonomy .title{font-weight:bold;margin-bottom:4px;display:block;}.nestedpages .quick-edit .np-taxonomy li,.nestedpages .new-child .np-taxonomy li{background-color:#ffffff;border:0;}.nestedpages .quick-edit .np-taxonomy textarea,.nestedpages .new-child .np-taxonomy textarea{width:100%;height:6.5em;}.nestedpages .quick-edit .np-menuoptions,.nestedpages .new-child .np-menuoptions{padding:15px;}.nestedpages .quick-edit .np-menuoptions label,.nestedpages .quick-edit .np-menuoptions input[type="text"],.nestedpages .new-child .np-menuoptions label,.nestedpages .new-child .np-menuoptions input[type="text"]{display:block;float:none;width:100%;}.nestedpages .quick-edit .np-menuoptions .menuoptions-left,.nestedpages .new-child .np-menuoptions .menuoptions-left{float:left;width:47%;}.nestedpages .quick-edit .np-menuoptions .menuoptions-right,.nestedpages .new-child .np-menuoptions .menuoptions-right{float:right;width:47%;padding-top:18px;}.nestedpages .quick-edit .np-menuoptions .menuoptions-right label,.nestedpages .new-child .np-menuoptions .menuoptions-right label{margin-bottom:10px;}.nestedpages .quick-edit .np-hide-options,.nestedpages .new-child .np-hide-options{display:none;background-color:#f0f0f0;-webkit-border-radius:3px;border-radius:3px;clear:both;padding:6px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}.nestedpages .quick-edit .np-hide-options p,.nestedpages .new-child .np-hide-options p{margin:0;}.nestedpages .quick-edit .np-hide-options label,.nestedpages .new-child .np-hide-options label{display:block;margin-top:4px;font-style:normal;}.nestedpages .quick-edit .new-page-titles,.nestedpages .new-child .new-page-titles{display:block;border:0;}.nestedpages .quick-edit .new-page-titles li,.nestedpages .new-child .new-page-titles li{background:transparent;border:0;padding:4px;zoom:1;}.nestedpages .quick-edit .new-page-titles li:before,.nestedpages .quick-edit .new-page-titles li:after,.nestedpages .new-child .new-page-titles li:before,.nestedpages .new-child .new-page-titles li:after{content:" ";display:table;}.nestedpages .quick-edit .new-page-titles li:after,.nestedpages .new-child .new-page-titles li:after{clear:both;}.nestedpages .quick-edit .new-page-titles li:nth-child(even),.nestedpages .new-child .new-page-titles li:nth-child(even){background-color:#f0f0f0;}.nestedpages .quick-edit .new-page-titles li label,.nestedpages .new-child .new-page-titles li label{margin-top:7px;}.nestedpages .quick-edit .new-page-titles .form-control,.nestedpages .new-child .new-page-titles .form-control{float:right;width:90%;clear:none;}.nestedpages .quick-edit .new-page-titles .np-icon-menu,.nestedpages .new-child .new-page-titles .np-icon-menu{float:left;margin-top:0px;height:auto;line-height:26px;}.nestedpages .quick-edit .new-page-titles .new-child-row div,.nestedpages .new-child .new-page-titles .new-child-row div{float:right;width:75%;margin:2px;zoom:1;}.nestedpages .quick-edit .new-page-titles .new-child-row div:before,.nestedpages .quick-edit .new-page-titles .new-child-row div:after,.nestedpages .new-child .new-page-titles .new-child-row div:before,.nestedpages .new-child .new-page-titles .new-child-row div:after{content:" ";display:table;}.nestedpages .quick-edit .new-page-titles .new-child-row div:after,.nestedpages .new-child .new-page-titles .new-child-row div:after{clear:both;}.nestedpages .quick-edit .new-page-titles .new-child-row div input[type='text'],.nestedpages .new-child .new-page-titles .new-child-row div input[type='text']{float:left;width:80%;}.nestedpages .quick-edit .new-page-titles .new-child-row div a,.nestedpages .new-child .new-page-titles .new-child-row div a{float:right;}.np-modal.nestedpages .new-child .right .form-control input[type='text'],.np-modal.nestedpages .new-child .right .form-control input[type='password'],.np-modal.nestedpages .new-child .right .form-control select{float:none;width:100%;}.np-modal.nestedpages .new-child .right .form-control label{float:none;width:100%;}.np-modal.nestedpages .new-child .new-page-titles .form-control{width:85%;}.np-modal.nestedpages .new-child .new-page-titles .form-control div{width:100%;}.np-modal.nestedpages .new-child .left label{display:none;}.np-qe-loading{display:none;float:right;width:25px;height:25px;margin:2px 10px 0 0;background:url('../images/loading-white.gif') no-repeat;}@media (max-width: 767px){.nestedpages .quick-edit .fields{background:transparent;}.nestedpages .quick-edit .left,.nestedpages .quick-edit .right{float:none;width:100%;}.nestedpages .quick-edit .form-control{margin-bottom:10px;}.nestedpages .quick-edit .form-control input[type='text'],.nestedpages .quick-edit .form-control input[type='password'],.nestedpages .quick-edit .form-control select{float:none;width:100%;}.nestedpages .quick-edit .form-control label{display:block;float:none;width:100%;margin-bottom:4px;}.nestedpages .quick-edit .form-control.np-datepicker-container .datetime{float:none;width:100%;}.nestedpages .quick-edit .comments{float:none;width:100%;}.nestedpages .quick-edit .dates{float:none;width:100%;margin-bottom:6px;}}.np-modal-form .form-interior{zoom:1;background:url('../images/border.png') repeat-y;background-position:center;padding:5px 0;}.np-modal-form .form-interior:before,.np-modal-form .form-interior:after{content:" ";display:table;}.np-modal-form .form-interior:after{clear:both;}.np-modal-form .form-control{zoom:1;margin-bottom:10px;}.np-modal-form .form-control:before,.np-modal-form .form-control:after{content:" ";display:table;}.np-modal-form .form-control:after{clear:both;}.np-modal-form .checkbox{margin-bottom:10px;}.np-modal-form .left{float:left;width:45%;}.np-modal-form .right{float:right;width:45%;padding-top:18px;}.np-modal-form label{display:block;}.np-modal-form input[type="text"],.np-modal-form select{width:100%;}.np-modal-form .buttons{clear:both;}.nestedpages-settings-table{border:1px solid #d9d9d9;border-collapse:collapse;}.nestedpages-settings-table thead th{background-color:#d9d9d9;padding:5px;}.nestedpages-settings-table tbody tr td{padding:5px;border-left:1px solid #e0e0e0;}.nestedpages-settings-table tbody tr td:first-child{border:0;}.nestedpages-settings-table tbody tr:nth-child(odd) td{background-color:#ffffff;}.nestedpages-settings-table i{font-size:20px;}
|
assets/js/lib/jquery.mjs.nestedSortable.js
CHANGED
@@ -11,6 +11,10 @@
|
|
11 |
* http://www.opensource.org/licenses/mit-license.php
|
12 |
*/
|
13 |
(function( factory ) {
|
|
|
|
|
|
|
|
|
14 |
if ( typeof define === "function" && define.amd ) {
|
15 |
|
16 |
// AMD. Register as an anonymous module.
|
@@ -21,9 +25,10 @@
|
|
21 |
} else {
|
22 |
|
23 |
// Browser globals
|
24 |
-
factory( jQuery );
|
25 |
}
|
26 |
}(function($) {
|
|
|
27 |
|
28 |
function isOverAxis( x, reference, size ) {
|
29 |
return ( x > reference ) && ( x < ( reference + size ) );
|
@@ -35,9 +40,9 @@
|
|
35 |
disableParentChange: false,
|
36 |
doNotClear: false,
|
37 |
expandOnHover: 700,
|
38 |
-
isAllowed: function(
|
39 |
isTree: false,
|
40 |
-
listType:
|
41 |
maxLevels: 0,
|
42 |
protectRoot: false,
|
43 |
rootID: null,
|
@@ -45,41 +50,56 @@
|
|
45 |
startCollapsed: false,
|
46 |
tabSize: 20,
|
47 |
|
48 |
-
branchClass:
|
49 |
-
collapsedClass:
|
50 |
-
disableNestingClass:
|
51 |
-
errorClass:
|
52 |
-
expandedClass:
|
53 |
-
hoveringClass:
|
54 |
-
leafClass:
|
55 |
-
disabledClass:
|
56 |
},
|
57 |
|
58 |
_create: function() {
|
59 |
-
this
|
|
|
|
|
|
|
60 |
|
61 |
// mjs - prevent browser from freezing if the HTML is not correct
|
62 |
-
if (!this.element.is(this.options.listType))
|
63 |
-
|
|
|
64 |
|
65 |
-
|
|
|
|
|
|
|
|
|
66 |
if (this.options.isTree && this.options.expandOnHover) {
|
67 |
-
this.options.tolerance =
|
68 |
}
|
69 |
|
70 |
$.ui.sortable.prototype._create.apply(this, arguments);
|
71 |
|
72 |
-
//
|
|
|
73 |
if (this.options.isTree) {
|
74 |
-
var self = this;
|
75 |
$(this.items).each(function() {
|
76 |
-
var $li = this.item
|
|
|
|
|
|
|
77 |
if ($li.children(self.options.listType).length) {
|
78 |
$li.addClass(self.options.branchClass);
|
79 |
// expand/collapse class only if they have children
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
} else {
|
85 |
$li.addClass(self.options.leafClass);
|
@@ -96,9 +116,26 @@
|
|
96 |
},
|
97 |
|
98 |
_mouseDrag: function(event) {
|
99 |
-
var i,
|
|
|
|
|
|
|
|
|
100 |
o = this.options,
|
101 |
-
scrolled = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
//Compute the helpers position
|
104 |
this.position = this._generatePosition(event);
|
@@ -109,53 +146,106 @@
|
|
109 |
}
|
110 |
|
111 |
//Do scrolling
|
112 |
-
if(this.options.scroll) {
|
113 |
-
if(this.scrollParent[0]
|
114 |
-
|
115 |
-
if(
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
|
121 |
-
if(
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
126 |
|
127 |
} else {
|
128 |
|
129 |
-
if
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
|
135 |
-
if
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
|
141 |
}
|
142 |
|
143 |
-
if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
|
144 |
$.ui.ddmanager.prepareOffsets(this, event);
|
|
|
145 |
}
|
146 |
|
147 |
//Regenerate the absolute position used for position checks
|
148 |
this.positionAbs = this._convertPositionTo("absolute");
|
149 |
|
150 |
// mjs - find the top offset before rearrangement,
|
151 |
-
|
152 |
|
153 |
//Set the helper position
|
154 |
-
if(!this.options.axis || this.options.axis !== "y") {
|
155 |
-
this.helper[0].style.left = this.position.left+"px";
|
156 |
}
|
157 |
-
if(!this.options.axis || this.options.axis !== "x") {
|
158 |
-
this.helper[0].style.top = this.position.top+"px";
|
159 |
}
|
160 |
|
161 |
// mjs - check and reset hovering state at each cycle
|
@@ -163,14 +253,16 @@
|
|
163 |
this.mouseentered = this.mouseentered ? this.mouseentered : false;
|
164 |
|
165 |
// mjs - let's start caching some variables
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
|
173 |
-
|
|
|
|
|
174 |
|
175 |
//Rearrange
|
176 |
for (i = this.items.length - 1; i >= 0; i--) {
|
@@ -194,81 +286,107 @@
|
|
194 |
continue;
|
195 |
}
|
196 |
|
197 |
-
// No action if intersected item is disabled
|
198 |
// and the element above or below in the direction we're going is also disabled
|
199 |
if (itemElement.className.indexOf(o.disabledClass) !== -1) {
|
200 |
-
// Note: intersection hardcoded direction values from
|
|
|
201 |
if (intersection === 2) {
|
202 |
// Going down
|
203 |
-
|
204 |
-
if (itemAfter && itemAfter.item
|
205 |
continue;
|
206 |
}
|
207 |
-
|
208 |
-
}
|
209 |
-
else if (intersection === 1) {
|
210 |
// Going up
|
211 |
-
|
212 |
-
if (itemBefore && itemBefore.item
|
213 |
continue;
|
214 |
}
|
215 |
}
|
216 |
}
|
217 |
|
|
|
|
|
218 |
// cannot intersect with itself
|
219 |
// no useless actions that have been done before
|
220 |
// no action if the item moved is the parent of the item checked
|
221 |
if (itemElement !== this.currentItem[0] &&
|
222 |
-
this.placeholder[
|
223 |
!$.contains(this.placeholder[0], itemElement) &&
|
224 |
-
(
|
|
|
|
|
|
|
|
|
225 |
) {
|
226 |
|
227 |
-
// mjs - we are intersecting an element:
|
|
|
228 |
if (!this.mouseentered) {
|
229 |
$(itemElement).mouseenter();
|
230 |
this.mouseentered = true;
|
231 |
}
|
232 |
|
233 |
-
// mjs - if the element has children and they are hidden,
|
|
|
234 |
if (o.isTree && $(itemElement).hasClass(o.collapsedClass) && o.expandOnHover) {
|
235 |
if (!this.hovering) {
|
236 |
$(itemElement).addClass(o.hoveringClass);
|
237 |
-
var self = this;
|
238 |
this.hovering = window.setTimeout(function() {
|
239 |
-
$(itemElement)
|
|
|
|
|
|
|
240 |
self.refreshPositions();
|
241 |
self._trigger("expand", event, self._uiHash());
|
242 |
}, o.expandOnHover);
|
243 |
}
|
244 |
}
|
245 |
|
246 |
-
this.direction = intersection
|
247 |
|
248 |
// mjs - rearrange the elements and reset timeouts and hovering state
|
249 |
-
if (this.options.tolerance
|
250 |
$(itemElement).mouseleave();
|
251 |
this.mouseentered = false;
|
252 |
$(itemElement).removeClass(o.hoveringClass);
|
253 |
-
|
|
|
|
|
254 |
this.hovering = null;
|
255 |
|
256 |
-
// mjs - do not switch container if
|
|
|
257 |
// or if it's not a root item but we are trying to make it root
|
258 |
-
if (o.protectRoot
|
259 |
-
|
260 |
-
|
|
|
|
|
|
|
|
|
261 |
) {
|
262 |
-
if (this.currentItem[0].parentNode
|
263 |
-
|
264 |
) {
|
265 |
|
266 |
-
if (
|
267 |
itemElement.appendChild(newList);
|
268 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
}
|
270 |
|
271 |
-
var a = this.direction === "down" ? $(itemElement).prev().children(o.listType) : $(itemElement).children(o.listType);
|
272 |
if (a[0] !== undefined) {
|
273 |
this._rearrange(event, null, a);
|
274 |
}
|
@@ -276,7 +394,7 @@
|
|
276 |
} else {
|
277 |
this._rearrange(event, item);
|
278 |
}
|
279 |
-
} else if (
|
280 |
this._rearrange(event, item);
|
281 |
}
|
282 |
} else {
|
@@ -291,10 +409,24 @@
|
|
291 |
}
|
292 |
}
|
293 |
|
294 |
-
// mjs - to find the previous sibling in the list,
|
295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
if (previousItem != null) {
|
297 |
-
while (
|
|
|
|
|
|
|
|
|
|
|
298 |
if (previousItem[0].previousSibling) {
|
299 |
previousItem = $(previousItem[0].previousSibling);
|
300 |
} else {
|
@@ -304,10 +436,24 @@
|
|
304 |
}
|
305 |
}
|
306 |
|
307 |
-
// mjs - to find the next sibling in the list,
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
if (nextItem != null) {
|
310 |
-
while (
|
|
|
|
|
|
|
|
|
|
|
311 |
if (nextItem[0].nextSibling) {
|
312 |
nextItem = $(nextItem[0].nextSibling);
|
313 |
} else {
|
@@ -319,75 +465,101 @@
|
|
319 |
|
320 |
this.beyondMaxLevels = 0;
|
321 |
|
322 |
-
// mjs - if the item is moved to the left, send it one level up
|
323 |
-
if
|
324 |
-
|
325 |
-
|
326 |
-
&&
|
327 |
-
|
328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
) {
|
330 |
|
331 |
parentItem.after(this.placeholder[0]);
|
332 |
-
|
333 |
-
|
334 |
-
|
|
|
|
|
|
|
|
|
|
|
335 |
}
|
336 |
-
|
|
|
337 |
this._trigger("change", event, this._uiHash());
|
338 |
-
|
339 |
-
|
340 |
-
else if (previousItem != null
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
) {
|
350 |
|
351 |
-
this._isAllowed(previousItem, level, level+childLevels+1);
|
352 |
|
353 |
if (!previousItem.children(o.listType).length) {
|
354 |
previousItem[0].appendChild(newList);
|
355 |
-
|
|
|
|
|
|
|
|
|
356 |
}
|
357 |
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
else {
|
364 |
previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);
|
365 |
}
|
366 |
-
|
|
|
367 |
this._trigger("change", event, this._uiHash());
|
368 |
-
}
|
369 |
-
|
370 |
-
this._isAllowed(parentItem, level, level+childLevels);
|
371 |
}
|
372 |
|
373 |
//Post events to containers
|
374 |
this._contactContainers(event);
|
375 |
|
376 |
//Interconnect with droppables
|
377 |
-
if($.ui.ddmanager) {
|
378 |
$.ui.ddmanager.drag(this, event);
|
379 |
}
|
380 |
|
381 |
//Call callbacks
|
382 |
-
this._trigger(
|
383 |
|
384 |
this.lastPositionAbs = this.positionAbs;
|
385 |
return false;
|
386 |
|
387 |
},
|
388 |
|
389 |
-
_mouseStop: function(event
|
390 |
-
|
391 |
// mjs - if the item is in a position not allowed, send it back
|
392 |
if (this.beyondMaxLevels) {
|
393 |
|
@@ -403,47 +575,63 @@
|
|
403 |
|
404 |
}
|
405 |
|
406 |
-
|
407 |
// mjs - clear the hovering timeout, just to be sure
|
408 |
-
$(
|
409 |
-
|
410 |
-
|
411 |
-
this.hovering = null;
|
412 |
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
var sort = this.domPosition.prev ? $(this.domPosition.prev).next().index() : 0;
|
417 |
-
|
418 |
-
if(!(pid == this._uiHash().item.parent().parent().attr("id") &&
|
419 |
-
sort == this._uiHash().item.index())) {
|
420 |
-
this._trigger("relocate", event, this._uiHash());
|
421 |
}
|
|
|
422 |
|
|
|
|
|
|
|
|
|
423 |
},
|
424 |
|
425 |
-
// mjs - this function is slightly modified
|
|
|
426 |
_intersectsWithSides: function(item) {
|
427 |
|
428 |
-
var half = this.options.isTree ? .8 : .5
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
verticalDirection = this._getDragVerticalDirection(),
|
434 |
horizontalDirection = this._getDragHorizontalDirection();
|
435 |
|
436 |
if (this.floating && horizontalDirection) {
|
437 |
-
return (
|
|
|
|
|
|
|
438 |
} else {
|
439 |
-
return verticalDirection && (
|
|
|
|
|
|
|
440 |
}
|
441 |
|
442 |
},
|
443 |
|
444 |
-
_contactContainers: function(
|
445 |
|
446 |
-
if (this.options.protectRoot && this.currentItem[0].parentNode
|
447 |
return;
|
448 |
}
|
449 |
|
@@ -451,13 +639,21 @@
|
|
451 |
|
452 |
},
|
453 |
|
454 |
-
_clear: function(
|
|
|
|
|
455 |
|
456 |
$.ui.sortable.prototype._clear.apply(this, arguments);
|
457 |
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
// mjs - clean last empty ul/ol
|
459 |
-
for (
|
460 |
-
|
461 |
this._clearEmpty(item);
|
462 |
}
|
463 |
|
@@ -467,38 +663,42 @@
|
|
467 |
|
468 |
var o = $.extend({}, this.options, options),
|
469 |
items = this._getItemsAsjQuery(o && o.connected),
|
470 |
-
|
471 |
|
472 |
$(items).each(function() {
|
473 |
-
var res = ($(o.item || this).attr(o.attribute ||
|
474 |
.match(o.expression || (/(.+)[-=_](.+)/)),
|
475 |
-
|
476 |
.parent(o.items)
|
477 |
-
.attr(o.attribute ||
|
478 |
.match(o.expression || (/(.+)[-=_](.+)/));
|
479 |
|
480 |
if (res) {
|
481 |
-
str.push(
|
482 |
-
|
483 |
-
|
|
|
|
|
|
|
|
|
|
|
484 |
}
|
485 |
});
|
486 |
|
487 |
-
if(!str.length && o.key) {
|
488 |
-
str.push(o.key +
|
489 |
}
|
490 |
|
491 |
-
return str.join(
|
492 |
|
493 |
},
|
494 |
|
495 |
toHierarchy: function(options) {
|
496 |
|
497 |
var o = $.extend({}, this.options, options),
|
498 |
-
|
499 |
-
ret = [];
|
500 |
|
501 |
-
$(this.element).children(o.items).each(function
|
502 |
var level = _recursiveItems(this);
|
503 |
ret.push(level);
|
504 |
});
|
@@ -506,9 +706,13 @@
|
|
506 |
return ret;
|
507 |
|
508 |
function _recursiveItems(item) {
|
509 |
-
var id = ($(item).attr(o.attribute ||
|
|
|
510 |
if (id) {
|
511 |
-
|
|
|
|
|
|
|
512 |
if ($(item).children(o.listType).children(o.items).length > 0) {
|
513 |
currentItem.children = [];
|
514 |
$(item).children(o.listType).children(o.items).each(function() {
|
@@ -525,8 +729,8 @@
|
|
525 |
|
526 |
var o = $.extend({}, this.options, options),
|
527 |
sDepth = o.startDepthCount || 0,
|
528 |
-
|
529 |
-
|
530 |
|
531 |
if (!o.excludeRoot) {
|
532 |
ret.push({
|
@@ -536,77 +740,99 @@
|
|
536 |
"left": left,
|
537 |
"right": ($(o.items, this.element).length + 1) * 2
|
538 |
});
|
539 |
-
left
|
540 |
}
|
541 |
|
542 |
-
$(this.element).children(o.items).each(function
|
543 |
left = _recursiveArray(this, sDepth + 1, left);
|
544 |
});
|
545 |
|
546 |
-
ret = ret.sort(function(a,b){ return (a.left - b.left); });
|
547 |
|
548 |
return ret;
|
549 |
|
550 |
-
function _recursiveArray(item, depth,
|
551 |
|
552 |
-
var right =
|
553 |
-
|
554 |
-
|
|
|
555 |
|
556 |
if ($(item).children(o.listType).children(o.items).length > 0) {
|
557 |
-
depth
|
558 |
-
$(item).children(o.listType).children(o.items).each(function
|
559 |
right = _recursiveArray($(this), depth, right);
|
560 |
});
|
561 |
-
depth
|
562 |
}
|
563 |
|
564 |
-
id = ($(item).attr(o.attribute ||
|
565 |
|
566 |
if (depth === sDepth + 1) {
|
567 |
pid = o.rootID;
|
568 |
} else {
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
pid = parentItem[2];
|
574 |
}
|
575 |
|
576 |
if (id) {
|
577 |
-
ret.push({
|
|
|
|
|
|
|
|
|
|
|
|
|
578 |
}
|
579 |
|
580 |
-
|
581 |
-
return
|
582 |
}
|
583 |
|
584 |
},
|
585 |
|
586 |
-
_clearEmpty: function(item) {
|
587 |
-
|
|
|
|
|
|
|
588 |
|
589 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
|
591 |
-
if (
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
$(item).removeClass(o.leafClass).addClass(o.branchClass + ' ' + o.collapsedClass);
|
598 |
}
|
599 |
|
|
|
|
|
|
|
600 |
},
|
601 |
|
602 |
_getLevel: function(item) {
|
603 |
|
604 |
-
var level = 1
|
|
|
605 |
|
606 |
if (this.options.listType) {
|
607 |
-
|
608 |
-
while (list && list.length > 0 &&
|
609 |
-
!list.is('.ui-sortable')) {
|
610 |
level++;
|
611 |
list = list.parent().closest(this.options.listType);
|
612 |
}
|
@@ -617,12 +843,12 @@
|
|
617 |
|
618 |
_getChildLevels: function(parent, depth) {
|
619 |
var self = this,
|
620 |
-
|
621 |
-
|
622 |
depth = depth || 0;
|
623 |
|
624 |
-
$(parent).children(o.listType).children(o.items).each(function
|
625 |
-
|
626 |
});
|
627 |
|
628 |
return depth ? result + 1 : result;
|
@@ -630,25 +856,33 @@
|
|
630 |
|
631 |
_isAllowed: function(parentItem, level, levels) {
|
632 |
var o = this.options,
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
|
|
|
|
|
|
|
|
|
|
641 |
// mjs - is the root protected?
|
642 |
// mjs - are we nesting too deep?
|
643 |
-
if (
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
|
|
|
|
|
|
650 |
} else {
|
651 |
-
if (maxLevels < levels && maxLevels
|
652 |
this.placeholder.addClass(o.errorClass);
|
653 |
this.beyondMaxLevels = levels - maxLevels;
|
654 |
} else {
|
@@ -660,5 +894,9 @@
|
|
660 |
|
661 |
}));
|
662 |
|
663 |
-
$.mjs.nestedSortable.prototype.options = $.extend(
|
|
|
|
|
|
|
|
|
664 |
}));
|
11 |
* http://www.opensource.org/licenses/mit-license.php
|
12 |
*/
|
13 |
(function( factory ) {
|
14 |
+
"use strict";
|
15 |
+
|
16 |
+
var define = window.define;
|
17 |
+
|
18 |
if ( typeof define === "function" && define.amd ) {
|
19 |
|
20 |
// AMD. Register as an anonymous module.
|
25 |
} else {
|
26 |
|
27 |
// Browser globals
|
28 |
+
factory( window.jQuery );
|
29 |
}
|
30 |
}(function($) {
|
31 |
+
"use strict";
|
32 |
|
33 |
function isOverAxis( x, reference, size ) {
|
34 |
return ( x > reference ) && ( x < ( reference + size ) );
|
40 |
disableParentChange: false,
|
41 |
doNotClear: false,
|
42 |
expandOnHover: 700,
|
43 |
+
isAllowed: function() { return true; },
|
44 |
isTree: false,
|
45 |
+
listType: "ol",
|
46 |
maxLevels: 0,
|
47 |
protectRoot: false,
|
48 |
rootID: null,
|
50 |
startCollapsed: false,
|
51 |
tabSize: 20,
|
52 |
|
53 |
+
branchClass: "mjs-nestedSortable-branch",
|
54 |
+
collapsedClass: "mjs-nestedSortable-collapsed",
|
55 |
+
disableNestingClass: "mjs-nestedSortable-no-nesting",
|
56 |
+
errorClass: "mjs-nestedSortable-error",
|
57 |
+
expandedClass: "mjs-nestedSortable-expanded",
|
58 |
+
hoveringClass: "mjs-nestedSortable-hovering",
|
59 |
+
leafClass: "mjs-nestedSortable-leaf",
|
60 |
+
disabledClass: "mjs-nestedSortable-disabled"
|
61 |
},
|
62 |
|
63 |
_create: function() {
|
64 |
+
var self = this,
|
65 |
+
err;
|
66 |
+
|
67 |
+
this.element.data("ui-sortable", this.element.data("mjs-nestedSortable"));
|
68 |
|
69 |
// mjs - prevent browser from freezing if the HTML is not correct
|
70 |
+
if (!this.element.is(this.options.listType)) {
|
71 |
+
err = "nestedSortable: " +
|
72 |
+
"Please check that the listType option is set to your actual list type";
|
73 |
|
74 |
+
throw new Error(err);
|
75 |
+
}
|
76 |
+
|
77 |
+
// if we have a tree with expanding/collapsing functionality,
|
78 |
+
// force 'intersect' tolerance method
|
79 |
if (this.options.isTree && this.options.expandOnHover) {
|
80 |
+
this.options.tolerance = "intersect";
|
81 |
}
|
82 |
|
83 |
$.ui.sortable.prototype._create.apply(this, arguments);
|
84 |
|
85 |
+
// prepare the tree by applying the right classes
|
86 |
+
// (the CSS is responsible for actual hide/show functionality)
|
87 |
if (this.options.isTree) {
|
|
|
88 |
$(this.items).each(function() {
|
89 |
+
var $li = this.item,
|
90 |
+
hasCollapsedClass = $li.hasClass(self.options.collapsedClass),
|
91 |
+
hasExpandedClass = $li.hasClass(self.options.expandedClass);
|
92 |
+
|
93 |
if ($li.children(self.options.listType).length) {
|
94 |
$li.addClass(self.options.branchClass);
|
95 |
// expand/collapse class only if they have children
|
96 |
+
|
97 |
+
if ( !hasCollapsedClass && !hasExpandedClass ) {
|
98 |
+
if (self.options.startCollapsed) {
|
99 |
+
$li.addClass(self.options.collapsedClass);
|
100 |
+
} else {
|
101 |
+
$li.addClass(self.options.expandedClass);
|
102 |
+
}
|
103 |
}
|
104 |
} else {
|
105 |
$li.addClass(self.options.leafClass);
|
116 |
},
|
117 |
|
118 |
_mouseDrag: function(event) {
|
119 |
+
var i,
|
120 |
+
item,
|
121 |
+
itemElement,
|
122 |
+
intersection,
|
123 |
+
self = this,
|
124 |
o = this.options,
|
125 |
+
scrolled = false,
|
126 |
+
$document = $(document),
|
127 |
+
previousTopOffset,
|
128 |
+
parentItem,
|
129 |
+
level,
|
130 |
+
childLevels,
|
131 |
+
itemAfter,
|
132 |
+
itemBefore,
|
133 |
+
newList,
|
134 |
+
method,
|
135 |
+
a,
|
136 |
+
previousItem,
|
137 |
+
nextItem,
|
138 |
+
helperIsNotSibling;
|
139 |
|
140 |
//Compute the helpers position
|
141 |
this.position = this._generatePosition(event);
|
146 |
}
|
147 |
|
148 |
//Do scrolling
|
149 |
+
if (this.options.scroll) {
|
150 |
+
if (this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
|
151 |
+
|
152 |
+
if (
|
153 |
+
(
|
154 |
+
this.overflowOffset.top +
|
155 |
+
this.scrollParent[0].offsetHeight
|
156 |
+
) -
|
157 |
+
event.pageY <
|
158 |
+
o.scrollSensitivity
|
159 |
+
) {
|
160 |
+
scrolled = this.scrollParent.scrollTop() + o.scrollSpeed;
|
161 |
+
this.scrollParent.scrollTop(scrolled);
|
162 |
+
} else if (
|
163 |
+
event.pageY -
|
164 |
+
this.overflowOffset.top <
|
165 |
+
o.scrollSensitivity
|
166 |
+
) {
|
167 |
+
scrolled = this.scrollParent.scrollTop() - o.scrollSpeed;
|
168 |
+
this.scrollParent.scrollTop(scrolled);
|
169 |
}
|
170 |
|
171 |
+
if (
|
172 |
+
(
|
173 |
+
this.overflowOffset.left +
|
174 |
+
this.scrollParent[0].offsetWidth
|
175 |
+
) -
|
176 |
+
event.pageX <
|
177 |
+
o.scrollSensitivity
|
178 |
+
) {
|
179 |
+
scrolled = this.scrollParent.scrollLeft() + o.scrollSpeed;
|
180 |
+
this.scrollParent.scrollLeft(scrolled);
|
181 |
+
} else if (
|
182 |
+
event.pageX -
|
183 |
+
this.overflowOffset.left <
|
184 |
+
o.scrollSensitivity
|
185 |
+
) {
|
186 |
+
scrolled = this.scrollParent.scrollLeft() - o.scrollSpeed;
|
187 |
+
this.scrollParent.scrollLeft(scrolled);
|
188 |
}
|
189 |
|
190 |
} else {
|
191 |
|
192 |
+
if (
|
193 |
+
event.pageY -
|
194 |
+
$document.scrollTop() <
|
195 |
+
o.scrollSensitivity
|
196 |
+
) {
|
197 |
+
scrolled = $document.scrollTop() - o.scrollSpeed;
|
198 |
+
$document.scrollTop(scrolled);
|
199 |
+
} else if (
|
200 |
+
$(window).height() -
|
201 |
+
(
|
202 |
+
event.pageY -
|
203 |
+
$document.scrollTop()
|
204 |
+
) <
|
205 |
+
o.scrollSensitivity
|
206 |
+
) {
|
207 |
+
scrolled = $document.scrollTop() + o.scrollSpeed;
|
208 |
+
$document.scrollTop(scrolled);
|
209 |
}
|
210 |
|
211 |
+
if (
|
212 |
+
event.pageX -
|
213 |
+
$document.scrollLeft() <
|
214 |
+
o.scrollSensitivity
|
215 |
+
) {
|
216 |
+
scrolled = $document.scrollLeft() - o.scrollSpeed;
|
217 |
+
$document.scrollLeft(scrolled);
|
218 |
+
} else if (
|
219 |
+
$(window).width() -
|
220 |
+
(
|
221 |
+
event.pageX -
|
222 |
+
$document.scrollLeft()
|
223 |
+
) <
|
224 |
+
o.scrollSensitivity
|
225 |
+
) {
|
226 |
+
scrolled = $document.scrollLeft() + o.scrollSpeed;
|
227 |
+
$document.scrollLeft(scrolled);
|
228 |
}
|
229 |
|
230 |
}
|
231 |
|
232 |
+
if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
|
233 |
$.ui.ddmanager.prepareOffsets(this, event);
|
234 |
+
}
|
235 |
}
|
236 |
|
237 |
//Regenerate the absolute position used for position checks
|
238 |
this.positionAbs = this._convertPositionTo("absolute");
|
239 |
|
240 |
// mjs - find the top offset before rearrangement,
|
241 |
+
previousTopOffset = this.placeholder.offset().top;
|
242 |
|
243 |
//Set the helper position
|
244 |
+
if (!this.options.axis || this.options.axis !== "y") {
|
245 |
+
this.helper[0].style.left = this.position.left + "px";
|
246 |
}
|
247 |
+
if (!this.options.axis || this.options.axis !== "x") {
|
248 |
+
this.helper[0].style.top = (this.position.top) + "px";
|
249 |
}
|
250 |
|
251 |
// mjs - check and reset hovering state at each cycle
|
253 |
this.mouseentered = this.mouseentered ? this.mouseentered : false;
|
254 |
|
255 |
// mjs - let's start caching some variables
|
256 |
+
(function() {
|
257 |
+
var _parentItem = this.placeholder.parent().parent();
|
258 |
+
if (_parentItem && _parentItem.closest(".ui-sortable").length) {
|
259 |
+
parentItem = _parentItem;
|
260 |
+
}
|
261 |
+
}.call(this));
|
262 |
|
263 |
+
level = this._getLevel(this.placeholder);
|
264 |
+
childLevels = this._getChildLevels(this.helper);
|
265 |
+
newList = document.createElement(o.listType);
|
266 |
|
267 |
//Rearrange
|
268 |
for (i = this.items.length - 1; i >= 0; i--) {
|
286 |
continue;
|
287 |
}
|
288 |
|
289 |
+
// No action if intersected item is disabled
|
290 |
// and the element above or below in the direction we're going is also disabled
|
291 |
if (itemElement.className.indexOf(o.disabledClass) !== -1) {
|
292 |
+
// Note: intersection hardcoded direction values from
|
293 |
+
// jquery.ui.sortable.js:_intersectsWithPointer
|
294 |
if (intersection === 2) {
|
295 |
// Going down
|
296 |
+
itemAfter = this.items[i + 1];
|
297 |
+
if (itemAfter && itemAfter.item.hasClass(o.disabledClass)) {
|
298 |
continue;
|
299 |
}
|
300 |
+
|
301 |
+
} else if (intersection === 1) {
|
|
|
302 |
// Going up
|
303 |
+
itemBefore = this.items[i - 1];
|
304 |
+
if (itemBefore && itemBefore.item.hasClass(o.disabledClass)) {
|
305 |
continue;
|
306 |
}
|
307 |
}
|
308 |
}
|
309 |
|
310 |
+
method = intersection === 1 ? "next" : "prev";
|
311 |
+
|
312 |
// cannot intersect with itself
|
313 |
// no useless actions that have been done before
|
314 |
// no action if the item moved is the parent of the item checked
|
315 |
if (itemElement !== this.currentItem[0] &&
|
316 |
+
this.placeholder[method]()[0] !== itemElement &&
|
317 |
!$.contains(this.placeholder[0], itemElement) &&
|
318 |
+
(
|
319 |
+
this.options.type === "semi-dynamic" ?
|
320 |
+
!$.contains(this.element[0], itemElement) :
|
321 |
+
true
|
322 |
+
)
|
323 |
) {
|
324 |
|
325 |
+
// mjs - we are intersecting an element:
|
326 |
+
// trigger the mouseenter event and store this state
|
327 |
if (!this.mouseentered) {
|
328 |
$(itemElement).mouseenter();
|
329 |
this.mouseentered = true;
|
330 |
}
|
331 |
|
332 |
+
// mjs - if the element has children and they are hidden,
|
333 |
+
// show them after a delay (CSS responsible)
|
334 |
if (o.isTree && $(itemElement).hasClass(o.collapsedClass) && o.expandOnHover) {
|
335 |
if (!this.hovering) {
|
336 |
$(itemElement).addClass(o.hoveringClass);
|
|
|
337 |
this.hovering = window.setTimeout(function() {
|
338 |
+
$(itemElement)
|
339 |
+
.removeClass(o.collapsedClass)
|
340 |
+
.addClass(o.expandedClass);
|
341 |
+
|
342 |
self.refreshPositions();
|
343 |
self._trigger("expand", event, self._uiHash());
|
344 |
}, o.expandOnHover);
|
345 |
}
|
346 |
}
|
347 |
|
348 |
+
this.direction = intersection === 1 ? "down" : "up";
|
349 |
|
350 |
// mjs - rearrange the elements and reset timeouts and hovering state
|
351 |
+
if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
|
352 |
$(itemElement).mouseleave();
|
353 |
this.mouseentered = false;
|
354 |
$(itemElement).removeClass(o.hoveringClass);
|
355 |
+
if (this.hovering) {
|
356 |
+
window.clearTimeout(this.hovering);
|
357 |
+
}
|
358 |
this.hovering = null;
|
359 |
|
360 |
+
// mjs - do not switch container if
|
361 |
+
// it's a root item and 'protectRoot' is true
|
362 |
// or if it's not a root item but we are trying to make it root
|
363 |
+
if (o.protectRoot &&
|
364 |
+
!(
|
365 |
+
this.currentItem[0].parentNode === this.element[0] &&
|
366 |
+
// it's a root item
|
367 |
+
itemElement.parentNode !== this.element[0]
|
368 |
+
// it's intersecting a non-root item
|
369 |
+
)
|
370 |
) {
|
371 |
+
if (this.currentItem[0].parentNode !== this.element[0] &&
|
372 |
+
itemElement.parentNode === this.element[0]
|
373 |
) {
|
374 |
|
375 |
+
if ( !$(itemElement).children(o.listType).length) {
|
376 |
itemElement.appendChild(newList);
|
377 |
+
if (o.isTree) {
|
378 |
+
$(itemElement)
|
379 |
+
.removeClass(o.leafClass)
|
380 |
+
.addClass(o.branchClass + " " + o.expandedClass);
|
381 |
+
}
|
382 |
+
}
|
383 |
+
|
384 |
+
if (this.direction === "down") {
|
385 |
+
a = $(itemElement).prev().children(o.listType);
|
386 |
+
} else {
|
387 |
+
a = $(itemElement).children(o.listType);
|
388 |
}
|
389 |
|
|
|
390 |
if (a[0] !== undefined) {
|
391 |
this._rearrange(event, null, a);
|
392 |
}
|
394 |
} else {
|
395 |
this._rearrange(event, item);
|
396 |
}
|
397 |
+
} else if (!o.protectRoot) {
|
398 |
this._rearrange(event, item);
|
399 |
}
|
400 |
} else {
|
409 |
}
|
410 |
}
|
411 |
|
412 |
+
// mjs - to find the previous sibling in the list,
|
413 |
+
// keep backtracking until we hit a valid list item.
|
414 |
+
(function() {
|
415 |
+
var _previousItem = this.placeholder.prev();
|
416 |
+
if (_previousItem.length) {
|
417 |
+
previousItem = _previousItem;
|
418 |
+
} else {
|
419 |
+
previousItem = null;
|
420 |
+
}
|
421 |
+
}.call(this));
|
422 |
+
|
423 |
if (previousItem != null) {
|
424 |
+
while (
|
425 |
+
previousItem[0].nodeName.toLowerCase() !== "li" ||
|
426 |
+
previousItem[0].className.indexOf(o.disabledClass) !== -1 ||
|
427 |
+
previousItem[0] === this.currentItem[0] ||
|
428 |
+
previousItem[0] === this.helper[0]
|
429 |
+
) {
|
430 |
if (previousItem[0].previousSibling) {
|
431 |
previousItem = $(previousItem[0].previousSibling);
|
432 |
} else {
|
436 |
}
|
437 |
}
|
438 |
|
439 |
+
// mjs - to find the next sibling in the list,
|
440 |
+
// keep stepping forward until we hit a valid list item.
|
441 |
+
(function() {
|
442 |
+
var _nextItem = this.placeholder.next();
|
443 |
+
if (_nextItem.length) {
|
444 |
+
nextItem = _nextItem;
|
445 |
+
} else {
|
446 |
+
nextItem = null;
|
447 |
+
}
|
448 |
+
}.call(this));
|
449 |
+
|
450 |
if (nextItem != null) {
|
451 |
+
while (
|
452 |
+
nextItem[0].nodeName.toLowerCase() !== "li" ||
|
453 |
+
nextItem[0].className.indexOf(o.disabledClass) !== -1 ||
|
454 |
+
nextItem[0] === this.currentItem[0] ||
|
455 |
+
nextItem[0] === this.helper[0]
|
456 |
+
) {
|
457 |
if (nextItem[0].nextSibling) {
|
458 |
nextItem = $(nextItem[0].nextSibling);
|
459 |
} else {
|
465 |
|
466 |
this.beyondMaxLevels = 0;
|
467 |
|
468 |
+
// mjs - if the item is moved to the left, send it one level up
|
469 |
+
// but only if it's at the bottom of the list
|
470 |
+
if (parentItem != null &&
|
471 |
+
nextItem == null &&
|
472 |
+
!(o.protectRoot && parentItem[0].parentNode == this.element[0]) &&
|
473 |
+
(
|
474 |
+
o.rtl &&
|
475 |
+
(
|
476 |
+
this.positionAbs.left +
|
477 |
+
this.helper.outerWidth() > parentItem.offset().left +
|
478 |
+
parentItem.outerWidth()
|
479 |
+
) ||
|
480 |
+
!o.rtl && (this.positionAbs.left < parentItem.offset().left)
|
481 |
+
)
|
482 |
) {
|
483 |
|
484 |
parentItem.after(this.placeholder[0]);
|
485 |
+
helperIsNotSibling = !parentItem
|
486 |
+
.children(o.listItem)
|
487 |
+
.children("li:visible:not(.ui-sortable-helper)")
|
488 |
+
.length;
|
489 |
+
if (o.isTree && helperIsNotSibling) {
|
490 |
+
parentItem
|
491 |
+
.removeClass(this.options.branchClass + " " + this.options.expandedClass)
|
492 |
+
.addClass(this.options.leafClass);
|
493 |
}
|
494 |
+
if(typeof parentItem !== 'undefined')
|
495 |
+
this._clearEmpty(parentItem[0]);
|
496 |
this._trigger("change", event, this._uiHash());
|
497 |
+
// mjs - if the item is below a sibling and is moved to the right,
|
498 |
+
// make it a child of that sibling
|
499 |
+
} else if (previousItem != null &&
|
500 |
+
!previousItem.hasClass(o.disableNestingClass) &&
|
501 |
+
(
|
502 |
+
previousItem.children(o.listType).length &&
|
503 |
+
previousItem.children(o.listType).is(":visible") ||
|
504 |
+
!previousItem.children(o.listType).length
|
505 |
+
) &&
|
506 |
+
!(o.protectRoot && this.currentItem[0].parentNode === this.element[0]) &&
|
507 |
+
(
|
508 |
+
o.rtl &&
|
509 |
+
(
|
510 |
+
this.positionAbs.left +
|
511 |
+
this.helper.outerWidth() <
|
512 |
+
previousItem.offset().left +
|
513 |
+
previousItem.outerWidth() -
|
514 |
+
o.tabSize
|
515 |
+
) ||
|
516 |
+
!o.rtl &&
|
517 |
+
(this.positionAbs.left > previousItem.offset().left + o.tabSize)
|
518 |
+
)
|
519 |
) {
|
520 |
|
521 |
+
this._isAllowed(previousItem, level, level + childLevels + 1);
|
522 |
|
523 |
if (!previousItem.children(o.listType).length) {
|
524 |
previousItem[0].appendChild(newList);
|
525 |
+
if (o.isTree) {
|
526 |
+
previousItem
|
527 |
+
.removeClass(o.leafClass)
|
528 |
+
.addClass(o.branchClass + " " + o.expandedClass);
|
529 |
+
}
|
530 |
}
|
531 |
|
532 |
+
// mjs - if this item is being moved from the top, add it to the top of the list.
|
533 |
+
if (previousTopOffset && (previousTopOffset <= previousItem.offset().top)) {
|
534 |
+
previousItem.children(o.listType).prepend(this.placeholder);
|
535 |
+
} else {
|
536 |
+
// mjs - otherwise, add it to the bottom of the list.
|
|
|
537 |
previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);
|
538 |
}
|
539 |
+
if(typeof parentItem !== 'undefined')
|
540 |
+
this._clearEmpty(parentItem[0]);
|
541 |
this._trigger("change", event, this._uiHash());
|
542 |
+
} else {
|
543 |
+
this._isAllowed(parentItem, level, level + childLevels);
|
|
|
544 |
}
|
545 |
|
546 |
//Post events to containers
|
547 |
this._contactContainers(event);
|
548 |
|
549 |
//Interconnect with droppables
|
550 |
+
if ($.ui.ddmanager) {
|
551 |
$.ui.ddmanager.drag(this, event);
|
552 |
}
|
553 |
|
554 |
//Call callbacks
|
555 |
+
this._trigger("sort", event, this._uiHash());
|
556 |
|
557 |
this.lastPositionAbs = this.positionAbs;
|
558 |
return false;
|
559 |
|
560 |
},
|
561 |
|
562 |
+
_mouseStop: function(event) {
|
|
|
563 |
// mjs - if the item is in a position not allowed, send it back
|
564 |
if (this.beyondMaxLevels) {
|
565 |
|
575 |
|
576 |
}
|
577 |
|
|
|
578 |
// mjs - clear the hovering timeout, just to be sure
|
579 |
+
$("." + this.options.hoveringClass)
|
580 |
+
.mouseleave()
|
581 |
+
.removeClass(this.options.hoveringClass);
|
|
|
582 |
|
583 |
+
this.mouseentered = false;
|
584 |
+
if (this.hovering) {
|
585 |
+
window.clearTimeout(this.hovering);
|
|
|
|
|
|
|
|
|
|
|
586 |
}
|
587 |
+
this.hovering = null;
|
588 |
|
589 |
+
this._relocate_event = event;
|
590 |
+
this._pid_current = $(this.domPosition.parent).parent().attr("id");
|
591 |
+
this._sort_current = this.domPosition.prev ? $(this.domPosition.prev).next().index() : 0;
|
592 |
+
$.ui.sortable.prototype._mouseStop.apply(this, arguments); //asybnchronous execution, @see _clear for the relocate event.
|
593 |
},
|
594 |
|
595 |
+
// mjs - this function is slightly modified
|
596 |
+
// to make it easier to hover over a collapsed element and have it expand
|
597 |
_intersectsWithSides: function(item) {
|
598 |
|
599 |
+
var half = this.options.isTree ? .8 : .5,
|
600 |
+
isOverBottomHalf = isOverAxis(
|
601 |
+
this.positionAbs.top + this.offset.click.top,
|
602 |
+
item.top + (item.height * half),
|
603 |
+
item.height
|
604 |
+
),
|
605 |
+
isOverTopHalf = isOverAxis(
|
606 |
+
this.positionAbs.top + this.offset.click.top,
|
607 |
+
item.top - (item.height * half),
|
608 |
+
item.height
|
609 |
+
),
|
610 |
+
isOverRightHalf = isOverAxis(
|
611 |
+
this.positionAbs.left + this.offset.click.left,
|
612 |
+
item.left + (item.width / 2),
|
613 |
+
item.width
|
614 |
+
),
|
615 |
verticalDirection = this._getDragVerticalDirection(),
|
616 |
horizontalDirection = this._getDragHorizontalDirection();
|
617 |
|
618 |
if (this.floating && horizontalDirection) {
|
619 |
+
return (
|
620 |
+
(horizontalDirection === "right" && isOverRightHalf) ||
|
621 |
+
(horizontalDirection === "left" && !isOverRightHalf)
|
622 |
+
);
|
623 |
} else {
|
624 |
+
return verticalDirection && (
|
625 |
+
(verticalDirection === "down" && isOverBottomHalf) ||
|
626 |
+
(verticalDirection === "up" && isOverTopHalf)
|
627 |
+
);
|
628 |
}
|
629 |
|
630 |
},
|
631 |
|
632 |
+
_contactContainers: function() {
|
633 |
|
634 |
+
if (this.options.protectRoot && this.currentItem[0].parentNode === this.element[0] ) {
|
635 |
return;
|
636 |
}
|
637 |
|
639 |
|
640 |
},
|
641 |
|
642 |
+
_clear: function() {
|
643 |
+
var i,
|
644 |
+
item;
|
645 |
|
646 |
$.ui.sortable.prototype._clear.apply(this, arguments);
|
647 |
|
648 |
+
//relocate event
|
649 |
+
if (!(this._pid_current === this._uiHash().item.parent().parent().attr("id") &&
|
650 |
+
this._sort_current === this._uiHash().item.index())) {
|
651 |
+
this._trigger("relocate", this._relocate_event, this._uiHash());
|
652 |
+
}
|
653 |
+
|
654 |
// mjs - clean last empty ul/ol
|
655 |
+
for (i = this.items.length - 1; i >= 0; i--) {
|
656 |
+
item = this.items[i].item[0];
|
657 |
this._clearEmpty(item);
|
658 |
}
|
659 |
|
663 |
|
664 |
var o = $.extend({}, this.options, options),
|
665 |
items = this._getItemsAsjQuery(o && o.connected),
|
666 |
+
str = [];
|
667 |
|
668 |
$(items).each(function() {
|
669 |
+
var res = ($(o.item || this).attr(o.attribute || "id") || "")
|
670 |
.match(o.expression || (/(.+)[-=_](.+)/)),
|
671 |
+
pid = ($(o.item || this).parent(o.listType)
|
672 |
.parent(o.items)
|
673 |
+
.attr(o.attribute || "id") || "")
|
674 |
.match(o.expression || (/(.+)[-=_](.+)/));
|
675 |
|
676 |
if (res) {
|
677 |
+
str.push(
|
678 |
+
(
|
679 |
+
(o.key || res[1]) +
|
680 |
+
"[" +
|
681 |
+
(o.key && o.expression ? res[1] : res[2]) + "]"
|
682 |
+
) +
|
683 |
+
"=" +
|
684 |
+
(pid ? (o.key && o.expression ? pid[1] : pid[2]) : o.rootID));
|
685 |
}
|
686 |
});
|
687 |
|
688 |
+
if (!str.length && o.key) {
|
689 |
+
str.push(o.key + "=");
|
690 |
}
|
691 |
|
692 |
+
return str.join("&");
|
693 |
|
694 |
},
|
695 |
|
696 |
toHierarchy: function(options) {
|
697 |
|
698 |
var o = $.extend({}, this.options, options),
|
699 |
+
ret = [];
|
|
|
700 |
|
701 |
+
$(this.element).children(o.items).each(function() {
|
702 |
var level = _recursiveItems(this);
|
703 |
ret.push(level);
|
704 |
});
|
706 |
return ret;
|
707 |
|
708 |
function _recursiveItems(item) {
|
709 |
+
var id = ($(item).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[-=_](.+)/)),
|
710 |
+
currentItem;
|
711 |
if (id) {
|
712 |
+
currentItem = {
|
713 |
+
"id": id[2]
|
714 |
+
};
|
715 |
+
|
716 |
if ($(item).children(o.listType).children(o.items).length > 0) {
|
717 |
currentItem.children = [];
|
718 |
$(item).children(o.listType).children(o.items).each(function() {
|
729 |
|
730 |
var o = $.extend({}, this.options, options),
|
731 |
sDepth = o.startDepthCount || 0,
|
732 |
+
ret = [],
|
733 |
+
left = 1;
|
734 |
|
735 |
if (!o.excludeRoot) {
|
736 |
ret.push({
|
740 |
"left": left,
|
741 |
"right": ($(o.items, this.element).length + 1) * 2
|
742 |
});
|
743 |
+
left++;
|
744 |
}
|
745 |
|
746 |
+
$(this.element).children(o.items).each(function() {
|
747 |
left = _recursiveArray(this, sDepth + 1, left);
|
748 |
});
|
749 |
|
750 |
+
ret = ret.sort(function(a, b) { return (a.left - b.left); });
|
751 |
|
752 |
return ret;
|
753 |
|
754 |
+
function _recursiveArray(item, depth, _left) {
|
755 |
|
756 |
+
var right = _left + 1,
|
757 |
+
id,
|
758 |
+
pid,
|
759 |
+
parentItem;
|
760 |
|
761 |
if ($(item).children(o.listType).children(o.items).length > 0) {
|
762 |
+
depth++;
|
763 |
+
$(item).children(o.listType).children(o.items).each(function() {
|
764 |
right = _recursiveArray($(this), depth, right);
|
765 |
});
|
766 |
+
depth--;
|
767 |
}
|
768 |
|
769 |
+
id = ($(item).attr(o.attribute || "id")).match(o.expression || (/(.+)[-=_](.+)/));
|
770 |
|
771 |
if (depth === sDepth + 1) {
|
772 |
pid = o.rootID;
|
773 |
} else {
|
774 |
+
parentItem = ($(item).parent(o.listType)
|
775 |
+
.parent(o.items)
|
776 |
+
.attr(o.attribute || "id"))
|
777 |
+
.match(o.expression || (/(.+)[-=_](.+)/));
|
778 |
pid = parentItem[2];
|
779 |
}
|
780 |
|
781 |
if (id) {
|
782 |
+
ret.push({
|
783 |
+
"item_id": id[2],
|
784 |
+
"parent_id": pid,
|
785 |
+
"depth": depth,
|
786 |
+
"left": _left,
|
787 |
+
"right": right
|
788 |
+
});
|
789 |
}
|
790 |
|
791 |
+
_left = right + 1;
|
792 |
+
return _left;
|
793 |
}
|
794 |
|
795 |
},
|
796 |
|
797 |
+
_clearEmpty: function (item) {
|
798 |
+
function replaceClass(elem, search, replace, swap) {
|
799 |
+
if (swap) {
|
800 |
+
search = [replace, replace = search][0];
|
801 |
+
}
|
802 |
|
803 |
+
$(elem).removeClass(search).addClass(replace);
|
804 |
+
}
|
805 |
+
|
806 |
+
var o = this.options,
|
807 |
+
childrenList = $(item).children(o.listType),
|
808 |
+
hasChildren = childrenList.is(':not(:empty)');
|
809 |
+
|
810 |
+
var doNotClear =
|
811 |
+
o.doNotClear ||
|
812 |
+
hasChildren ||
|
813 |
+
o.protectRoot && $(item)[0] === this.element[0];
|
814 |
|
815 |
+
if (o.isTree) {
|
816 |
+
replaceClass(item, o.branchClass, o.leafClass, doNotClear);
|
817 |
+
|
818 |
+
if (doNotClear && hasChildren) {
|
819 |
+
replaceClass(item, o.collapsedClass, o.expandedClass);
|
820 |
+
}
|
|
|
821 |
}
|
822 |
|
823 |
+
if (!doNotClear) {
|
824 |
+
childrenList.remove();
|
825 |
+
}
|
826 |
},
|
827 |
|
828 |
_getLevel: function(item) {
|
829 |
|
830 |
+
var level = 1,
|
831 |
+
list;
|
832 |
|
833 |
if (this.options.listType) {
|
834 |
+
list = item.closest(this.options.listType);
|
835 |
+
while (list && list.length > 0 && !list.is(".ui-sortable")) {
|
|
|
836 |
level++;
|
837 |
list = list.parent().closest(this.options.listType);
|
838 |
}
|
843 |
|
844 |
_getChildLevels: function(parent, depth) {
|
845 |
var self = this,
|
846 |
+
o = this.options,
|
847 |
+
result = 0;
|
848 |
depth = depth || 0;
|
849 |
|
850 |
+
$(parent).children(o.listType).children(o.items).each(function(index, child) {
|
851 |
+
result = Math.max(self._getChildLevels(child, depth + 1), result);
|
852 |
});
|
853 |
|
854 |
return depth ? result + 1 : result;
|
856 |
|
857 |
_isAllowed: function(parentItem, level, levels) {
|
858 |
var o = this.options,
|
859 |
+
// this takes into account the maxLevels set to the recipient list
|
860 |
+
maxLevels = this
|
861 |
+
.placeholder
|
862 |
+
.closest(".ui-sortable")
|
863 |
+
.nestedSortable("option", "maxLevels"),
|
864 |
+
|
865 |
+
// Check if the parent has changed to prevent it, when o.disableParentChange is true
|
866 |
+
oldParent = this.currentItem.parent().parent(),
|
867 |
+
disabledByParentchange = o.disableParentChange && (
|
868 |
+
//From somewhere to somewhere else, except the root
|
869 |
+
typeof parentItem !== 'undefined' && !oldParent.is(parentItem) ||
|
870 |
+
typeof parentItem === 'undefined' && oldParent.is("li") //From somewhere to the root
|
871 |
+
);
|
872 |
// mjs - is the root protected?
|
873 |
// mjs - are we nesting too deep?
|
874 |
+
if (
|
875 |
+
disabledByParentchange ||
|
876 |
+
!o.isAllowed(this.placeholder, parentItem, this.currentItem)
|
877 |
+
) {
|
878 |
+
this.placeholder.addClass(o.errorClass);
|
879 |
+
if (maxLevels < levels && maxLevels !== 0) {
|
880 |
+
this.beyondMaxLevels = levels - maxLevels;
|
881 |
+
} else {
|
882 |
+
this.beyondMaxLevels = 1;
|
883 |
+
}
|
884 |
} else {
|
885 |
+
if (maxLevels < levels && maxLevels !== 0) {
|
886 |
this.placeholder.addClass(o.errorClass);
|
887 |
this.beyondMaxLevels = levels - maxLevels;
|
888 |
} else {
|
894 |
|
895 |
}));
|
896 |
|
897 |
+
$.mjs.nestedSortable.prototype.options = $.extend(
|
898 |
+
{},
|
899 |
+
$.ui.sortable.prototype.options,
|
900 |
+
$.mjs.nestedSortable.prototype.options
|
901 |
+
);
|
902 |
}));
|
assets/js/lib/nestedpages-factory.js
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Primary Nested Pages Initialization
|
3 |
+
* @package Nested Pages
|
4 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
5 |
+
*/
|
6 |
+
|
7 |
+
jQuery(document).ready(function(){
|
8 |
+
new NestedPages.Factory;
|
9 |
+
});
|
10 |
+
|
11 |
+
var NestedPages = NestedPages || {};
|
12 |
+
|
13 |
+
|
14 |
+
// DOM Selectors
|
15 |
+
NestedPages.selectors = {
|
16 |
+
childToggle : '.child-toggle', // Child Toggle Buttons
|
17 |
+
childToggleLink : '.child-toggle a', // Actual link in button
|
18 |
+
toggleAll : '.nestedpages-toggleall', // Toggle All Button
|
19 |
+
toggleHidden : '.np-toggle-hidden', // Toggle Hidden Pages
|
20 |
+
toggleStatus : '.np-toggle-publish', // Toggle Published Pages
|
21 |
+
lists : '.nplist', // OL elements
|
22 |
+
rows : '.page-row', // Page Row,
|
23 |
+
row : '.row', // Inner row div element
|
24 |
+
sortable : '.sortable', // Sortable List
|
25 |
+
notSortable : '.no-sort', // Unsortable List
|
26 |
+
handle : '.handle', // Sortable Handle
|
27 |
+
published : '.published', // Published Rows
|
28 |
+
hiddenRows : '.np-hide', // Hidden Rows
|
29 |
+
errorDiv : '#np-error', // Error Alert
|
30 |
+
loadingIndicator : '#nested-loading', // Loading Indicator,
|
31 |
+
syncCheckbox : '.np-sync-menu', // Sync menu checkbox
|
32 |
+
|
33 |
+
// Responsive Toggle
|
34 |
+
toggleEditButtons : '.np-toggle-edit', // Button that toggles responsive buttons
|
35 |
+
|
36 |
+
// Quick Edit
|
37 |
+
quickEditOverlay : '.np-inline-overlay', // The inline modal
|
38 |
+
quickEditLoadingIndicator : '.np-qe-loading', // Loading indicator in Quick Edit
|
39 |
+
quickEditErrorDiv : '.np-quickedit-error', // Error Div in Quick Edit
|
40 |
+
quickEditCancel : '.np-cancel-quickedit', // Cancel button in quick edit
|
41 |
+
quickEditToggleTaxonomies : '.np-toggle-taxonomies', // Toggle Taxonomies in Quick Edit
|
42 |
+
quickEditToggleMenuOptions : '.np-toggle-menuoptions', // Toggle Menu Options in Quick Edit
|
43 |
+
|
44 |
+
// Quick Edit - Links
|
45 |
+
quickEditButtonLink : '.np-quick-edit-redirect', // Button to open link quick edit
|
46 |
+
quickEditLinkForm : '.quick-edit-form-redirect', // Form for link quick edits
|
47 |
+
quickEditLinkSaveButton : '.np-save-quickedit-redirect', // Save button in link quick edit form
|
48 |
+
|
49 |
+
// Quick Edit - Posts
|
50 |
+
quickEditOpen : '.np-quick-edit', // Button to open post quick edit
|
51 |
+
quickEditPostForm : '.quick-edit-form', // Form container
|
52 |
+
quickEditSaveButton : '.np-save-quickedit', // Save button in quick edit (posts)
|
53 |
+
|
54 |
+
// Link Items
|
55 |
+
openLinkModal : '.open-redirect-modal', // Opens new link modal
|
56 |
+
linkModal : '#np-link-modal', // The add a link modal
|
57 |
+
saveLink : '.np-save-link', // Save Link Button
|
58 |
+
linkLoadingIndicator : '.np-link-loading', // Loading Indicator in Link Modal
|
59 |
+
linkErrorDiv : '.np-new-link-error', // Error Div in Link Modal
|
60 |
+
linkForm : '.np-new-link-form', // The form element for a new link
|
61 |
+
|
62 |
+
// New Page Items
|
63 |
+
openPageModal : '.open-bulk-modal', // Opens the new page(s) modal
|
64 |
+
newPageModal : '#np-bulk-modal', // The modal with the new page form
|
65 |
+
newPageFormContainer : '.new-child-form', // The new page form container
|
66 |
+
newPageForm : '.np-new-child-form', // The form element
|
67 |
+
newPageSubmitButton : '.np-save-newchild', // Submit button in new page form
|
68 |
+
newPageTitle : '.add-new-child-row', // Button to add a new page title field to the form
|
69 |
+
newPageRemoveTitle : '.np-remove-child', // Button to remove a title field in the form
|
70 |
+
addChildButton : '.add-new-child', // Button to add child page(s)
|
71 |
+
newChildError : '.np-newchild-error', // Error div in new child quick edit
|
72 |
+
cancelNewChildButton : '.np-cancel-newchild', // Cancel button in new child quick edit
|
73 |
+
|
74 |
+
// Clone
|
75 |
+
cloneButton : '.clone-post', // Button to clone a post
|
76 |
+
confirmClone : '[data-confirm-clone]', // Button in modal to confirm clone
|
77 |
+
cloneModal : '#np-clone-modal', // Modal with clone options
|
78 |
+
cloneQuantity : '[data-clone-quantity]', // Quantity to Clone
|
79 |
+
cloneStatus : '[data-clone-status]', // Clone Status
|
80 |
+
cloneAuthor : '[data-clone-author]', // Clone Author
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
// CSS Classes
|
85 |
+
NestedPages.cssClasses = {
|
86 |
+
iconToggleDown : 'np-icon-arrow-down',
|
87 |
+
iconToggleRight : 'np-icon-arrow-right',
|
88 |
+
noborder : 'no-border'
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
// JS Data
|
93 |
+
NestedPages.jsData = {
|
94 |
+
ajaxurl : ajaxurl,
|
95 |
+
nonce : nestedpages.np_nonce,
|
96 |
+
allPostTypes : nestedpages.post_types, // Localized data with all post types
|
97 |
+
posttype : '', // current Screen's post type
|
98 |
+
nestable : true, // boolean - whether post type is nestable
|
99 |
+
hierarchical : true, // boolean - whether post type is hierarchical
|
100 |
+
expandText : nestedpages.expand_text, // Expand all button text
|
101 |
+
collapseText : nestedpages.collapse_text, // Collapse all button text
|
102 |
+
showHiddenText : nestedpages.show_hidden, // Show Hidden Pages Link Text
|
103 |
+
hideHiddenText : nestedpages.hide_hidden, // Hide Hidden Pages Link Text
|
104 |
+
quickEditText : nestedpages.quick_edit, // Quick Edit Button Text
|
105 |
+
hiddenText : nestedpages.hidden, // Localized "Hidden"
|
106 |
+
titleText : nestedpages.title, // Localized "Title"
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
+
// Form Actions
|
111 |
+
NestedPages.formActions = {
|
112 |
+
syncToggles : 'npnestToggle',
|
113 |
+
syncNesting : 'npsort',
|
114 |
+
syncMenu : 'npsyncMenu',
|
115 |
+
newLink : 'npnewLink',
|
116 |
+
newPage : 'npnewChild',
|
117 |
+
quickEditLink : 'npquickEditLink',
|
118 |
+
getTaxonomies : 'npgetTaxonomies',
|
119 |
+
quickEditPost : 'npquickEdit',
|
120 |
+
clonePost : 'npclonePost'
|
121 |
+
}
|
122 |
+
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Primary Nested Pages Class
|
126 |
+
*/
|
127 |
+
NestedPages.Factory = function()
|
128 |
+
{
|
129 |
+
var plugin = this;
|
130 |
+
var $ = jQuery;
|
131 |
+
|
132 |
+
plugin.formatter = new NestedPages.Formatter;
|
133 |
+
plugin.responsive = new NestedPages.Responsive;
|
134 |
+
plugin.menuToggle = new NestedPages.MenuToggle;
|
135 |
+
plugin.pageToggle = new NestedPages.PageToggle;
|
136 |
+
plugin.nesting = new NestedPages.Nesting;
|
137 |
+
plugin.syncMenuSetting = new NestedPages.SyncMenuSetting;
|
138 |
+
plugin.newLink = new NestedPages.NewLink;
|
139 |
+
plugin.newPage = new NestedPages.NewPage;
|
140 |
+
plugin.quickEditLink = new NestedPages.QuickEditLink;
|
141 |
+
plugin.quickEditPost = new NestedPages.QuickEditPost;
|
142 |
+
plugin.clone = new NestedPages.Clone;
|
143 |
+
|
144 |
+
plugin.init = function()
|
145 |
+
{
|
146 |
+
plugin.bindEvents();
|
147 |
+
plugin.setPostType();
|
148 |
+
plugin.setNestable();
|
149 |
+
plugin.formatter.updateSubMenuToggle();
|
150 |
+
plugin.formatter.setBorders();
|
151 |
+
plugin.formatter.setNestedMargins();
|
152 |
+
plugin.nesting.initializeSortable();
|
153 |
+
}
|
154 |
+
|
155 |
+
|
156 |
+
plugin.bindEvents = function()
|
157 |
+
{
|
158 |
+
$(document).on('click', NestedPages.selectors.quickEditOverlay, function(e){
|
159 |
+
plugin.formatter.removeQuickEdit();
|
160 |
+
plugin.newPage.cancelNewPage();
|
161 |
+
});
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
// Set whether or not post type is nestable
|
166 |
+
plugin.setNestable = function()
|
167 |
+
{
|
168 |
+
var nestable = true;
|
169 |
+
$.each(NestedPages.jsData.allPostTypes, function(i, v){
|
170 |
+
if ( v.name !== NestedPages.jsData.posttype ) return;
|
171 |
+
if ( v.hierarchical === true ) nestable = true;
|
172 |
+
if ( v.disable_nesting === true ) nestable = false;
|
173 |
+
});
|
174 |
+
NestedPages.jsData.nestable = nestable;
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
+
// Set the Screen's Post Type
|
179 |
+
plugin.setPostType = function()
|
180 |
+
{
|
181 |
+
NestedPages.jsData.posttype = $(NestedPages.selectors.sortable).attr('id').substring(3);
|
182 |
+
NestedPages.jsData.hierarchical = NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical;
|
183 |
+
}
|
184 |
+
|
185 |
+
|
186 |
+
return plugin.init();
|
187 |
+
}
|
assets/js/lib/{nestedpages.js → nestedpages-old.js}
RENAMED
@@ -1560,53 +1560,4 @@ jQuery(function($){
|
|
1560 |
|
1561 |
|
1562 |
|
1563 |
-
|
1564 |
-
|
1565 |
-
/**
|
1566 |
-
* ------------------------------------------------------------------------
|
1567 |
-
* Empty Trash
|
1568 |
-
* ------------------------------------------------------------------------
|
1569 |
-
**/
|
1570 |
-
$('.np-empty-trash').on('click', function(e){
|
1571 |
-
e.preventDefault();
|
1572 |
-
$('#np-trash-modal').modal('show');
|
1573 |
-
});
|
1574 |
-
|
1575 |
-
// Confirm
|
1576 |
-
$('.np-trash-confirm').on('click', function(e){
|
1577 |
-
e.preventDefault();
|
1578 |
-
$('#np-trash-modal').hide();
|
1579 |
-
$('#nested-loading').show();
|
1580 |
-
$('#np-error').hide();
|
1581 |
-
empty_trash();
|
1582 |
-
});
|
1583 |
-
|
1584 |
-
/**
|
1585 |
-
* Empty the trash
|
1586 |
-
*/
|
1587 |
-
function empty_trash()
|
1588 |
-
{
|
1589 |
-
var posttype = $('#np-trash-posttype').val();
|
1590 |
-
$.ajax({
|
1591 |
-
url: ajaxurl,
|
1592 |
-
type: 'post',
|
1593 |
-
datatype: 'json',
|
1594 |
-
data: {
|
1595 |
-
action : 'npEmptyTrash',
|
1596 |
-
nonce : nestedpages.np_nonce,
|
1597 |
-
posttype : posttype
|
1598 |
-
},
|
1599 |
-
success: function(data){
|
1600 |
-
$('#nested-loading').hide();
|
1601 |
-
if (data.status === 'error'){
|
1602 |
-
$('#np-error').text(data.message).show();
|
1603 |
-
} else {
|
1604 |
-
$('.np-trash-links').hide();
|
1605 |
-
}
|
1606 |
-
}
|
1607 |
-
});
|
1608 |
-
}
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
}); //$
|
1560 |
|
1561 |
|
1562 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1563 |
}); //$
|
assets/js/lib/nestedpages-responsive.js
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Responsive functionality for nested view
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.Responsive = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.init = function()
|
14 |
+
{
|
15 |
+
plugin.bindEvents();
|
16 |
+
}
|
17 |
+
|
18 |
+
plugin.bindEvents = function()
|
19 |
+
{
|
20 |
+
$(document).on('click', NestedPages.selectors.toggleEditButtons, function(e){
|
21 |
+
e.preventDefault();
|
22 |
+
plugin.toggleEdit($(this));
|
23 |
+
});
|
24 |
+
// Remove the block display when sizing up
|
25 |
+
$(window).resize(function() {
|
26 |
+
plugin.timer(function(){
|
27 |
+
$('.action-buttons').removeAttr('style');
|
28 |
+
$('.np-toggle-edit').removeClass('active');
|
29 |
+
}, 500);
|
30 |
+
});
|
31 |
+
}
|
32 |
+
|
33 |
+
// Toggle the responsive edit buttons
|
34 |
+
plugin.toggleEdit = function(button)
|
35 |
+
{
|
36 |
+
var buttons = $(button).siblings('.action-buttons');
|
37 |
+
if ( $(buttons).is(':visible') ){
|
38 |
+
$(button).removeClass('active');
|
39 |
+
$(buttons).hide();
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
$(button).addClass('active');
|
43 |
+
$(buttons).show();
|
44 |
+
}
|
45 |
+
|
46 |
+
plugin.timer = (function(){
|
47 |
+
var timer = 0;
|
48 |
+
return function(callback, ms){
|
49 |
+
clearTimeout (timer);
|
50 |
+
timer = setTimeout(callback, ms);
|
51 |
+
};
|
52 |
+
})();
|
53 |
+
|
54 |
+
return plugin.init();
|
55 |
+
}
|
assets/js/lib/nestedpages.clone.js
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Post clone functionality
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.Clone = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.parent_id = ''; // The parent/source post ID
|
14 |
+
plugin.parent_title = ''; // The parent title
|
15 |
+
plugin.parentLi = null;
|
16 |
+
|
17 |
+
plugin.formatter = new NestedPages.Formatter;
|
18 |
+
|
19 |
+
plugin.init = function()
|
20 |
+
{
|
21 |
+
plugin.bindEvents();
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
plugin.bindEvents = function()
|
26 |
+
{
|
27 |
+
$(document).on('click', NestedPages.selectors.cloneButton, function(e){
|
28 |
+
e.preventDefault();
|
29 |
+
plugin.parent_id = $(this).attr('data-id');
|
30 |
+
plugin.parent_title = $(this).attr('data-parentname');
|
31 |
+
plugin.parentLi = $(this).parent('.row').parent('.page-row').parent('.npList');
|
32 |
+
plugin.openModal();
|
33 |
+
});
|
34 |
+
$(document).on('click', NestedPages.selectors.confirmClone, function(e){
|
35 |
+
e.preventDefault();
|
36 |
+
plugin.clone();
|
37 |
+
});
|
38 |
+
}
|
39 |
+
|
40 |
+
// Open the modal with clone options
|
41 |
+
plugin.openModal = function()
|
42 |
+
{
|
43 |
+
$(NestedPages.selectors.cloneModal).find('[data-clone-parent]').text(plugin.parent_title);
|
44 |
+
$(NestedPages.selectors.cloneModal).modal('show');
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
// Clone the post
|
49 |
+
plugin.clone = function()
|
50 |
+
{
|
51 |
+
plugin.toggleLoading(true);
|
52 |
+
$.ajax({
|
53 |
+
url : NestedPages.jsData.ajaxurl,
|
54 |
+
type : 'post',
|
55 |
+
data : {
|
56 |
+
action : NestedPages.formActions.clonePost,
|
57 |
+
parent_id : plugin.parent_id,
|
58 |
+
quantity : $(NestedPages.selectors.cloneQuantity).val(),
|
59 |
+
status : $(NestedPages.selectors.cloneStatus).val(),
|
60 |
+
author : $(NestedPages.selectors.cloneAuthor).find('select').val(),
|
61 |
+
nonce : NestedPages.jsData.nonce,
|
62 |
+
posttype : NestedPages.jsData.posttype
|
63 |
+
},
|
64 |
+
success : function(data){
|
65 |
+
plugin.toggleLoading(false);
|
66 |
+
$(NestedPages.selectors.cloneModal).modal('hide');
|
67 |
+
location.reload();
|
68 |
+
}
|
69 |
+
});
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
+
// Toggle Loading
|
74 |
+
plugin.toggleLoading = function(loading)
|
75 |
+
{
|
76 |
+
if ( loading ){
|
77 |
+
$(NestedPages.selectors.cloneModal).find('[data-clone-loading]').show();
|
78 |
+
$(NestedPages.selectors.confirmClone).attr('disabled', 'disabled');
|
79 |
+
return;
|
80 |
+
}
|
81 |
+
$(NestedPages.selectors.cloneModal).find('[data-clone-loading]').hide();
|
82 |
+
$(NestedPages.selectors.confirmClone).attr('disabled', false);
|
83 |
+
}
|
84 |
+
|
85 |
+
return plugin.init();
|
86 |
+
}
|
assets/js/lib/nestedpages.formatter.js
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Formatting updates
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.Formatter = function()
|
9 |
+
{
|
10 |
+
|
11 |
+
var plugin = this;
|
12 |
+
var $ = jQuery;
|
13 |
+
|
14 |
+
|
15 |
+
// Update the Submenu Toggle Button State based on if the child menu is visible
|
16 |
+
plugin.updateSubMenuToggle = function()
|
17 |
+
{
|
18 |
+
var allButtons = $(NestedPages.selectors.childToggle);
|
19 |
+
for ( var i = 0; i < allButtons.length; i++ ){
|
20 |
+
var button = allButtons[i];
|
21 |
+
var row = $(button).parent('.row').parent('li');
|
22 |
+
if ( $(row).children('ol').length > 0 ){ // Row has a child menu
|
23 |
+
var icon = ( $(row).children('ol:visible').length > 0 )
|
24 |
+
? NestedPages.cssClasses.iconToggleDown
|
25 |
+
: NestedPages.cssClasses.iconToggleRight;
|
26 |
+
$(button).html('<a href="#"><i class="' + icon + '"></i></a>');
|
27 |
+
continue;
|
28 |
+
}
|
29 |
+
$(button).empty(); // No Child Menu
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
// Fix :visible :first css limitation when toggling various options
|
35 |
+
plugin.setBorders = function()
|
36 |
+
{
|
37 |
+
$(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder);
|
38 |
+
$.each($(NestedPages.selectors.lists), function(){
|
39 |
+
$(this).find('.page-row:visible:first').addClass(NestedPages.cssClasses.noborder);
|
40 |
+
});
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
// Adjust nested margins based on how deep the list is nested
|
45 |
+
plugin.setNestedMargins = function()
|
46 |
+
{
|
47 |
+
$.each($(NestedPages.selectors.lists), function(i, v){
|
48 |
+
var parent_count = $(this).parents(NestedPages.selectors.lists).length;
|
49 |
+
var padding = 56;
|
50 |
+
if ( parent_count > 0 ){
|
51 |
+
var padding = ( parent_count * 20 ) + padding;
|
52 |
+
$(this).find('.row-inner').css('padding-left', padding + 'px');
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
$(this).find('.row-inner').css('padding-left', '0px');
|
56 |
+
});
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
// Update the width of the placeholder ( width changes depending on level of nesting )
|
61 |
+
plugin.updatePlaceholderWidth = function(ui)
|
62 |
+
{
|
63 |
+
if ( NestedPages.jsData.nestable ){
|
64 |
+
var parentCount = $(ui.placeholder).parents('ol').length;
|
65 |
+
var listWidth = $(NestedPages.selectors.sortable).width();
|
66 |
+
var offset = ( parentCount * 40 ) - 40;
|
67 |
+
var newWidth = listWidth - offset;
|
68 |
+
$(ui.placeholder).width(newWidth).css('margin-left', offset + 'px');
|
69 |
+
}
|
70 |
+
plugin.updateListVisibility(ui);
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
// Update the list visibility on sort (prevent lists from collapsing when nesting)
|
75 |
+
plugin.updateListVisibility = function(ui)
|
76 |
+
{
|
77 |
+
var parentList = $(ui.placeholder).parent('ol');
|
78 |
+
if ( !$(parentList).is(':visible') ){
|
79 |
+
$(parentList).addClass('nplist');
|
80 |
+
$(parentList).show();
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
// Remove the Quick Edit Overlay
|
86 |
+
plugin.removeQuickEdit = function()
|
87 |
+
{
|
88 |
+
$(NestedPages.selectors.quickEditOverlay).removeClass('active').remove();
|
89 |
+
$('.sortable .quick-edit').remove();
|
90 |
+
$('.row').show();
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
// Show the Quick Edit Overlay
|
95 |
+
plugin.showQuickEdit = function()
|
96 |
+
{
|
97 |
+
$('body').append('<div class="np-inline-overlay"></div>');
|
98 |
+
setTimeout(function(){
|
99 |
+
$('.np-inline-overlay').addClass('active');
|
100 |
+
}, 50);
|
101 |
+
}
|
102 |
+
|
103 |
+
|
104 |
+
// Flash an updated row
|
105 |
+
plugin.flashRow = function(row)
|
106 |
+
{
|
107 |
+
$(row).addClass('np-updated');
|
108 |
+
plugin.setBorders();
|
109 |
+
setTimeout(function(){
|
110 |
+
$(row).addClass('np-updated-show');
|
111 |
+
}, 1500);
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
+
}
|
assets/js/lib/nestedpages.menu-toggle.js
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Toggles Menu Elements
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.MenuToggle = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.formatter = new NestedPages.Formatter;
|
14 |
+
|
15 |
+
plugin.bindEvents = function()
|
16 |
+
{
|
17 |
+
$(document).on('click', NestedPages.selectors.childToggleLink, function(e){
|
18 |
+
e.preventDefault();
|
19 |
+
plugin.toggleSingleMenu($(this));
|
20 |
+
});
|
21 |
+
$(document).on('click', NestedPages.selectors.toggleAll, function(e){
|
22 |
+
e.preventDefault();
|
23 |
+
plugin.toggleAllMenus();
|
24 |
+
});
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
// Toggle individual submenus
|
29 |
+
plugin.toggleSingleMenu = function(button)
|
30 |
+
{
|
31 |
+
var submenu = $(button).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings('ol');
|
32 |
+
$(button).find('i')
|
33 |
+
.toggleClass(NestedPages.cssClasses.iconToggleDown)
|
34 |
+
.toggleClass(NestedPages.cssClasses.iconToggleRight);
|
35 |
+
$(submenu).toggle();
|
36 |
+
plugin.formatter.setBorders();
|
37 |
+
plugin.formatter.setNestedMargins();
|
38 |
+
plugin.syncUserToggles();
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
// Toggle All Submenus
|
43 |
+
plugin.toggleAllMenus = function()
|
44 |
+
{
|
45 |
+
var button = NestedPages.selectors.toggleAll;
|
46 |
+
if ( $(button).attr('data-toggle') === 'closed' ){
|
47 |
+
$(NestedPages.selectors.lists).show();
|
48 |
+
$(button).attr('data-toggle', 'opened').text(NestedPages.jsData.collapseText);
|
49 |
+
$(NestedPages.selectors.childToggle).find('i').removeClass(NestedPages.cssClasses.iconToggleRight).addClass(NestedPages.cssClasses.iconToggleDown);
|
50 |
+
// revert_quick_edit();
|
51 |
+
plugin.formatter.setBorders();
|
52 |
+
plugin.syncUserToggles();
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
|
56 |
+
$(NestedPages.selectors.lists).not($(NestedPages.selectors.lists)[0]).hide();
|
57 |
+
$(button).attr('data-toggle', 'closed').text(NestedPages.jsData.expandText);
|
58 |
+
$(NestedPages.selectors.childToggle).find('i').removeClass(NestedPages.cssClasses.iconToggleDown).addClass(NestedPages.cssClasses.iconToggleRight);
|
59 |
+
// revert_quick_edit();
|
60 |
+
plugin.formatter.setBorders();
|
61 |
+
plugin.syncUserToggles();
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
// Get an array of visible rows
|
66 |
+
plugin.visibleRowIDs = function()
|
67 |
+
{
|
68 |
+
var visible_ids = [];
|
69 |
+
var visible = $(NestedPages.selectors.rows + ':visible');
|
70 |
+
$.each(visible, function(i, v){
|
71 |
+
var id = $(this).attr('id');
|
72 |
+
visible_ids.push(id.replace("menuItem_", ""));
|
73 |
+
});
|
74 |
+
return visible_ids;
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
// Save the user's toggled menus
|
79 |
+
plugin.syncUserToggles = function()
|
80 |
+
{
|
81 |
+
$.ajax({
|
82 |
+
url: NestedPages.jsData.ajaxurl,
|
83 |
+
type: 'post',
|
84 |
+
datatype: 'json',
|
85 |
+
data: {
|
86 |
+
action : NestedPages.formActions.syncToggles,
|
87 |
+
nonce : NestedPages.jsData.nonce,
|
88 |
+
ids : plugin.visibleRowIDs(),
|
89 |
+
posttype : NestedPages.jsData.posttype
|
90 |
+
},
|
91 |
+
success: function(data){
|
92 |
+
if ( data.status !== 'success' ){
|
93 |
+
console.log('There was an error saving toggled pages.');
|
94 |
+
}
|
95 |
+
}
|
96 |
+
});
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
return plugin.bindEvents();
|
101 |
+
}
|
assets/js/lib/nestedpages.nesting.js
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Enables and Saves Nesting
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.Nesting = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.formatter = new NestedPages.Formatter;
|
14 |
+
|
15 |
+
|
16 |
+
// Make the Menu sortable
|
17 |
+
plugin.initializeSortable = function()
|
18 |
+
{
|
19 |
+
maxLevels = ( NestedPages.jsData.nestable ) ? 0 : 1;
|
20 |
+
$(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({
|
21 |
+
items : NestedPages.selectors.rows,
|
22 |
+
toleranceElement: '> .row',
|
23 |
+
handle: NestedPages.selectors.handle,
|
24 |
+
placeholder: "ui-sortable-placeholder",
|
25 |
+
maxLevels: maxLevels,
|
26 |
+
tabSize : 56,
|
27 |
+
start: function(e, ui){
|
28 |
+
ui.placeholder.height(ui.item.height());
|
29 |
+
},
|
30 |
+
sort: function(e, ui){
|
31 |
+
plugin.formatter.updatePlaceholderWidth(ui);
|
32 |
+
},
|
33 |
+
stop: function(e, ui){
|
34 |
+
setTimeout(
|
35 |
+
function(){
|
36 |
+
plugin.formatter.updateSubMenuToggle();
|
37 |
+
plugin.formatter.setBorders();
|
38 |
+
plugin.formatter.setNestedMargins();
|
39 |
+
}, 100
|
40 |
+
);
|
41 |
+
plugin.syncNesting();
|
42 |
+
},
|
43 |
+
});
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
// Disable Nesting
|
48 |
+
plugin.disableNesting = function()
|
49 |
+
{
|
50 |
+
$(NestedPages.selectors.sortable).sortable('destroy');
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
// Sync Nesting
|
55 |
+
plugin.syncNesting = function()
|
56 |
+
{
|
57 |
+
$(NestedPages.selectors.errorDiv).hide();
|
58 |
+
$(NestedPages.selectors.loadingIndicator).show();
|
59 |
+
|
60 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
61 |
+
|
62 |
+
list = $(NestedPages.selectors.sortable).nestedSortable('toHierarchy', {startDepthCount: 0});
|
63 |
+
plugin.disableNesting();
|
64 |
+
|
65 |
+
$.ajax({
|
66 |
+
url: ajaxurl,
|
67 |
+
type: 'post',
|
68 |
+
datatype: 'json',
|
69 |
+
data: {
|
70 |
+
action : NestedPages.formActions.syncNesting,
|
71 |
+
nonce : NestedPages.jsData.nonce,
|
72 |
+
list : list,
|
73 |
+
post_type : NestedPages.jsData.posttype,
|
74 |
+
syncmenu : syncmenu
|
75 |
+
},
|
76 |
+
success: function(data){
|
77 |
+
plugin.initializeSortable();
|
78 |
+
if (data.status === 'error'){
|
79 |
+
$(NestedPages.selectors.errorDiv).text(data.message).show();
|
80 |
+
$(NestedPages.selectors.loadingIndicator).hide();
|
81 |
+
} else {
|
82 |
+
$(NestedPages.selectors.loadingIndicator).hide();
|
83 |
+
}
|
84 |
+
}
|
85 |
+
});
|
86 |
+
}
|
87 |
+
|
88 |
+
}
|
assets/js/lib/nestedpages.new-link.js
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add a new Link (top level and child)
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.NewLink = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.postParent = 0; // Parent Post ID
|
14 |
+
plugin.post = ''; // New Post Data
|
15 |
+
plugin.row = ''; // Newly Appended Row
|
16 |
+
|
17 |
+
plugin.formatter = new NestedPages.Formatter;
|
18 |
+
|
19 |
+
plugin.init = function()
|
20 |
+
{
|
21 |
+
plugin.bindEvents();
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
plugin.bindEvents = function()
|
26 |
+
{
|
27 |
+
$(document).on('click', NestedPages.selectors.openLinkModal, function(e){
|
28 |
+
e.preventDefault();
|
29 |
+
plugin.postParent = $(this).attr('data-parentid');
|
30 |
+
plugin.openModal();
|
31 |
+
});
|
32 |
+
$(document).on('click', NestedPages.selectors.saveLink, function(e){
|
33 |
+
e.preventDefault();
|
34 |
+
plugin.saveLink();
|
35 |
+
});
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
// Open the Modal and Clear/Populate hidden fields
|
40 |
+
plugin.openModal = function()
|
41 |
+
{
|
42 |
+
$(NestedPages.selectors.linkErrorDiv).hide();
|
43 |
+
$(NestedPages.selectors.linkModal).find('input').val('');
|
44 |
+
$(NestedPages.selectors.linkModal).find('.parent_id').val(plugin.postParent);
|
45 |
+
$(NestedPages.selectors.linkModal).modal('show');
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
// Toggle the loading state in the link modal
|
50 |
+
plugin.toggleLoading = function(loading)
|
51 |
+
{
|
52 |
+
if ( loading ){
|
53 |
+
$(NestedPages.selectors.linkErrorDiv).hide();
|
54 |
+
$(NestedPages.selectors.linkLoadingIndicator).show();
|
55 |
+
$(NestedPages.selectors.saveLink).attr('disabled', 'disabled');
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
$(NestedPages.selectors.linkLoadingIndicator).hide();
|
59 |
+
$(NestedPages.selectors.saveLink).attr('disabled', false);
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
// Save the link
|
64 |
+
plugin.saveLink = function()
|
65 |
+
{
|
66 |
+
plugin.toggleLoading(true);
|
67 |
+
var data = $(NestedPages.selectors.linkForm).serialize();
|
68 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
69 |
+
|
70 |
+
$.ajax({
|
71 |
+
url: NestedPages.jsData.ajaxurl,
|
72 |
+
type: 'POST',
|
73 |
+
datatype: 'json',
|
74 |
+
data: data + '&action=' + NestedPages.formActions.newLink + '&nonce=' + NestedPages.jsData.nonce + '&syncmenu=' + syncmenu + '&post_type=' + NestedPages.jsData.posttype,
|
75 |
+
success: function(data){
|
76 |
+
plugin.toggleLoading(false);
|
77 |
+
if (data.status === 'error'){
|
78 |
+
$(NestedPages.selectors.linkErrorDiv).text(data.message).show();
|
79 |
+
return;
|
80 |
+
}
|
81 |
+
plugin.post = data.post_data;
|
82 |
+
plugin.createRow();
|
83 |
+
}
|
84 |
+
});
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
// Create the nested pages row for the new link
|
89 |
+
plugin.createRow = function()
|
90 |
+
{
|
91 |
+
var html = '<li id="menuItem_' + plugin.post.id + '" class="page-row';
|
92 |
+
if ( plugin.post._status === 'publish' ) html += ' published';
|
93 |
+
html += '">'
|
94 |
+
|
95 |
+
html += '<div class="row"><div class="child-toggle"></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="' + plugin.post.np_link_content + '" class="page-link page-title" target="_blank"><span class="title">' + plugin.post.np_link_title + ' <i class="np-icon-link"></i></span>';
|
96 |
+
|
97 |
+
// Post Status
|
98 |
+
html += '<span class="status">';
|
99 |
+
if ( plugin.post._status !== 'publish' ) html += plugin.post._status;
|
100 |
+
html += '</span>';
|
101 |
+
|
102 |
+
// Nested Pages Status
|
103 |
+
if ( plugin.post.np_status === "hide" ) html += '<i class="np-icon-eye-blocked"></i>';
|
104 |
+
|
105 |
+
// Nav Menu Status
|
106 |
+
html += '<span class="nav-status">';
|
107 |
+
if ( plugin.post.nav_status === "hide" ) html += '(' + NestedPages.jsData.hiddenText + ')';
|
108 |
+
html += '</span>';
|
109 |
+
|
110 |
+
// Quick Edit Button
|
111 |
+
html += '</a><a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ';
|
112 |
+
html += 'data-id="' + plugin.post.id + '"';
|
113 |
+
html += 'data-parentid="' + plugin.post.parent_id + '"';
|
114 |
+
html += 'data-title="' + plugin.post.np_link_title + '" ';
|
115 |
+
html += 'data-url="' + plugin.post.np_link_content + '" ';
|
116 |
+
html += 'data-status="' + plugin.post._status + '" ';
|
117 |
+
html += 'data-np-status="' + plugin.post.np_status + '" ';
|
118 |
+
html += 'data-navstatus="' + plugin.post.nav_status + '" ';
|
119 |
+
html += 'data-linktarget="' + plugin.post.link_target + '">'
|
120 |
+
html += NestedPages.jsData.quickEditText;
|
121 |
+
html += '</a>';
|
122 |
+
|
123 |
+
// Delete Link
|
124 |
+
html += '<a href="' + plugin.post.delete_link + '" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>';
|
125 |
+
|
126 |
+
html += '</div></div></div></li>';
|
127 |
+
|
128 |
+
if ( plugin.post.parent_id === "0" ){
|
129 |
+
$('.nplist:first li:first').after(html);
|
130 |
+
} else {
|
131 |
+
plugin.appendChildRow(html);
|
132 |
+
}
|
133 |
+
|
134 |
+
$(NestedPages.selectors.linkModal).modal('hide');
|
135 |
+
|
136 |
+
plugin.row = $('#menuItem_' + plugin.post.id).find('.row');
|
137 |
+
plugin.formatter.flashRow(plugin.row);
|
138 |
+
}
|
139 |
+
|
140 |
+
|
141 |
+
// Append a new child link to the appropriate menu
|
142 |
+
plugin.appendChildRow = function(html)
|
143 |
+
{
|
144 |
+
var parent_row = $('#menuItem_' + plugin.post.parent_id);
|
145 |
+
if ( $(parent_row).children('ol').length === 0 ){
|
146 |
+
html = '<ol class="sortable nplist" style="display:block;">' + html + '</ol>';
|
147 |
+
$(parent_row).append(html);
|
148 |
+
} else {
|
149 |
+
$(parent_row).find('ol:first').prepend(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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add new page(s) - Top level & child
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.NewPage = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.formatter = new NestedPages.Formatter;
|
14 |
+
plugin.parent_id = 0; // Parent ID for the post(s) to add
|
15 |
+
plugin.posts = ''; // The newly added posts
|
16 |
+
plugin.form = ''; // The active form
|
17 |
+
|
18 |
+
|
19 |
+
plugin.init = function()
|
20 |
+
{
|
21 |
+
plugin.bindEvents();
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
plugin.bindEvents = function()
|
26 |
+
{
|
27 |
+
$(document).on('click', NestedPages.selectors.openPageModal, function(e){
|
28 |
+
e.preventDefault();
|
29 |
+
plugin.openModal();
|
30 |
+
});
|
31 |
+
$(document).on('submit', NestedPages.selectors.newPageForm, function(e){
|
32 |
+
e.preventDefault();
|
33 |
+
});
|
34 |
+
$(document).on('click', NestedPages.selectors.newPageSubmitButton, function(e){
|
35 |
+
e.preventDefault();
|
36 |
+
plugin.submitForm($(this));
|
37 |
+
});
|
38 |
+
$(document).on('click', NestedPages.selectors.newPageTitle, function(e){
|
39 |
+
e.preventDefault();
|
40 |
+
plugin.addTitleField($(this));
|
41 |
+
});
|
42 |
+
$(document).on('click', NestedPages.selectors.newPageRemoveTitle, function(e){
|
43 |
+
e.preventDefault();
|
44 |
+
plugin.removeTitleField($(this));
|
45 |
+
});
|
46 |
+
$(document).on('click', NestedPages.selectors.addChildButton, function(e){
|
47 |
+
e.preventDefault();
|
48 |
+
plugin.openQuickEdit($(this));
|
49 |
+
});
|
50 |
+
$(NestedPages.selectors.newPageModal).on('hide.bs.modal', function(){
|
51 |
+
plugin.cancelNewPage();
|
52 |
+
});
|
53 |
+
$(document).on('click', NestedPages.selectors.cancelNewChildButton, function(e){
|
54 |
+
e.preventDefault();
|
55 |
+
plugin.cancelNewPage();
|
56 |
+
$(NestedPages.selectors.newPageModal).modal('hide');
|
57 |
+
});
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
// Open the form modal
|
62 |
+
plugin.openModal = function()
|
63 |
+
{
|
64 |
+
var newform = $(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm).addClass('in-modal');
|
65 |
+
$(NestedPages.selectors.newPageModal).find('.modal-body').html(newform);
|
66 |
+
$(NestedPages.selectors.newPageModal).find('h3').text(nestedpages.add_multiple);
|
67 |
+
$(NestedPages.selectors.newPageModal).find('.page_parent_id').val(plugin.parent_id);
|
68 |
+
$(NestedPages.selectors.newPageModal).modal('show');
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
// Open the new child quick edit
|
73 |
+
plugin.openQuickEdit = function(button)
|
74 |
+
{
|
75 |
+
var parent_li = $(button).closest(NestedPages.selectors.row).parent('li');
|
76 |
+
var newform = $(NestedPages.selectors.newPageFormContainer).clone();
|
77 |
+
|
78 |
+
// Append the form to the list item
|
79 |
+
if ( $(parent_li).children('ol').length > 0 ){
|
80 |
+
var child_ol = $(parent_li).children('ol');
|
81 |
+
$(newform).insertBefore(child_ol);
|
82 |
+
} else {
|
83 |
+
$(newform).appendTo(parent_li);
|
84 |
+
}
|
85 |
+
|
86 |
+
$(newform).siblings(NestedPages.selectors.row).hide();
|
87 |
+
|
88 |
+
plugin.formatter.showQuickEdit();
|
89 |
+
|
90 |
+
$(newform).find('.parent_name').html('<em>Parent:</em> ' + $(button).attr('data-parentname'));
|
91 |
+
$(newform).find('.page_parent_id').val($(button).attr('data-id'));
|
92 |
+
$(newform).show();
|
93 |
+
}
|
94 |
+
|
95 |
+
|
96 |
+
// Close the form modal
|
97 |
+
plugin.cancelNewPage = function()
|
98 |
+
{
|
99 |
+
plugin.formatter.removeQuickEdit();
|
100 |
+
$(NestedPages.selectors.newChildError).hide();
|
101 |
+
$(NestedPages.selectors.newPageModal).find('.modal-body').empty();
|
102 |
+
$(NestedPages.selectors.sortable).find('.new-child').remove();
|
103 |
+
$(NestedPages.selectors.row).show();
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
+
// Add a page title field to the form
|
108 |
+
plugin.addTitleField = function(button)
|
109 |
+
{
|
110 |
+
var form = $(button).parents('form');
|
111 |
+
var html = '<li><i class="handle np-icon-menu"></i><div class="form-control new-child-row"><label>' + NestedPages.jsData.titleText + '</label><div><input type="text" name="post_title[]" class="np_title" placeholder="' + NestedPages.jsData.titleText + '" value="" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';
|
112 |
+
var container = $(button).siblings('.new-page-titles').append(html);
|
113 |
+
$('.new-page-titles').sortable({
|
114 |
+
items : 'li',
|
115 |
+
handle: '.handle',
|
116 |
+
});
|
117 |
+
}
|
118 |
+
|
119 |
+
|
120 |
+
// Remove a page title field
|
121 |
+
plugin.removeTitleField = function(button)
|
122 |
+
{
|
123 |
+
$(button).parents('.new-child-row').parent('li').remove();
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
// Submit the New Page Form
|
128 |
+
plugin.submitForm = function(button)
|
129 |
+
{
|
130 |
+
plugin.toggleLoading(true);
|
131 |
+
plugin.form = $(button).parents('form');
|
132 |
+
|
133 |
+
var addedit = ( $(button).hasClass('add-edit') ) ? true : false;
|
134 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
135 |
+
|
136 |
+
$.ajax({
|
137 |
+
url: NestedPages.jsData.ajaxurl,
|
138 |
+
type: 'post',
|
139 |
+
datatype: 'json',
|
140 |
+
data: $(plugin.form).serialize() + '&action=' + NestedPages.formActions.newPage + '&nonce=' + NestedPages.jsData.nonce + '&syncmenu=' + syncmenu + '&post_type=' + NestedPages.jsData.posttype,
|
141 |
+
success: function(data){
|
142 |
+
if (data.status === 'error'){
|
143 |
+
plugin.toggleLoading(false);
|
144 |
+
$(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text(data.message).show();
|
145 |
+
return;
|
146 |
+
}
|
147 |
+
if ( addedit === true ){ // Redirect to Edit Screen
|
148 |
+
var link = data.new_pages[0].edit_link;
|
149 |
+
link = link.replace(/&/g, '&');
|
150 |
+
window.location.replace(link);
|
151 |
+
return;
|
152 |
+
}
|
153 |
+
plugin.toggleLoading(false);
|
154 |
+
plugin.posts = data.new_pages;
|
155 |
+
plugin.addPosts();
|
156 |
+
},
|
157 |
+
error: function(){
|
158 |
+
plugin.toggleLoading(false);
|
159 |
+
$(form).find(NestedPages.selectors.quickEditErrorDiv).text('The form could not be saved at this time.').show();
|
160 |
+
}
|
161 |
+
});
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
// Add the new posts
|
166 |
+
plugin.addPosts = function()
|
167 |
+
{
|
168 |
+
var parent_li = $(plugin.form).parent('.new-child').parent('.page-row');
|
169 |
+
|
170 |
+
// If parent li doesn't have a child ol, add one
|
171 |
+
if ( $(parent_li).children('ol').length === 0 ){
|
172 |
+
$(parent_li).append('<ol class="nplist"></ol>');
|
173 |
+
}
|
174 |
+
|
175 |
+
if ( $(plugin.form).hasClass('in-modal') ){
|
176 |
+
var appendto = $('.nplist.sortable li.page-row:first');
|
177 |
+
} else {
|
178 |
+
var appendto = $(parent_li).children('ol');
|
179 |
+
}
|
180 |
+
|
181 |
+
for (i = 0; i < plugin.posts.length; i++){
|
182 |
+
plugin.appendRows(appendto, plugin.posts[i]);
|
183 |
+
}
|
184 |
+
|
185 |
+
// Show the child page list and reset submenu toggles
|
186 |
+
$(appendto).show();
|
187 |
+
plugin.formatter.updateSubMenuToggle();
|
188 |
+
plugin.cancelNewPage();
|
189 |
+
$(NestedPages.selectors.newPageModal).modal('hide');
|
190 |
+
}
|
191 |
+
|
192 |
+
|
193 |
+
// Append new post rows to the nested view
|
194 |
+
plugin.appendRows = function(appendto, post)
|
195 |
+
{
|
196 |
+
var html = '<li id="menuItem_' + post.id + '" class="page-row';
|
197 |
+
if ( post.status === 'publish' ) html += ' published';
|
198 |
+
html += '">';
|
199 |
+
|
200 |
+
if ( NestedPages.jsData.hierarchical ){
|
201 |
+
html += '<div class="row">';
|
202 |
+
html += '<div class="child-toggle"></div>';
|
203 |
+
} else {
|
204 |
+
html += '<div class="row non-hierarchical">';
|
205 |
+
}
|
206 |
+
|
207 |
+
html += '<div class="row-inner">';
|
208 |
+
html += '<i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i>';
|
209 |
+
html += '<a href="' + post.edit_link + '" class="page-link page-title">';
|
210 |
+
html += '<span class="title">' + post.title + '</span>';
|
211 |
+
|
212 |
+
// Status
|
213 |
+
if ( post.status !== 'Publish' ){
|
214 |
+
html += '<span class="status">(' + post.status + ')</span>';
|
215 |
+
} else {
|
216 |
+
html += '<span class="status"></span>';
|
217 |
+
}
|
218 |
+
|
219 |
+
html += '<span class="nav-status"></span><span class="edit-indicator"><i class="np-icon-pencil"></i>Edit</span>';
|
220 |
+
html += '</a>';
|
221 |
+
|
222 |
+
// Action Buttons
|
223 |
+
html += '<div class="action-buttons">';
|
224 |
+
html += '<a href="#" class="np-btn open-redirect-modal" data-parentid="' + post.id + '"><i class="np-icon-link"></i></a>';
|
225 |
+
html += '<a href="#" class="np-btn add-new-child" data-id="' + post.id + '" data-parentname="' + post.title + '">' + nestedpages.add_child_short + '</a>';
|
226 |
+
|
227 |
+
// Quick Edit (data attrs)
|
228 |
+
html += '<a href="#" class="np-btn np-quick-edit" data-id="' + post.id + '" data-template="' + post.page_template + '" data-title="' + post.title + '" data-slug="' + post.slug + '" data-commentstatus="closed" data-status="' + post.status.toLowerCase() + '" data-np-status="show" data-navstatus="show" data-author="' + post.author + '" data-template="' + post.template + '" data-month="' + post.month + '" data-day="' + post.day + '" data-year="' + post.year + '" data-hour="' + post.hour + '" data-minute="' + post.minute + '" data-datepicker="' + post.datepicker + '" data-time="' + post.time + '" data-formattedtime="' + post.formattedtime + '" data-ampm="' + post.ampm + '">' + nestedpages.quick_edit + '</a>';
|
229 |
+
|
230 |
+
html += '<a href="' + post.view_link + '" class="np-btn" target="_blank">' + nestedpages.view + '</a>';
|
231 |
+
html += '<a href="' + post.delete_link + '" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>';
|
232 |
+
html += '</div><!-- .action-buttons -->';
|
233 |
+
|
234 |
+
html += '</div><!-- .row-inner --></div><!-- .row -->';
|
235 |
+
html += '</li>';
|
236 |
+
|
237 |
+
$(appendto).append(html);
|
238 |
+
}
|
239 |
+
|
240 |
+
|
241 |
+
|
242 |
+
// Toggle the form loading state
|
243 |
+
plugin.toggleLoading = function(loading)
|
244 |
+
{
|
245 |
+
if ( loading ){
|
246 |
+
$(NestedPages.selectors.quickEditErrorDiv).hide();
|
247 |
+
$(NestedPages.selectors.newPageSubmitButton).attr('disabled', 'disabled');
|
248 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).show();
|
249 |
+
return;
|
250 |
+
}
|
251 |
+
$(NestedPages.selectors.newPageSubmitButton).attr('disabled', false);
|
252 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).hide();
|
253 |
+
}
|
254 |
+
|
255 |
+
|
256 |
+
|
257 |
+
return plugin.init();
|
258 |
+
}
|
assets/js/lib/nestedpages.page-toggle.js
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Toggle Page Rows
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.PageToggle = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.formatter = new NestedPages.Formatter;
|
14 |
+
|
15 |
+
plugin.init = function()
|
16 |
+
{
|
17 |
+
plugin.bindEvents();
|
18 |
+
}
|
19 |
+
|
20 |
+
plugin.bindEvents = function()
|
21 |
+
{
|
22 |
+
$(document).on('click', NestedPages.selectors.toggleHidden, function(e){
|
23 |
+
e.preventDefault();
|
24 |
+
plugin.toggleHidden();
|
25 |
+
});
|
26 |
+
$(document).on('click', NestedPages.selectors.toggleStatus, function(e){
|
27 |
+
e.preventDefault();
|
28 |
+
plugin.toggleStatus($(this));
|
29 |
+
});
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
// Toggle Hidden Pages
|
34 |
+
plugin.toggleHidden = function()
|
35 |
+
{
|
36 |
+
var button = NestedPages.selectors.toggleHidden;
|
37 |
+
var action = $(button).attr('href');
|
38 |
+
if ( action === 'show' ){
|
39 |
+
$(button).attr('href', 'hide').text(NestedPages.jsData.showHiddenText);
|
40 |
+
$(NestedPages.selectors.hiddenRows).removeClass('shown').hide();
|
41 |
+
plugin.formatter.setBorders();
|
42 |
+
return;
|
43 |
+
}
|
44 |
+
$(button).attr('href', 'show').text(NestedPages.jsData.hideHiddenText);
|
45 |
+
$(NestedPages.selectors.hiddenRows).addClass('shown').show();
|
46 |
+
plugin.formatter.setBorders();
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
// Toggle Pages based on status
|
51 |
+
plugin.toggleStatus = function(button)
|
52 |
+
{
|
53 |
+
var target = $(button).attr('href');
|
54 |
+
target = target.substring(1);
|
55 |
+
$(NestedPages.selectors.toggleStatus).removeClass('active');
|
56 |
+
$(button).addClass('active');
|
57 |
+
if ( target == 'all' ){
|
58 |
+
$(NestedPages.selectors.rows).show();
|
59 |
+
return;
|
60 |
+
}
|
61 |
+
$(NestedPages.selectors.rows).hide();
|
62 |
+
$('.' + target).show();
|
63 |
+
return;
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
+
return plugin.init();
|
69 |
+
|
70 |
+
}
|
assets/js/lib/nestedpages.quickedit-link.js
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Quick Edit functionality for links
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.QuickEditLink = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.formatter = new NestedPages.Formatter;
|
14 |
+
plugin.button = ''; // The Active Quick Edit Button
|
15 |
+
plugin.postData = ''; // Data for Post being edited (before update)
|
16 |
+
plugin.newPostData = ''; // Data after update
|
17 |
+
plugin.form = ''; // The newly created Quick Edit Form
|
18 |
+
|
19 |
+
|
20 |
+
plugin.init = function()
|
21 |
+
{
|
22 |
+
plugin.bindEvents();
|
23 |
+
}
|
24 |
+
|
25 |
+
|
26 |
+
plugin.bindEvents = function()
|
27 |
+
{
|
28 |
+
$(document).on('click', NestedPages.selectors.quickEditButtonLink, function(e){
|
29 |
+
e.preventDefault();
|
30 |
+
plugin.formatter.removeQuickEdit();
|
31 |
+
plugin.button = $(this);
|
32 |
+
plugin.openQuickEdit();
|
33 |
+
});
|
34 |
+
$(document).on('click', NestedPages.selectors.quickEditLinkSaveButton, function(e){
|
35 |
+
e.preventDefault();
|
36 |
+
plugin.submitForm();
|
37 |
+
});
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
// Open the Quick Edit Form
|
42 |
+
plugin.openQuickEdit = function()
|
43 |
+
{
|
44 |
+
plugin.setData();
|
45 |
+
plugin.createForm();
|
46 |
+
plugin.populateForm();
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
// Set the Quick Edit Data
|
51 |
+
plugin.setData = function()
|
52 |
+
{
|
53 |
+
plugin.postData = {
|
54 |
+
id : $(plugin.button).attr('data-id'),
|
55 |
+
url : $(plugin.button).attr('data-url'),
|
56 |
+
title : $(plugin.button).attr('data-title'),
|
57 |
+
status : $(plugin.button).attr('data-status'),
|
58 |
+
navstatus : $(plugin.button).attr('data-navstatus'),
|
59 |
+
npstatus : $(plugin.button).attr('data-np-status'),
|
60 |
+
linktarget : $(plugin.button).attr('data-linktarget'),
|
61 |
+
parentid : $(plugin.button).attr('data-parentid'),
|
62 |
+
navtitleattr : $(plugin.button).attr('data-navtitleattr'),
|
63 |
+
navcss : $(plugin.button).attr('data-navcss')
|
64 |
+
};
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
+
// Create the quick edit form
|
69 |
+
plugin.createForm = function()
|
70 |
+
{
|
71 |
+
var parent_li = $(plugin.button).closest(NestedPages.selectors.row).parent('li');
|
72 |
+
plugin.form = $(NestedPages.selectors.quickEditLinkForm).clone();
|
73 |
+
|
74 |
+
// Append the form to the list item
|
75 |
+
if ( $(parent_li).children('ol').length > 0 ){
|
76 |
+
var child_ol = $(parent_li).children('ol');
|
77 |
+
$(plugin.form).insertBefore(child_ol);
|
78 |
+
} else {
|
79 |
+
$(plugin.form).appendTo(parent_li);
|
80 |
+
}
|
81 |
+
|
82 |
+
var row = $(plugin.form).siblings(NestedPages.selectors.row).hide();
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
// Populate the Quick Edit form with the post data
|
87 |
+
plugin.populateForm = function()
|
88 |
+
{
|
89 |
+
$(plugin.form).find('.np_id').val(plugin.postData.id);
|
90 |
+
$(plugin.form).find('.np_title').val(plugin.postData.title);
|
91 |
+
$(plugin.form).find('.np_author select').val(plugin.postData.author);
|
92 |
+
$(plugin.form).find('.np_status').val(plugin.postData.status);
|
93 |
+
$(plugin.form).find('.np_content').val(plugin.postData.url);
|
94 |
+
$(plugin.form).find('.np_parent_id').val(plugin.postData.parentid);
|
95 |
+
$(plugin.form).find('.np_title_attribute').val(plugin.postData.navtitleattr);
|
96 |
+
$(plugin.form).find('.np_nav_css_classes').val(plugin.postData.navcss);
|
97 |
+
|
98 |
+
if ( plugin.postData.npstatus === 'hide' ){
|
99 |
+
$(plugin.form).find('.np_status').prop('checked', 'checked');
|
100 |
+
} else {
|
101 |
+
$(plugin.form).find('.np_status').removeAttr('checked');
|
102 |
+
}
|
103 |
+
|
104 |
+
if ( plugin.postData.navstatus === 'hide' ) {
|
105 |
+
$(plugin.form).find('.np_nav_status').prop('checked', 'checked');
|
106 |
+
} else {
|
107 |
+
$(plugin.form).find('.np_nav_status').removeAttr('checked');
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( plugin.postData.linktarget === "_blank" ) {
|
111 |
+
$(plugin.form).find('.link_target').prop('checked', 'checked');
|
112 |
+
} else {
|
113 |
+
$(plugin.form).find('.link_target').removeAttr('checked');
|
114 |
+
}
|
115 |
+
|
116 |
+
plugin.formatter.showQuickEdit();
|
117 |
+
$(plugin.form).show();
|
118 |
+
}
|
119 |
+
|
120 |
+
|
121 |
+
// Submit the form
|
122 |
+
plugin.submitForm = function()
|
123 |
+
{
|
124 |
+
plugin.toggleLoading(true);
|
125 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
126 |
+
|
127 |
+
$.ajax({
|
128 |
+
url: NestedPages.jsData.ajaxurl,
|
129 |
+
type: 'post',
|
130 |
+
datatype: 'json',
|
131 |
+
data: $(plugin.form).find('form').serialize() + '&action=' + NestedPages.formActions.quickEditLink + '&nonce=' + NestedPages.jsData.nonce + '&syncmenu=' + syncmenu + '&post_type=' + NestedPages.jsData.posttype,
|
132 |
+
success: function(data){
|
133 |
+
if (data.status === 'error'){
|
134 |
+
plugin.toggleLoading(false);
|
135 |
+
$(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text(data.message).show();
|
136 |
+
} else {
|
137 |
+
plugin.toggleLoading(false);
|
138 |
+
plugin.newPostData = data.post_data;
|
139 |
+
plugin.updateRow();
|
140 |
+
}
|
141 |
+
},
|
142 |
+
error: function(data){
|
143 |
+
plugin.toggleLoading(false);
|
144 |
+
$(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text('The form could not be saved at this time.').show();
|
145 |
+
}
|
146 |
+
});
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
// Update the row after successfully saving quick edit data
|
151 |
+
plugin.updateRow = function()
|
152 |
+
{
|
153 |
+
var row = $(plugin.form).siblings('.row');
|
154 |
+
$(row).find('.title').html(plugin.newPostData.post_title + ' <i class="np-icon-link"></i>');
|
155 |
+
|
156 |
+
var status = $(row).find('.status');
|
157 |
+
if ( (plugin.newPostData._status !== 'publish') && (data._status !== 'future') ){
|
158 |
+
$(status).text('(' + plugin.newPostData._status + ')');
|
159 |
+
} else {
|
160 |
+
$(status).text('');
|
161 |
+
}
|
162 |
+
|
163 |
+
// Hide / Show in Nav
|
164 |
+
var nav_status = $(row).find('.nav-status');
|
165 |
+
if ( (plugin.newPostData.nav_status == 'hide') ){
|
166 |
+
$(nav_status).text('(' + NestedPages.jsData.hiddenText + ')');
|
167 |
+
} else {
|
168 |
+
$(nav_status).text('');
|
169 |
+
}
|
170 |
+
|
171 |
+
// Hide / Show in Nested Pages
|
172 |
+
var li = $(row).parent('li');
|
173 |
+
if ( (plugin.newPostData.np_status == 'hide') ){
|
174 |
+
$(li).addClass('np-hide');
|
175 |
+
$(row).find('.status').after('<i class="np-icon-eye-blocked"></i>');
|
176 |
+
} else {
|
177 |
+
$(li).removeClass('np-hide');
|
178 |
+
$(row).find('.np-icon-eye-blocked').remove();
|
179 |
+
}
|
180 |
+
|
181 |
+
var button = $(row).find(NestedPages.selectors.quickEditButtonLink);
|
182 |
+
|
183 |
+
$(button).attr('data-id', plugin.newPostData.post_id);
|
184 |
+
$(button).attr('data-title', plugin.newPostData.post_title);
|
185 |
+
$(button).attr('data-url', plugin.newPostData.post_content);
|
186 |
+
$(button).attr('data-status', plugin.newPostData._status);
|
187 |
+
$(button).attr('data-navstatus', plugin.newPostData.nav_status);
|
188 |
+
$(button).attr('data-np-status', plugin.newPostData.np_status);
|
189 |
+
$(button).attr('data-linktarget', plugin.newPostData.link_target);
|
190 |
+
$(button).attr('data-navtitleattr', plugin.newPostData.np_title_attribute);
|
191 |
+
$(button).attr('data-navcss', plugin.newPostData.np_nav_css_classes);
|
192 |
+
|
193 |
+
plugin.formatter.removeQuickEdit();
|
194 |
+
plugin.formatter.flashRow(row);
|
195 |
+
}
|
196 |
+
|
197 |
+
|
198 |
+
// Toggle loading state in form
|
199 |
+
plugin.toggleLoading = function(loading)
|
200 |
+
{
|
201 |
+
$('.row').removeClass('np-updated').removeClass('np-updated-show');
|
202 |
+
if ( loading ){
|
203 |
+
$(NestedPages.selectors.quickEditErrorDiv).hide();
|
204 |
+
$(NestedPages.selectors.quickEditLinkSaveButton).attr('disabled', 'disabled');
|
205 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).show();
|
206 |
+
return;
|
207 |
+
}
|
208 |
+
$(NestedPages.selectors.quickEditLinkSaveButton).attr('disabled', false);
|
209 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).hide();
|
210 |
+
}
|
211 |
+
|
212 |
+
|
213 |
+
return plugin.init();
|
214 |
+
|
215 |
+
}
|
assets/js/lib/nestedpages.quickedit-post.js
ADDED
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Quick Edit functionality for posts
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.QuickEditPost = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.formatter = new NestedPages.Formatter;
|
14 |
+
plugin.button = ''; // The quick edit button
|
15 |
+
plugin.initialData = ''; // The unedited post data
|
16 |
+
plugin.parent_li = ''; // The post's nested pages list element
|
17 |
+
plugin.form = ''; // The newly created form
|
18 |
+
plugin.flatTerms = ''; // Object containing flat taxonomy IDs
|
19 |
+
plugin.termNames = ''; // Flat Taxonomy Term Names
|
20 |
+
plugin.saveButton = ''; // Save button
|
21 |
+
plugin.newData = ''; // New Data, after save
|
22 |
+
plugin.row = ''; // The row being edited
|
23 |
+
|
24 |
+
|
25 |
+
plugin.init = function()
|
26 |
+
{
|
27 |
+
plugin.bindEvents();
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
plugin.bindEvents = function()
|
32 |
+
{
|
33 |
+
$(document).on('click', NestedPages.selectors.quickEditOpen, function(e){
|
34 |
+
e.preventDefault();
|
35 |
+
plugin.button = $(this);
|
36 |
+
plugin.openForm();
|
37 |
+
});
|
38 |
+
$(document).on('click', NestedPages.selectors.quickEditCancel, function(e){
|
39 |
+
e.preventDefault();
|
40 |
+
plugin.formatter.removeQuickEdit();
|
41 |
+
});
|
42 |
+
$(document).on('click', NestedPages.selectors.quickEditToggleTaxonomies, function(e){
|
43 |
+
e.preventDefault();
|
44 |
+
$(this).parents('form').find('.np-taxonomies').toggle();
|
45 |
+
});
|
46 |
+
$(document).on('click', NestedPages.selectors.quickEditToggleMenuOptions, function(e){
|
47 |
+
e.preventDefault();
|
48 |
+
$(this).parents('form').find('.np-menuoptions').toggle();
|
49 |
+
});
|
50 |
+
$(document).on('change', '.keep_private', function(){
|
51 |
+
if ( this.checked ){
|
52 |
+
$('.post_password').val('').prop('readonly', true);
|
53 |
+
} else {
|
54 |
+
$('.post_password').prop('readonly', false);
|
55 |
+
}
|
56 |
+
});
|
57 |
+
$(document).on('click', NestedPages.selectors.quickEditSaveButton, function(e){
|
58 |
+
e.preventDefault();
|
59 |
+
plugin.saveButton = $(this);
|
60 |
+
plugin.save();
|
61 |
+
});
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
// Create and open the quick edit form
|
66 |
+
plugin.openForm = function()
|
67 |
+
{
|
68 |
+
plugin.setInitialData();
|
69 |
+
plugin.createForm();
|
70 |
+
plugin.populateForm();
|
71 |
+
plugin.populateFlatTaxonomies();
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
// Set the unedited initial data
|
76 |
+
plugin.setInitialData = function()
|
77 |
+
{
|
78 |
+
plugin.initialData = {
|
79 |
+
id : $(plugin.button).attr('data-id'),
|
80 |
+
title : $(plugin.button).attr('data-title'),
|
81 |
+
slug : $(plugin.button).attr('data-slug'),
|
82 |
+
author : $(plugin.button).attr('data-author'),
|
83 |
+
cs : $(plugin.button).attr('data-commentstatus'),
|
84 |
+
status : $(plugin.button).attr('data-status'),
|
85 |
+
template : $(plugin.button).attr('data-template'),
|
86 |
+
month : $(plugin.button).attr('data-month'),
|
87 |
+
day : $(plugin.button).attr('data-day'),
|
88 |
+
year : $(plugin.button).attr('data-year'),
|
89 |
+
hour : $(plugin.button).attr('data-hour'),
|
90 |
+
minute : $(plugin.button).attr('data-minute'),
|
91 |
+
navstatus : $(plugin.button).attr('data-navstatus'),
|
92 |
+
npstatus : $(plugin.button).attr('data-np-status'),
|
93 |
+
navtitle : $(plugin.button).attr('data-navtitle'),
|
94 |
+
navtitleattr : $(plugin.button).attr('data-navtitleattr'),
|
95 |
+
navcss : $(plugin.button).attr('data-navcss'),
|
96 |
+
linktarget : $(plugin.button).attr('data-linktarget'),
|
97 |
+
password : $(plugin.button).attr('data-password'),
|
98 |
+
datepicker : $(plugin.button).attr('data-datepicker'),
|
99 |
+
time: $(plugin.button).attr('data-formattedtime'),
|
100 |
+
ampm: $(plugin.button).attr('data-ampm')
|
101 |
+
};
|
102 |
+
|
103 |
+
// Add Array of Taxonomies to the data object using classes applied to the list element
|
104 |
+
plugin.initialData.h_taxonomies = [];
|
105 |
+
plugin.initialData.f_taxonomies = [];
|
106 |
+
|
107 |
+
plugin.parent_li = $(plugin.button).closest(NestedPages.selectors.row).parent('li');
|
108 |
+
var classes = $(plugin.parent_li).attr('class').split(/\s+/);
|
109 |
+
for ( i = 0; i < classes.length; i++ ){
|
110 |
+
if ( classes[i].substring(0, 3) === 'in-'){
|
111 |
+
plugin.initialData.h_taxonomies.push(classes[i]);
|
112 |
+
}
|
113 |
+
if ( classes[i].substring(0, 4) === 'inf-' ){
|
114 |
+
plugin.initialData.f_taxonomies.push(classes[i]);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
|
120 |
+
// Create the form and append it to the row
|
121 |
+
plugin.createForm = function()
|
122 |
+
{
|
123 |
+
plugin.form = $(NestedPages.selectors.quickEditPostForm).clone();
|
124 |
+
if ( $(plugin.parent_li).children('ol').length > 0 ){
|
125 |
+
var child_ol = $(plugin.parent_li).children('ol');
|
126 |
+
$(plugin.form).insertBefore(child_ol);
|
127 |
+
} else {
|
128 |
+
$(plugin.form).appendTo(plugin.parent_li);
|
129 |
+
}
|
130 |
+
$(plugin.form).siblings(NestedPages.selectors.row).hide();
|
131 |
+
$(plugin.form).show();
|
132 |
+
}
|
133 |
+
|
134 |
+
|
135 |
+
// Populate the new quick edit form
|
136 |
+
plugin.populateForm = function()
|
137 |
+
{
|
138 |
+
$(plugin.form).find('.page_id').html('<em>ID:</em> ' + plugin.initialData.id);
|
139 |
+
$(plugin.form).find('.np_id').val(plugin.initialData.id);
|
140 |
+
$(plugin.form).find('.np_title').val(plugin.initialData.title);
|
141 |
+
$(plugin.form).find('.np_slug').val(plugin.initialData.slug);
|
142 |
+
$(plugin.form).find('.np_author select').val(plugin.initialData.author);
|
143 |
+
$(plugin.form).find('.np_status').val(plugin.initialData.status);
|
144 |
+
$(plugin.form).find('.np_nav_title').val(plugin.initialData.navtitle);
|
145 |
+
$(plugin.form).find('.np_title_attribute').val(plugin.initialData.navtitleattr);
|
146 |
+
$(plugin.form).find('.np_nav_css_classes').val(plugin.initialData.navcss);
|
147 |
+
$(plugin.form).find('.post_password').val(plugin.initialData.password);
|
148 |
+
$(plugin.form).find('.np_datepicker').val(plugin.initialData.datepicker);
|
149 |
+
$(plugin.form).find('.np_time').val(plugin.initialData.time);
|
150 |
+
$(plugin.form).find('.np_ampm').val(plugin.initialData.ampm);
|
151 |
+
if ( plugin.initialData.cs === 'open' ) $(plugin.form).find('.np_cs').attr('checked', 'checked');
|
152 |
+
|
153 |
+
if ( plugin.initialData.template !== '' ){
|
154 |
+
$(plugin.form).find('.np_template').val(plugin.initialData.template);
|
155 |
+
} else {
|
156 |
+
$(plugin.form).find('.np_template').val('default');
|
157 |
+
}
|
158 |
+
|
159 |
+
if ( plugin.initialData.status === 'private' ){
|
160 |
+
$(plugin.form).find('.post_password').attr('readonly', true);
|
161 |
+
$(plugin.form).find('.keep_private').attr('checked', true);
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( plugin.initialData.npstatus === 'hide' ){
|
165 |
+
$(plugin.form).find('.np_status').attr('checked', 'checked');
|
166 |
+
} else {
|
167 |
+
$(plugin.form).find('.np_status').removeAttr('checked');
|
168 |
+
}
|
169 |
+
|
170 |
+
if ( plugin.initialData.navstatus === 'hide' ) {
|
171 |
+
$(plugin.form).find('.np_nav_status').attr('checked', 'checked');
|
172 |
+
} else {
|
173 |
+
$(plugin.form).find('.np_nav_status').attr('checked', false);
|
174 |
+
}
|
175 |
+
|
176 |
+
if ( plugin.initialData.linktarget === "_blank" ) {
|
177 |
+
$(plugin.form).find('.link_target').attr('checked', 'checked');
|
178 |
+
} else {
|
179 |
+
$(plugin.form).find('.link_target').attr('checked', false);
|
180 |
+
}
|
181 |
+
|
182 |
+
if ( plugin.initialData.status === "private" ) {
|
183 |
+
$(plugin.form).find('.np_status').val('publish');
|
184 |
+
}
|
185 |
+
|
186 |
+
// Date Fields
|
187 |
+
$(plugin.form).find('select[name="mm"]').val(plugin.initialData.month);
|
188 |
+
$(plugin.form).find('input[name="jj"]').val(plugin.initialData.day);
|
189 |
+
$(plugin.form).find('input[name="aa"]').val(plugin.initialData.year);
|
190 |
+
$(plugin.form).find('input[name="hh"]').val(plugin.initialData.hour);
|
191 |
+
$(plugin.form).find('input[name="mn"]').val(plugin.initialData.minute);
|
192 |
+
|
193 |
+
// Populate Hierarchical Taxonomy Checkboxes
|
194 |
+
if ( plugin.initialData.hasOwnProperty('h_taxonomies') ){
|
195 |
+
var taxonomies = plugin.initialData.h_taxonomies;
|
196 |
+
for ( i = 0; i < taxonomies.length; i++ ){
|
197 |
+
var tax = '#' + taxonomies[i];
|
198 |
+
$(plugin.form).find(tax).attr('checked', 'checked');
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
$(plugin.form).find('.np_datepicker').datepicker({
|
203 |
+
beforeShow: function(input, inst) {
|
204 |
+
$('#ui-datepicker-div').addClass('nestedpages-datepicker');
|
205 |
+
}
|
206 |
+
});
|
207 |
+
|
208 |
+
plugin.formatter.showQuickEdit();
|
209 |
+
$(plugin.form).show();
|
210 |
+
}
|
211 |
+
|
212 |
+
|
213 |
+
// Populate the flat taxonomies
|
214 |
+
plugin.populateFlatTaxonomies = function()
|
215 |
+
{
|
216 |
+
if ( !plugin.initialData.hasOwnProperty('f_taxonomies') ) return;
|
217 |
+
plugin.createTaxonomyObject();
|
218 |
+
plugin.getTermNames();
|
219 |
+
plugin.setWPSuggest();
|
220 |
+
}
|
221 |
+
|
222 |
+
|
223 |
+
// Create an object of taxonomies from class names
|
224 |
+
plugin.createTaxonomyObject = function()
|
225 |
+
{
|
226 |
+
var out = "";
|
227 |
+
var terms = {};
|
228 |
+
for ( i = 0; i < plugin.initialData.f_taxonomies.length; i++ ){
|
229 |
+
|
230 |
+
// Get the term
|
231 |
+
var singleTerm = plugin.initialData.f_taxonomies[i];
|
232 |
+
|
233 |
+
var tax_array = singleTerm.split('-'); // split the string into an array
|
234 |
+
var splitter = tax_array.indexOf('nps'); // find the index of the name splitter
|
235 |
+
var term = tax_array.splice(splitter + 1); // Splice off the name
|
236 |
+
term = term.join('-'); // Join the name back into a string
|
237 |
+
|
238 |
+
// Get the taxonomy
|
239 |
+
var tax = singleTerm.split('-').splice(0, splitter);
|
240 |
+
tax.shift('inf');
|
241 |
+
var taxonomy = tax.join('-');
|
242 |
+
|
243 |
+
// Add taxonomy array to object
|
244 |
+
if ( !(taxonomy in terms) ){
|
245 |
+
terms[taxonomy] = [];
|
246 |
+
}
|
247 |
+
// push term to taxonomy array
|
248 |
+
var term_array = terms[taxonomy];
|
249 |
+
term_array.push(term);
|
250 |
+
}
|
251 |
+
plugin.flatTerms = terms;
|
252 |
+
}
|
253 |
+
|
254 |
+
|
255 |
+
// Get the taxonomy names from the ids
|
256 |
+
plugin.getTermNames = function()
|
257 |
+
{
|
258 |
+
$.ajax({
|
259 |
+
url: NestedPages.jsData.ajaxurl,
|
260 |
+
type: 'post',
|
261 |
+
datatype: 'json',
|
262 |
+
data : {
|
263 |
+
action : NestedPages.formActions.getTaxonomies,
|
264 |
+
nonce : NestedPages.jsData.nonce,
|
265 |
+
terms : plugin.flatTerms
|
266 |
+
},
|
267 |
+
success: function(data){
|
268 |
+
plugin.termNames = data.terms;
|
269 |
+
plugin.populateFlatTaxonomyFields();
|
270 |
+
}
|
271 |
+
});
|
272 |
+
}
|
273 |
+
|
274 |
+
|
275 |
+
// Populate the flat taxonomy fields in the form
|
276 |
+
plugin.populateFlatTaxonomyFields = function()
|
277 |
+
{
|
278 |
+
if ( !plugin.termNames ) return;
|
279 |
+
$.each(plugin.termNames, function(i, v){
|
280 |
+
var textarea = $('#' + i);
|
281 |
+
$(textarea).val(v.join(','));
|
282 |
+
});
|
283 |
+
}
|
284 |
+
|
285 |
+
|
286 |
+
// Initialize WP Auto Suggest on Flat Taxonomy fields
|
287 |
+
plugin.setWPSuggest = function()
|
288 |
+
{
|
289 |
+
var tagfields = $(plugin.form).find('[data-autotag]');
|
290 |
+
$.each(tagfields, function(i, v){
|
291 |
+
var taxonomy = $(this).attr('data-taxonomy');
|
292 |
+
$(this).suggest(ajaxurl + '?action=ajax-tag-search&tax=' + taxonomy , {multiple:true, multipleSep: ","});
|
293 |
+
});
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
// Save the quick edit
|
298 |
+
plugin.save = function()
|
299 |
+
{
|
300 |
+
plugin.toggleLoading(true);
|
301 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
302 |
+
|
303 |
+
$.ajax({
|
304 |
+
url: NestedPages.jsData.ajaxurl,
|
305 |
+
type: 'post',
|
306 |
+
datatype: 'json',
|
307 |
+
data: $(plugin.form).find('form').serialize() + '&action=' + NestedPages.formActions.quickEditPost + '&nonce=' + NestedPages.jsData.nonce + '&syncmenu=' + syncmenu + '&post_type=' + NestedPages.jsData.posttype,
|
308 |
+
success: function(data){
|
309 |
+
if (data.status === 'error'){
|
310 |
+
plugin.toggleLoading(false);
|
311 |
+
$(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text(data.message).show();
|
312 |
+
} else {
|
313 |
+
plugin.toggleLoading(false);
|
314 |
+
plugin.newData = data.post_data;
|
315 |
+
plugin.updatePostRow();
|
316 |
+
}
|
317 |
+
},
|
318 |
+
error: function(data){
|
319 |
+
console.log(data);
|
320 |
+
}
|
321 |
+
});
|
322 |
+
}
|
323 |
+
|
324 |
+
|
325 |
+
// Update the Row after saving quick edit data
|
326 |
+
plugin.updatePostRow = function()
|
327 |
+
{
|
328 |
+
plugin.row = $(plugin.form).parent('.page-row');
|
329 |
+
$(plugin.row).find('.title').text(plugin.newData.post_title);
|
330 |
+
|
331 |
+
var status = $(plugin.row).find('.status');
|
332 |
+
if ( (plugin.newData._status !== 'publish') && (plugin.newData._status !== 'future') ){
|
333 |
+
$(status).text('(' + plugin.newData._status + ')');
|
334 |
+
} else if (plugin.newData.keep_private === 'private') {
|
335 |
+
$(status).text('(' + plugin.newData.keep_private + ')');
|
336 |
+
} else {
|
337 |
+
$(status).text('');
|
338 |
+
}
|
339 |
+
|
340 |
+
// Password Lock Icon
|
341 |
+
if ( plugin.newData.post_password !== "" ){
|
342 |
+
var statustext = $(status).text();
|
343 |
+
statustext += ' <i class="np-icon-lock"></i>';
|
344 |
+
$(status).html(statustext);
|
345 |
+
}
|
346 |
+
|
347 |
+
// Hide / Show in Nav
|
348 |
+
var nav_status = $(plugin.row).find('.nav-status');
|
349 |
+
if ( (plugin.newData.nav_status == 'hide') ){
|
350 |
+
$(nav_status).text('(Hidden)');
|
351 |
+
} else {
|
352 |
+
$(nav_status).text('');
|
353 |
+
}
|
354 |
+
|
355 |
+
// Hide / Show in Nested Pages
|
356 |
+
var li = $(plugin.row).parent('li');
|
357 |
+
if ( (plugin.newData.np_status == 'hide') ){
|
358 |
+
$(li).addClass('np-hide');
|
359 |
+
$(plugin.row).find('.status').after('<i class="np-icon-eye-blocked"></i>');
|
360 |
+
} else {
|
361 |
+
$(li).removeClass('np-hide');
|
362 |
+
$(plugin.row).find('.np-icon-eye-blocked').remove();
|
363 |
+
}
|
364 |
+
|
365 |
+
// Author for Non-Hierarchical Types
|
366 |
+
if ( !NestedPages.jsData.hierarchical ){
|
367 |
+
$(plugin.row).find('.np-author-display').text(plugin.newData.author_name);
|
368 |
+
}
|
369 |
+
|
370 |
+
var button = $(plugin.row).find(NestedPages.selectors.quickEditOpen);
|
371 |
+
|
372 |
+
$(button).attr('data-id', plugin.newData.post_id);
|
373 |
+
$(button).attr('data-template', plugin.newData.page_template);
|
374 |
+
$(button).attr('data-title', plugin.newData.post_title);
|
375 |
+
$(button).attr('data-slug', plugin.newData.post_name);
|
376 |
+
$(button).attr('data-commentstatus', plugin.newData.comment_status);
|
377 |
+
$(button).attr('data-status', plugin.newData._status);
|
378 |
+
|
379 |
+
// Private Status
|
380 |
+
if ( plugin.newData.keep_private === 'private' ) {
|
381 |
+
$(button).attr('data-status', 'private');
|
382 |
+
}
|
383 |
+
|
384 |
+
$(button).attr('data-author', plugin.newData.post_author);
|
385 |
+
$(button).attr('data-np-status', plugin.newData.np_status);
|
386 |
+
$(button).attr('data-password', plugin.newData.post_password);
|
387 |
+
|
388 |
+
$(button).attr('data-navstatus', plugin.newData.nav_status);
|
389 |
+
$(button).attr('data-navtitle', plugin.newData.np_nav_title);
|
390 |
+
$(button).attr('data-linktarget', plugin.newData.link_target);
|
391 |
+
$(button).attr('data-navtitleattr', plugin.newData.np_title_attribute);
|
392 |
+
$(button).attr('data-navcss', plugin.newData.np_nav_css_classes);
|
393 |
+
|
394 |
+
$(button).attr('data-month', plugin.newData.mm);
|
395 |
+
$(button).attr('data-day', plugin.newData.jj);
|
396 |
+
$(button).attr('data-year', plugin.newData.aa);
|
397 |
+
$(button).attr('data-hour', plugin.newData.hh);
|
398 |
+
$(button).attr('data-minute', plugin.newData.mn);
|
399 |
+
$(button).attr('data-datepicker', plugin.newData.np_date);
|
400 |
+
$(button).attr('data-time', plugin.newData.np_time);
|
401 |
+
$(button).attr('data-formattedtime', plugin.newData.np_time);
|
402 |
+
$(button).attr('data-ampm', plugin.newData.np_ampm);
|
403 |
+
|
404 |
+
plugin.removeTaxonomyClasses();
|
405 |
+
plugin.addCategoryClasses();
|
406 |
+
plugin.addHierarchicalClasses();
|
407 |
+
plugin.addFlatClasses();
|
408 |
+
plugin.addStatusClass();
|
409 |
+
|
410 |
+
plugin.formatter.removeQuickEdit();
|
411 |
+
plugin.formatter.flashRow(plugin.row);
|
412 |
+
}
|
413 |
+
|
414 |
+
|
415 |
+
// Add Status Class
|
416 |
+
plugin.addStatusClass = function()
|
417 |
+
{
|
418 |
+
var taxonomies = ['published', 'draft', 'pending', 'future'];
|
419 |
+
for ( i = 0; i < taxonomies.length; i++ ){
|
420 |
+
$(plugin.row).removeClass(taxonomies[i]);
|
421 |
+
}
|
422 |
+
console.log(plugin.newData);
|
423 |
+
$(plugin.row).addClass(plugin.newData._status);
|
424 |
+
}
|
425 |
+
|
426 |
+
|
427 |
+
// Remove Taxonomy Classes from the updated row
|
428 |
+
plugin.removeTaxonomyClasses = function()
|
429 |
+
{
|
430 |
+
taxonomies = [];
|
431 |
+
var classes = $(plugin.row).attr('class').split(/\s+/);
|
432 |
+
for ( i = 0; i < classes.length; i++ ){
|
433 |
+
if ( classes[i].substring(0, 3) === 'in-'){ // hierarchical
|
434 |
+
$(plugin.row).removeClass(classes[i]);
|
435 |
+
}
|
436 |
+
if ( classes[i].substring(0, 4) === 'inf-'){ // flat
|
437 |
+
$(plugin.row).removeClass(classes[i]);
|
438 |
+
}
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
|
443 |
+
// Add Category Classes to the Row
|
444 |
+
plugin.addCategoryClasses = function()
|
445 |
+
{
|
446 |
+
if ( !plugin.newData.hasOwnProperty('post_category') ) return;
|
447 |
+
var cats = plugin.newData.post_category;
|
448 |
+
for ( i = 0; i < cats.length; i++ ){
|
449 |
+
var taxclass = 'in-category-' + cats[i];
|
450 |
+
$(plugin.row).addClass(taxclass);
|
451 |
+
}
|
452 |
+
}
|
453 |
+
|
454 |
+
|
455 |
+
// Add hierarchical taxonomy classes to the row
|
456 |
+
plugin.addHierarchicalClasses = function()
|
457 |
+
{
|
458 |
+
if ( !plugin.newData.hasOwnProperty('tax_input') ) return;
|
459 |
+
var taxonomies = plugin.newData.tax_input;
|
460 |
+
$.each(taxonomies, function(tax, terms){
|
461 |
+
for (i = 0; i < terms.length; i++){
|
462 |
+
var taxclass = 'in-' + tax + '-' + terms[i];
|
463 |
+
$(plugin.row).addClass(taxclass);
|
464 |
+
}
|
465 |
+
});
|
466 |
+
}
|
467 |
+
|
468 |
+
|
469 |
+
// Add flat taxonomy classes to the row
|
470 |
+
plugin.addFlatClasses = function()
|
471 |
+
{
|
472 |
+
if ( !plugin.newData.hasOwnProperty('flat_tax') ) return;
|
473 |
+
var taxonomies = plugin.newData.flat_tax;
|
474 |
+
$.each(taxonomies, function(tax, terms){
|
475 |
+
for (i = 0; i < terms.length; i++){
|
476 |
+
var taxclass = 'inf-' + tax + '-nps-' + terms[i];
|
477 |
+
$(plugin.row).addClass(taxclass);
|
478 |
+
}
|
479 |
+
});
|
480 |
+
}
|
481 |
+
|
482 |
+
|
483 |
+
// Toggle Form Loading State
|
484 |
+
plugin.toggleLoading = function(loading)
|
485 |
+
{
|
486 |
+
if ( loading ){
|
487 |
+
$(NestedPages.selectors.quickEditErrorDiv).hide();
|
488 |
+
$(plugin.saveButton).attr('disabled', 'disabled');
|
489 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).show();
|
490 |
+
return;
|
491 |
+
}
|
492 |
+
$(plugin.saveButton).attr('disabled', false);
|
493 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).hide();
|
494 |
+
}
|
495 |
+
|
496 |
+
|
497 |
+
|
498 |
+
return plugin.init();
|
499 |
+
|
500 |
+
|
501 |
+
}
|
assets/js/lib/nestedpages.sync-menu-setting.js
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sync the "sync menu" setting
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.SyncMenuSetting = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.init = function()
|
14 |
+
{
|
15 |
+
plugin.bindEvents();
|
16 |
+
}
|
17 |
+
|
18 |
+
plugin.bindEvents = function()
|
19 |
+
{
|
20 |
+
$(document).ready(function(){ // catches trash updates
|
21 |
+
if ( nestedpages.syncmenu === '1' ) plugin.syncSetting();
|
22 |
+
});
|
23 |
+
$(document).on('change', NestedPages.selectors.syncCheckbox, function(){
|
24 |
+
plugin.syncSetting();
|
25 |
+
});
|
26 |
+
}
|
27 |
+
|
28 |
+
// Sync the "Sync menu" preference / setting
|
29 |
+
plugin.syncSetting = function()
|
30 |
+
{
|
31 |
+
var setting = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
32 |
+
$.ajax({
|
33 |
+
url: NestedPages.jsData.ajaxurl,
|
34 |
+
type: 'post',
|
35 |
+
datatype: 'json',
|
36 |
+
data: {
|
37 |
+
action : NestedPages.formActions.syncMenu,
|
38 |
+
nonce : NestedPages.jsData.nonce,
|
39 |
+
post_type : NestedPages.jsData.posttype,
|
40 |
+
syncmenu : setting
|
41 |
+
},
|
42 |
+
success: function(data){
|
43 |
+
if (data.status === 'error'){
|
44 |
+
alert('There was an error saving the sync setting.')
|
45 |
+
}
|
46 |
+
}
|
47 |
+
});
|
48 |
+
}
|
49 |
+
|
50 |
+
return plugin.bindEvents();
|
51 |
+
}
|
assets/js/lib/nestedpages.trash.js
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Empty Trash Functionality
|
3 |
+
* @package Nested Pages
|
4 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
5 |
+
*/
|
6 |
+
jQuery(document).ready(function(){
|
7 |
+
new NestedPagesTrash;
|
8 |
+
});
|
9 |
+
|
10 |
+
var NestedPagesTrash = function()
|
11 |
+
{
|
12 |
+
var plugin = this;
|
13 |
+
var $ = jQuery;
|
14 |
+
|
15 |
+
// DOM Selectors
|
16 |
+
plugin.trashButton = '.np-empty-trash'; // Trash Link
|
17 |
+
plugin.confirmButton = '.np-trash-confirm'; // Confirm button in modal
|
18 |
+
plugin.warningModal = '#np-trash-modal'; // Modal with empty confirmation
|
19 |
+
plugin.errorAlert = '#np-error'; // Alert Error Notification
|
20 |
+
plugin.loadingIndicator = '#nested-loading'; // Loading Indication
|
21 |
+
plugin.trashLinks = '.np-trash-links';
|
22 |
+
plugin.postType = $('#np-trash-posttype').val();
|
23 |
+
|
24 |
+
// JS Data
|
25 |
+
plugin.nonce = nestedpages.np_nonce;
|
26 |
+
plugin.formAction = 'npEmptyTrash';
|
27 |
+
|
28 |
+
|
29 |
+
// Initialization
|
30 |
+
plugin.init = function(){
|
31 |
+
plugin.bindEvents();
|
32 |
+
}
|
33 |
+
|
34 |
+
// Bind Events
|
35 |
+
plugin.bindEvents = function(){
|
36 |
+
$(document).on('click', plugin.trashButton, function(e){
|
37 |
+
e.preventDefault();
|
38 |
+
$(plugin.warningModal).modal('show');
|
39 |
+
});
|
40 |
+
$(document).on('click', plugin.confirmButton, function(e){
|
41 |
+
e.preventDefault();
|
42 |
+
plugin.confirmEmpty();
|
43 |
+
});
|
44 |
+
}
|
45 |
+
|
46 |
+
// Confirm Trash Empty
|
47 |
+
plugin.confirmEmpty = function(){
|
48 |
+
plugin.loading(true);
|
49 |
+
$(plugin.warningModal).hide();
|
50 |
+
$(plugin.errorAlert).hide();
|
51 |
+
plugin.emptyTrash();
|
52 |
+
}
|
53 |
+
|
54 |
+
// Empty the Trash
|
55 |
+
plugin.emptyTrash = function(){
|
56 |
+
$.ajax({
|
57 |
+
url: ajaxurl,
|
58 |
+
type: 'post',
|
59 |
+
datatype: 'json',
|
60 |
+
data: {
|
61 |
+
action : plugin.formAction,
|
62 |
+
nonce : plugin.nonce,
|
63 |
+
posttype : plugin.postType
|
64 |
+
},
|
65 |
+
success: function(data){
|
66 |
+
plugin.loading(false);
|
67 |
+
if (data.status === 'error'){
|
68 |
+
$(plugin.errorAlert).text(data.message).show();
|
69 |
+
} else {
|
70 |
+
$(plugin.trashLinks).hide();
|
71 |
+
}
|
72 |
+
}
|
73 |
+
});
|
74 |
+
}
|
75 |
+
|
76 |
+
// Loading Indication
|
77 |
+
plugin.loading = function(loading){
|
78 |
+
if ( loading ){
|
79 |
+
$(plugin.loadingIndicator).show();
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
$(plugin.loadingIndicator).hide();
|
83 |
+
}
|
84 |
+
|
85 |
+
return plugin.init();
|
86 |
+
}
|
assets/js/nestedpages.min.js
CHANGED
@@ -1 +1,1970 @@
|
|
1 |
-
jQuery(function(t){function a(){var a=t(".nplist");t(".page-row").removeClass("no-border"),t.each(a,function(){t(this).find(".page-row:visible:first").addClass("no-border")})}function e(){var a=t(".nestedpages").find(".nplist");t.each(a,function(){var a=t(this).parents(".nplist").length,e=56;if(a>0){var e=20*a+e;t(this).find(".row-inner").css("padding-left",e+"px")}else t(this).find(".row-inner").css("padding-left","0px")})}function n(){var a=t(".sortable").attr("id");return a.substring(3)}function s(){var t=n();return 0===r(t)?!0:!1}function d(){t(".sortable").not(".no-sort").nestedSortable({items:".page-row",toleranceElement:"> .row",handle:".handle",placeholder:"ui-sortable-placeholder",maxLevels:r(n()),start:function(t,a){a.placeholder.height(a.item.height())},sort:function(t,a){l(a)},stop:function(){setTimeout(function(){c(),a(),e()},100),u()}})}function o(){t(".sortable").sortable("destroy")}function r(a){var e=1;return t.each(nestedpages.post_types,function(t,n){n.name===a&&(n.hierarchical===!0&&(e=0),n.disable_nesting===!0&&(e=1))}),e}function l(a){if(0===r(n())){var e=t(a.placeholder).parents("ol").length,i=t(".sortable").width(),s=40*e-40,d=i-s;t(a.placeholder).width(d).css("margin-left",s+"px")}p(a)}function p(a){var e=t(a.placeholder).parent("ol");t(e).is(":visible")||(t(e).addClass("nplist"),t(e).show())}function c(){t(".child-toggle").each(function(){var a=t(this).parent(".row").parent("li");if(t(a).children("ol").length>0){var e=t(a).children("ol:visible").length>0?"np-icon-arrow-down":"np-icon-arrow-right";t(this).html('<a href="#"><i class="'+e+'"></i></a>')}else t(this).empty()})}function u(){t("#np-error").hide(),t("#nested-loading").show();var a=t(".np-sync-menu").is(":checked")?"sync":"nosync";list=t("ol.sortable").nestedSortable("toHierarchy",{startDepthCount:0}),o(),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npsort",nonce:nestedpages.np_nonce,list:list,post_type:n(),syncmenu:a},success:function(a){d(),"error"===a.status?(t("#np-error").text(a.message).show(),t("#nested-loading").hide()):t("#nested-loading").hide()}})}function h(a){t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npsyncMenu",nonce:nestedpages.np_nonce,post_type:n(),syncmenu:a},success:function(t){"error"===t.status&&alert("There was an error saving the sync setting.")}})}function f(a){var e={id:t(a).attr("data-id"),title:t(a).attr("data-title"),slug:t(a).attr("data-slug"),author:t(a).attr("data-author"),cs:t(a).attr("data-commentstatus"),status:t(a).attr("data-status"),template:t(a).attr("data-template"),month:t(a).attr("data-month"),day:t(a).attr("data-day"),year:t(a).attr("data-year"),hour:t(a).attr("data-hour"),minute:t(a).attr("data-minute"),navstatus:t(a).attr("data-navstatus"),npstatus:t(a).attr("data-np-status"),navtitle:t(a).attr("data-navtitle"),navtitleattr:t(a).attr("data-navtitleattr"),navcss:t(a).attr("data-navcss"),linktarget:t(a).attr("data-linktarget"),password:t(a).attr("data-password"),datepicker:t(a).attr("data-datepicker"),time:t(a).attr("data-formattedtime"),ampm:t(a).attr("data-ampm")},n=t(a).closest(".row").parent("li");e.h_taxonomies=[],e.f_taxonomies=[];var s=t(n).attr("class").split(/\s+/);for(i=0;i<s.length;i++)"in-"===s[i].substring(0,3)&&e.h_taxonomies.push(s[i]),"inf-"===s[i].substring(0,4)&&e.f_taxonomies.push(s[i]);if(t(n).children("ol").length>0)var d=t(n).children("ol"),o=t(".quick-edit-form").clone().insertBefore(d);else var o=t(".quick-edit-form").clone().appendTo(n);t(o).siblings(".row").hide();v(o,e)}function v(a,e){if(t(a).find(".page_id").html("<em>ID:</em> "+e.id),t(a).find(".np_id").val(e.id),t(a).find(".np_title").val(e.title),t(a).find(".np_slug").val(e.slug),t(a).find(".np_author select").val(e.author),t(a).find(".np_status").val(e.status),t(a).find(".np_nav_title").val(e.navtitle),t(a).find(".np_title_attribute").val(e.navtitleattr),t(a).find(".np_nav_css_classes").val(e.navcss),t(a).find(".post_password").val(e.password),t(a).find(".np_datepicker").val(e.datepicker),t(a).find(".np_time").val(e.time),t(a).find(".np_ampm").val(e.ampm),"open"===e.cs&&t(a).find(".np_cs").prop("checked","checked"),t(a).find(".np_template").val(""!==e.template?e.template:"default"),"private"===e.status&&(t(a).find(".post_password").prop("readonly",!0),t(a).find(".keep_private").prop("checked",!0)),"hide"===e.npstatus?t(a).find(".np_status").prop("checked","checked"):t(a).find(".np_status").removeAttr("checked"),"hide"===e.navstatus?t(a).find(".np_nav_status").prop("checked","checked"):t(a).find(".np_nav_status").removeAttr("checked"),"_blank"===e.linktarget?t(a).find(".link_target").prop("checked","checked"):t(a).find(".link_target").removeAttr("checked"),"private"===e.status&&t(a).find(".np_status").val("publish"),t(a).find('select[name="mm"]').val(e.month),t(a).find('input[name="jj"]').val(e.day),t(a).find('input[name="aa"]').val(e.year),t(a).find('input[name="hh"]').val(e.hour),t(a).find('input[name="mn"]').val(e.minute),e.hasOwnProperty("h_taxonomies")){var n=e.h_taxonomies;for(i=0;i<n.length;i++){var s="#"+n[i];t(a).find(s).prop("checked","checked")}}b(),t(a).show(),t(a).find(".np_datepicker").datepicker({beforeShow:function(){t("#ui-datepicker-div").addClass("nestedpages-datepicker")}}),e.hasOwnProperty("f_taxonomies")&&(m(e.f_taxonomies),k(a))}function m(t){var a={};for(i=0;i<t.length;i++){var e=t[i].split("-"),n=e.indexOf("nps"),s=e.splice(n+1);s=s.join("-");var d=t[i].split("-").splice(0,n);d.shift("inf");var o=d.join("-");o in a||(a[o]=[]);var r=a[o];r.push(s)}g(a)}function g(a){t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npgetTaxonomies",nonce:nestedpages.np_nonce,terms:a},success:function(t){_(t.terms)}})}function _(a){a&&t.each(a,function(a,e){var n=t("#"+a);t(n).val(e.join(","))})}function k(a){var e=t(a).find("[data-autotag]");t.each(e,function(){var a=t(this).attr("data-taxonomy");t(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})}function w(){t(".np-quickedit-error").hide(),y(),t(".sortable .quick-edit").remove(),t(".row").show()}function b(){t("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){t(".np-inline-overlay").addClass("active")},50)}function y(){t(".np-inline-overlay").removeClass("active").remove()}function x(a){t(".np-quickedit-error").hide();var e=t(".np-sync-menu").is(":checked")?"sync":"nosync";t.ajax({url:ajaxurl,type:"post",datatype:"json",data:t(a).serialize()+"&action=npquickEdit&nonce="+nestedpages.np_nonce+"&syncmenu="+e+"&post_type="+n(),success:function(e){"error"===e.status?(A(a),t(a).find(".np-quickedit-error").text(e.message).show()):(A(a),C(a,e.post_data),P(a))},error:function(t){console.log(t)}})}function C(a,e){var n=t(a).parent(".quick-edit").siblings(".row");t(n).find(".title").text(e.post_title);var i=t(n).find(".status");if(t(i).text("publish"!==e._status&&"future"!==e._status?"("+e._status+")":"private"===e.keep_private?"("+e.keep_private+")":""),""!==e.post_password){var d=t(i).text();d+=' <i class="np-icon-lock"></i>',t(i).html(d)}var o=t(n).find(".nav-status");t(o).text("hide"==e.nav_status?"(Hidden)":"");var r=t(n).parent("li");"hide"==e.np_status?(t(r).addClass("np-hide"),t(n).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(r).removeClass("np-hide"),t(n).find(".np-icon-eye-blocked").remove()),s()||t(n).find(".np-author-display").text(e.author_name);var l=t(n).find(".np-quick-edit");t(l).attr("data-id",e.post_id),t(l).attr("data-template",e.page_template),t(l).attr("data-title",e.post_title),t(l).attr("data-slug",e.post_name),t(l).attr("data-commentstatus",e.comment_status),t(l).attr("data-status",e._status),"private"===e.keep_private&&t(l).attr("data-status","private"),t(l).attr("data-author",e.post_author),t(l).attr("data-np-status",e.np_status),t(l).attr("data-password",e.post_password),t(l).attr("data-navstatus",e.nav_status),t(l).attr("data-navtitle",e.np_nav_title),t(l).attr("data-linktarget",e.link_target),t(l).attr("data-navtitleattr",e.np_title_attribute),t(l).attr("data-navcss",e.np_nav_css_classes),t(l).attr("data-month",e.mm),t(l).attr("data-day",e.jj),t(l).attr("data-year",e.aa),t(l).attr("data-hour",e.hh),t(l).attr("data-minute",e.mn),t(l).attr("data-datepicker",e.np_date),t(l).attr("data-time",e.np_time),t(l).attr("data-formattedtime",e.np_time),t(l).attr("data-ampm",e.np_ampm),j(r),q(r,e),D(r,e),T(r,e)}function j(a){taxonomies=[];var e=t(a).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&t(a).removeClass(e[i]),"inf-"===e[i].substring(0,4)&&t(a).removeClass(e[i])}function q(a,e){if(e.hasOwnProperty("post_category")){var n=e.post_category;for(i=0;i<n.length;i++){var s="in-category-"+n[i];t(a).addClass(s)}}}function D(a,e){if(e.hasOwnProperty("tax_input")){var n=e.tax_input;t.each(n,function(e,n){for(i=0;i<n.length;i++){var s="in-"+e+"-"+n[i];t(a).addClass(s)}})}}function T(a,e){if(e.hasOwnProperty("flat_tax")){var n=e.flat_tax;t.each(n,function(e,n){for(i=0;i<n.length;i++){var s="inf-"+e+"-nps-"+n[i];t(a).addClass(s)}})}}function A(a){t(a).find(".np-save-quickedit, .np-save-quickedit-redirect, .np-save-newchild").removeAttr("disabled"),t(a).find(".np-qe-loading").hide()}function P(e){var n=t(e).parent(".quick-edit, .new-child").siblings(".row");t(n).addClass("np-updated"),t(n).show(),t(e).parent(".quick-edit, .new-child").remove(),y(),a(),setTimeout(function(){t(n).addClass("np-updated-show")},1500)}function E(a){var e={id:t(a).attr("data-id"),url:t(a).attr("data-url"),title:t(a).attr("data-title"),status:t(a).attr("data-status"),navstatus:t(a).attr("data-navstatus"),npstatus:t(a).attr("data-np-status"),linktarget:t(a).attr("data-linktarget"),parentid:t(a).attr("data-parentid"),navtitleattr:t(a).attr("data-navtitleattr"),navcss:t(a).attr("data-navcss")},n=t(a).closest(".row").parent("li");if(t(n).children("ol").length>0)var i=t(n).children("ol"),s=t(".quick-edit-form-redirect").clone().insertBefore(i);else var s=t(".quick-edit-form-redirect").clone().appendTo(n);t(s).siblings(".row").hide();t(s).show(),I(s,e)}function I(a,e){t(a).find(".np_id").val(e.id),t(a).find(".np_title").val(e.title),t(a).find(".np_author select").val(e.author),t(a).find(".np_status").val(e.status),t(a).find(".np_content").val(e.url),t(a).find(".np_parent_id").val(e.parentid),t(a).find(".np_title_attribute").val(e.navtitleattr),t(a).find(".np_nav_css_classes").val(e.navcss),"hide"===e.npstatus?t(a).find(".np_status").prop("checked","checked"):t(a).find(".np_status").removeAttr("checked"),"hide"===e.navstatus?t(a).find(".np_nav_status").prop("checked","checked"):t(a).find(".np_nav_status").removeAttr("checked"),"_blank"===e.linktarget?t(a).find(".link_target").prop("checked","checked"):t(a).find(".link_target").removeAttr("checked"),b(),t(a).show()}function O(a){t(".np-quickedit-error").hide();var e=t(".np-sync-menu").is(":checked")?"sync":"nosync";t.ajax({url:ajaxurl,type:"post",datatype:"json",data:t(a).serialize()+"&action=npquickEditLink&nonce="+nestedpages.np_nonce+"&syncmenu="+e+"&post_type="+n(),success:function(e){console.log(e),"error"===e.status?(A(a),t(a).find(".np-quickedit-error").text(e.message).show()):(A(a),z(a,e.post_data),P(a))},error:function(){A(a),t(a).find(".np-quickedit-error").text("The form could not be saved at this time.").show()}})}function z(a,e){var n=t(a).parent(".quick-edit").siblings(".row");t(n).find(".title").html(e.post_title+' <i class="np-icon-link"></i>');var i=t(n).find(".status");t(i).text("publish"!==e._status&&"future"!==e._status?"("+e._status+")":"");var s=t(n).find(".nav-status");t(s).text("hide"==e.nav_status?"(Hidden)":"");var d=t(n).parent("li");"hide"==e.np_status?(t(d).addClass("np-hide"),t(n).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(d).removeClass("np-hide"),t(n).find(".np-icon-eye-blocked").remove());var o=t(n).find(".np-quick-edit-redirect");t(o).attr("data-id",e.post_id),t(o).attr("data-title",e.post_title),t(o).attr("data-url",e.post_content),t(o).attr("data-status",e._status),t(o).attr("data-navstatus",e.nav_status),t(o).attr("data-np-status",e.np_status),t(o).attr("data-linktarget",e.link_target),t(o).attr("data-navtitleattr",e.np_title_attribute),t(o).attr("data-navcss",e.np_nav_css_classes)}function H(){t(".np-link-loading").hide(),t(".np-save-link").removeAttr("disabled")}function L(){t(".np-new-link-error").hide();var a=t(".np-new-link-form").serialize(),e=t(".np-sync-menu").is(":checked")?"sync":"nosync";t.ajax({url:ajaxurl,type:"post",datatype:"json",data:a+"&action=npnewLink&nonce="+nestedpages.np_nonce+"&syncmenu="+e+"&post_type="+n(),success:function(a){"error"===a.status?(H(),t(".np-new-link-error").text(a.message).show()):(H(),S(a.post_data))}})}function S(a){var e='<li id="menuItem_'+a.id+'" class="page-row';"publish"===a._status&&(e+=" published"),e+='">',e+='<div class="row"><div class="child-toggle"></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="'+a.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+a.np_link_title+' <i class="np-icon-link"></i></span>',e+="publish"!==a._status?'<span class="status">'+a._status+"</span>":'<span class="status"></span>',"hide"===a.np_status&&(e+='<i class="np-icon-eye-blocked"></i>'),e+="hide"===a.nav_status?'<span class="nav-status">(Hidden)</span>':'<span class="nav-status"></span>',e+='</a><a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',e+='data-id="'+a.id+'"',e+='data-parentid="'+a.parent_id+'"',e+='data-title="'+a.np_link_title+'" ',e+='data-url="'+a.np_link_content+'" ',e+='data-status="'+a._status+'" ',e+='data-np-status="'+a.np_status+'" ',e+='data-navstatus="'+a.nav_status+'" ',e+='data-linktarget="'+a.link_target+'">',e+="Quick Edit</a>",e+='<a href="'+a.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',e+="</div></div></div></li>","0"===a.parent_id?t(".nplist:first li:first").after(e):B(e,a),t("#np-link-modal").modal("hide");var n=t("#menuItem_"+a.id).find(".row");Q(n)}function B(a,e){var n=t("#menuItem_"+e.parent_id);0===t(n).children("ol").length?(a='<ol class="sortable nplist" style="display:block;">'+a+"</ol>",t(n).append(a)):t(n).find("ol:first").prepend(a),c(),F()}function Q(e){t(e).addClass("np-updated"),a(),setTimeout(function(){t(e).addClass("np-updated-show")},1500)}function M(){var a=[],e=t(".page-row:visible");return t.each(e,function(){var e=t(this).attr("id");a.push(e.replace("menuItem_",""))}),a}function F(){var a=M(),e=n();t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npnestToggle",nonce:nestedpages.np_nonce,ids:a,posttype:e},success:function(t){"success"!==t.status&&console.log("There was an error saving toggled pages.")}})}function G(){t(".np-newchild-error").hide(),y(),t("#np-bulk-modal .modal-body").empty(),t(".sortable .new-child").remove(),t(".row").show()}function J(a){var e=t(a).closest(".row").parent("li");if(t(e).children("ol").length>0)var n=t(e).children("ol"),i=t(".new-child-form").not(".np-modal .new-child-form").clone().insertBefore(n);else var i=t(".new-child-form").not(".np-modal .new-child-form").clone().appendTo(e);t(i).siblings(".row").hide();b(),t(i).find(".parent_name").html("<em>Parent:</em> "+t(a).attr("data-parentname")),t(i).find(".page_parent_id").val(t(a).attr("data-id")),t(i).show()}function K(a){{var e='<li><i class="handle np-icon-menu"></i><div class="form-control new-child-row"><label>'+nestedpages.title+'</label><div><input type="text" name="post_title[]" class="np_title" placeholder="'+nestedpages.title+'" value="" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';t(a).siblings(".new-page-titles").append(e)}t(".new-page-titles").sortable({items:"li",handle:".handle"})}function N(a){var e=t(a).find(t(".new-child-row")).length;e>1?(t(a).find(".add-edit").hide(),t(a).find("h3 strong").text(nestedpages.add_child_pages),t(a).find(".np-save-newchild").text(nestedpages.add+" ("+e+")")):(t(a).find(".add-edit").show(),t(a).find("h3 strong").text(nestedpages.add_child),t(a).find(".np-save-newchild").text(nestedpages.add))}function R(a,e){t(".np-quickedit-error").hide();var i=t(".np-sync-menu").is(":checked")?"sync":"nosync";t.ajax({url:ajaxurl,type:"post",datatype:"json",data:t(a).serialize()+"&action=npnewChild&nonce="+nestedpages.np_nonce+"&syncmenu="+i+"&post_type="+n(),success:function(n){if("error"===n.status)A(a),t(a).find(".np-quickedit-error").text(n.message).show();else if(e===!0){var i=n.new_pages[0].edit_link;i=i.replace(/&/g,"&"),window.location.replace(i)}else A(a),U(a,n)},error:function(){A(a),t(a).find(".np-quickedit-error").text("The form could not be saved at this time.").show()}})}function U(a,e){var n=e.new_pages,s=t(a).parent(".new-child").parent(".page-row");if(0===t(s).children("ol").length&&t(s).append('<ol class="nplist"></ol>'),t(a).hasClass("in-modal"))var d=t(".nplist.sortable li.page-row:first");else var d=t(s).children("ol");for(i=0;i<n.length;i++)V(d,n[i]);t(d).show(),c(),G(),t("#np-bulk-modal").modal("hide"),P(a),u()}function V(a,e){var i='<li id="menuItem_'+e.id+'" class="page-row';"publish"===e.status&&(i+=" published"),i+='">',0===r(n())?(i+='<div class="row">',i+='<div class="child-toggle"></div>'):i+='<div class="row non-hierarchical">',i+='<div class="row-inner">',i+='<i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i>',i+='<a href="'+e.edit_link+'" class="page-link page-title">',i+='<span class="title">'+e.title+"</span>",i+="Publish"!==e.status?'<span class="status">('+e.status+")</span>":'<span class="status"></span>',i+='<span class="nav-status"></span><span class="edit-indicator"><i class="np-icon-pencil"></i>Edit</span>',i+="</a>",i+='<div class="action-buttons">',i+='<a href="#" class="np-btn open-redirect-modal" data-parentid="'+e.id+'"><i class="np-icon-link"></i></a>',i+='<a href="#" class="np-btn add-new-child" data-id="'+e.id+'" data-parentname="'+e.title+'">'+nestedpages.add_child_short+"</a>",i+='<a href="#" class="np-btn np-quick-edit" data-id="'+e.id+'" data-template="'+e.page_template+'" data-title="'+e.title+'" data-slug="'+e.slug+'" data-commentstatus="closed" data-status="'+e.status.toLowerCase()+'" data-np-status="show" data-navstatus="show" data-author="'+e.author+'" data-template="'+e.template+'" data-month="'+e.month+'" data-day="'+e.day+'" data-year="'+e.year+'" data-hour="'+e.hour+'" data-minute="'+e.minute+'" data-datepicker="'+e.datepicker+'" data-time="'+e.time+'" data-formattedtime="'+e.formattedtime+'" data-ampm="'+e.ampm+'">'+nestedpages.quick_edit+"</a>",i+='<a href="'+e.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",i+='<a href="'+e.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',i+="</div><!-- .action-buttons -->",i+="</div><!-- .row-inner --></div><!-- .row -->",i+="</li>",t(a).append(i)}function W(){var a=t("#np-trash-posttype").val();t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npEmptyTrash",nonce:nestedpages.np_nonce,posttype:a},success:function(a){t("#nested-loading").hide(),"error"===a.status?t("#np-error").text(a.message).show():t(".np-trash-links").hide()}})}t(document).ready(function(){c(),a(),e(),d()}),t(document).on("click",".child-toggle a",function(n){n.preventDefault();var i=t(this).parent(".child-toggle").parent(".row").siblings("ol");t(this).find("i").toggleClass("np-icon-arrow-down").toggleClass("np-icon-arrow-right"),t(i).toggle(),a(),F(),e()}),t(document).on("click",".nestedpages-toggleall",function(e){e.preventDefault(),"closed"==t(this).attr("data-toggle")?(t(".nestedpages ol li ol").show(),t(this).attr("data-toggle","opened"),t(this).text(nestedpages.collapse_text),t(".child-toggle i").removeClass("np-icon-arrow-right").addClass("np-icon-arrow-down"),w(),a()):(t(".nestedpages ol li ol").hide(),t(this).attr("data-toggle","closed"),t(this).text(nestedpages.expand_text),t(".child-toggle i").removeClass("np-icon-arrow-down").addClass("np-icon-arrow-right"),w(),a()),F()}),t(document).on("click",".np-toggle-hidden",function(e){e.preventDefault();var n=t(this).attr("href");"show"===n?(t(this).attr("href","hide"),t(this).text(nestedpages.show_hidden),t(".np-hide").removeClass("shown").hide(),a()):(t(this).attr("href","show"),t(this).text(nestedpages.hide_hidden),t(".np-hide").addClass("shown").show(),a())}),t(".np-tabs a").on("click",function(a){a.preventDefault(),t(".np-tabs a").removeClass("active"),t(this).addClass("active");var e=t(this).attr("href");t(".np-tabbed-content").hide(),t(e).show()}),t(document).on("click",".np-toggle-publish",function(a){a.preventDefault();var e=t(this).attr("href");t(".np-toggle-publish").removeClass("active"),t(this).addClass("active"),"#published"==e?(t(".nplist .page-row").hide(),t(".nplist .published").show()):t(".nplist .page-row").show()}),t(document).on("click",".np-toggle-edit",function(a){a.preventDefault();var e=t(this).siblings(".action-buttons");t(e).is(":visible")?(t(this).removeClass("active"),t(e).hide()):(t(this).addClass("active"),t(e).show())});var X=function(){var t=0;return function(a,e){clearTimeout(t),t=setTimeout(a,e)}}();t(window).resize(function(){X(function(){t(".action-buttons").removeAttr("style"),t(".np-toggle-edit").removeClass("active")},500)}),t(document).ready(function(){"1"===nestedpages.syncmenu&&h("sync")}),t(".np-sync-menu").on("change",function(){var a=t(this).is(":checked")?"sync":"nosync";h(a)}),t(document).on("click",".np-quick-edit",function(a){a.preventDefault(),w(),f(t(this))}),t(document).on("click",".np-inline-overlay",function(){w(),G()}),t(document).on("click",".np-cancel-quickedit",function(a){var e=t(this).parents(".page-row");w(e),a.preventDefault()}),t(document).on("click",".np-save-quickedit",function(a){a.preventDefault(),t(".row").removeClass("np-updated").removeClass("np-updated-show");var e=t(this).parents("form");t(this).attr("disabled","disabled"),t(e).find(".np-qe-loading").show(),x(e)}),t(document).on("click",".np-toggle-taxonomies",function(a){t(this).parents("form").find(".np-taxonomies").toggle(),a.preventDefault()}),t(document).on("click",".np-toggle-menuoptions",function(a){a.preventDefault(),t(this).parents("form").find(".np-menuoptions").toggle()}),t(document).on("change",".keep_private",function(){this.checked?t(".post_password").val("").prop("readonly",!0):t(".post_password").prop("readonly",!1)}),t(document).on("click",".np-quick-edit-redirect",function(a){a.preventDefault(),w(),E(t(this))}),t(document).on("click",".np-save-quickedit-redirect",function(a){a.preventDefault(),t(".row").removeClass("np-updated").removeClass("np-updated-show");var e=t(this).parents("form");t(this).attr("disabled","disabled"),t(e).find(".np-qe-loading").show(),O(e)}),t(document).on("click",".open-redirect-modal",function(a){a.preventDefault();var e=t(this).attr("data-parentid");t("#np-link-modal").find("input").val(""),t("#np-link-modal .parent_id").val(e),t("#np-add-link-title").text("0"===e?nestedpages.add_link:nestedpages.add_child_link),t("#np-link-modal").modal("show")}),t(document).on("click",".np-save-link",function(a){a.preventDefault(),t(".np-new-link-error").hide(),t(".np-link-loading").show(),t(this).attr("disabled","disabled"),L()}),t("#np-bulk-modal").on("hide.bs.modal",function(){G()}),t(document).on("click",".np-cancel-newchild",function(a){a.preventDefault(),G(),t("#np-bulk-modal").modal("hide")}),t(document).on("click",".add-new-child",function(a){a.preventDefault(),J(t(this))}),t(document).on("click",".open-bulk-modal",function(a){a.preventDefault();var e=t(".new-child-form").clone().find(".np-new-child-form").addClass("in-modal");t("#np-bulk-modal .modal-body").html(e),t("#np-bulk-modal .new-child-form").show(),t("#np-bulk-modal").find("h3").text(nestedpages.add_multiple),t("#np-bulk-modal").find(".page_parent_id").val("0"),t("#np-bulk-modal").modal("show")}),t(document).on("click",".add-new-child-row",function(a){a.preventDefault(),K(t(this));var e=t(this).parents("form");N(e)}),t(document).on("click",".np-remove-child",function(a){a.preventDefault();var e=t(this).parents("form");t(this).parents(".new-child-row").parent("li").remove(),N(e)}),t(document).on("submit",".np-new-child-form",function(t){t.preventDefault()}),t(document).on("click",".np-save-newchild",function(a){a.preventDefault(),t(this).prop("disabled","disabled");var e=t(this).parents("form");t(e).find(".np-qe-loading").show();var n=t(this).hasClass("add-edit")?!0:!1;R(e,n)}),t(".np-empty-trash").on("click",function(a){a.preventDefault(),t("#np-trash-modal").modal("show")}),t(".np-trash-confirm").on("click",function(a){a.preventDefault(),t("#np-trash-modal").hide(),t("#nested-loading").show(),t("#np-error").hide(),W()})});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var NestedPages = NestedPages || {};
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Responsive functionality for nested view
|
5 |
+
* @package Nested Pages
|
6 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
7 |
+
*/
|
8 |
+
NestedPages.Responsive = function()
|
9 |
+
{
|
10 |
+
var plugin = this;
|
11 |
+
var $ = jQuery;
|
12 |
+
|
13 |
+
plugin.init = function()
|
14 |
+
{
|
15 |
+
plugin.bindEvents();
|
16 |
+
}
|
17 |
+
|
18 |
+
plugin.bindEvents = function()
|
19 |
+
{
|
20 |
+
$(document).on('click', NestedPages.selectors.toggleEditButtons, function(e){
|
21 |
+
e.preventDefault();
|
22 |
+
plugin.toggleEdit($(this));
|
23 |
+
});
|
24 |
+
// Remove the block display when sizing up
|
25 |
+
$(window).resize(function() {
|
26 |
+
plugin.timer(function(){
|
27 |
+
$('.action-buttons').removeAttr('style');
|
28 |
+
$('.np-toggle-edit').removeClass('active');
|
29 |
+
}, 500);
|
30 |
+
});
|
31 |
+
}
|
32 |
+
|
33 |
+
// Toggle the responsive edit buttons
|
34 |
+
plugin.toggleEdit = function(button)
|
35 |
+
{
|
36 |
+
var buttons = $(button).siblings('.action-buttons');
|
37 |
+
if ( $(buttons).is(':visible') ){
|
38 |
+
$(button).removeClass('active');
|
39 |
+
$(buttons).hide();
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
$(button).addClass('active');
|
43 |
+
$(buttons).show();
|
44 |
+
}
|
45 |
+
|
46 |
+
plugin.timer = (function(){
|
47 |
+
var timer = 0;
|
48 |
+
return function(callback, ms){
|
49 |
+
clearTimeout (timer);
|
50 |
+
timer = setTimeout(callback, ms);
|
51 |
+
};
|
52 |
+
})();
|
53 |
+
|
54 |
+
return plugin.init();
|
55 |
+
}
|
56 |
+
var NestedPages = NestedPages || {};
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Formatting updates
|
60 |
+
* @package Nested Pages
|
61 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
62 |
+
*/
|
63 |
+
NestedPages.Formatter = function()
|
64 |
+
{
|
65 |
+
|
66 |
+
var plugin = this;
|
67 |
+
var $ = jQuery;
|
68 |
+
|
69 |
+
|
70 |
+
// Update the Submenu Toggle Button State based on if the child menu is visible
|
71 |
+
plugin.updateSubMenuToggle = function()
|
72 |
+
{
|
73 |
+
var allButtons = $(NestedPages.selectors.childToggle);
|
74 |
+
for ( var i = 0; i < allButtons.length; i++ ){
|
75 |
+
var button = allButtons[i];
|
76 |
+
var row = $(button).parent('.row').parent('li');
|
77 |
+
if ( $(row).children('ol').length > 0 ){ // Row has a child menu
|
78 |
+
var icon = ( $(row).children('ol:visible').length > 0 )
|
79 |
+
? NestedPages.cssClasses.iconToggleDown
|
80 |
+
: NestedPages.cssClasses.iconToggleRight;
|
81 |
+
$(button).html('<a href="#"><i class="' + icon + '"></i></a>');
|
82 |
+
continue;
|
83 |
+
}
|
84 |
+
$(button).empty(); // No Child Menu
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
// Fix :visible :first css limitation when toggling various options
|
90 |
+
plugin.setBorders = function()
|
91 |
+
{
|
92 |
+
$(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder);
|
93 |
+
$.each($(NestedPages.selectors.lists), function(){
|
94 |
+
$(this).find('.page-row:visible:first').addClass(NestedPages.cssClasses.noborder);
|
95 |
+
});
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
// Adjust nested margins based on how deep the list is nested
|
100 |
+
plugin.setNestedMargins = function()
|
101 |
+
{
|
102 |
+
$.each($(NestedPages.selectors.lists), function(i, v){
|
103 |
+
var parent_count = $(this).parents(NestedPages.selectors.lists).length;
|
104 |
+
var padding = 56;
|
105 |
+
if ( parent_count > 0 ){
|
106 |
+
var padding = ( parent_count * 20 ) + padding;
|
107 |
+
$(this).find('.row-inner').css('padding-left', padding + 'px');
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
$(this).find('.row-inner').css('padding-left', '0px');
|
111 |
+
});
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
+
// Update the width of the placeholder ( width changes depending on level of nesting )
|
116 |
+
plugin.updatePlaceholderWidth = function(ui)
|
117 |
+
{
|
118 |
+
if ( NestedPages.jsData.nestable ){
|
119 |
+
var parentCount = $(ui.placeholder).parents('ol').length;
|
120 |
+
var listWidth = $(NestedPages.selectors.sortable).width();
|
121 |
+
var offset = ( parentCount * 40 ) - 40;
|
122 |
+
var newWidth = listWidth - offset;
|
123 |
+
$(ui.placeholder).width(newWidth).css('margin-left', offset + 'px');
|
124 |
+
}
|
125 |
+
plugin.updateListVisibility(ui);
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
// Update the list visibility on sort (prevent lists from collapsing when nesting)
|
130 |
+
plugin.updateListVisibility = function(ui)
|
131 |
+
{
|
132 |
+
var parentList = $(ui.placeholder).parent('ol');
|
133 |
+
if ( !$(parentList).is(':visible') ){
|
134 |
+
$(parentList).addClass('nplist');
|
135 |
+
$(parentList).show();
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
|
140 |
+
// Remove the Quick Edit Overlay
|
141 |
+
plugin.removeQuickEdit = function()
|
142 |
+
{
|
143 |
+
$(NestedPages.selectors.quickEditOverlay).removeClass('active').remove();
|
144 |
+
$('.sortable .quick-edit').remove();
|
145 |
+
$('.row').show();
|
146 |
+
}
|
147 |
+
|
148 |
+
|
149 |
+
// Show the Quick Edit Overlay
|
150 |
+
plugin.showQuickEdit = function()
|
151 |
+
{
|
152 |
+
$('body').append('<div class="np-inline-overlay"></div>');
|
153 |
+
setTimeout(function(){
|
154 |
+
$('.np-inline-overlay').addClass('active');
|
155 |
+
}, 50);
|
156 |
+
}
|
157 |
+
|
158 |
+
|
159 |
+
// Flash an updated row
|
160 |
+
plugin.flashRow = function(row)
|
161 |
+
{
|
162 |
+
$(row).addClass('np-updated');
|
163 |
+
plugin.setBorders();
|
164 |
+
setTimeout(function(){
|
165 |
+
$(row).addClass('np-updated-show');
|
166 |
+
}, 1500);
|
167 |
+
}
|
168 |
+
|
169 |
+
|
170 |
+
}
|
171 |
+
var NestedPages = NestedPages || {};
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Toggles Menu Elements
|
175 |
+
* @package Nested Pages
|
176 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
177 |
+
*/
|
178 |
+
NestedPages.MenuToggle = function()
|
179 |
+
{
|
180 |
+
var plugin = this;
|
181 |
+
var $ = jQuery;
|
182 |
+
|
183 |
+
plugin.formatter = new NestedPages.Formatter;
|
184 |
+
|
185 |
+
plugin.bindEvents = function()
|
186 |
+
{
|
187 |
+
$(document).on('click', NestedPages.selectors.childToggleLink, function(e){
|
188 |
+
e.preventDefault();
|
189 |
+
plugin.toggleSingleMenu($(this));
|
190 |
+
});
|
191 |
+
$(document).on('click', NestedPages.selectors.toggleAll, function(e){
|
192 |
+
e.preventDefault();
|
193 |
+
plugin.toggleAllMenus();
|
194 |
+
});
|
195 |
+
}
|
196 |
+
|
197 |
+
|
198 |
+
// Toggle individual submenus
|
199 |
+
plugin.toggleSingleMenu = function(button)
|
200 |
+
{
|
201 |
+
var submenu = $(button).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings('ol');
|
202 |
+
$(button).find('i')
|
203 |
+
.toggleClass(NestedPages.cssClasses.iconToggleDown)
|
204 |
+
.toggleClass(NestedPages.cssClasses.iconToggleRight);
|
205 |
+
$(submenu).toggle();
|
206 |
+
plugin.formatter.setBorders();
|
207 |
+
plugin.formatter.setNestedMargins();
|
208 |
+
plugin.syncUserToggles();
|
209 |
+
}
|
210 |
+
|
211 |
+
|
212 |
+
// Toggle All Submenus
|
213 |
+
plugin.toggleAllMenus = function()
|
214 |
+
{
|
215 |
+
var button = NestedPages.selectors.toggleAll;
|
216 |
+
if ( $(button).attr('data-toggle') === 'closed' ){
|
217 |
+
$(NestedPages.selectors.lists).show();
|
218 |
+
$(button).attr('data-toggle', 'opened').text(NestedPages.jsData.collapseText);
|
219 |
+
$(NestedPages.selectors.childToggle).find('i').removeClass(NestedPages.cssClasses.iconToggleRight).addClass(NestedPages.cssClasses.iconToggleDown);
|
220 |
+
// revert_quick_edit();
|
221 |
+
plugin.formatter.setBorders();
|
222 |
+
plugin.syncUserToggles();
|
223 |
+
return;
|
224 |
+
}
|
225 |
+
|
226 |
+
$(NestedPages.selectors.lists).not($(NestedPages.selectors.lists)[0]).hide();
|
227 |
+
$(button).attr('data-toggle', 'closed').text(NestedPages.jsData.expandText);
|
228 |
+
$(NestedPages.selectors.childToggle).find('i').removeClass(NestedPages.cssClasses.iconToggleDown).addClass(NestedPages.cssClasses.iconToggleRight);
|
229 |
+
// revert_quick_edit();
|
230 |
+
plugin.formatter.setBorders();
|
231 |
+
plugin.syncUserToggles();
|
232 |
+
}
|
233 |
+
|
234 |
+
|
235 |
+
// Get an array of visible rows
|
236 |
+
plugin.visibleRowIDs = function()
|
237 |
+
{
|
238 |
+
var visible_ids = [];
|
239 |
+
var visible = $(NestedPages.selectors.rows + ':visible');
|
240 |
+
$.each(visible, function(i, v){
|
241 |
+
var id = $(this).attr('id');
|
242 |
+
visible_ids.push(id.replace("menuItem_", ""));
|
243 |
+
});
|
244 |
+
return visible_ids;
|
245 |
+
}
|
246 |
+
|
247 |
+
|
248 |
+
// Save the user's toggled menus
|
249 |
+
plugin.syncUserToggles = function()
|
250 |
+
{
|
251 |
+
$.ajax({
|
252 |
+
url: NestedPages.jsData.ajaxurl,
|
253 |
+
type: 'post',
|
254 |
+
datatype: 'json',
|
255 |
+
data: {
|
256 |
+
action : NestedPages.formActions.syncToggles,
|
257 |
+
nonce : NestedPages.jsData.nonce,
|
258 |
+
ids : plugin.visibleRowIDs(),
|
259 |
+
posttype : NestedPages.jsData.posttype
|
260 |
+
},
|
261 |
+
success: function(data){
|
262 |
+
if ( data.status !== 'success' ){
|
263 |
+
console.log('There was an error saving toggled pages.');
|
264 |
+
}
|
265 |
+
}
|
266 |
+
});
|
267 |
+
}
|
268 |
+
|
269 |
+
|
270 |
+
return plugin.bindEvents();
|
271 |
+
}
|
272 |
+
var NestedPages = NestedPages || {};
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Toggle Page Rows
|
276 |
+
* @package Nested Pages
|
277 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
278 |
+
*/
|
279 |
+
NestedPages.PageToggle = function()
|
280 |
+
{
|
281 |
+
var plugin = this;
|
282 |
+
var $ = jQuery;
|
283 |
+
|
284 |
+
plugin.formatter = new NestedPages.Formatter;
|
285 |
+
|
286 |
+
plugin.init = function()
|
287 |
+
{
|
288 |
+
plugin.bindEvents();
|
289 |
+
}
|
290 |
+
|
291 |
+
plugin.bindEvents = function()
|
292 |
+
{
|
293 |
+
$(document).on('click', NestedPages.selectors.toggleHidden, function(e){
|
294 |
+
e.preventDefault();
|
295 |
+
plugin.toggleHidden();
|
296 |
+
});
|
297 |
+
$(document).on('click', NestedPages.selectors.toggleStatus, function(e){
|
298 |
+
e.preventDefault();
|
299 |
+
plugin.toggleStatus($(this));
|
300 |
+
});
|
301 |
+
}
|
302 |
+
|
303 |
+
|
304 |
+
// Toggle Hidden Pages
|
305 |
+
plugin.toggleHidden = function()
|
306 |
+
{
|
307 |
+
var button = NestedPages.selectors.toggleHidden;
|
308 |
+
var action = $(button).attr('href');
|
309 |
+
if ( action === 'show' ){
|
310 |
+
$(button).attr('href', 'hide').text(NestedPages.jsData.showHiddenText);
|
311 |
+
$(NestedPages.selectors.hiddenRows).removeClass('shown').hide();
|
312 |
+
plugin.formatter.setBorders();
|
313 |
+
return;
|
314 |
+
}
|
315 |
+
$(button).attr('href', 'show').text(NestedPages.jsData.hideHiddenText);
|
316 |
+
$(NestedPages.selectors.hiddenRows).addClass('shown').show();
|
317 |
+
plugin.formatter.setBorders();
|
318 |
+
}
|
319 |
+
|
320 |
+
|
321 |
+
// Toggle Pages based on status
|
322 |
+
plugin.toggleStatus = function(button)
|
323 |
+
{
|
324 |
+
var target = $(button).attr('href');
|
325 |
+
target = target.substring(1);
|
326 |
+
$(NestedPages.selectors.toggleStatus).removeClass('active');
|
327 |
+
$(button).addClass('active');
|
328 |
+
if ( target == 'all' ){
|
329 |
+
$(NestedPages.selectors.rows).show();
|
330 |
+
return;
|
331 |
+
}
|
332 |
+
$(NestedPages.selectors.rows).hide();
|
333 |
+
$('.' + target).show();
|
334 |
+
return;
|
335 |
+
|
336 |
+
}
|
337 |
+
|
338 |
+
|
339 |
+
return plugin.init();
|
340 |
+
|
341 |
+
}
|
342 |
+
var NestedPages = NestedPages || {};
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Enables and Saves Nesting
|
346 |
+
* @package Nested Pages
|
347 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
348 |
+
*/
|
349 |
+
NestedPages.Nesting = function()
|
350 |
+
{
|
351 |
+
var plugin = this;
|
352 |
+
var $ = jQuery;
|
353 |
+
|
354 |
+
plugin.formatter = new NestedPages.Formatter;
|
355 |
+
|
356 |
+
|
357 |
+
// Make the Menu sortable
|
358 |
+
plugin.initializeSortable = function()
|
359 |
+
{
|
360 |
+
maxLevels = ( NestedPages.jsData.nestable ) ? 0 : 1;
|
361 |
+
$(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({
|
362 |
+
items : NestedPages.selectors.rows,
|
363 |
+
toleranceElement: '> .row',
|
364 |
+
handle: NestedPages.selectors.handle,
|
365 |
+
placeholder: "ui-sortable-placeholder",
|
366 |
+
maxLevels: maxLevels,
|
367 |
+
tabSize : 56,
|
368 |
+
start: function(e, ui){
|
369 |
+
ui.placeholder.height(ui.item.height());
|
370 |
+
},
|
371 |
+
sort: function(e, ui){
|
372 |
+
plugin.formatter.updatePlaceholderWidth(ui);
|
373 |
+
},
|
374 |
+
stop: function(e, ui){
|
375 |
+
setTimeout(
|
376 |
+
function(){
|
377 |
+
plugin.formatter.updateSubMenuToggle();
|
378 |
+
plugin.formatter.setBorders();
|
379 |
+
plugin.formatter.setNestedMargins();
|
380 |
+
}, 100
|
381 |
+
);
|
382 |
+
plugin.syncNesting();
|
383 |
+
},
|
384 |
+
});
|
385 |
+
}
|
386 |
+
|
387 |
+
|
388 |
+
// Disable Nesting
|
389 |
+
plugin.disableNesting = function()
|
390 |
+
{
|
391 |
+
$(NestedPages.selectors.sortable).sortable('destroy');
|
392 |
+
}
|
393 |
+
|
394 |
+
|
395 |
+
// Sync Nesting
|
396 |
+
plugin.syncNesting = function()
|
397 |
+
{
|
398 |
+
$(NestedPages.selectors.errorDiv).hide();
|
399 |
+
$(NestedPages.selectors.loadingIndicator).show();
|
400 |
+
|
401 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
402 |
+
|
403 |
+
list = $(NestedPages.selectors.sortable).nestedSortable('toHierarchy', {startDepthCount: 0});
|
404 |
+
plugin.disableNesting();
|
405 |
+
|
406 |
+
$.ajax({
|
407 |
+
url: ajaxurl,
|
408 |
+
type: 'post',
|
409 |
+
datatype: 'json',
|
410 |
+
data: {
|
411 |
+
action : NestedPages.formActions.syncNesting,
|
412 |
+
nonce : NestedPages.jsData.nonce,
|
413 |
+
list : list,
|
414 |
+
post_type : NestedPages.jsData.posttype,
|
415 |
+
syncmenu : syncmenu
|
416 |
+
},
|
417 |
+
success: function(data){
|
418 |
+
plugin.initializeSortable();
|
419 |
+
if (data.status === 'error'){
|
420 |
+
$(NestedPages.selectors.errorDiv).text(data.message).show();
|
421 |
+
$(NestedPages.selectors.loadingIndicator).hide();
|
422 |
+
} else {
|
423 |
+
$(NestedPages.selectors.loadingIndicator).hide();
|
424 |
+
}
|
425 |
+
}
|
426 |
+
});
|
427 |
+
}
|
428 |
+
|
429 |
+
}
|
430 |
+
var NestedPages = NestedPages || {};
|
431 |
+
|
432 |
+
/**
|
433 |
+
* Sync the "sync menu" setting
|
434 |
+
* @package Nested Pages
|
435 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
436 |
+
*/
|
437 |
+
NestedPages.SyncMenuSetting = function()
|
438 |
+
{
|
439 |
+
var plugin = this;
|
440 |
+
var $ = jQuery;
|
441 |
+
|
442 |
+
plugin.init = function()
|
443 |
+
{
|
444 |
+
plugin.bindEvents();
|
445 |
+
}
|
446 |
+
|
447 |
+
plugin.bindEvents = function()
|
448 |
+
{
|
449 |
+
$(document).ready(function(){ // catches trash updates
|
450 |
+
if ( nestedpages.syncmenu === '1' ) plugin.syncSetting();
|
451 |
+
});
|
452 |
+
$(document).on('change', NestedPages.selectors.syncCheckbox, function(){
|
453 |
+
plugin.syncSetting();
|
454 |
+
});
|
455 |
+
}
|
456 |
+
|
457 |
+
// Sync the "Sync menu" preference / setting
|
458 |
+
plugin.syncSetting = function()
|
459 |
+
{
|
460 |
+
var setting = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
461 |
+
$.ajax({
|
462 |
+
url: NestedPages.jsData.ajaxurl,
|
463 |
+
type: 'post',
|
464 |
+
datatype: 'json',
|
465 |
+
data: {
|
466 |
+
action : NestedPages.formActions.syncMenu,
|
467 |
+
nonce : NestedPages.jsData.nonce,
|
468 |
+
post_type : NestedPages.jsData.posttype,
|
469 |
+
syncmenu : setting
|
470 |
+
},
|
471 |
+
success: function(data){
|
472 |
+
if (data.status === 'error'){
|
473 |
+
alert('There was an error saving the sync setting.')
|
474 |
+
}
|
475 |
+
}
|
476 |
+
});
|
477 |
+
}
|
478 |
+
|
479 |
+
return plugin.bindEvents();
|
480 |
+
}
|
481 |
+
var NestedPages = NestedPages || {};
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Add a new Link (top level and child)
|
485 |
+
* @package Nested Pages
|
486 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
487 |
+
*/
|
488 |
+
NestedPages.NewLink = function()
|
489 |
+
{
|
490 |
+
var plugin = this;
|
491 |
+
var $ = jQuery;
|
492 |
+
|
493 |
+
plugin.postParent = 0; // Parent Post ID
|
494 |
+
plugin.post = ''; // New Post Data
|
495 |
+
plugin.row = ''; // Newly Appended Row
|
496 |
+
|
497 |
+
plugin.formatter = new NestedPages.Formatter;
|
498 |
+
|
499 |
+
plugin.init = function()
|
500 |
+
{
|
501 |
+
plugin.bindEvents();
|
502 |
+
}
|
503 |
+
|
504 |
+
|
505 |
+
plugin.bindEvents = function()
|
506 |
+
{
|
507 |
+
$(document).on('click', NestedPages.selectors.openLinkModal, function(e){
|
508 |
+
e.preventDefault();
|
509 |
+
plugin.postParent = $(this).attr('data-parentid');
|
510 |
+
plugin.openModal();
|
511 |
+
});
|
512 |
+
$(document).on('click', NestedPages.selectors.saveLink, function(e){
|
513 |
+
e.preventDefault();
|
514 |
+
plugin.saveLink();
|
515 |
+
});
|
516 |
+
}
|
517 |
+
|
518 |
+
|
519 |
+
// Open the Modal and Clear/Populate hidden fields
|
520 |
+
plugin.openModal = function()
|
521 |
+
{
|
522 |
+
$(NestedPages.selectors.linkErrorDiv).hide();
|
523 |
+
$(NestedPages.selectors.linkModal).find('input').val('');
|
524 |
+
$(NestedPages.selectors.linkModal).find('.parent_id').val(plugin.postParent);
|
525 |
+
$(NestedPages.selectors.linkModal).modal('show');
|
526 |
+
}
|
527 |
+
|
528 |
+
|
529 |
+
// Toggle the loading state in the link modal
|
530 |
+
plugin.toggleLoading = function(loading)
|
531 |
+
{
|
532 |
+
if ( loading ){
|
533 |
+
$(NestedPages.selectors.linkErrorDiv).hide();
|
534 |
+
$(NestedPages.selectors.linkLoadingIndicator).show();
|
535 |
+
$(NestedPages.selectors.saveLink).attr('disabled', 'disabled');
|
536 |
+
return;
|
537 |
+
}
|
538 |
+
$(NestedPages.selectors.linkLoadingIndicator).hide();
|
539 |
+
$(NestedPages.selectors.saveLink).attr('disabled', false);
|
540 |
+
}
|
541 |
+
|
542 |
+
|
543 |
+
// Save the link
|
544 |
+
plugin.saveLink = function()
|
545 |
+
{
|
546 |
+
plugin.toggleLoading(true);
|
547 |
+
var data = $(NestedPages.selectors.linkForm).serialize();
|
548 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
549 |
+
|
550 |
+
$.ajax({
|
551 |
+
url: NestedPages.jsData.ajaxurl,
|
552 |
+
type: 'POST',
|
553 |
+
datatype: 'json',
|
554 |
+
data: data + '&action=' + NestedPages.formActions.newLink + '&nonce=' + NestedPages.jsData.nonce + '&syncmenu=' + syncmenu + '&post_type=' + NestedPages.jsData.posttype,
|
555 |
+
success: function(data){
|
556 |
+
plugin.toggleLoading(false);
|
557 |
+
if (data.status === 'error'){
|
558 |
+
$(NestedPages.selectors.linkErrorDiv).text(data.message).show();
|
559 |
+
return;
|
560 |
+
}
|
561 |
+
plugin.post = data.post_data;
|
562 |
+
plugin.createRow();
|
563 |
+
}
|
564 |
+
});
|
565 |
+
}
|
566 |
+
|
567 |
+
|
568 |
+
// Create the nested pages row for the new link
|
569 |
+
plugin.createRow = function()
|
570 |
+
{
|
571 |
+
var html = '<li id="menuItem_' + plugin.post.id + '" class="page-row';
|
572 |
+
if ( plugin.post._status === 'publish' ) html += ' published';
|
573 |
+
html += '">'
|
574 |
+
|
575 |
+
html += '<div class="row"><div class="child-toggle"></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="' + plugin.post.np_link_content + '" class="page-link page-title" target="_blank"><span class="title">' + plugin.post.np_link_title + ' <i class="np-icon-link"></i></span>';
|
576 |
+
|
577 |
+
// Post Status
|
578 |
+
html += '<span class="status">';
|
579 |
+
if ( plugin.post._status !== 'publish' ) html += plugin.post._status;
|
580 |
+
html += '</span>';
|
581 |
+
|
582 |
+
// Nested Pages Status
|
583 |
+
if ( plugin.post.np_status === "hide" ) html += '<i class="np-icon-eye-blocked"></i>';
|
584 |
+
|
585 |
+
// Nav Menu Status
|
586 |
+
html += '<span class="nav-status">';
|
587 |
+
if ( plugin.post.nav_status === "hide" ) html += '(' + NestedPages.jsData.hiddenText + ')';
|
588 |
+
html += '</span>';
|
589 |
+
|
590 |
+
// Quick Edit Button
|
591 |
+
html += '</a><a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ';
|
592 |
+
html += 'data-id="' + plugin.post.id + '"';
|
593 |
+
html += 'data-parentid="' + plugin.post.parent_id + '"';
|
594 |
+
html += 'data-title="' + plugin.post.np_link_title + '" ';
|
595 |
+
html += 'data-url="' + plugin.post.np_link_content + '" ';
|
596 |
+
html += 'data-status="' + plugin.post._status + '" ';
|
597 |
+
html += 'data-np-status="' + plugin.post.np_status + '" ';
|
598 |
+
html += 'data-navstatus="' + plugin.post.nav_status + '" ';
|
599 |
+
html += 'data-linktarget="' + plugin.post.link_target + '">'
|
600 |
+
html += NestedPages.jsData.quickEditText;
|
601 |
+
html += '</a>';
|
602 |
+
|
603 |
+
// Delete Link
|
604 |
+
html += '<a href="' + plugin.post.delete_link + '" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>';
|
605 |
+
|
606 |
+
html += '</div></div></div></li>';
|
607 |
+
|
608 |
+
if ( plugin.post.parent_id === "0" ){
|
609 |
+
$('.nplist:first li:first').after(html);
|
610 |
+
} else {
|
611 |
+
plugin.appendChildRow(html);
|
612 |
+
}
|
613 |
+
|
614 |
+
$(NestedPages.selectors.linkModal).modal('hide');
|
615 |
+
|
616 |
+
plugin.row = $('#menuItem_' + plugin.post.id).find('.row');
|
617 |
+
plugin.formatter.flashRow(plugin.row);
|
618 |
+
}
|
619 |
+
|
620 |
+
|
621 |
+
// Append a new child link to the appropriate menu
|
622 |
+
plugin.appendChildRow = function(html)
|
623 |
+
{
|
624 |
+
var parent_row = $('#menuItem_' + plugin.post.parent_id);
|
625 |
+
if ( $(parent_row).children('ol').length === 0 ){
|
626 |
+
html = '<ol class="sortable nplist" style="display:block;">' + html + '</ol>';
|
627 |
+
$(parent_row).append(html);
|
628 |
+
} else {
|
629 |
+
$(parent_row).find('ol:first').prepend(html);
|
630 |
+
}
|
631 |
+
plugin.formatter.updateSubMenuToggle();
|
632 |
+
}
|
633 |
+
|
634 |
+
|
635 |
+
return plugin.init();
|
636 |
+
|
637 |
+
}
|
638 |
+
var NestedPages = NestedPages || {};
|
639 |
+
|
640 |
+
/**
|
641 |
+
* Add new page(s) - Top level & child
|
642 |
+
* @package Nested Pages
|
643 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
644 |
+
*/
|
645 |
+
NestedPages.NewPage = function()
|
646 |
+
{
|
647 |
+
var plugin = this;
|
648 |
+
var $ = jQuery;
|
649 |
+
|
650 |
+
plugin.formatter = new NestedPages.Formatter;
|
651 |
+
plugin.parent_id = 0; // Parent ID for the post(s) to add
|
652 |
+
plugin.posts = ''; // The newly added posts
|
653 |
+
plugin.form = ''; // The active form
|
654 |
+
|
655 |
+
|
656 |
+
plugin.init = function()
|
657 |
+
{
|
658 |
+
plugin.bindEvents();
|
659 |
+
}
|
660 |
+
|
661 |
+
|
662 |
+
plugin.bindEvents = function()
|
663 |
+
{
|
664 |
+
$(document).on('click', NestedPages.selectors.openPageModal, function(e){
|
665 |
+
e.preventDefault();
|
666 |
+
plugin.openModal();
|
667 |
+
});
|
668 |
+
$(document).on('submit', NestedPages.selectors.newPageForm, function(e){
|
669 |
+
e.preventDefault();
|
670 |
+
});
|
671 |
+
$(document).on('click', NestedPages.selectors.newPageSubmitButton, function(e){
|
672 |
+
e.preventDefault();
|
673 |
+
plugin.submitForm($(this));
|
674 |
+
});
|
675 |
+
$(document).on('click', NestedPages.selectors.newPageTitle, function(e){
|
676 |
+
e.preventDefault();
|
677 |
+
plugin.addTitleField($(this));
|
678 |
+
});
|
679 |
+
$(document).on('click', NestedPages.selectors.newPageRemoveTitle, function(e){
|
680 |
+
e.preventDefault();
|
681 |
+
plugin.removeTitleField($(this));
|
682 |
+
});
|
683 |
+
$(document).on('click', NestedPages.selectors.addChildButton, function(e){
|
684 |
+
e.preventDefault();
|
685 |
+
plugin.openQuickEdit($(this));
|
686 |
+
});
|
687 |
+
$(NestedPages.selectors.newPageModal).on('hide.bs.modal', function(){
|
688 |
+
plugin.cancelNewPage();
|
689 |
+
});
|
690 |
+
$(document).on('click', NestedPages.selectors.cancelNewChildButton, function(e){
|
691 |
+
e.preventDefault();
|
692 |
+
plugin.cancelNewPage();
|
693 |
+
$(NestedPages.selectors.newPageModal).modal('hide');
|
694 |
+
});
|
695 |
+
}
|
696 |
+
|
697 |
+
|
698 |
+
// Open the form modal
|
699 |
+
plugin.openModal = function()
|
700 |
+
{
|
701 |
+
var newform = $(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm).addClass('in-modal');
|
702 |
+
$(NestedPages.selectors.newPageModal).find('.modal-body').html(newform);
|
703 |
+
$(NestedPages.selectors.newPageModal).find('h3').text(nestedpages.add_multiple);
|
704 |
+
$(NestedPages.selectors.newPageModal).find('.page_parent_id').val(plugin.parent_id);
|
705 |
+
$(NestedPages.selectors.newPageModal).modal('show');
|
706 |
+
}
|
707 |
+
|
708 |
+
|
709 |
+
// Open the new child quick edit
|
710 |
+
plugin.openQuickEdit = function(button)
|
711 |
+
{
|
712 |
+
var parent_li = $(button).closest(NestedPages.selectors.row).parent('li');
|
713 |
+
var newform = $(NestedPages.selectors.newPageFormContainer).clone();
|
714 |
+
|
715 |
+
// Append the form to the list item
|
716 |
+
if ( $(parent_li).children('ol').length > 0 ){
|
717 |
+
var child_ol = $(parent_li).children('ol');
|
718 |
+
$(newform).insertBefore(child_ol);
|
719 |
+
} else {
|
720 |
+
$(newform).appendTo(parent_li);
|
721 |
+
}
|
722 |
+
|
723 |
+
$(newform).siblings(NestedPages.selectors.row).hide();
|
724 |
+
|
725 |
+
plugin.formatter.showQuickEdit();
|
726 |
+
|
727 |
+
$(newform).find('.parent_name').html('<em>Parent:</em> ' + $(button).attr('data-parentname'));
|
728 |
+
$(newform).find('.page_parent_id').val($(button).attr('data-id'));
|
729 |
+
$(newform).show();
|
730 |
+
}
|
731 |
+
|
732 |
+
|
733 |
+
// Close the form modal
|
734 |
+
plugin.cancelNewPage = function()
|
735 |
+
{
|
736 |
+
plugin.formatter.removeQuickEdit();
|
737 |
+
$(NestedPages.selectors.newChildError).hide();
|
738 |
+
$(NestedPages.selectors.newPageModal).find('.modal-body').empty();
|
739 |
+
$(NestedPages.selectors.sortable).find('.new-child').remove();
|
740 |
+
$(NestedPages.selectors.row).show();
|
741 |
+
}
|
742 |
+
|
743 |
+
|
744 |
+
// Add a page title field to the form
|
745 |
+
plugin.addTitleField = function(button)
|
746 |
+
{
|
747 |
+
var form = $(button).parents('form');
|
748 |
+
var html = '<li><i class="handle np-icon-menu"></i><div class="form-control new-child-row"><label>' + NestedPages.jsData.titleText + '</label><div><input type="text" name="post_title[]" class="np_title" placeholder="' + NestedPages.jsData.titleText + '" value="" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';
|
749 |
+
var container = $(button).siblings('.new-page-titles').append(html);
|
750 |
+
$('.new-page-titles').sortable({
|
751 |
+
items : 'li',
|
752 |
+
handle: '.handle',
|
753 |
+
});
|
754 |
+
}
|
755 |
+
|
756 |
+
|
757 |
+
// Remove a page title field
|
758 |
+
plugin.removeTitleField = function(button)
|
759 |
+
{
|
760 |
+
$(button).parents('.new-child-row').parent('li').remove();
|
761 |
+
}
|
762 |
+
|
763 |
+
|
764 |
+
// Submit the New Page Form
|
765 |
+
plugin.submitForm = function(button)
|
766 |
+
{
|
767 |
+
plugin.toggleLoading(true);
|
768 |
+
plugin.form = $(button).parents('form');
|
769 |
+
|
770 |
+
var addedit = ( $(button).hasClass('add-edit') ) ? true : false;
|
771 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
772 |
+
|
773 |
+
$.ajax({
|
774 |
+
url: NestedPages.jsData.ajaxurl,
|
775 |
+
type: 'post',
|
776 |
+
datatype: 'json',
|
777 |
+
data: $(plugin.form).serialize() + '&action=' + NestedPages.formActions.newPage + '&nonce=' + NestedPages.jsData.nonce + '&syncmenu=' + syncmenu + '&post_type=' + NestedPages.jsData.posttype,
|
778 |
+
success: function(data){
|
779 |
+
if (data.status === 'error'){
|
780 |
+
plugin.toggleLoading(false);
|
781 |
+
$(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text(data.message).show();
|
782 |
+
return;
|
783 |
+
}
|
784 |
+
if ( addedit === true ){ // Redirect to Edit Screen
|
785 |
+
var link = data.new_pages[0].edit_link;
|
786 |
+
link = link.replace(/&/g, '&');
|
787 |
+
window.location.replace(link);
|
788 |
+
return;
|
789 |
+
}
|
790 |
+
plugin.toggleLoading(false);
|
791 |
+
plugin.posts = data.new_pages;
|
792 |
+
plugin.addPosts();
|
793 |
+
},
|
794 |
+
error: function(){
|
795 |
+
plugin.toggleLoading(false);
|
796 |
+
$(form).find(NestedPages.selectors.quickEditErrorDiv).text('The form could not be saved at this time.').show();
|
797 |
+
}
|
798 |
+
});
|
799 |
+
}
|
800 |
+
|
801 |
+
|
802 |
+
// Add the new posts
|
803 |
+
plugin.addPosts = function()
|
804 |
+
{
|
805 |
+
var parent_li = $(plugin.form).parent('.new-child').parent('.page-row');
|
806 |
+
|
807 |
+
// If parent li doesn't have a child ol, add one
|
808 |
+
if ( $(parent_li).children('ol').length === 0 ){
|
809 |
+
$(parent_li).append('<ol class="nplist"></ol>');
|
810 |
+
}
|
811 |
+
|
812 |
+
if ( $(plugin.form).hasClass('in-modal') ){
|
813 |
+
var appendto = $('.nplist.sortable li.page-row:first');
|
814 |
+
} else {
|
815 |
+
var appendto = $(parent_li).children('ol');
|
816 |
+
}
|
817 |
+
|
818 |
+
for (i = 0; i < plugin.posts.length; i++){
|
819 |
+
plugin.appendRows(appendto, plugin.posts[i]);
|
820 |
+
}
|
821 |
+
|
822 |
+
// Show the child page list and reset submenu toggles
|
823 |
+
$(appendto).show();
|
824 |
+
plugin.formatter.updateSubMenuToggle();
|
825 |
+
plugin.cancelNewPage();
|
826 |
+
$(NestedPages.selectors.newPageModal).modal('hide');
|
827 |
+
}
|
828 |
+
|
829 |
+
|
830 |
+
// Append new post rows to the nested view
|
831 |
+
plugin.appendRows = function(appendto, post)
|
832 |
+
{
|
833 |
+
var html = '<li id="menuItem_' + post.id + '" class="page-row';
|
834 |
+
if ( post.status === 'publish' ) html += ' published';
|
835 |
+
html += '">';
|
836 |
+
|
837 |
+
if ( NestedPages.jsData.hierarchical ){
|
838 |
+
html += '<div class="row">';
|
839 |
+
html += '<div class="child-toggle"></div>';
|
840 |
+
} else {
|
841 |
+
html += '<div class="row non-hierarchical">';
|
842 |
+
}
|
843 |
+
|
844 |
+
html += '<div class="row-inner">';
|
845 |
+
html += '<i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i>';
|
846 |
+
html += '<a href="' + post.edit_link + '" class="page-link page-title">';
|
847 |
+
html += '<span class="title">' + post.title + '</span>';
|
848 |
+
|
849 |
+
// Status
|
850 |
+
if ( post.status !== 'Publish' ){
|
851 |
+
html += '<span class="status">(' + post.status + ')</span>';
|
852 |
+
} else {
|
853 |
+
html += '<span class="status"></span>';
|
854 |
+
}
|
855 |
+
|
856 |
+
html += '<span class="nav-status"></span><span class="edit-indicator"><i class="np-icon-pencil"></i>Edit</span>';
|
857 |
+
html += '</a>';
|
858 |
+
|
859 |
+
// Action Buttons
|
860 |
+
html += '<div class="action-buttons">';
|
861 |
+
html += '<a href="#" class="np-btn open-redirect-modal" data-parentid="' + post.id + '"><i class="np-icon-link"></i></a>';
|
862 |
+
html += '<a href="#" class="np-btn add-new-child" data-id="' + post.id + '" data-parentname="' + post.title + '">' + nestedpages.add_child_short + '</a>';
|
863 |
+
|
864 |
+
// Quick Edit (data attrs)
|
865 |
+
html += '<a href="#" class="np-btn np-quick-edit" data-id="' + post.id + '" data-template="' + post.page_template + '" data-title="' + post.title + '" data-slug="' + post.slug + '" data-commentstatus="closed" data-status="' + post.status.toLowerCase() + '" data-np-status="show" data-navstatus="show" data-author="' + post.author + '" data-template="' + post.template + '" data-month="' + post.month + '" data-day="' + post.day + '" data-year="' + post.year + '" data-hour="' + post.hour + '" data-minute="' + post.minute + '" data-datepicker="' + post.datepicker + '" data-time="' + post.time + '" data-formattedtime="' + post.formattedtime + '" data-ampm="' + post.ampm + '">' + nestedpages.quick_edit + '</a>';
|
866 |
+
|
867 |
+
html += '<a href="' + post.view_link + '" class="np-btn" target="_blank">' + nestedpages.view + '</a>';
|
868 |
+
html += '<a href="' + post.delete_link + '" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>';
|
869 |
+
html += '</div><!-- .action-buttons -->';
|
870 |
+
|
871 |
+
html += '</div><!-- .row-inner --></div><!-- .row -->';
|
872 |
+
html += '</li>';
|
873 |
+
|
874 |
+
$(appendto).append(html);
|
875 |
+
}
|
876 |
+
|
877 |
+
|
878 |
+
|
879 |
+
// Toggle the form loading state
|
880 |
+
plugin.toggleLoading = function(loading)
|
881 |
+
{
|
882 |
+
if ( loading ){
|
883 |
+
$(NestedPages.selectors.quickEditErrorDiv).hide();
|
884 |
+
$(NestedPages.selectors.newPageSubmitButton).attr('disabled', 'disabled');
|
885 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).show();
|
886 |
+
return;
|
887 |
+
}
|
888 |
+
$(NestedPages.selectors.newPageSubmitButton).attr('disabled', false);
|
889 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).hide();
|
890 |
+
}
|
891 |
+
|
892 |
+
|
893 |
+
|
894 |
+
return plugin.init();
|
895 |
+
}
|
896 |
+
var NestedPages = NestedPages || {};
|
897 |
+
|
898 |
+
/**
|
899 |
+
* Quick Edit functionality for posts
|
900 |
+
* @package Nested Pages
|
901 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
902 |
+
*/
|
903 |
+
NestedPages.QuickEditPost = function()
|
904 |
+
{
|
905 |
+
var plugin = this;
|
906 |
+
var $ = jQuery;
|
907 |
+
|
908 |
+
plugin.formatter = new NestedPages.Formatter;
|
909 |
+
plugin.button = ''; // The quick edit button
|
910 |
+
plugin.initialData = ''; // The unedited post data
|
911 |
+
plugin.parent_li = ''; // The post's nested pages list element
|
912 |
+
plugin.form = ''; // The newly created form
|
913 |
+
plugin.flatTerms = ''; // Object containing flat taxonomy IDs
|
914 |
+
plugin.termNames = ''; // Flat Taxonomy Term Names
|
915 |
+
plugin.saveButton = ''; // Save button
|
916 |
+
plugin.newData = ''; // New Data, after save
|
917 |
+
plugin.row = ''; // The row being edited
|
918 |
+
|
919 |
+
|
920 |
+
plugin.init = function()
|
921 |
+
{
|
922 |
+
plugin.bindEvents();
|
923 |
+
}
|
924 |
+
|
925 |
+
|
926 |
+
plugin.bindEvents = function()
|
927 |
+
{
|
928 |
+
$(document).on('click', NestedPages.selectors.quickEditOpen, function(e){
|
929 |
+
e.preventDefault();
|
930 |
+
plugin.button = $(this);
|
931 |
+
plugin.openForm();
|
932 |
+
});
|
933 |
+
$(document).on('click', NestedPages.selectors.quickEditCancel, function(e){
|
934 |
+
e.preventDefault();
|
935 |
+
plugin.formatter.removeQuickEdit();
|
936 |
+
});
|
937 |
+
$(document).on('click', NestedPages.selectors.quickEditToggleTaxonomies, function(e){
|
938 |
+
e.preventDefault();
|
939 |
+
$(this).parents('form').find('.np-taxonomies').toggle();
|
940 |
+
});
|
941 |
+
$(document).on('click', NestedPages.selectors.quickEditToggleMenuOptions, function(e){
|
942 |
+
e.preventDefault();
|
943 |
+
$(this).parents('form').find('.np-menuoptions').toggle();
|
944 |
+
});
|
945 |
+
$(document).on('change', '.keep_private', function(){
|
946 |
+
if ( this.checked ){
|
947 |
+
$('.post_password').val('').prop('readonly', true);
|
948 |
+
} else {
|
949 |
+
$('.post_password').prop('readonly', false);
|
950 |
+
}
|
951 |
+
});
|
952 |
+
$(document).on('click', NestedPages.selectors.quickEditSaveButton, function(e){
|
953 |
+
e.preventDefault();
|
954 |
+
plugin.saveButton = $(this);
|
955 |
+
plugin.save();
|
956 |
+
});
|
957 |
+
}
|
958 |
+
|
959 |
+
|
960 |
+
// Create and open the quick edit form
|
961 |
+
plugin.openForm = function()
|
962 |
+
{
|
963 |
+
plugin.setInitialData();
|
964 |
+
plugin.createForm();
|
965 |
+
plugin.populateForm();
|
966 |
+
plugin.populateFlatTaxonomies();
|
967 |
+
}
|
968 |
+
|
969 |
+
|
970 |
+
// Set the unedited initial data
|
971 |
+
plugin.setInitialData = function()
|
972 |
+
{
|
973 |
+
plugin.initialData = {
|
974 |
+
id : $(plugin.button).attr('data-id'),
|
975 |
+
title : $(plugin.button).attr('data-title'),
|
976 |
+
slug : $(plugin.button).attr('data-slug'),
|
977 |
+
author : $(plugin.button).attr('data-author'),
|
978 |
+
cs : $(plugin.button).attr('data-commentstatus'),
|
979 |
+
status : $(plugin.button).attr('data-status'),
|
980 |
+
template : $(plugin.button).attr('data-template'),
|
981 |
+
month : $(plugin.button).attr('data-month'),
|
982 |
+
day : $(plugin.button).attr('data-day'),
|
983 |
+
year : $(plugin.button).attr('data-year'),
|
984 |
+
hour : $(plugin.button).attr('data-hour'),
|
985 |
+
minute : $(plugin.button).attr('data-minute'),
|
986 |
+
navstatus : $(plugin.button).attr('data-navstatus'),
|
987 |
+
npstatus : $(plugin.button).attr('data-np-status'),
|
988 |
+
navtitle : $(plugin.button).attr('data-navtitle'),
|
989 |
+
navtitleattr : $(plugin.button).attr('data-navtitleattr'),
|
990 |
+
navcss : $(plugin.button).attr('data-navcss'),
|
991 |
+
linktarget : $(plugin.button).attr('data-linktarget'),
|
992 |
+
password : $(plugin.button).attr('data-password'),
|
993 |
+
datepicker : $(plugin.button).attr('data-datepicker'),
|
994 |
+
time: $(plugin.button).attr('data-formattedtime'),
|
995 |
+
ampm: $(plugin.button).attr('data-ampm')
|
996 |
+
};
|
997 |
+
|
998 |
+
// Add Array of Taxonomies to the data object using classes applied to the list element
|
999 |
+
plugin.initialData.h_taxonomies = [];
|
1000 |
+
plugin.initialData.f_taxonomies = [];
|
1001 |
+
|
1002 |
+
plugin.parent_li = $(plugin.button).closest(NestedPages.selectors.row).parent('li');
|
1003 |
+
var classes = $(plugin.parent_li).attr('class').split(/\s+/);
|
1004 |
+
for ( i = 0; i < classes.length; i++ ){
|
1005 |
+
if ( classes[i].substring(0, 3) === 'in-'){
|
1006 |
+
plugin.initialData.h_taxonomies.push(classes[i]);
|
1007 |
+
}
|
1008 |
+
if ( classes[i].substring(0, 4) === 'inf-' ){
|
1009 |
+
plugin.initialData.f_taxonomies.push(classes[i]);
|
1010 |
+
}
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
|
1015 |
+
// Create the form and append it to the row
|
1016 |
+
plugin.createForm = function()
|
1017 |
+
{
|
1018 |
+
plugin.form = $(NestedPages.selectors.quickEditPostForm).clone();
|
1019 |
+
if ( $(plugin.parent_li).children('ol').length > 0 ){
|
1020 |
+
var child_ol = $(plugin.parent_li).children('ol');
|
1021 |
+
$(plugin.form).insertBefore(child_ol);
|
1022 |
+
} else {
|
1023 |
+
$(plugin.form).appendTo(plugin.parent_li);
|
1024 |
+
}
|
1025 |
+
$(plugin.form).siblings(NestedPages.selectors.row).hide();
|
1026 |
+
$(plugin.form).show();
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
|
1030 |
+
// Populate the new quick edit form
|
1031 |
+
plugin.populateForm = function()
|
1032 |
+
{
|
1033 |
+
$(plugin.form).find('.page_id').html('<em>ID:</em> ' + plugin.initialData.id);
|
1034 |
+
$(plugin.form).find('.np_id').val(plugin.initialData.id);
|
1035 |
+
$(plugin.form).find('.np_title').val(plugin.initialData.title);
|
1036 |
+
$(plugin.form).find('.np_slug').val(plugin.initialData.slug);
|
1037 |
+
$(plugin.form).find('.np_author select').val(plugin.initialData.author);
|
1038 |
+
$(plugin.form).find('.np_status').val(plugin.initialData.status);
|
1039 |
+
$(plugin.form).find('.np_nav_title').val(plugin.initialData.navtitle);
|
1040 |
+
$(plugin.form).find('.np_title_attribute').val(plugin.initialData.navtitleattr);
|
1041 |
+
$(plugin.form).find('.np_nav_css_classes').val(plugin.initialData.navcss);
|
1042 |
+
$(plugin.form).find('.post_password').val(plugin.initialData.password);
|
1043 |
+
$(plugin.form).find('.np_datepicker').val(plugin.initialData.datepicker);
|
1044 |
+
$(plugin.form).find('.np_time').val(plugin.initialData.time);
|
1045 |
+
$(plugin.form).find('.np_ampm').val(plugin.initialData.ampm);
|
1046 |
+
if ( plugin.initialData.cs === 'open' ) $(plugin.form).find('.np_cs').attr('checked', 'checked');
|
1047 |
+
|
1048 |
+
if ( plugin.initialData.template !== '' ){
|
1049 |
+
$(plugin.form).find('.np_template').val(plugin.initialData.template);
|
1050 |
+
} else {
|
1051 |
+
$(plugin.form).find('.np_template').val('default');
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
if ( plugin.initialData.status === 'private' ){
|
1055 |
+
$(plugin.form).find('.post_password').attr('readonly', true);
|
1056 |
+
$(plugin.form).find('.keep_private').attr('checked', true);
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
if ( plugin.initialData.npstatus === 'hide' ){
|
1060 |
+
$(plugin.form).find('.np_status').attr('checked', 'checked');
|
1061 |
+
} else {
|
1062 |
+
$(plugin.form).find('.np_status').removeAttr('checked');
|
1063 |
+
}
|
1064 |
+
|
1065 |
+
if ( plugin.initialData.navstatus === 'hide' ) {
|
1066 |
+
$(plugin.form).find('.np_nav_status').attr('checked', 'checked');
|
1067 |
+
} else {
|
1068 |
+
$(plugin.form).find('.np_nav_status').attr('checked', false);
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
if ( plugin.initialData.linktarget === "_blank" ) {
|
1072 |
+
$(plugin.form).find('.link_target').attr('checked', 'checked');
|
1073 |
+
} else {
|
1074 |
+
$(plugin.form).find('.link_target').attr('checked', false);
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
if ( plugin.initialData.status === "private" ) {
|
1078 |
+
$(plugin.form).find('.np_status').val('publish');
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
// Date Fields
|
1082 |
+
$(plugin.form).find('select[name="mm"]').val(plugin.initialData.month);
|
1083 |
+
$(plugin.form).find('input[name="jj"]').val(plugin.initialData.day);
|
1084 |
+
$(plugin.form).find('input[name="aa"]').val(plugin.initialData.year);
|
1085 |
+
$(plugin.form).find('input[name="hh"]').val(plugin.initialData.hour);
|
1086 |
+
$(plugin.form).find('input[name="mn"]').val(plugin.initialData.minute);
|
1087 |
+
|
1088 |
+
// Populate Hierarchical Taxonomy Checkboxes
|
1089 |
+
if ( plugin.initialData.hasOwnProperty('h_taxonomies') ){
|
1090 |
+
var taxonomies = plugin.initialData.h_taxonomies;
|
1091 |
+
for ( i = 0; i < taxonomies.length; i++ ){
|
1092 |
+
var tax = '#' + taxonomies[i];
|
1093 |
+
$(plugin.form).find(tax).attr('checked', 'checked');
|
1094 |
+
}
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
$(plugin.form).find('.np_datepicker').datepicker({
|
1098 |
+
beforeShow: function(input, inst) {
|
1099 |
+
$('#ui-datepicker-div').addClass('nestedpages-datepicker');
|
1100 |
+
}
|
1101 |
+
});
|
1102 |
+
|
1103 |
+
plugin.formatter.showQuickEdit();
|
1104 |
+
$(plugin.form).show();
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
|
1108 |
+
// Populate the flat taxonomies
|
1109 |
+
plugin.populateFlatTaxonomies = function()
|
1110 |
+
{
|
1111 |
+
if ( !plugin.initialData.hasOwnProperty('f_taxonomies') ) return;
|
1112 |
+
plugin.createTaxonomyObject();
|
1113 |
+
plugin.getTermNames();
|
1114 |
+
plugin.setWPSuggest();
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
|
1118 |
+
// Create an object of taxonomies from class names
|
1119 |
+
plugin.createTaxonomyObject = function()
|
1120 |
+
{
|
1121 |
+
var out = "";
|
1122 |
+
var terms = {};
|
1123 |
+
for ( i = 0; i < plugin.initialData.f_taxonomies.length; i++ ){
|
1124 |
+
|
1125 |
+
// Get the term
|
1126 |
+
var singleTerm = plugin.initialData.f_taxonomies[i];
|
1127 |
+
|
1128 |
+
var tax_array = singleTerm.split('-'); // split the string into an array
|
1129 |
+
var splitter = tax_array.indexOf('nps'); // find the index of the name splitter
|
1130 |
+
var term = tax_array.splice(splitter + 1); // Splice off the name
|
1131 |
+
term = term.join('-'); // Join the name back into a string
|
1132 |
+
|
1133 |
+
// Get the taxonomy
|
1134 |
+
var tax = singleTerm.split('-').splice(0, splitter);
|
1135 |
+
tax.shift('inf');
|
1136 |
+
var taxonomy = tax.join('-');
|
1137 |
+
|
1138 |
+
// Add taxonomy array to object
|
1139 |
+
if ( !(taxonomy in terms) ){
|
1140 |
+
terms[taxonomy] = [];
|
1141 |
+
}
|
1142 |
+
// push term to taxonomy array
|
1143 |
+
var term_array = terms[taxonomy];
|
1144 |
+
term_array.push(term);
|
1145 |
+
}
|
1146 |
+
plugin.flatTerms = terms;
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
|
1150 |
+
// Get the taxonomy names from the ids
|
1151 |
+
plugin.getTermNames = function()
|
1152 |
+
{
|
1153 |
+
$.ajax({
|
1154 |
+
url: NestedPages.jsData.ajaxurl,
|
1155 |
+
type: 'post',
|
1156 |
+
datatype: 'json',
|
1157 |
+
data : {
|
1158 |
+
action : NestedPages.formActions.getTaxonomies,
|
1159 |
+
nonce : NestedPages.jsData.nonce,
|
1160 |
+
terms : plugin.flatTerms
|
1161 |
+
},
|
1162 |
+
success: function(data){
|
1163 |
+
plugin.termNames = data.terms;
|
1164 |
+
plugin.populateFlatTaxonomyFields();
|
1165 |
+
}
|
1166 |
+
});
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
|
1170 |
+
// Populate the flat taxonomy fields in the form
|
1171 |
+
plugin.populateFlatTaxonomyFields = function()
|
1172 |
+
{
|
1173 |
+
if ( !plugin.termNames ) return;
|
1174 |
+
$.each(plugin.termNames, function(i, v){
|
1175 |
+
var textarea = $('#' + i);
|
1176 |
+
$(textarea).val(v.join(','));
|
1177 |
+
});
|
1178 |
+
}
|
1179 |
+
|
1180 |
+
|
1181 |
+
// Initialize WP Auto Suggest on Flat Taxonomy fields
|
1182 |
+
plugin.setWPSuggest = function()
|
1183 |
+
{
|
1184 |
+
var tagfields = $(plugin.form).find('[data-autotag]');
|
1185 |
+
$.each(tagfields, function(i, v){
|
1186 |
+
var taxonomy = $(this).attr('data-taxonomy');
|
1187 |
+
$(this).suggest(ajaxurl + '?action=ajax-tag-search&tax=' + taxonomy , {multiple:true, multipleSep: ","});
|
1188 |
+
});
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
|
1192 |
+
// Save the quick edit
|
1193 |
+
plugin.save = function()
|
1194 |
+
{
|
1195 |
+
plugin.toggleLoading(true);
|
1196 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
1197 |
+
|
1198 |
+
$.ajax({
|
1199 |
+
url: NestedPages.jsData.ajaxurl,
|
1200 |
+
type: 'post',
|
1201 |
+
datatype: 'json',
|
1202 |
+
data: $(plugin.form).find('form').serialize() + '&action=' + NestedPages.formActions.quickEditPost + '&nonce=' + NestedPages.jsData.nonce + '&syncmenu=' + syncmenu + '&post_type=' + NestedPages.jsData.posttype,
|
1203 |
+
success: function(data){
|
1204 |
+
if (data.status === 'error'){
|
1205 |
+
plugin.toggleLoading(false);
|
1206 |
+
$(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text(data.message).show();
|
1207 |
+
} else {
|
1208 |
+
plugin.toggleLoading(false);
|
1209 |
+
plugin.newData = data.post_data;
|
1210 |
+
plugin.updatePostRow();
|
1211 |
+
}
|
1212 |
+
},
|
1213 |
+
error: function(data){
|
1214 |
+
console.log(data);
|
1215 |
+
}
|
1216 |
+
});
|
1217 |
+
}
|
1218 |
+
|
1219 |
+
|
1220 |
+
// Update the Row after saving quick edit data
|
1221 |
+
plugin.updatePostRow = function()
|
1222 |
+
{
|
1223 |
+
plugin.row = $(plugin.form).parent('.page-row');
|
1224 |
+
$(plugin.row).find('.title').text(plugin.newData.post_title);
|
1225 |
+
|
1226 |
+
var status = $(plugin.row).find('.status');
|
1227 |
+
if ( (plugin.newData._status !== 'publish') && (plugin.newData._status !== 'future') ){
|
1228 |
+
$(status).text('(' + plugin.newData._status + ')');
|
1229 |
+
} else if (plugin.newData.keep_private === 'private') {
|
1230 |
+
$(status).text('(' + plugin.newData.keep_private + ')');
|
1231 |
+
} else {
|
1232 |
+
$(status).text('');
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
// Password Lock Icon
|
1236 |
+
if ( plugin.newData.post_password !== "" ){
|
1237 |
+
var statustext = $(status).text();
|
1238 |
+
statustext += ' <i class="np-icon-lock"></i>';
|
1239 |
+
$(status).html(statustext);
|
1240 |
+
}
|
1241 |
+
|
1242 |
+
// Hide / Show in Nav
|
1243 |
+
var nav_status = $(plugin.row).find('.nav-status');
|
1244 |
+
if ( (plugin.newData.nav_status == 'hide') ){
|
1245 |
+
$(nav_status).text('(Hidden)');
|
1246 |
+
} else {
|
1247 |
+
$(nav_status).text('');
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
// Hide / Show in Nested Pages
|
1251 |
+
var li = $(plugin.row).parent('li');
|
1252 |
+
if ( (plugin.newData.np_status == 'hide') ){
|
1253 |
+
$(li).addClass('np-hide');
|
1254 |
+
$(plugin.row).find('.status').after('<i class="np-icon-eye-blocked"></i>');
|
1255 |
+
} else {
|
1256 |
+
$(li).removeClass('np-hide');
|
1257 |
+
$(plugin.row).find('.np-icon-eye-blocked').remove();
|
1258 |
+
}
|
1259 |
+
|
1260 |
+
// Author for Non-Hierarchical Types
|
1261 |
+
if ( !NestedPages.jsData.hierarchical ){
|
1262 |
+
$(plugin.row).find('.np-author-display').text(plugin.newData.author_name);
|
1263 |
+
}
|
1264 |
+
|
1265 |
+
var button = $(plugin.row).find(NestedPages.selectors.quickEditOpen);
|
1266 |
+
|
1267 |
+
$(button).attr('data-id', plugin.newData.post_id);
|
1268 |
+
$(button).attr('data-template', plugin.newData.page_template);
|
1269 |
+
$(button).attr('data-title', plugin.newData.post_title);
|
1270 |
+
$(button).attr('data-slug', plugin.newData.post_name);
|
1271 |
+
$(button).attr('data-commentstatus', plugin.newData.comment_status);
|
1272 |
+
$(button).attr('data-status', plugin.newData._status);
|
1273 |
+
|
1274 |
+
// Private Status
|
1275 |
+
if ( plugin.newData.keep_private === 'private' ) {
|
1276 |
+
$(button).attr('data-status', 'private');
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
$(button).attr('data-author', plugin.newData.post_author);
|
1280 |
+
$(button).attr('data-np-status', plugin.newData.np_status);
|
1281 |
+
$(button).attr('data-password', plugin.newData.post_password);
|
1282 |
+
|
1283 |
+
$(button).attr('data-navstatus', plugin.newData.nav_status);
|
1284 |
+
$(button).attr('data-navtitle', plugin.newData.np_nav_title);
|
1285 |
+
$(button).attr('data-linktarget', plugin.newData.link_target);
|
1286 |
+
$(button).attr('data-navtitleattr', plugin.newData.np_title_attribute);
|
1287 |
+
$(button).attr('data-navcss', plugin.newData.np_nav_css_classes);
|
1288 |
+
|
1289 |
+
$(button).attr('data-month', plugin.newData.mm);
|
1290 |
+
$(button).attr('data-day', plugin.newData.jj);
|
1291 |
+
$(button).attr('data-year', plugin.newData.aa);
|
1292 |
+
$(button).attr('data-hour', plugin.newData.hh);
|
1293 |
+
$(button).attr('data-minute', plugin.newData.mn);
|
1294 |
+
$(button).attr('data-datepicker', plugin.newData.np_date);
|
1295 |
+
$(button).attr('data-time', plugin.newData.np_time);
|
1296 |
+
$(button).attr('data-formattedtime', plugin.newData.np_time);
|
1297 |
+
$(button).attr('data-ampm', plugin.newData.np_ampm);
|
1298 |
+
|
1299 |
+
plugin.removeTaxonomyClasses();
|
1300 |
+
plugin.addCategoryClasses();
|
1301 |
+
plugin.addHierarchicalClasses();
|
1302 |
+
plugin.addFlatClasses();
|
1303 |
+
plugin.addStatusClass();
|
1304 |
+
|
1305 |
+
plugin.formatter.removeQuickEdit();
|
1306 |
+
plugin.formatter.flashRow(plugin.row);
|
1307 |
+
}
|
1308 |
+
|
1309 |
+
|
1310 |
+
// Add Status Class
|
1311 |
+
plugin.addStatusClass = function()
|
1312 |
+
{
|
1313 |
+
var taxonomies = ['published', 'draft', 'pending', 'future'];
|
1314 |
+
for ( i = 0; i < taxonomies.length; i++ ){
|
1315 |
+
$(plugin.row).removeClass(taxonomies[i]);
|
1316 |
+
}
|
1317 |
+
console.log(plugin.newData);
|
1318 |
+
$(plugin.row).addClass(plugin.newData._status);
|
1319 |
+
}
|
1320 |
+
|
1321 |
+
|
1322 |
+
// Remove Taxonomy Classes from the updated row
|
1323 |
+
plugin.removeTaxonomyClasses = function()
|
1324 |
+
{
|
1325 |
+
taxonomies = [];
|
1326 |
+
var classes = $(plugin.row).attr('class').split(/\s+/);
|
1327 |
+
for ( i = 0; i < classes.length; i++ ){
|
1328 |
+
if ( classes[i].substring(0, 3) === 'in-'){ // hierarchical
|
1329 |
+
$(plugin.row).removeClass(classes[i]);
|
1330 |
+
}
|
1331 |
+
if ( classes[i].substring(0, 4) === 'inf-'){ // flat
|
1332 |
+
$(plugin.row).removeClass(classes[i]);
|
1333 |
+
}
|
1334 |
+
}
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
|
1338 |
+
// Add Category Classes to the Row
|
1339 |
+
plugin.addCategoryClasses = function()
|
1340 |
+
{
|
1341 |
+
if ( !plugin.newData.hasOwnProperty('post_category') ) return;
|
1342 |
+
var cats = plugin.newData.post_category;
|
1343 |
+
for ( i = 0; i < cats.length; i++ ){
|
1344 |
+
var taxclass = 'in-category-' + cats[i];
|
1345 |
+
$(plugin.row).addClass(taxclass);
|
1346 |
+
}
|
1347 |
+
}
|
1348 |
+
|
1349 |
+
|
1350 |
+
// Add hierarchical taxonomy classes to the row
|
1351 |
+
plugin.addHierarchicalClasses = function()
|
1352 |
+
{
|
1353 |
+
if ( !plugin.newData.hasOwnProperty('tax_input') ) return;
|
1354 |
+
var taxonomies = plugin.newData.tax_input;
|
1355 |
+
$.each(taxonomies, function(tax, terms){
|
1356 |
+
for (i = 0; i < terms.length; i++){
|
1357 |
+
var taxclass = 'in-' + tax + '-' + terms[i];
|
1358 |
+
$(plugin.row).addClass(taxclass);
|
1359 |
+
}
|
1360 |
+
});
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
|
1364 |
+
// Add flat taxonomy classes to the row
|
1365 |
+
plugin.addFlatClasses = function()
|
1366 |
+
{
|
1367 |
+
if ( !plugin.newData.hasOwnProperty('flat_tax') ) return;
|
1368 |
+
var taxonomies = plugin.newData.flat_tax;
|
1369 |
+
$.each(taxonomies, function(tax, terms){
|
1370 |
+
for (i = 0; i < terms.length; i++){
|
1371 |
+
var taxclass = 'inf-' + tax + '-nps-' + terms[i];
|
1372 |
+
$(plugin.row).addClass(taxclass);
|
1373 |
+
}
|
1374 |
+
});
|
1375 |
+
}
|
1376 |
+
|
1377 |
+
|
1378 |
+
// Toggle Form Loading State
|
1379 |
+
plugin.toggleLoading = function(loading)
|
1380 |
+
{
|
1381 |
+
if ( loading ){
|
1382 |
+
$(NestedPages.selectors.quickEditErrorDiv).hide();
|
1383 |
+
$(plugin.saveButton).attr('disabled', 'disabled');
|
1384 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).show();
|
1385 |
+
return;
|
1386 |
+
}
|
1387 |
+
$(plugin.saveButton).attr('disabled', false);
|
1388 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).hide();
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
|
1392 |
+
|
1393 |
+
return plugin.init();
|
1394 |
+
|
1395 |
+
|
1396 |
+
}
|
1397 |
+
var NestedPages = NestedPages || {};
|
1398 |
+
|
1399 |
+
/**
|
1400 |
+
* Quick Edit functionality for links
|
1401 |
+
* @package Nested Pages
|
1402 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
1403 |
+
*/
|
1404 |
+
NestedPages.QuickEditLink = function()
|
1405 |
+
{
|
1406 |
+
var plugin = this;
|
1407 |
+
var $ = jQuery;
|
1408 |
+
|
1409 |
+
plugin.formatter = new NestedPages.Formatter;
|
1410 |
+
plugin.button = ''; // The Active Quick Edit Button
|
1411 |
+
plugin.postData = ''; // Data for Post being edited (before update)
|
1412 |
+
plugin.newPostData = ''; // Data after update
|
1413 |
+
plugin.form = ''; // The newly created Quick Edit Form
|
1414 |
+
|
1415 |
+
|
1416 |
+
plugin.init = function()
|
1417 |
+
{
|
1418 |
+
plugin.bindEvents();
|
1419 |
+
}
|
1420 |
+
|
1421 |
+
|
1422 |
+
plugin.bindEvents = function()
|
1423 |
+
{
|
1424 |
+
$(document).on('click', NestedPages.selectors.quickEditButtonLink, function(e){
|
1425 |
+
e.preventDefault();
|
1426 |
+
plugin.formatter.removeQuickEdit();
|
1427 |
+
plugin.button = $(this);
|
1428 |
+
plugin.openQuickEdit();
|
1429 |
+
});
|
1430 |
+
$(document).on('click', NestedPages.selectors.quickEditLinkSaveButton, function(e){
|
1431 |
+
e.preventDefault();
|
1432 |
+
plugin.submitForm();
|
1433 |
+
});
|
1434 |
+
}
|
1435 |
+
|
1436 |
+
|
1437 |
+
// Open the Quick Edit Form
|
1438 |
+
plugin.openQuickEdit = function()
|
1439 |
+
{
|
1440 |
+
plugin.setData();
|
1441 |
+
plugin.createForm();
|
1442 |
+
plugin.populateForm();
|
1443 |
+
}
|
1444 |
+
|
1445 |
+
|
1446 |
+
// Set the Quick Edit Data
|
1447 |
+
plugin.setData = function()
|
1448 |
+
{
|
1449 |
+
plugin.postData = {
|
1450 |
+
id : $(plugin.button).attr('data-id'),
|
1451 |
+
url : $(plugin.button).attr('data-url'),
|
1452 |
+
title : $(plugin.button).attr('data-title'),
|
1453 |
+
status : $(plugin.button).attr('data-status'),
|
1454 |
+
navstatus : $(plugin.button).attr('data-navstatus'),
|
1455 |
+
npstatus : $(plugin.button).attr('data-np-status'),
|
1456 |
+
linktarget : $(plugin.button).attr('data-linktarget'),
|
1457 |
+
parentid : $(plugin.button).attr('data-parentid'),
|
1458 |
+
navtitleattr : $(plugin.button).attr('data-navtitleattr'),
|
1459 |
+
navcss : $(plugin.button).attr('data-navcss')
|
1460 |
+
};
|
1461 |
+
}
|
1462 |
+
|
1463 |
+
|
1464 |
+
// Create the quick edit form
|
1465 |
+
plugin.createForm = function()
|
1466 |
+
{
|
1467 |
+
var parent_li = $(plugin.button).closest(NestedPages.selectors.row).parent('li');
|
1468 |
+
plugin.form = $(NestedPages.selectors.quickEditLinkForm).clone();
|
1469 |
+
|
1470 |
+
// Append the form to the list item
|
1471 |
+
if ( $(parent_li).children('ol').length > 0 ){
|
1472 |
+
var child_ol = $(parent_li).children('ol');
|
1473 |
+
$(plugin.form).insertBefore(child_ol);
|
1474 |
+
} else {
|
1475 |
+
$(plugin.form).appendTo(parent_li);
|
1476 |
+
}
|
1477 |
+
|
1478 |
+
var row = $(plugin.form).siblings(NestedPages.selectors.row).hide();
|
1479 |
+
}
|
1480 |
+
|
1481 |
+
|
1482 |
+
// Populate the Quick Edit form with the post data
|
1483 |
+
plugin.populateForm = function()
|
1484 |
+
{
|
1485 |
+
$(plugin.form).find('.np_id').val(plugin.postData.id);
|
1486 |
+
$(plugin.form).find('.np_title').val(plugin.postData.title);
|
1487 |
+
$(plugin.form).find('.np_author select').val(plugin.postData.author);
|
1488 |
+
$(plugin.form).find('.np_status').val(plugin.postData.status);
|
1489 |
+
$(plugin.form).find('.np_content').val(plugin.postData.url);
|
1490 |
+
$(plugin.form).find('.np_parent_id').val(plugin.postData.parentid);
|
1491 |
+
$(plugin.form).find('.np_title_attribute').val(plugin.postData.navtitleattr);
|
1492 |
+
$(plugin.form).find('.np_nav_css_classes').val(plugin.postData.navcss);
|
1493 |
+
|
1494 |
+
if ( plugin.postData.npstatus === 'hide' ){
|
1495 |
+
$(plugin.form).find('.np_status').prop('checked', 'checked');
|
1496 |
+
} else {
|
1497 |
+
$(plugin.form).find('.np_status').removeAttr('checked');
|
1498 |
+
}
|
1499 |
+
|
1500 |
+
if ( plugin.postData.navstatus === 'hide' ) {
|
1501 |
+
$(plugin.form).find('.np_nav_status').prop('checked', 'checked');
|
1502 |
+
} else {
|
1503 |
+
$(plugin.form).find('.np_nav_status').removeAttr('checked');
|
1504 |
+
}
|
1505 |
+
|
1506 |
+
if ( plugin.postData.linktarget === "_blank" ) {
|
1507 |
+
$(plugin.form).find('.link_target').prop('checked', 'checked');
|
1508 |
+
} else {
|
1509 |
+
$(plugin.form).find('.link_target').removeAttr('checked');
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
plugin.formatter.showQuickEdit();
|
1513 |
+
$(plugin.form).show();
|
1514 |
+
}
|
1515 |
+
|
1516 |
+
|
1517 |
+
// Submit the form
|
1518 |
+
plugin.submitForm = function()
|
1519 |
+
{
|
1520 |
+
plugin.toggleLoading(true);
|
1521 |
+
var syncmenu = ( $(NestedPages.selectors.syncCheckbox).is(':checked') ) ? 'sync' : 'nosync';
|
1522 |
+
|
1523 |
+
$.ajax({
|
1524 |
+
url: NestedPages.jsData.ajaxurl,
|
1525 |
+
type: 'post',
|
1526 |
+
datatype: 'json',
|
1527 |
+
data: $(plugin.form).find('form').serialize() + '&action=' + NestedPages.formActions.quickEditLink + '&nonce=' + NestedPages.jsData.nonce + '&syncmenu=' + syncmenu + '&post_type=' + NestedPages.jsData.posttype,
|
1528 |
+
success: function(data){
|
1529 |
+
if (data.status === 'error'){
|
1530 |
+
plugin.toggleLoading(false);
|
1531 |
+
$(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text(data.message).show();
|
1532 |
+
} else {
|
1533 |
+
plugin.toggleLoading(false);
|
1534 |
+
plugin.newPostData = data.post_data;
|
1535 |
+
plugin.updateRow();
|
1536 |
+
}
|
1537 |
+
},
|
1538 |
+
error: function(data){
|
1539 |
+
plugin.toggleLoading(false);
|
1540 |
+
$(plugin.form).find(NestedPages.selectors.quickEditErrorDiv).text('The form could not be saved at this time.').show();
|
1541 |
+
}
|
1542 |
+
});
|
1543 |
+
}
|
1544 |
+
|
1545 |
+
|
1546 |
+
// Update the row after successfully saving quick edit data
|
1547 |
+
plugin.updateRow = function()
|
1548 |
+
{
|
1549 |
+
var row = $(plugin.form).siblings('.row');
|
1550 |
+
$(row).find('.title').html(plugin.newPostData.post_title + ' <i class="np-icon-link"></i>');
|
1551 |
+
|
1552 |
+
var status = $(row).find('.status');
|
1553 |
+
if ( (plugin.newPostData._status !== 'publish') && (data._status !== 'future') ){
|
1554 |
+
$(status).text('(' + plugin.newPostData._status + ')');
|
1555 |
+
} else {
|
1556 |
+
$(status).text('');
|
1557 |
+
}
|
1558 |
+
|
1559 |
+
// Hide / Show in Nav
|
1560 |
+
var nav_status = $(row).find('.nav-status');
|
1561 |
+
if ( (plugin.newPostData.nav_status == 'hide') ){
|
1562 |
+
$(nav_status).text('(' + NestedPages.jsData.hiddenText + ')');
|
1563 |
+
} else {
|
1564 |
+
$(nav_status).text('');
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
// Hide / Show in Nested Pages
|
1568 |
+
var li = $(row).parent('li');
|
1569 |
+
if ( (plugin.newPostData.np_status == 'hide') ){
|
1570 |
+
$(li).addClass('np-hide');
|
1571 |
+
$(row).find('.status').after('<i class="np-icon-eye-blocked"></i>');
|
1572 |
+
} else {
|
1573 |
+
$(li).removeClass('np-hide');
|
1574 |
+
$(row).find('.np-icon-eye-blocked').remove();
|
1575 |
+
}
|
1576 |
+
|
1577 |
+
var button = $(row).find(NestedPages.selectors.quickEditButtonLink);
|
1578 |
+
|
1579 |
+
$(button).attr('data-id', plugin.newPostData.post_id);
|
1580 |
+
$(button).attr('data-title', plugin.newPostData.post_title);
|
1581 |
+
$(button).attr('data-url', plugin.newPostData.post_content);
|
1582 |
+
$(button).attr('data-status', plugin.newPostData._status);
|
1583 |
+
$(button).attr('data-navstatus', plugin.newPostData.nav_status);
|
1584 |
+
$(button).attr('data-np-status', plugin.newPostData.np_status);
|
1585 |
+
$(button).attr('data-linktarget', plugin.newPostData.link_target);
|
1586 |
+
$(button).attr('data-navtitleattr', plugin.newPostData.np_title_attribute);
|
1587 |
+
$(button).attr('data-navcss', plugin.newPostData.np_nav_css_classes);
|
1588 |
+
|
1589 |
+
plugin.formatter.removeQuickEdit();
|
1590 |
+
plugin.formatter.flashRow(row);
|
1591 |
+
}
|
1592 |
+
|
1593 |
+
|
1594 |
+
// Toggle loading state in form
|
1595 |
+
plugin.toggleLoading = function(loading)
|
1596 |
+
{
|
1597 |
+
$('.row').removeClass('np-updated').removeClass('np-updated-show');
|
1598 |
+
if ( loading ){
|
1599 |
+
$(NestedPages.selectors.quickEditErrorDiv).hide();
|
1600 |
+
$(NestedPages.selectors.quickEditLinkSaveButton).attr('disabled', 'disabled');
|
1601 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).show();
|
1602 |
+
return;
|
1603 |
+
}
|
1604 |
+
$(NestedPages.selectors.quickEditLinkSaveButton).attr('disabled', false);
|
1605 |
+
$(NestedPages.selectors.quickEditLoadingIndicator).hide();
|
1606 |
+
}
|
1607 |
+
|
1608 |
+
|
1609 |
+
return plugin.init();
|
1610 |
+
|
1611 |
+
}
|
1612 |
+
var NestedPages = NestedPages || {};
|
1613 |
+
|
1614 |
+
/**
|
1615 |
+
* Post clone functionality
|
1616 |
+
* @package Nested Pages
|
1617 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
1618 |
+
*/
|
1619 |
+
NestedPages.Clone = function()
|
1620 |
+
{
|
1621 |
+
var plugin = this;
|
1622 |
+
var $ = jQuery;
|
1623 |
+
|
1624 |
+
plugin.parent_id = ''; // The parent/source post ID
|
1625 |
+
plugin.parent_title = ''; // The parent title
|
1626 |
+
plugin.parentLi = null;
|
1627 |
+
|
1628 |
+
plugin.formatter = new NestedPages.Formatter;
|
1629 |
+
|
1630 |
+
plugin.init = function()
|
1631 |
+
{
|
1632 |
+
plugin.bindEvents();
|
1633 |
+
}
|
1634 |
+
|
1635 |
+
|
1636 |
+
plugin.bindEvents = function()
|
1637 |
+
{
|
1638 |
+
$(document).on('click', NestedPages.selectors.cloneButton, function(e){
|
1639 |
+
e.preventDefault();
|
1640 |
+
plugin.parent_id = $(this).attr('data-id');
|
1641 |
+
plugin.parent_title = $(this).attr('data-parentname');
|
1642 |
+
plugin.parentLi = $(this).parent('.row').parent('.page-row').parent('.npList');
|
1643 |
+
plugin.openModal();
|
1644 |
+
});
|
1645 |
+
$(document).on('click', NestedPages.selectors.confirmClone, function(e){
|
1646 |
+
e.preventDefault();
|
1647 |
+
plugin.clone();
|
1648 |
+
});
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
// Open the modal with clone options
|
1652 |
+
plugin.openModal = function()
|
1653 |
+
{
|
1654 |
+
$(NestedPages.selectors.cloneModal).find('[data-clone-parent]').text(plugin.parent_title);
|
1655 |
+
$(NestedPages.selectors.cloneModal).modal('show');
|
1656 |
+
}
|
1657 |
+
|
1658 |
+
|
1659 |
+
// Clone the post
|
1660 |
+
plugin.clone = function()
|
1661 |
+
{
|
1662 |
+
plugin.toggleLoading(true);
|
1663 |
+
$.ajax({
|
1664 |
+
url : NestedPages.jsData.ajaxurl,
|
1665 |
+
type : 'post',
|
1666 |
+
data : {
|
1667 |
+
action : NestedPages.formActions.clonePost,
|
1668 |
+
parent_id : plugin.parent_id,
|
1669 |
+
quantity : $(NestedPages.selectors.cloneQuantity).val(),
|
1670 |
+
status : $(NestedPages.selectors.cloneStatus).val(),
|
1671 |
+
author : $(NestedPages.selectors.cloneAuthor).find('select').val(),
|
1672 |
+
nonce : NestedPages.jsData.nonce,
|
1673 |
+
posttype : NestedPages.jsData.posttype
|
1674 |
+
},
|
1675 |
+
success : function(data){
|
1676 |
+
plugin.toggleLoading(false);
|
1677 |
+
$(NestedPages.selectors.cloneModal).modal('hide');
|
1678 |
+
location.reload();
|
1679 |
+
}
|
1680 |
+
});
|
1681 |
+
}
|
1682 |
+
|
1683 |
+
|
1684 |
+
// Toggle Loading
|
1685 |
+
plugin.toggleLoading = function(loading)
|
1686 |
+
{
|
1687 |
+
if ( loading ){
|
1688 |
+
$(NestedPages.selectors.cloneModal).find('[data-clone-loading]').show();
|
1689 |
+
$(NestedPages.selectors.confirmClone).attr('disabled', 'disabled');
|
1690 |
+
return;
|
1691 |
+
}
|
1692 |
+
$(NestedPages.selectors.cloneModal).find('[data-clone-loading]').hide();
|
1693 |
+
$(NestedPages.selectors.confirmClone).attr('disabled', false);
|
1694 |
+
}
|
1695 |
+
|
1696 |
+
return plugin.init();
|
1697 |
+
}
|
1698 |
+
/**
|
1699 |
+
* Primary Nested Pages Initialization
|
1700 |
+
* @package Nested Pages
|
1701 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
1702 |
+
*/
|
1703 |
+
|
1704 |
+
jQuery(document).ready(function(){
|
1705 |
+
new NestedPages.Factory;
|
1706 |
+
});
|
1707 |
+
|
1708 |
+
var NestedPages = NestedPages || {};
|
1709 |
+
|
1710 |
+
|
1711 |
+
// DOM Selectors
|
1712 |
+
NestedPages.selectors = {
|
1713 |
+
childToggle : '.child-toggle', // Child Toggle Buttons
|
1714 |
+
childToggleLink : '.child-toggle a', // Actual link in button
|
1715 |
+
toggleAll : '.nestedpages-toggleall', // Toggle All Button
|
1716 |
+
toggleHidden : '.np-toggle-hidden', // Toggle Hidden Pages
|
1717 |
+
toggleStatus : '.np-toggle-publish', // Toggle Published Pages
|
1718 |
+
lists : '.nplist', // OL elements
|
1719 |
+
rows : '.page-row', // Page Row,
|
1720 |
+
row : '.row', // Inner row div element
|
1721 |
+
sortable : '.sortable', // Sortable List
|
1722 |
+
notSortable : '.no-sort', // Unsortable List
|
1723 |
+
handle : '.handle', // Sortable Handle
|
1724 |
+
published : '.published', // Published Rows
|
1725 |
+
hiddenRows : '.np-hide', // Hidden Rows
|
1726 |
+
errorDiv : '#np-error', // Error Alert
|
1727 |
+
loadingIndicator : '#nested-loading', // Loading Indicator,
|
1728 |
+
syncCheckbox : '.np-sync-menu', // Sync menu checkbox
|
1729 |
+
|
1730 |
+
// Responsive Toggle
|
1731 |
+
toggleEditButtons : '.np-toggle-edit', // Button that toggles responsive buttons
|
1732 |
+
|
1733 |
+
// Quick Edit
|
1734 |
+
quickEditOverlay : '.np-inline-overlay', // The inline modal
|
1735 |
+
quickEditLoadingIndicator : '.np-qe-loading', // Loading indicator in Quick Edit
|
1736 |
+
quickEditErrorDiv : '.np-quickedit-error', // Error Div in Quick Edit
|
1737 |
+
quickEditCancel : '.np-cancel-quickedit', // Cancel button in quick edit
|
1738 |
+
quickEditToggleTaxonomies : '.np-toggle-taxonomies', // Toggle Taxonomies in Quick Edit
|
1739 |
+
quickEditToggleMenuOptions : '.np-toggle-menuoptions', // Toggle Menu Options in Quick Edit
|
1740 |
+
|
1741 |
+
// Quick Edit - Links
|
1742 |
+
quickEditButtonLink : '.np-quick-edit-redirect', // Button to open link quick edit
|
1743 |
+
quickEditLinkForm : '.quick-edit-form-redirect', // Form for link quick edits
|
1744 |
+
quickEditLinkSaveButton : '.np-save-quickedit-redirect', // Save button in link quick edit form
|
1745 |
+
|
1746 |
+
// Quick Edit - Posts
|
1747 |
+
quickEditOpen : '.np-quick-edit', // Button to open post quick edit
|
1748 |
+
quickEditPostForm : '.quick-edit-form', // Form container
|
1749 |
+
quickEditSaveButton : '.np-save-quickedit', // Save button in quick edit (posts)
|
1750 |
+
|
1751 |
+
// Link Items
|
1752 |
+
openLinkModal : '.open-redirect-modal', // Opens new link modal
|
1753 |
+
linkModal : '#np-link-modal', // The add a link modal
|
1754 |
+
saveLink : '.np-save-link', // Save Link Button
|
1755 |
+
linkLoadingIndicator : '.np-link-loading', // Loading Indicator in Link Modal
|
1756 |
+
linkErrorDiv : '.np-new-link-error', // Error Div in Link Modal
|
1757 |
+
linkForm : '.np-new-link-form', // The form element for a new link
|
1758 |
+
|
1759 |
+
// New Page Items
|
1760 |
+
openPageModal : '.open-bulk-modal', // Opens the new page(s) modal
|
1761 |
+
newPageModal : '#np-bulk-modal', // The modal with the new page form
|
1762 |
+
newPageFormContainer : '.new-child-form', // The new page form container
|
1763 |
+
newPageForm : '.np-new-child-form', // The form element
|
1764 |
+
newPageSubmitButton : '.np-save-newchild', // Submit button in new page form
|
1765 |
+
newPageTitle : '.add-new-child-row', // Button to add a new page title field to the form
|
1766 |
+
newPageRemoveTitle : '.np-remove-child', // Button to remove a title field in the form
|
1767 |
+
addChildButton : '.add-new-child', // Button to add child page(s)
|
1768 |
+
newChildError : '.np-newchild-error', // Error div in new child quick edit
|
1769 |
+
cancelNewChildButton : '.np-cancel-newchild', // Cancel button in new child quick edit
|
1770 |
+
|
1771 |
+
// Clone
|
1772 |
+
cloneButton : '.clone-post', // Button to clone a post
|
1773 |
+
confirmClone : '[data-confirm-clone]', // Button in modal to confirm clone
|
1774 |
+
cloneModal : '#np-clone-modal', // Modal with clone options
|
1775 |
+
cloneQuantity : '[data-clone-quantity]', // Quantity to Clone
|
1776 |
+
cloneStatus : '[data-clone-status]', // Clone Status
|
1777 |
+
cloneAuthor : '[data-clone-author]', // Clone Author
|
1778 |
+
}
|
1779 |
+
|
1780 |
+
|
1781 |
+
// CSS Classes
|
1782 |
+
NestedPages.cssClasses = {
|
1783 |
+
iconToggleDown : 'np-icon-arrow-down',
|
1784 |
+
iconToggleRight : 'np-icon-arrow-right',
|
1785 |
+
noborder : 'no-border'
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
|
1789 |
+
// JS Data
|
1790 |
+
NestedPages.jsData = {
|
1791 |
+
ajaxurl : ajaxurl,
|
1792 |
+
nonce : nestedpages.np_nonce,
|
1793 |
+
allPostTypes : nestedpages.post_types, // Localized data with all post types
|
1794 |
+
posttype : '', // current Screen's post type
|
1795 |
+
nestable : true, // boolean - whether post type is nestable
|
1796 |
+
hierarchical : true, // boolean - whether post type is hierarchical
|
1797 |
+
expandText : nestedpages.expand_text, // Expand all button text
|
1798 |
+
collapseText : nestedpages.collapse_text, // Collapse all button text
|
1799 |
+
showHiddenText : nestedpages.show_hidden, // Show Hidden Pages Link Text
|
1800 |
+
hideHiddenText : nestedpages.hide_hidden, // Hide Hidden Pages Link Text
|
1801 |
+
quickEditText : nestedpages.quick_edit, // Quick Edit Button Text
|
1802 |
+
hiddenText : nestedpages.hidden, // Localized "Hidden"
|
1803 |
+
titleText : nestedpages.title, // Localized "Title"
|
1804 |
+
}
|
1805 |
+
|
1806 |
+
|
1807 |
+
// Form Actions
|
1808 |
+
NestedPages.formActions = {
|
1809 |
+
syncToggles : 'npnestToggle',
|
1810 |
+
syncNesting : 'npsort',
|
1811 |
+
syncMenu : 'npsyncMenu',
|
1812 |
+
newLink : 'npnewLink',
|
1813 |
+
newPage : 'npnewChild',
|
1814 |
+
quickEditLink : 'npquickEditLink',
|
1815 |
+
getTaxonomies : 'npgetTaxonomies',
|
1816 |
+
quickEditPost : 'npquickEdit',
|
1817 |
+
clonePost : 'npclonePost'
|
1818 |
+
}
|
1819 |
+
|
1820 |
+
|
1821 |
+
/**
|
1822 |
+
* Primary Nested Pages Class
|
1823 |
+
*/
|
1824 |
+
NestedPages.Factory = function()
|
1825 |
+
{
|
1826 |
+
var plugin = this;
|
1827 |
+
var $ = jQuery;
|
1828 |
+
|
1829 |
+
plugin.formatter = new NestedPages.Formatter;
|
1830 |
+
plugin.responsive = new NestedPages.Responsive;
|
1831 |
+
plugin.menuToggle = new NestedPages.MenuToggle;
|
1832 |
+
plugin.pageToggle = new NestedPages.PageToggle;
|
1833 |
+
plugin.nesting = new NestedPages.Nesting;
|
1834 |
+
plugin.syncMenuSetting = new NestedPages.SyncMenuSetting;
|
1835 |
+
plugin.newLink = new NestedPages.NewLink;
|
1836 |
+
plugin.newPage = new NestedPages.NewPage;
|
1837 |
+
plugin.quickEditLink = new NestedPages.QuickEditLink;
|
1838 |
+
plugin.quickEditPost = new NestedPages.QuickEditPost;
|
1839 |
+
plugin.clone = new NestedPages.Clone;
|
1840 |
+
|
1841 |
+
plugin.init = function()
|
1842 |
+
{
|
1843 |
+
plugin.bindEvents();
|
1844 |
+
plugin.setPostType();
|
1845 |
+
plugin.setNestable();
|
1846 |
+
plugin.formatter.updateSubMenuToggle();
|
1847 |
+
plugin.formatter.setBorders();
|
1848 |
+
plugin.formatter.setNestedMargins();
|
1849 |
+
plugin.nesting.initializeSortable();
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
|
1853 |
+
plugin.bindEvents = function()
|
1854 |
+
{
|
1855 |
+
$(document).on('click', NestedPages.selectors.quickEditOverlay, function(e){
|
1856 |
+
plugin.formatter.removeQuickEdit();
|
1857 |
+
plugin.newPage.cancelNewPage();
|
1858 |
+
});
|
1859 |
+
}
|
1860 |
+
|
1861 |
+
|
1862 |
+
// Set whether or not post type is nestable
|
1863 |
+
plugin.setNestable = function()
|
1864 |
+
{
|
1865 |
+
var nestable = true;
|
1866 |
+
$.each(NestedPages.jsData.allPostTypes, function(i, v){
|
1867 |
+
if ( v.name !== NestedPages.jsData.posttype ) return;
|
1868 |
+
if ( v.hierarchical === true ) nestable = true;
|
1869 |
+
if ( v.disable_nesting === true ) nestable = false;
|
1870 |
+
});
|
1871 |
+
NestedPages.jsData.nestable = nestable;
|
1872 |
+
}
|
1873 |
+
|
1874 |
+
|
1875 |
+
// Set the Screen's Post Type
|
1876 |
+
plugin.setPostType = function()
|
1877 |
+
{
|
1878 |
+
NestedPages.jsData.posttype = $(NestedPages.selectors.sortable).attr('id').substring(3);
|
1879 |
+
NestedPages.jsData.hierarchical = NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical;
|
1880 |
+
}
|
1881 |
+
|
1882 |
+
|
1883 |
+
return plugin.init();
|
1884 |
+
}
|
1885 |
+
/**
|
1886 |
+
* Empty Trash Functionality
|
1887 |
+
* @package Nested Pages
|
1888 |
+
* @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
|
1889 |
+
*/
|
1890 |
+
jQuery(document).ready(function(){
|
1891 |
+
new NestedPagesTrash;
|
1892 |
+
});
|
1893 |
+
|
1894 |
+
var NestedPagesTrash = function()
|
1895 |
+
{
|
1896 |
+
var plugin = this;
|
1897 |
+
var $ = jQuery;
|
1898 |
+
|
1899 |
+
// DOM Selectors
|
1900 |
+
plugin.trashButton = '.np-empty-trash'; // Trash Link
|
1901 |
+
plugin.confirmButton = '.np-trash-confirm'; // Confirm button in modal
|
1902 |
+
plugin.warningModal = '#np-trash-modal'; // Modal with empty confirmation
|
1903 |
+
plugin.errorAlert = '#np-error'; // Alert Error Notification
|
1904 |
+
plugin.loadingIndicator = '#nested-loading'; // Loading Indication
|
1905 |
+
plugin.trashLinks = '.np-trash-links';
|
1906 |
+
plugin.postType = $('#np-trash-posttype').val();
|
1907 |
+
|
1908 |
+
// JS Data
|
1909 |
+
plugin.nonce = nestedpages.np_nonce;
|
1910 |
+
plugin.formAction = 'npEmptyTrash';
|
1911 |
+
|
1912 |
+
|
1913 |
+
// Initialization
|
1914 |
+
plugin.init = function(){
|
1915 |
+
plugin.bindEvents();
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
// Bind Events
|
1919 |
+
plugin.bindEvents = function(){
|
1920 |
+
$(document).on('click', plugin.trashButton, function(e){
|
1921 |
+
e.preventDefault();
|
1922 |
+
$(plugin.warningModal).modal('show');
|
1923 |
+
});
|
1924 |
+
$(document).on('click', plugin.confirmButton, function(e){
|
1925 |
+
e.preventDefault();
|
1926 |
+
plugin.confirmEmpty();
|
1927 |
+
});
|
1928 |
+
}
|
1929 |
+
|
1930 |
+
// Confirm Trash Empty
|
1931 |
+
plugin.confirmEmpty = function(){
|
1932 |
+
plugin.loading(true);
|
1933 |
+
$(plugin.warningModal).hide();
|
1934 |
+
$(plugin.errorAlert).hide();
|
1935 |
+
plugin.emptyTrash();
|
1936 |
+
}
|
1937 |
+
|
1938 |
+
// Empty the Trash
|
1939 |
+
plugin.emptyTrash = function(){
|
1940 |
+
$.ajax({
|
1941 |
+
url: ajaxurl,
|
1942 |
+
type: 'post',
|
1943 |
+
datatype: 'json',
|
1944 |
+
data: {
|
1945 |
+
action : plugin.formAction,
|
1946 |
+
nonce : plugin.nonce,
|
1947 |
+
posttype : plugin.postType
|
1948 |
+
},
|
1949 |
+
success: function(data){
|
1950 |
+
plugin.loading(false);
|
1951 |
+
if (data.status === 'error'){
|
1952 |
+
$(plugin.errorAlert).text(data.message).show();
|
1953 |
+
} else {
|
1954 |
+
$(plugin.trashLinks).hide();
|
1955 |
+
}
|
1956 |
+
}
|
1957 |
+
});
|
1958 |
+
}
|
1959 |
+
|
1960 |
+
// Loading Indication
|
1961 |
+
plugin.loading = function(loading){
|
1962 |
+
if ( loading ){
|
1963 |
+
$(plugin.loadingIndicator).show();
|
1964 |
+
return;
|
1965 |
+
}
|
1966 |
+
$(plugin.loadingIndicator).hide();
|
1967 |
+
}
|
1968 |
+
|
1969 |
+
return plugin.init();
|
1970 |
+
}
|
languages/nestedpages-da_DK.mo
CHANGED
Binary file
|
languages/nestedpages-da_DK.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Nested Pages v1.1.6\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
-
"PO-Revision-Date: 2015-
|
7 |
"Last-Translator: Thomas Blomberg Hansen <thomas@blomberg.it>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: da_DK\n"
|
@@ -11,7 +11,7 @@ msgstr ""
|
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
-
"X-Generator: Poedit 1.
|
15 |
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
@@ -19,116 +19,122 @@ msgstr ""
|
|
19 |
"X-Textdomain-Support: yes\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
|
22 |
-
#: app/Activation/Dependencies.php:
|
23 |
msgid "Expand All"
|
24 |
msgstr "Udvid alle"
|
25 |
|
26 |
-
#: app/Activation/Dependencies.php:
|
27 |
msgid "Collapse All"
|
28 |
msgstr "Skjul alle"
|
29 |
|
30 |
# @ nestedpages
|
31 |
-
#: app/Activation/Dependencies.php:
|
32 |
msgid "Show Hidden"
|
33 |
msgstr "Vis skjulte"
|
34 |
|
35 |
# @ nestedpages
|
36 |
-
#: app/Activation/Dependencies.php:
|
37 |
msgid "Hide Hidden"
|
38 |
msgstr "Skjul skjulte"
|
39 |
|
40 |
# @ nestedpages
|
41 |
# @ default
|
42 |
-
#: app/Activation/Dependencies.php:
|
43 |
-
#: app/Views/listing.php:
|
44 |
msgid "Add Link"
|
45 |
msgstr "Tilføj link"
|
46 |
|
47 |
# @ nestedpages
|
48 |
-
#: app/Activation/Dependencies.php:
|
49 |
msgid "Add Child Link"
|
50 |
msgstr "Tilføj link under"
|
51 |
|
52 |
# @ nestedpages
|
53 |
# @ default
|
54 |
-
#: app/Activation/Dependencies.php:
|
55 |
-
#: app/Entities/Post/PostUpdateRepository.php:
|
56 |
#: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
|
57 |
-
#: app/Views/forms/quickedit-post.php:20 app/Views/partials/tool-list.php:
|
58 |
msgid "Title"
|
59 |
msgstr "Titel"
|
60 |
|
61 |
# @ default
|
62 |
-
#: app/Activation/Dependencies.php:
|
63 |
-
#: app/Views/partials/row-link.php:
|
64 |
msgid "Quick Edit"
|
65 |
msgstr "Lynrediger"
|
66 |
|
67 |
-
#: app/Activation/Dependencies.php:
|
68 |
msgid "Page Title"
|
69 |
msgstr "Sidetitel"
|
70 |
|
71 |
# @ default
|
72 |
-
#: app/Activation/Dependencies.php:
|
73 |
msgid "View"
|
74 |
msgstr "Vis"
|
75 |
|
76 |
# @ nestedpages
|
77 |
-
#: app/Activation/Dependencies.php:
|
78 |
-
#: app/Views/partials/row.php:
|
79 |
msgid "Add Child"
|
80 |
msgstr "Tilføj underside"
|
81 |
|
82 |
-
#: app/Activation/Dependencies.php:
|
83 |
msgid "Add Child Page"
|
84 |
msgstr "Tilføj undersider"
|
85 |
|
86 |
-
#: app/Activation/Dependencies.php:
|
87 |
msgid "Add Child Pages"
|
88 |
msgstr "Tilføj undersider"
|
89 |
|
90 |
-
#: app/Activation/Dependencies.php:
|
91 |
msgid "Add"
|
92 |
msgstr "Tilføj"
|
93 |
|
94 |
-
#: app/Activation/Dependencies.php:
|
95 |
msgid "Add Page"
|
96 |
msgstr "Tilføj Side"
|
97 |
|
98 |
-
#: app/Activation/Dependencies.php:
|
99 |
msgid "Add Pages"
|
100 |
msgstr "Tilføj Sider"
|
101 |
|
102 |
-
#: app/Activation/Dependencies.php:
|
103 |
-
#: app/Views/listing.php:
|
104 |
msgid "Add Multiple"
|
105 |
msgstr "Tilføj flere"
|
106 |
|
107 |
-
#: app/Activation/Dependencies.php:
|
108 |
msgid ""
|
109 |
"Are you sure you would like to empty the trash? This action is not "
|
110 |
"reversable."
|
111 |
msgstr ""
|
112 |
"Er du sikker på, at du vil tømme papirkurven? Dette kan ikke fortrydes."
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
# @ default
|
115 |
-
#: app/Bootstrap.php:
|
116 |
msgid "Settings"
|
117 |
msgstr "Indstillinger"
|
118 |
|
119 |
# @ nestedpages
|
120 |
-
#: app/Config/Settings.php:
|
121 |
msgid "Nested Pages Settings"
|
122 |
msgstr "Nested Pages Indstillinger"
|
123 |
|
124 |
# @ nestedpages
|
125 |
-
#: app/Config/Settings.php:
|
126 |
msgid "Nested Pages"
|
127 |
msgstr "Nested Pages"
|
128 |
|
129 |
# @ default
|
130 |
#: app/Entities/AdminMenu/AdminSubmenu.php:73
|
131 |
-
#: app/Views/partials/tool-list.php:
|
132 |
msgid "Default"
|
133 |
msgstr "Standard"
|
134 |
|
@@ -167,15 +173,15 @@ msgid "restored from trash"
|
|
167 |
msgstr "gendannet fra papirkurven"
|
168 |
|
169 |
# @ nestedpages
|
170 |
-
#: app/Entities/Post/PostUpdateRepository.php:
|
171 |
msgid "Label"
|
172 |
msgstr "Label"
|
173 |
|
174 |
-
#: app/Entities/PostType/PostTypeRepository.php:
|
175 |
msgid "Nested View"
|
176 |
msgstr "Hierarkisk visning"
|
177 |
|
178 |
-
#: app/Entities/PostType/PostTypeRepository.php:
|
179 |
#, fuzzy
|
180 |
msgid "Sort View"
|
181 |
msgstr "Sorterings visning"
|
@@ -196,7 +202,7 @@ msgid "Incorrect Form Field"
|
|
196 |
msgstr "Ukorrekt formular felt"
|
197 |
|
198 |
# @ nestedpages
|
199 |
-
#: app/Form/Handlers/BaseHandler.php:
|
200 |
msgid "There was an error updating the page."
|
201 |
msgstr "Der skete en fejl under opdateringen af siden."
|
202 |
|
@@ -236,41 +242,51 @@ msgid "Menu sync disabled."
|
|
236 |
msgstr "Menu synkronisering deaktiveret."
|
237 |
|
238 |
# @ nestedpages
|
239 |
-
#: app/Form/Validation/Validation.php:
|
240 |
-
#: app/Form/Validation/Validation.php:63
|
241 |
msgid "Please provide a valid date."
|
242 |
msgstr "Vælg venligst en gyldig dato."
|
243 |
|
244 |
# @ nestedpages
|
245 |
-
#: app/Form/Validation/Validation.php:
|
246 |
msgid "Please provide a menu title."
|
247 |
msgstr "Angiv venligst en menu titel."
|
248 |
|
249 |
# @ nestedpages
|
250 |
-
#: app/Form/Validation/Validation.php:
|
251 |
msgid "Please provide a valid URL."
|
252 |
msgstr "Indtast venligst en gyldig URL."
|
253 |
|
254 |
# @ nestedpages
|
255 |
-
#: app/Form/Validation/Validation.php:
|
256 |
msgid "Please provide a "
|
257 |
msgstr "Angiv venligst"
|
258 |
|
259 |
-
#: app/Form/Validation/Validation.php:
|
260 |
msgid "A valid parent page was not provided."
|
261 |
msgstr "En gyldig forældre side blev ikke angivet."
|
262 |
|
263 |
-
#: app/Form/Validation/Validation.php:
|
264 |
msgid "Please provide at least one page title."
|
265 |
msgstr "Angiv venligst én sidetitel."
|
266 |
|
267 |
-
#: app/Form/Validation/Validation.php:
|
268 |
msgid "Page titles cannot be blank."
|
269 |
msgstr "Sidetitler kan ikke være blanke."
|
270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
# @ default
|
272 |
#: app/Views/forms/link-form.php:31 app/Views/forms/quickedit-link.php:17
|
273 |
-
#: app/Views/forms/quickedit-post.php:
|
274 |
msgid "Navigation Label"
|
275 |
msgstr "Navigation label"
|
276 |
|
@@ -283,51 +299,51 @@ msgstr "URL"
|
|
283 |
# @ default
|
284 |
#: app/Views/forms/link-form.php:41 app/Views/forms/new-child.php:35
|
285 |
#: app/Views/forms/quickedit-link.php:27
|
286 |
-
#: app/Views/forms/quickedit-post.php:
|
287 |
msgid "Status"
|
288 |
msgstr "Status"
|
289 |
|
290 |
# @ default
|
291 |
#: app/Views/forms/link-form.php:44 app/Views/forms/new-child.php:38
|
292 |
#: app/Views/forms/quickedit-link.php:30
|
293 |
-
#: app/Views/forms/quickedit-post.php:
|
294 |
msgid "Published"
|
295 |
msgstr "Udgivet"
|
296 |
|
297 |
# @ default
|
298 |
#: app/Views/forms/link-form.php:45 app/Views/forms/quickedit-link.php:31
|
299 |
-
#: app/Views/forms/quickedit-post.php:
|
300 |
msgid "Scheduled"
|
301 |
msgstr "Planlagt"
|
302 |
|
303 |
# @ default
|
304 |
#: app/Views/forms/link-form.php:47 app/Views/forms/quickedit-link.php:33
|
305 |
-
#: app/Views/forms/quickedit-post.php:
|
306 |
msgid "Pending Review"
|
307 |
msgstr "Afventer godkendelse"
|
308 |
|
309 |
# @ default
|
310 |
#: app/Views/forms/link-form.php:48 app/Views/forms/new-child.php:40
|
311 |
#: app/Views/forms/quickedit-link.php:34
|
312 |
-
#: app/Views/forms/quickedit-post.php:
|
313 |
msgid "Draft"
|
314 |
msgstr "Kladde"
|
315 |
|
316 |
# @ nestedpages
|
317 |
#: app/Views/forms/link-form.php:59 app/Views/forms/quickedit-link.php:54
|
318 |
-
#: app/Views/forms/quickedit-post.php:
|
319 |
msgid "Hide in Nav Menu"
|
320 |
msgstr "Skjul i Menuer"
|
321 |
|
322 |
# @ nestedpages
|
323 |
#: app/Views/forms/link-form.php:64 app/Views/forms/quickedit-link.php:60
|
324 |
-
#: app/Views/forms/quickedit-post.php:
|
325 |
msgid "Hide in Nested Pages"
|
326 |
msgstr "Skjul i denne oversigt"
|
327 |
|
328 |
# @ default
|
329 |
#: app/Views/forms/link-form.php:69 app/Views/forms/quickedit-link.php:66
|
330 |
-
#: app/Views/forms/quickedit-post.php:
|
331 |
msgid "Open link in a new window/tab"
|
332 |
msgstr "Åben link i nyt vindue/faneblad"
|
333 |
|
@@ -346,26 +362,20 @@ msgid "+"
|
|
346 |
msgstr "+"
|
347 |
|
348 |
# @ default
|
349 |
-
#: app/Views/forms/new-child.php:61 app/Views/forms/quickedit-post.php:
|
350 |
msgid "Author"
|
351 |
msgstr "Forfatter"
|
352 |
|
353 |
# @ default
|
354 |
-
#: app/Views/forms/new-child.php:71 app/Views/forms/quickedit-post.php:
|
355 |
msgid "Template"
|
356 |
msgstr "Skabelon"
|
357 |
|
358 |
# @ default
|
359 |
-
#: app/Views/forms/new-child.php:73 app/Views/forms/quickedit-post.php:
|
360 |
msgid "Default Template"
|
361 |
msgstr "Standard skabelon"
|
362 |
|
363 |
-
# @ default
|
364 |
-
#: app/Views/forms/new-child.php:90 app/Views/forms/quickedit-link.php:81
|
365 |
-
#: app/Views/forms/quickedit-post.php:189
|
366 |
-
msgid "Cancel"
|
367 |
-
msgstr "Annullere"
|
368 |
-
|
369 |
#: app/Views/forms/new-child.php:96
|
370 |
msgid "Add & Edit"
|
371 |
msgstr "Tilføj & Rediger"
|
@@ -377,19 +387,19 @@ msgstr "Link"
|
|
377 |
|
378 |
# @ default
|
379 |
#: app/Views/forms/quickedit-link.php:44
|
380 |
-
#: app/Views/forms/quickedit-post.php:
|
381 |
msgid "Title Attribute"
|
382 |
msgstr "Titel attribut"
|
383 |
|
384 |
# @ default
|
385 |
#: app/Views/forms/quickedit-link.php:48
|
386 |
-
#: app/Views/forms/quickedit-post.php:
|
387 |
msgid "CSS Classes"
|
388 |
msgstr "CSS Klasser"
|
389 |
|
390 |
# @ default
|
391 |
#: app/Views/forms/quickedit-link.php:84
|
392 |
-
#: app/Views/forms/quickedit-post.php:
|
393 |
msgid "Update"
|
394 |
msgstr "Opdater"
|
395 |
|
@@ -399,57 +409,65 @@ msgid "Slug"
|
|
399 |
msgstr "Korttitel"
|
400 |
|
401 |
# @ default
|
402 |
-
#: app/Views/forms/quickedit-post.php:
|
|
|
403 |
msgid "Date"
|
404 |
msgstr "Dato"
|
405 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
# @ default
|
407 |
-
#: app/Views/forms/quickedit-post.php:
|
408 |
msgid "Password"
|
409 |
msgstr "Kodeord"
|
410 |
|
411 |
# @ default
|
412 |
-
#: app/Views/forms/quickedit-post.php:
|
413 |
msgid "–OR–"
|
414 |
msgstr "–ELLER–"
|
415 |
|
416 |
# @ default
|
417 |
-
#: app/Views/forms/quickedit-post.php:
|
418 |
msgid "Private"
|
419 |
msgstr "Privat"
|
420 |
|
421 |
# @ default
|
422 |
-
#: app/Views/forms/quickedit-post.php:
|
423 |
msgid "Allow Comments"
|
424 |
msgstr "Tillad kommentarer"
|
425 |
|
426 |
# @ nestedpages
|
427 |
-
#: app/Views/forms/quickedit-post.php:
|
428 |
msgid "Menu Options"
|
429 |
msgstr "Menuer indstilinger"
|
430 |
|
431 |
# @ nestedpages
|
432 |
-
#: app/Views/forms/quickedit-post.php:
|
433 |
msgid "Taxonomies"
|
434 |
msgstr "Taxonomier"
|
435 |
|
436 |
# @ nestedpages
|
437 |
-
#: app/Views/listing.php:
|
438 |
msgid "Sync Menu"
|
439 |
msgstr "Synkronisere til Menuer"
|
440 |
|
441 |
-
# @ nestedpages
|
442 |
-
#: app/Views/partials/row-link.php:30 app/Views/partials/row.php:39
|
443 |
-
msgid "Hidden"
|
444 |
-
msgstr "Skjult"
|
445 |
-
|
446 |
# @ nestedpages
|
447 |
#: app/Views/partials/row.php:47
|
448 |
msgid "currently editing"
|
449 |
msgstr "redigere siden"
|
450 |
|
451 |
# @ default
|
452 |
-
#: app/Views/partials/row.php:
|
453 |
msgid "Edit"
|
454 |
msgstr "Rediger"
|
455 |
|
@@ -459,46 +477,54 @@ msgid "All"
|
|
459 |
msgstr "Alle"
|
460 |
|
461 |
# @ default
|
462 |
-
#: app/Views/partials/tool-list.php:
|
463 |
msgid "Trash"
|
464 |
msgstr "Papirkurv"
|
465 |
|
466 |
-
#: app/Views/partials/tool-list.php:
|
467 |
msgid "Empty"
|
468 |
msgstr "Tom"
|
469 |
|
470 |
-
#: app/Views/partials/tool-list.php:
|
471 |
msgid "All Authors"
|
472 |
msgstr "Alle forfattere"
|
473 |
|
474 |
-
#: app/Views/partials/tool-list.php:
|
475 |
msgid "Menu Order"
|
476 |
msgstr "Menu rækkefølge"
|
477 |
|
478 |
-
#: app/Views/partials/tool-list.php:
|
479 |
msgid "Order By"
|
480 |
msgstr "Sorter efter"
|
481 |
|
482 |
-
#: app/Views/partials/tool-list.php:
|
483 |
msgid "Ascending"
|
484 |
msgstr "Stigende"
|
485 |
|
486 |
-
#: app/Views/partials/tool-list.php:
|
487 |
msgid "Decending"
|
488 |
msgstr "Faldende"
|
489 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
# @ nestedpages
|
491 |
-
#: app/Views/settings/settings-general.php:
|
492 |
msgid "Nested Pages Version"
|
493 |
msgstr "Plugin version"
|
494 |
|
495 |
# @ nestedpages
|
496 |
-
#: app/Views/settings/settings-general.php:
|
497 |
msgid "Menu Name"
|
498 |
msgstr "Menunavn"
|
499 |
|
500 |
# @ nestedpages
|
501 |
-
#: app/Views/settings/settings-general.php:
|
502 |
msgid ""
|
503 |
"Important: Once the menu name has changed, theme files should be updated to "
|
504 |
"reference the new name."
|
@@ -506,11 +532,27 @@ msgstr ""
|
|
506 |
"Vigtig: Når menunavnet ændret, skal dette ajourføres i temaet, så temaet "
|
507 |
"bruger det nye navn."
|
508 |
|
509 |
-
#: app/Views/settings/settings-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
msgid "Allow Page Sorting"
|
511 |
msgstr "Tillad Side sortering"
|
512 |
|
513 |
-
#: app/Views/settings/settings-general.php:
|
514 |
msgid "Admins always have sorting ability."
|
515 |
msgstr "Admins har altid tilladelse til Side sortering"
|
516 |
|
@@ -538,12 +580,16 @@ msgstr "Erstat standard menu"
|
|
538 |
msgid "Hide Default Link"
|
539 |
msgstr "Skjul Standard link"
|
540 |
|
541 |
-
#: app/Views/settings/settings-posttypes.php:
|
|
|
|
|
|
|
|
|
542 |
msgid "Note: Nesting features not enabled for non-hierarchical post types."
|
543 |
msgstr ""
|
544 |
"Note: Indlægstyper, der ikke tillader hierarki, vil have færre muligheder."
|
545 |
|
546 |
-
#: app/Views/settings/settings-posttypes.php:
|
547 |
msgid ""
|
548 |
"If default menu is not replaced, an additional submenu item will be added "
|
549 |
"for \"Nested/Sort View\""
|
@@ -551,6 +597,20 @@ msgstr ""
|
|
551 |
"Hvis Sider menupunktet ikke erstattes, vil der blive dannet et "
|
552 |
"undermenupunkt til denne visning"
|
553 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
#: app/Views/settings/settings.php:6
|
555 |
msgid "General"
|
556 |
msgstr "Generelt"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Nested Pages v1.1.6\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-08-12 18:47+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-08-12 18:49+0100\n"
|
7 |
"Last-Translator: Thomas Blomberg Hansen <thomas@blomberg.it>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: da_DK\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Generator: Poedit 1.8.1\n"
|
15 |
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
19 |
"X-Textdomain-Support: yes\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
|
22 |
+
#: app/Activation/Dependencies.php:107 app/Views/listing.php:29
|
23 |
msgid "Expand All"
|
24 |
msgstr "Udvid alle"
|
25 |
|
26 |
+
#: app/Activation/Dependencies.php:108
|
27 |
msgid "Collapse All"
|
28 |
msgstr "Skjul alle"
|
29 |
|
30 |
# @ nestedpages
|
31 |
+
#: app/Activation/Dependencies.php:109 app/Views/partials/tool-list.php:18
|
32 |
msgid "Show Hidden"
|
33 |
msgstr "Vis skjulte"
|
34 |
|
35 |
# @ nestedpages
|
36 |
+
#: app/Activation/Dependencies.php:110
|
37 |
msgid "Hide Hidden"
|
38 |
msgstr "Skjul skjulte"
|
39 |
|
40 |
# @ nestedpages
|
41 |
# @ default
|
42 |
+
#: app/Activation/Dependencies.php:111 app/Views/forms/link-form.php:14
|
43 |
+
#: app/Views/listing.php:16 app/Views/listing.php:17
|
44 |
msgid "Add Link"
|
45 |
msgstr "Tilføj link"
|
46 |
|
47 |
# @ nestedpages
|
48 |
+
#: app/Activation/Dependencies.php:112
|
49 |
msgid "Add Child Link"
|
50 |
msgstr "Tilføj link under"
|
51 |
|
52 |
# @ nestedpages
|
53 |
# @ default
|
54 |
+
#: app/Activation/Dependencies.php:113
|
55 |
+
#: app/Entities/Post/PostUpdateRepository.php:68
|
56 |
#: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
|
57 |
+
#: app/Views/forms/quickedit-post.php:20 app/Views/partials/tool-list.php:64
|
58 |
msgid "Title"
|
59 |
msgstr "Titel"
|
60 |
|
61 |
# @ default
|
62 |
+
#: app/Activation/Dependencies.php:114 app/Views/forms/quickedit-post.php:11
|
63 |
+
#: app/Views/partials/row-link.php:60 app/Views/partials/row.php:120
|
64 |
msgid "Quick Edit"
|
65 |
msgstr "Lynrediger"
|
66 |
|
67 |
+
#: app/Activation/Dependencies.php:115
|
68 |
msgid "Page Title"
|
69 |
msgstr "Sidetitel"
|
70 |
|
71 |
# @ default
|
72 |
+
#: app/Activation/Dependencies.php:116 app/Views/partials/row.php:124
|
73 |
msgid "View"
|
74 |
msgstr "Vis"
|
75 |
|
76 |
# @ nestedpages
|
77 |
+
#: app/Activation/Dependencies.php:117 app/Views/forms/new-child.php:7
|
78 |
+
#: app/Views/partials/row.php:88
|
79 |
msgid "Add Child"
|
80 |
msgstr "Tilføj underside"
|
81 |
|
82 |
+
#: app/Activation/Dependencies.php:118
|
83 |
msgid "Add Child Page"
|
84 |
msgstr "Tilføj undersider"
|
85 |
|
86 |
+
#: app/Activation/Dependencies.php:119
|
87 |
msgid "Add Child Pages"
|
88 |
msgstr "Tilføj undersider"
|
89 |
|
90 |
+
#: app/Activation/Dependencies.php:120 app/Views/forms/new-child.php:93
|
91 |
msgid "Add"
|
92 |
msgstr "Tilføj"
|
93 |
|
94 |
+
#: app/Activation/Dependencies.php:121
|
95 |
msgid "Add Page"
|
96 |
msgstr "Tilføj Side"
|
97 |
|
98 |
+
#: app/Activation/Dependencies.php:122
|
99 |
msgid "Add Pages"
|
100 |
msgstr "Tilføj Sider"
|
101 |
|
102 |
+
#: app/Activation/Dependencies.php:123 app/Views/listing.php:10
|
103 |
+
#: app/Views/listing.php:11
|
104 |
msgid "Add Multiple"
|
105 |
msgstr "Tilføj flere"
|
106 |
|
107 |
+
#: app/Activation/Dependencies.php:124
|
108 |
msgid ""
|
109 |
"Are you sure you would like to empty the trash? This action is not "
|
110 |
"reversable."
|
111 |
msgstr ""
|
112 |
"Er du sikker på, at du vil tømme papirkurven? Dette kan ikke fortrydes."
|
113 |
|
114 |
+
# @ nestedpages
|
115 |
+
#: app/Activation/Dependencies.php:125 app/Views/partials/row-link.php:37
|
116 |
+
#: app/Views/partials/row.php:39
|
117 |
+
msgid "Hidden"
|
118 |
+
msgstr "Skjult"
|
119 |
+
|
120 |
# @ default
|
121 |
+
#: app/Bootstrap.php:60
|
122 |
msgid "Settings"
|
123 |
msgstr "Indstillinger"
|
124 |
|
125 |
# @ nestedpages
|
126 |
+
#: app/Config/Settings.php:52 app/Views/settings/settings.php:2
|
127 |
msgid "Nested Pages Settings"
|
128 |
msgstr "Nested Pages Indstillinger"
|
129 |
|
130 |
# @ nestedpages
|
131 |
+
#: app/Config/Settings.php:53
|
132 |
msgid "Nested Pages"
|
133 |
msgstr "Nested Pages"
|
134 |
|
135 |
# @ default
|
136 |
#: app/Entities/AdminMenu/AdminSubmenu.php:73
|
137 |
+
#: app/Views/partials/tool-list.php:33
|
138 |
msgid "Default"
|
139 |
msgstr "Standard"
|
140 |
|
173 |
msgstr "gendannet fra papirkurven"
|
174 |
|
175 |
# @ nestedpages
|
176 |
+
#: app/Entities/Post/PostUpdateRepository.php:310
|
177 |
msgid "Label"
|
178 |
msgstr "Label"
|
179 |
|
180 |
+
#: app/Entities/PostType/PostTypeRepository.php:182
|
181 |
msgid "Nested View"
|
182 |
msgstr "Hierarkisk visning"
|
183 |
|
184 |
+
#: app/Entities/PostType/PostTypeRepository.php:182
|
185 |
#, fuzzy
|
186 |
msgid "Sort View"
|
187 |
msgstr "Sorterings visning"
|
202 |
msgstr "Ukorrekt formular felt"
|
203 |
|
204 |
# @ nestedpages
|
205 |
+
#: app/Form/Handlers/BaseHandler.php:110
|
206 |
msgid "There was an error updating the page."
|
207 |
msgstr "Der skete en fejl under opdateringen af siden."
|
208 |
|
242 |
msgstr "Menu synkronisering deaktiveret."
|
243 |
|
244 |
# @ nestedpages
|
245 |
+
#: app/Form/Validation/Validation.php:139
|
|
|
246 |
msgid "Please provide a valid date."
|
247 |
msgstr "Vælg venligst en gyldig dato."
|
248 |
|
249 |
# @ nestedpages
|
250 |
+
#: app/Form/Validation/Validation.php:151
|
251 |
msgid "Please provide a menu title."
|
252 |
msgstr "Angiv venligst en menu titel."
|
253 |
|
254 |
# @ nestedpages
|
255 |
+
#: app/Form/Validation/Validation.php:154
|
256 |
msgid "Please provide a valid URL."
|
257 |
msgstr "Indtast venligst en gyldig URL."
|
258 |
|
259 |
# @ nestedpages
|
260 |
+
#: app/Form/Validation/Validation.php:165
|
261 |
msgid "Please provide a "
|
262 |
msgstr "Angiv venligst"
|
263 |
|
264 |
+
#: app/Form/Validation/Validation.php:179
|
265 |
msgid "A valid parent page was not provided."
|
266 |
msgstr "En gyldig forældre side blev ikke angivet."
|
267 |
|
268 |
+
#: app/Form/Validation/Validation.php:186
|
269 |
msgid "Please provide at least one page title."
|
270 |
msgstr "Angiv venligst én sidetitel."
|
271 |
|
272 |
+
#: app/Form/Validation/Validation.php:194
|
273 |
msgid "Page titles cannot be blank."
|
274 |
msgstr "Sidetitler kan ikke være blanke."
|
275 |
|
276 |
+
# @ default
|
277 |
+
#: app/Views/forms/empty-trash-modal.php:11 app/Views/forms/new-child.php:90
|
278 |
+
#: app/Views/forms/quickedit-link.php:81
|
279 |
+
#: app/Views/forms/quickedit-post.php:207
|
280 |
+
msgid "Cancel"
|
281 |
+
msgstr "Annullere"
|
282 |
+
|
283 |
+
#: app/Views/forms/empty-trash-modal.php:12
|
284 |
+
msgid "Empty Trash"
|
285 |
+
msgstr "Tøm papirkurv"
|
286 |
+
|
287 |
# @ default
|
288 |
#: app/Views/forms/link-form.php:31 app/Views/forms/quickedit-link.php:17
|
289 |
+
#: app/Views/forms/quickedit-post.php:171
|
290 |
msgid "Navigation Label"
|
291 |
msgstr "Navigation label"
|
292 |
|
299 |
# @ default
|
300 |
#: app/Views/forms/link-form.php:41 app/Views/forms/new-child.php:35
|
301 |
#: app/Views/forms/quickedit-link.php:27
|
302 |
+
#: app/Views/forms/quickedit-post.php:76
|
303 |
msgid "Status"
|
304 |
msgstr "Status"
|
305 |
|
306 |
# @ default
|
307 |
#: app/Views/forms/link-form.php:44 app/Views/forms/new-child.php:38
|
308 |
#: app/Views/forms/quickedit-link.php:30
|
309 |
+
#: app/Views/forms/quickedit-post.php:79 app/Views/partials/tool-list.php:10
|
310 |
msgid "Published"
|
311 |
msgstr "Udgivet"
|
312 |
|
313 |
# @ default
|
314 |
#: app/Views/forms/link-form.php:45 app/Views/forms/quickedit-link.php:31
|
315 |
+
#: app/Views/forms/quickedit-post.php:80
|
316 |
msgid "Scheduled"
|
317 |
msgstr "Planlagt"
|
318 |
|
319 |
# @ default
|
320 |
#: app/Views/forms/link-form.php:47 app/Views/forms/quickedit-link.php:33
|
321 |
+
#: app/Views/forms/quickedit-post.php:82
|
322 |
msgid "Pending Review"
|
323 |
msgstr "Afventer godkendelse"
|
324 |
|
325 |
# @ default
|
326 |
#: app/Views/forms/link-form.php:48 app/Views/forms/new-child.php:40
|
327 |
#: app/Views/forms/quickedit-link.php:34
|
328 |
+
#: app/Views/forms/quickedit-post.php:83 app/Views/partials/tool-list.php:14
|
329 |
msgid "Draft"
|
330 |
msgstr "Kladde"
|
331 |
|
332 |
# @ nestedpages
|
333 |
#: app/Views/forms/link-form.php:59 app/Views/forms/quickedit-link.php:54
|
334 |
+
#: app/Views/forms/quickedit-post.php:187
|
335 |
msgid "Hide in Nav Menu"
|
336 |
msgstr "Skjul i Menuer"
|
337 |
|
338 |
# @ nestedpages
|
339 |
#: app/Views/forms/link-form.php:64 app/Views/forms/quickedit-link.php:60
|
340 |
+
#: app/Views/forms/quickedit-post.php:126
|
341 |
msgid "Hide in Nested Pages"
|
342 |
msgstr "Skjul i denne oversigt"
|
343 |
|
344 |
# @ default
|
345 |
#: app/Views/forms/link-form.php:69 app/Views/forms/quickedit-link.php:66
|
346 |
+
#: app/Views/forms/quickedit-post.php:193
|
347 |
msgid "Open link in a new window/tab"
|
348 |
msgstr "Åben link i nyt vindue/faneblad"
|
349 |
|
362 |
msgstr "+"
|
363 |
|
364 |
# @ default
|
365 |
+
#: app/Views/forms/new-child.php:61 app/Views/forms/quickedit-post.php:67
|
366 |
msgid "Author"
|
367 |
msgstr "Forfatter"
|
368 |
|
369 |
# @ default
|
370 |
+
#: app/Views/forms/new-child.php:71 app/Views/forms/quickedit-post.php:93
|
371 |
msgid "Template"
|
372 |
msgstr "Skabelon"
|
373 |
|
374 |
# @ default
|
375 |
+
#: app/Views/forms/new-child.php:73 app/Views/forms/quickedit-post.php:95
|
376 |
msgid "Default Template"
|
377 |
msgstr "Standard skabelon"
|
378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
#: app/Views/forms/new-child.php:96
|
380 |
msgid "Add & Edit"
|
381 |
msgstr "Tilføj & Rediger"
|
387 |
|
388 |
# @ default
|
389 |
#: app/Views/forms/quickedit-link.php:44
|
390 |
+
#: app/Views/forms/quickedit-post.php:175
|
391 |
msgid "Title Attribute"
|
392 |
msgstr "Titel attribut"
|
393 |
|
394 |
# @ default
|
395 |
#: app/Views/forms/quickedit-link.php:48
|
396 |
+
#: app/Views/forms/quickedit-post.php:179
|
397 |
msgid "CSS Classes"
|
398 |
msgstr "CSS Klasser"
|
399 |
|
400 |
# @ default
|
401 |
#: app/Views/forms/quickedit-link.php:84
|
402 |
+
#: app/Views/forms/quickedit-post.php:210
|
403 |
msgid "Update"
|
404 |
msgstr "Opdater"
|
405 |
|
409 |
msgstr "Korttitel"
|
410 |
|
411 |
# @ default
|
412 |
+
#: app/Views/forms/quickedit-post.php:30
|
413 |
+
#: app/Views/forms/quickedit-post.php:45 app/Views/partials/tool-list.php:63
|
414 |
msgid "Date"
|
415 |
msgstr "Dato"
|
416 |
|
417 |
+
#: app/Views/forms/quickedit-post.php:33
|
418 |
+
msgid "@"
|
419 |
+
msgstr "@"
|
420 |
+
|
421 |
+
#: app/Views/forms/quickedit-post.php:36
|
422 |
+
msgid "am"
|
423 |
+
msgstr "am"
|
424 |
+
|
425 |
+
#: app/Views/forms/quickedit-post.php:37
|
426 |
+
msgid "pm"
|
427 |
+
msgstr "pm"
|
428 |
+
|
429 |
# @ default
|
430 |
+
#: app/Views/forms/quickedit-post.php:103
|
431 |
msgid "Password"
|
432 |
msgstr "Kodeord"
|
433 |
|
434 |
# @ default
|
435 |
+
#: app/Views/forms/quickedit-post.php:106
|
436 |
msgid "–OR–"
|
437 |
msgstr "–ELLER–"
|
438 |
|
439 |
# @ default
|
440 |
+
#: app/Views/forms/quickedit-post.php:109
|
441 |
msgid "Private"
|
442 |
msgstr "Privat"
|
443 |
|
444 |
# @ default
|
445 |
+
#: app/Views/forms/quickedit-post.php:118
|
446 |
msgid "Allow Comments"
|
447 |
msgstr "Tillad kommentarer"
|
448 |
|
449 |
# @ nestedpages
|
450 |
+
#: app/Views/forms/quickedit-post.php:135
|
451 |
msgid "Menu Options"
|
452 |
msgstr "Menuer indstilinger"
|
453 |
|
454 |
# @ nestedpages
|
455 |
+
#: app/Views/forms/quickedit-post.php:139
|
456 |
msgid "Taxonomies"
|
457 |
msgstr "Taxonomier"
|
458 |
|
459 |
# @ nestedpages
|
460 |
+
#: app/Views/listing.php:35
|
461 |
msgid "Sync Menu"
|
462 |
msgstr "Synkronisere til Menuer"
|
463 |
|
|
|
|
|
|
|
|
|
|
|
464 |
# @ nestedpages
|
465 |
#: app/Views/partials/row.php:47
|
466 |
msgid "currently editing"
|
467 |
msgstr "redigere siden"
|
468 |
|
469 |
# @ default
|
470 |
+
#: app/Views/partials/row.php:51
|
471 |
msgid "Edit"
|
472 |
msgstr "Rediger"
|
473 |
|
477 |
msgstr "Alle"
|
478 |
|
479 |
# @ default
|
480 |
+
#: app/Views/partials/tool-list.php:24
|
481 |
msgid "Trash"
|
482 |
msgstr "Papirkurv"
|
483 |
|
484 |
+
#: app/Views/partials/tool-list.php:25
|
485 |
msgid "Empty"
|
486 |
msgstr "Tom"
|
487 |
|
488 |
+
#: app/Views/partials/tool-list.php:47
|
489 |
msgid "All Authors"
|
490 |
msgstr "Alle forfattere"
|
491 |
|
492 |
+
#: app/Views/partials/tool-list.php:62
|
493 |
msgid "Menu Order"
|
494 |
msgstr "Menu rækkefølge"
|
495 |
|
496 |
+
#: app/Views/partials/tool-list.php:66
|
497 |
msgid "Order By"
|
498 |
msgstr "Sorter efter"
|
499 |
|
500 |
+
#: app/Views/partials/tool-list.php:80
|
501 |
msgid "Ascending"
|
502 |
msgstr "Stigende"
|
503 |
|
504 |
+
#: app/Views/partials/tool-list.php:81
|
505 |
msgid "Decending"
|
506 |
msgstr "Faldende"
|
507 |
|
508 |
+
#: app/Views/settings/settings-general.php:4
|
509 |
+
msgid "Currently Enabled"
|
510 |
+
msgstr "Aktiveret"
|
511 |
+
|
512 |
+
#: app/Views/settings/settings-general.php:4
|
513 |
+
msgid "Currently Disabled"
|
514 |
+
msgstr "Deaktiveret"
|
515 |
+
|
516 |
# @ nestedpages
|
517 |
+
#: app/Views/settings/settings-general.php:8
|
518 |
msgid "Nested Pages Version"
|
519 |
msgstr "Plugin version"
|
520 |
|
521 |
# @ nestedpages
|
522 |
+
#: app/Views/settings/settings-general.php:12
|
523 |
msgid "Menu Name"
|
524 |
msgstr "Menunavn"
|
525 |
|
526 |
# @ nestedpages
|
527 |
+
#: app/Views/settings/settings-general.php:15
|
528 |
msgid ""
|
529 |
"Important: Once the menu name has changed, theme files should be updated to "
|
530 |
"reference the new name."
|
532 |
"Vigtig: Når menunavnet ændret, skal dette ajourføres i temaet, så temaet "
|
533 |
"bruger det nye navn."
|
534 |
|
535 |
+
#: app/Views/settings/settings-general.php:19
|
536 |
+
msgid "Display Options"
|
537 |
+
msgstr "Visning"
|
538 |
+
|
539 |
+
#: app/Views/settings/settings-general.php:23
|
540 |
+
msgid "Enable Date Picker in Quick Edit"
|
541 |
+
msgstr "Aktiver \"dato-vælger\" under \"Lynrediger\""
|
542 |
+
|
543 |
+
#: app/Views/settings/settings-general.php:28
|
544 |
+
msgid "Menu Sync"
|
545 |
+
msgstr "Menu synkronisering"
|
546 |
+
|
547 |
+
#: app/Views/settings/settings-general.php:32
|
548 |
+
msgid "Hide Menu Sync Checkbox"
|
549 |
+
msgstr "Skjul menu synkronisering afkrydsningsfeltet"
|
550 |
+
|
551 |
+
#: app/Views/settings/settings-general.php:37
|
552 |
msgid "Allow Page Sorting"
|
553 |
msgstr "Tillad Side sortering"
|
554 |
|
555 |
+
#: app/Views/settings/settings-general.php:47
|
556 |
msgid "Admins always have sorting ability."
|
557 |
msgstr "Admins har altid tilladelse til Side sortering"
|
558 |
|
580 |
msgid "Hide Default Link"
|
581 |
msgstr "Skjul Standard link"
|
582 |
|
583 |
+
#: app/Views/settings/settings-posttypes.php:19
|
584 |
+
msgid "Disable Nesting"
|
585 |
+
msgstr "Deaktiver nesting"
|
586 |
+
|
587 |
+
#: app/Views/settings/settings-posttypes.php:51
|
588 |
msgid "Note: Nesting features not enabled for non-hierarchical post types."
|
589 |
msgstr ""
|
590 |
"Note: Indlægstyper, der ikke tillader hierarki, vil have færre muligheder."
|
591 |
|
592 |
+
#: app/Views/settings/settings-posttypes.php:54
|
593 |
msgid ""
|
594 |
"If default menu is not replaced, an additional submenu item will be added "
|
595 |
"for \"Nested/Sort View\""
|
597 |
"Hvis Sider menupunktet ikke erstattes, vil der blive dannet et "
|
598 |
"undermenupunkt til denne visning"
|
599 |
|
600 |
+
#: app/Views/settings/settings-posttypes.php:57
|
601 |
+
msgid ""
|
602 |
+
"<strong>Important:</strong> Changing page structures on live sites may "
|
603 |
+
"effect SEO and existing inbound links. Limit URL structure changes on live "
|
604 |
+
"sites by disabling nesting. Sorting within the current nesting structure "
|
605 |
+
"will still be available. If nesting changes are made to a live site, it may "
|
606 |
+
"help to add a 301 redirect from the old location to the new one."
|
607 |
+
msgstr ""
|
608 |
+
"<strong>Vigtig:</strong> Changing page structures on live sites may effect "
|
609 |
+
"SEO and existing inbound links. Limit URL structure changes on live sites "
|
610 |
+
"by disabling nesting. Sorting within the current nesting structure will "
|
611 |
+
"still be available. If nesting changes are made to a live site, it may help "
|
612 |
+
"to add a 301 redirect from the old location to the new one."
|
613 |
+
|
614 |
#: app/Views/settings/settings.php:6
|
615 |
msgid "General"
|
616 |
msgstr "Generelt"
|
languages/nestedpages.mo
CHANGED
Binary file
|
languages/nestedpages.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Nested Pages\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
@@ -16,101 +16,106 @@ msgstr ""
|
|
16 |
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
-
#: app/Activation/Dependencies.php:
|
20 |
msgid "Expand All"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: app/Activation/Dependencies.php:
|
24 |
msgid "Collapse All"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: app/Activation/Dependencies.php:
|
28 |
msgid "Show Hidden"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: app/Activation/Dependencies.php:
|
32 |
msgid "Hide Hidden"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: app/Activation/Dependencies.php:
|
36 |
-
#: app/Views/listing.php:
|
37 |
msgid "Add Link"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: app/Activation/Dependencies.php:
|
41 |
msgid "Add Child Link"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: app/Activation/Dependencies.php:
|
45 |
-
#: app/Entities/Post/PostUpdateRepository.php:
|
46 |
#: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
|
47 |
-
#: app/Views/forms/quickedit-post.php:20 app/Views/partials/tool-list.php:
|
48 |
msgid "Title"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: app/Activation/Dependencies.php:
|
52 |
-
#: app/Views/partials/row-link.php:
|
53 |
msgid "Quick Edit"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: app/Activation/Dependencies.php:
|
57 |
msgid "Page Title"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: app/Activation/Dependencies.php:
|
61 |
msgid "View"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: app/Activation/Dependencies.php:
|
65 |
-
#: app/Views/partials/row.php:
|
66 |
msgid "Add Child"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: app/Activation/Dependencies.php:
|
70 |
msgid "Add Child Page"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: app/Activation/Dependencies.php:
|
74 |
msgid "Add Child Pages"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: app/Activation/Dependencies.php:
|
78 |
msgid "Add"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: app/Activation/Dependencies.php:
|
82 |
msgid "Add Page"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: app/Activation/Dependencies.php:
|
86 |
msgid "Add Pages"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: app/Activation/Dependencies.php:
|
90 |
-
#: app/Views/listing.php:
|
91 |
msgid "Add Multiple"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: app/Activation/Dependencies.php:
|
95 |
msgid ""
|
96 |
"Are you sure you would like to empty the trash? This action is not "
|
97 |
"reversable."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: app/
|
|
|
|
|
|
|
|
|
|
|
101 |
msgid "Settings"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: app/Config/Settings.php:
|
105 |
msgid "Nested Pages Settings"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: app/Config/Settings.php:
|
109 |
msgid "Nested Pages"
|
110 |
msgstr ""
|
111 |
|
112 |
#: app/Entities/AdminMenu/AdminSubmenu.php:73
|
113 |
-
#: app/Views/partials/tool-list.php:
|
114 |
msgid "Default"
|
115 |
msgstr ""
|
116 |
|
@@ -142,15 +147,15 @@ msgstr ""
|
|
142 |
msgid "restored from trash"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: app/Entities/Post/PostUpdateRepository.php:
|
146 |
msgid "Label"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: app/Entities/PostType/PostTypeRepository.php:
|
150 |
msgid "Nested View"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: app/Entities/PostType/PostTypeRepository.php:
|
154 |
msgid "Sort View"
|
155 |
msgstr ""
|
156 |
|
@@ -166,10 +171,14 @@ msgstr ""
|
|
166 |
msgid "Incorrect Form Field"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: app/Form/Handlers/BaseHandler.php:
|
170 |
msgid "There was an error updating the page."
|
171 |
msgstr ""
|
172 |
|
|
|
|
|
|
|
|
|
173 |
#: app/Form/Handlers/EmptyTrashHandler.php:16
|
174 |
msgid "Trash successfully emptied."
|
175 |
msgstr ""
|
@@ -199,81 +208,107 @@ msgstr ""
|
|
199 |
msgid "Menu sync disabled."
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: app/Form/Validation/Validation.php:
|
203 |
msgid "Please provide a valid date."
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: app/Form/Validation/Validation.php:
|
207 |
msgid "Please provide a menu title."
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: app/Form/Validation/Validation.php:
|
211 |
msgid "Please provide a valid URL."
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: app/Form/Validation/Validation.php:
|
215 |
msgid "Please provide a "
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: app/Form/Validation/Validation.php:
|
219 |
msgid "A valid parent page was not provided."
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: app/Form/Validation/Validation.php:
|
223 |
msgid "Please provide at least one page title."
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: app/Form/Validation/Validation.php:
|
227 |
msgid "Page titles cannot be blank."
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: app/Views/forms/
|
231 |
-
#: app/Views/
|
232 |
-
msgid "
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: app/Views/forms/
|
236 |
-
msgid "
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: app/Views/forms/
|
240 |
-
#: app/Views/forms/
|
|
|
241 |
msgid "Status"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: app/Views/forms/
|
245 |
-
#: app/Views/forms/
|
246 |
-
#: app/Views/partials/tool-list.php:10
|
247 |
msgid "Published"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: app/Views/forms/
|
251 |
-
#: app/Views/forms/quickedit-post.php:
|
252 |
-
msgid "Scheduled"
|
253 |
-
msgstr ""
|
254 |
-
|
255 |
-
#: app/Views/forms/link-form.php:47 app/Views/forms/quickedit-link.php:33
|
256 |
-
#: app/Views/forms/quickedit-post.php:64
|
257 |
msgid "Pending Review"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: app/Views/forms/
|
261 |
-
#: app/Views/forms/
|
|
|
262 |
msgid "Draft"
|
263 |
msgstr ""
|
264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
#: app/Views/forms/link-form.php:59 app/Views/forms/quickedit-link.php:54
|
266 |
-
#: app/Views/forms/quickedit-post.php:
|
267 |
msgid "Hide in Nav Menu"
|
268 |
msgstr ""
|
269 |
|
270 |
#: app/Views/forms/link-form.php:64 app/Views/forms/quickedit-link.php:60
|
271 |
-
#: app/Views/forms/quickedit-post.php:
|
272 |
msgid "Hide in Nested Pages"
|
273 |
msgstr ""
|
274 |
|
275 |
#: app/Views/forms/link-form.php:69 app/Views/forms/quickedit-link.php:66
|
276 |
-
#: app/Views/forms/quickedit-post.php:
|
277 |
msgid "Open link in a new window/tab"
|
278 |
msgstr ""
|
279 |
|
@@ -289,23 +324,14 @@ msgstr ""
|
|
289 |
msgid "+"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: app/Views/forms/new-child.php:
|
293 |
-
msgid "Author"
|
294 |
-
msgstr ""
|
295 |
-
|
296 |
-
#: app/Views/forms/new-child.php:71 app/Views/forms/quickedit-post.php:75
|
297 |
msgid "Template"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: app/Views/forms/new-child.php:73 app/Views/forms/quickedit-post.php:
|
301 |
msgid "Default Template"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: app/Views/forms/new-child.php:90 app/Views/forms/quickedit-link.php:81
|
305 |
-
#: app/Views/forms/quickedit-post.php:189
|
306 |
-
msgid "Cancel"
|
307 |
-
msgstr ""
|
308 |
-
|
309 |
#: app/Views/forms/new-child.php:96
|
310 |
msgid "Add & Edit"
|
311 |
msgstr ""
|
@@ -315,17 +341,17 @@ msgid "Link"
|
|
315 |
msgstr ""
|
316 |
|
317 |
#: app/Views/forms/quickedit-link.php:44
|
318 |
-
#: app/Views/forms/quickedit-post.php:
|
319 |
msgid "Title Attribute"
|
320 |
msgstr ""
|
321 |
|
322 |
#: app/Views/forms/quickedit-link.php:48
|
323 |
-
#: app/Views/forms/quickedit-post.php:
|
324 |
msgid "CSS Classes"
|
325 |
msgstr ""
|
326 |
|
327 |
#: app/Views/forms/quickedit-link.php:84
|
328 |
-
#: app/Views/forms/quickedit-post.php:
|
329 |
msgid "Update"
|
330 |
msgstr ""
|
331 |
|
@@ -333,47 +359,56 @@ msgstr ""
|
|
333 |
msgid "Slug"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: app/Views/forms/quickedit-post.php:
|
|
|
337 |
msgid "Date"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: app/Views/forms/quickedit-post.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
msgid "Password"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: app/Views/forms/quickedit-post.php:
|
345 |
msgid "–OR–"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: app/Views/forms/quickedit-post.php:
|
349 |
msgid "Private"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: app/Views/forms/quickedit-post.php:
|
353 |
msgid "Allow Comments"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: app/Views/forms/quickedit-post.php:
|
357 |
msgid "Menu Options"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: app/Views/forms/quickedit-post.php:
|
361 |
msgid "Taxonomies"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: app/Views/listing.php:
|
365 |
msgid "Sync Menu"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: app/Views/partials/row-link.php:30 app/Views/partials/row.php:39
|
369 |
-
msgid "Hidden"
|
370 |
-
msgstr ""
|
371 |
-
|
372 |
#: app/Views/partials/row.php:47
|
373 |
msgid "currently editing"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: app/Views/partials/row.php:
|
377 |
msgid "Edit"
|
378 |
msgstr ""
|
379 |
|
@@ -381,53 +416,77 @@ msgstr ""
|
|
381 |
msgid "All"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: app/Views/partials/tool-list.php:
|
385 |
msgid "Trash"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: app/Views/partials/tool-list.php:
|
389 |
msgid "Empty"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: app/Views/partials/tool-list.php:
|
393 |
msgid "All Authors"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: app/Views/partials/tool-list.php:
|
397 |
msgid "Menu Order"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: app/Views/partials/tool-list.php:
|
401 |
msgid "Order By"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: app/Views/partials/tool-list.php:
|
405 |
msgid "Ascending"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: app/Views/partials/tool-list.php:
|
409 |
msgid "Decending"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: app/Views/settings/settings-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
msgid "Nested Pages Version"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: app/Views/settings/settings-general.php:
|
417 |
msgid "Menu Name"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: app/Views/settings/settings-general.php:
|
421 |
msgid ""
|
422 |
"Important: Once the menu name has changed, theme files should be updated to "
|
423 |
"reference the new name."
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: app/Views/settings/settings-general.php:
|
427 |
-
msgid "
|
|
|
|
|
|
|
|
|
428 |
msgstr ""
|
429 |
|
430 |
#: app/Views/settings/settings-general.php:28
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
msgid "Admins always have sorting ability."
|
432 |
msgstr ""
|
433 |
|
@@ -455,16 +514,29 @@ msgstr ""
|
|
455 |
msgid "Hide Default Link"
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: app/Views/settings/settings-posttypes.php:
|
|
|
|
|
|
|
|
|
459 |
msgid "Note: Nesting features not enabled for non-hierarchical post types."
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: app/Views/settings/settings-posttypes.php:
|
463 |
msgid ""
|
464 |
"If default menu is not replaced, an additional submenu item will be added "
|
465 |
"for \"Nested/Sort View\""
|
466 |
msgstr ""
|
467 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
#: app/Views/settings/settings.php:6
|
469 |
msgid "General"
|
470 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Nested Pages\n"
|
4 |
+
"POT-Creation-Date: 2015-08-15 11:02-0500\n"
|
5 |
+
"PO-Revision-Date: 2015-08-15 11:02-0500\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
16 |
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
+
#: app/Activation/Dependencies.php:107 app/Views/listing.php:29
|
20 |
msgid "Expand All"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: app/Activation/Dependencies.php:108
|
24 |
msgid "Collapse All"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: app/Activation/Dependencies.php:109 app/Views/partials/tool-list.php:18
|
28 |
msgid "Show Hidden"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: app/Activation/Dependencies.php:110
|
32 |
msgid "Hide Hidden"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: app/Activation/Dependencies.php:111 app/Views/forms/link-form.php:14
|
36 |
+
#: app/Views/listing.php:16 app/Views/listing.php:17
|
37 |
msgid "Add Link"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: app/Activation/Dependencies.php:112
|
41 |
msgid "Add Child Link"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: app/Activation/Dependencies.php:113
|
45 |
+
#: app/Entities/Post/PostUpdateRepository.php:68
|
46 |
#: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
|
47 |
+
#: app/Views/forms/quickedit-post.php:20 app/Views/partials/tool-list.php:64
|
48 |
msgid "Title"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: app/Activation/Dependencies.php:114 app/Views/forms/quickedit-post.php:11
|
52 |
+
#: app/Views/partials/row-link.php:60 app/Views/partials/row.php:124
|
53 |
msgid "Quick Edit"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: app/Activation/Dependencies.php:115
|
57 |
msgid "Page Title"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: app/Activation/Dependencies.php:116 app/Views/partials/row.php:128
|
61 |
msgid "View"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: app/Activation/Dependencies.php:117 app/Views/forms/new-child.php:7
|
65 |
+
#: app/Views/partials/row.php:88
|
66 |
msgid "Add Child"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: app/Activation/Dependencies.php:118
|
70 |
msgid "Add Child Page"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: app/Activation/Dependencies.php:119
|
74 |
msgid "Add Child Pages"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: app/Activation/Dependencies.php:120 app/Views/forms/new-child.php:93
|
78 |
msgid "Add"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: app/Activation/Dependencies.php:121
|
82 |
msgid "Add Page"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: app/Activation/Dependencies.php:122
|
86 |
msgid "Add Pages"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: app/Activation/Dependencies.php:123 app/Views/listing.php:10
|
90 |
+
#: app/Views/listing.php:11
|
91 |
msgid "Add Multiple"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: app/Activation/Dependencies.php:124
|
95 |
msgid ""
|
96 |
"Are you sure you would like to empty the trash? This action is not "
|
97 |
"reversable."
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: app/Activation/Dependencies.php:125 app/Views/partials/row-link.php:37
|
101 |
+
#: app/Views/partials/row.php:39
|
102 |
+
msgid "Hidden"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: app/Bootstrap.php:60
|
106 |
msgid "Settings"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: app/Config/Settings.php:52 app/Views/settings/settings.php:2
|
110 |
msgid "Nested Pages Settings"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: app/Config/Settings.php:53
|
114 |
msgid "Nested Pages"
|
115 |
msgstr ""
|
116 |
|
117 |
#: app/Entities/AdminMenu/AdminSubmenu.php:73
|
118 |
+
#: app/Views/partials/tool-list.php:33
|
119 |
msgid "Default"
|
120 |
msgstr ""
|
121 |
|
147 |
msgid "restored from trash"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: app/Entities/Post/PostUpdateRepository.php:310
|
151 |
msgid "Label"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: app/Entities/PostType/PostTypeRepository.php:182
|
155 |
msgid "Nested View"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: app/Entities/PostType/PostTypeRepository.php:182
|
159 |
msgid "Sort View"
|
160 |
msgstr ""
|
161 |
|
171 |
msgid "Incorrect Form Field"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: app/Form/Handlers/BaseHandler.php:110
|
175 |
msgid "There was an error updating the page."
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: app/Form/Handlers/ClonePostHandler.php:36
|
179 |
+
msgid "Post Not Found"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
#: app/Form/Handlers/EmptyTrashHandler.php:16
|
183 |
msgid "Trash successfully emptied."
|
184 |
msgstr ""
|
208 |
msgid "Menu sync disabled."
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: app/Form/Validation/Validation.php:139
|
212 |
msgid "Please provide a valid date."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: app/Form/Validation/Validation.php:151
|
216 |
msgid "Please provide a menu title."
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: app/Form/Validation/Validation.php:154
|
220 |
msgid "Please provide a valid URL."
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: app/Form/Validation/Validation.php:165
|
224 |
msgid "Please provide a "
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: app/Form/Validation/Validation.php:179
|
228 |
msgid "A valid parent page was not provided."
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: app/Form/Validation/Validation.php:186
|
232 |
msgid "Please provide at least one page title."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: app/Form/Validation/Validation.php:194
|
236 |
msgid "Page titles cannot be blank."
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: app/Views/forms/clone-form.php:9 app/Views/forms/clone-form.php:65
|
240 |
+
#: app/Views/partials/row.php:93
|
241 |
+
msgid "Clone"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: app/Views/forms/clone-form.php:14
|
245 |
+
msgid "Number of Copies"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: app/Views/forms/clone-form.php:26 app/Views/forms/link-form.php:41
|
249 |
+
#: app/Views/forms/new-child.php:35 app/Views/forms/quickedit-link.php:27
|
250 |
+
#: app/Views/forms/quickedit-post.php:76
|
251 |
msgid "Status"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: app/Views/forms/clone-form.php:29 app/Views/forms/link-form.php:44
|
255 |
+
#: app/Views/forms/new-child.php:38 app/Views/forms/quickedit-link.php:30
|
256 |
+
#: app/Views/forms/quickedit-post.php:79 app/Views/partials/tool-list.php:10
|
257 |
msgid "Published"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: app/Views/forms/clone-form.php:31 app/Views/forms/link-form.php:47
|
261 |
+
#: app/Views/forms/quickedit-link.php:33 app/Views/forms/quickedit-post.php:82
|
|
|
|
|
|
|
|
|
|
|
262 |
msgid "Pending Review"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: app/Views/forms/clone-form.php:32 app/Views/forms/link-form.php:48
|
266 |
+
#: app/Views/forms/new-child.php:40 app/Views/forms/quickedit-link.php:34
|
267 |
+
#: app/Views/forms/quickedit-post.php:83 app/Views/partials/tool-list.php:14
|
268 |
msgid "Draft"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: app/Views/forms/clone-form.php:50 app/Views/forms/new-child.php:61
|
272 |
+
#: app/Views/forms/quickedit-post.php:67
|
273 |
+
msgid "Author"
|
274 |
+
msgstr ""
|
275 |
+
|
276 |
+
#: app/Views/forms/clone-form.php:62 app/Views/forms/empty-trash-modal.php:11
|
277 |
+
#: app/Views/forms/new-child.php:90 app/Views/forms/quickedit-link.php:81
|
278 |
+
#: app/Views/forms/quickedit-post.php:207
|
279 |
+
msgid "Cancel"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: app/Views/forms/empty-trash-modal.php:12
|
283 |
+
msgid "Empty Trash"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: app/Views/forms/link-form.php:31 app/Views/forms/quickedit-link.php:17
|
287 |
+
#: app/Views/forms/quickedit-post.php:171
|
288 |
+
msgid "Navigation Label"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: app/Views/forms/link-form.php:36 app/Views/forms/quickedit-link.php:22
|
292 |
+
msgid "URL"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: app/Views/forms/link-form.php:45 app/Views/forms/quickedit-link.php:31
|
296 |
+
#: app/Views/forms/quickedit-post.php:80
|
297 |
+
msgid "Scheduled"
|
298 |
+
msgstr ""
|
299 |
+
|
300 |
#: app/Views/forms/link-form.php:59 app/Views/forms/quickedit-link.php:54
|
301 |
+
#: app/Views/forms/quickedit-post.php:187
|
302 |
msgid "Hide in Nav Menu"
|
303 |
msgstr ""
|
304 |
|
305 |
#: app/Views/forms/link-form.php:64 app/Views/forms/quickedit-link.php:60
|
306 |
+
#: app/Views/forms/quickedit-post.php:126
|
307 |
msgid "Hide in Nested Pages"
|
308 |
msgstr ""
|
309 |
|
310 |
#: app/Views/forms/link-form.php:69 app/Views/forms/quickedit-link.php:66
|
311 |
+
#: app/Views/forms/quickedit-post.php:193
|
312 |
msgid "Open link in a new window/tab"
|
313 |
msgstr ""
|
314 |
|
324 |
msgid "+"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: app/Views/forms/new-child.php:71 app/Views/forms/quickedit-post.php:93
|
|
|
|
|
|
|
|
|
328 |
msgid "Template"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: app/Views/forms/new-child.php:73 app/Views/forms/quickedit-post.php:95
|
332 |
msgid "Default Template"
|
333 |
msgstr ""
|
334 |
|
|
|
|
|
|
|
|
|
|
|
335 |
#: app/Views/forms/new-child.php:96
|
336 |
msgid "Add & Edit"
|
337 |
msgstr ""
|
341 |
msgstr ""
|
342 |
|
343 |
#: app/Views/forms/quickedit-link.php:44
|
344 |
+
#: app/Views/forms/quickedit-post.php:175
|
345 |
msgid "Title Attribute"
|
346 |
msgstr ""
|
347 |
|
348 |
#: app/Views/forms/quickedit-link.php:48
|
349 |
+
#: app/Views/forms/quickedit-post.php:179
|
350 |
msgid "CSS Classes"
|
351 |
msgstr ""
|
352 |
|
353 |
#: app/Views/forms/quickedit-link.php:84
|
354 |
+
#: app/Views/forms/quickedit-post.php:210
|
355 |
msgid "Update"
|
356 |
msgstr ""
|
357 |
|
359 |
msgid "Slug"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: app/Views/forms/quickedit-post.php:30 app/Views/forms/quickedit-post.php:45
|
363 |
+
#: app/Views/partials/tool-list.php:63
|
364 |
msgid "Date"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: app/Views/forms/quickedit-post.php:33
|
368 |
+
msgid "@"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: app/Views/forms/quickedit-post.php:36
|
372 |
+
msgid "am"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: app/Views/forms/quickedit-post.php:37
|
376 |
+
msgid "pm"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: app/Views/forms/quickedit-post.php:103
|
380 |
msgid "Password"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: app/Views/forms/quickedit-post.php:106
|
384 |
msgid "–OR–"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: app/Views/forms/quickedit-post.php:109
|
388 |
msgid "Private"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: app/Views/forms/quickedit-post.php:118
|
392 |
msgid "Allow Comments"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: app/Views/forms/quickedit-post.php:135
|
396 |
msgid "Menu Options"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: app/Views/forms/quickedit-post.php:139
|
400 |
msgid "Taxonomies"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: app/Views/listing.php:35
|
404 |
msgid "Sync Menu"
|
405 |
msgstr ""
|
406 |
|
|
|
|
|
|
|
|
|
407 |
#: app/Views/partials/row.php:47
|
408 |
msgid "currently editing"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: app/Views/partials/row.php:51
|
412 |
msgid "Edit"
|
413 |
msgstr ""
|
414 |
|
416 |
msgid "All"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: app/Views/partials/tool-list.php:24
|
420 |
msgid "Trash"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: app/Views/partials/tool-list.php:25
|
424 |
msgid "Empty"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: app/Views/partials/tool-list.php:47
|
428 |
msgid "All Authors"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: app/Views/partials/tool-list.php:62
|
432 |
msgid "Menu Order"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: app/Views/partials/tool-list.php:66
|
436 |
msgid "Order By"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: app/Views/partials/tool-list.php:80
|
440 |
msgid "Ascending"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: app/Views/partials/tool-list.php:81
|
444 |
msgid "Decending"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: app/Views/settings/settings-general.php:4
|
448 |
+
msgid "Currently Enabled"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: app/Views/settings/settings-general.php:4
|
452 |
+
msgid "Currently Disabled"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: app/Views/settings/settings-general.php:8
|
456 |
msgid "Nested Pages Version"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: app/Views/settings/settings-general.php:12
|
460 |
msgid "Menu Name"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: app/Views/settings/settings-general.php:15
|
464 |
msgid ""
|
465 |
"Important: Once the menu name has changed, theme files should be updated to "
|
466 |
"reference the new name."
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: app/Views/settings/settings-general.php:19
|
470 |
+
msgid "Display Options"
|
471 |
+
msgstr ""
|
472 |
+
|
473 |
+
#: app/Views/settings/settings-general.php:23
|
474 |
+
msgid "Enable Date Picker in Quick Edit"
|
475 |
msgstr ""
|
476 |
|
477 |
#: app/Views/settings/settings-general.php:28
|
478 |
+
msgid "Menu Sync"
|
479 |
+
msgstr ""
|
480 |
+
|
481 |
+
#: app/Views/settings/settings-general.php:32
|
482 |
+
msgid "Hide Menu Sync Checkbox"
|
483 |
+
msgstr ""
|
484 |
+
|
485 |
+
#: app/Views/settings/settings-general.php:37
|
486 |
+
msgid "Allow Page Sorting"
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: app/Views/settings/settings-general.php:47
|
490 |
msgid "Admins always have sorting ability."
|
491 |
msgstr ""
|
492 |
|
514 |
msgid "Hide Default Link"
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: app/Views/settings/settings-posttypes.php:19
|
518 |
+
msgid "Disable Nesting"
|
519 |
+
msgstr ""
|
520 |
+
|
521 |
+
#: app/Views/settings/settings-posttypes.php:51
|
522 |
msgid "Note: Nesting features not enabled for non-hierarchical post types."
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: app/Views/settings/settings-posttypes.php:54
|
526 |
msgid ""
|
527 |
"If default menu is not replaced, an additional submenu item will be added "
|
528 |
"for \"Nested/Sort View\""
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: app/Views/settings/settings-posttypes.php:57
|
532 |
+
msgid ""
|
533 |
+
"<strong>Important:</strong> Changing page structures on live sites may "
|
534 |
+
"effect SEO and existing inbound links. Limit URL structure changes on live "
|
535 |
+
"sites by disabling nesting. Sorting within the current nesting structure "
|
536 |
+
"will still be available. If nesting changes are made to a live site, it may "
|
537 |
+
"help to add a 301 redirect from the old location to the new one."
|
538 |
+
msgstr ""
|
539 |
+
|
540 |
#: app/Views/settings/settings.php:6
|
541 |
msgid "General"
|
542 |
msgstr ""
|
nestedpages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Nested Pages
|
4 |
Plugin URI: http://nestedpages.com
|
5 |
Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while maintaining quick edit functionality.
|
6 |
-
Version: 1.
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: nestedpages
|
3 |
Plugin Name: Nested Pages
|
4 |
Plugin URI: http://nestedpages.com
|
5 |
Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while maintaining quick edit functionality.
|
6 |
+
Version: 1.4.0
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: nestedpages
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://nestedpages.com/
|
|
4 |
Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.3.
|
8 |
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -89,6 +89,13 @@ If you have WordPress SEO by Yoast installed, your page score indicators are sho
|
|
89 |
|
90 |
== Changelog ==
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
= 1.3.15 =
|
93 |
* Minor Bug fixes and optimizations
|
94 |
* Bug fix in expand all button
|
4 |
Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 1.3.15
|
8 |
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
+
= 1.4.0 =
|
93 |
+
* Clone/Duplicate functionality added - click the "clone" button in a row to clone/duplicate a post or page
|
94 |
+
* Bug fix when attempting to trash Advanced Custom Field field groups (Thanks to Ben Plum)
|
95 |
+
* Javascript rewritten for more future-friendly updates and feature builds
|
96 |
+
* Draft filter added to list
|
97 |
+
* Tested and confirmed WordPress 4.3 compatibility
|
98 |
+
|
99 |
= 1.3.15 =
|
100 |
* Minor Bug fixes and optimizations
|
101 |
* Bug fix in expand all button
|