Nested Pages - Version 1.7.0

Version Description

  • Added option to disable sorting per post type
  • Added option to assign a post type page. Assigning a page to a post type adds "Add New" and "All" links to the page row for the given post type, along with a count of published posts for that type
  • 24 hour time format support added to datepicker time field (follows General Time Format settings)
  • Custom fields generated by the plugin converted to hidden fields, preventing them from displaying in the post custom field meta box
  • Bug fix where selecting "Hide in Nested Pages" was not saving in the quick edit interface
  • rel=page removed from generated nav menu links which was causing errors in W3C validation
  • Bug fix where menu sync was firing in the background when "Disable menu sync completely" option was selected
Download this release

Release Info

Developer kylephillips
Plugin Icon 128x128 Nested Pages
Version 1.7.0
Comparing to
See all releases

Code changes from version 1.6.8 to 1.7.0

Files changed (38) hide show
  1. app/Activation/Dependencies.php +10 -2
  2. app/Activation/Updates/CustomFieldsToHidden.php +62 -0
  3. app/Activation/Updates/Updates.php +12 -0
  4. app/Bootstrap.php +0 -1
  5. app/Config/Settings.php +14 -0
  6. app/Entities/AdminMenu/AdminSubmenuDefault.php +14 -1
  7. app/Entities/AdminMenu/EnabledMenus.php +6 -3
  8. app/Entities/Listing/Listing.php +32 -7
  9. app/Entities/NavMenu/NavMenuActions.php +16 -3
  10. app/Entities/NavMenu/NavMenuRepository.php +2 -2
  11. app/Entities/NavMenu/NavMenuSync.php +0 -1
  12. app/Entities/NavMenu/NavMenuSyncMenu.php +1 -1
  13. app/Entities/Post/PostDataFactory.php +9 -9
  14. app/Entities/Post/PostRepository.php +17 -1
  15. app/Entities/Post/PostUpdateRepository.php +13 -13
  16. app/Entities/PostType/PostTypeRepository.php +33 -1
  17. app/Form/Events.php +2 -1
  18. app/Form/Listeners/BaseHandler.php +3 -0
  19. app/Form/Listeners/PostSearch.php +51 -0
  20. app/Form/Validation/Validation.php +6 -2
  21. app/FrontEndBootstrap.php +1 -1
  22. app/NestedPages.php +2 -2
  23. app/Views/forms/quickedit-post.php +2 -0
  24. app/Views/partials/row.php +17 -4
  25. app/Views/settings/settings-general.php +2 -0
  26. app/Views/settings/settings-posttypes.php +53 -0
  27. assets/css/nestedpages.css +1 -1
  28. assets/js/lib/nestedpages-factory.js +23 -2
  29. assets/js/lib/nestedpages.formatter.js +5 -0
  30. assets/js/lib/nestedpages.post-search.js +138 -0
  31. assets/js/lib/nestedpages.quickedit-post.js +15 -9
  32. assets/js/lib/nestedpages.settings.js +65 -0
  33. assets/js/nestedpages.min.js +2 -2
  34. assets/js/nestedpages.settings.min.js +1 -1
  35. languages/nestedpages-cs_CZ.mo +0 -0
  36. languages/nestedpages-cs_CZ.po +758 -0
  37. nestedpages.php +1 -1
  38. readme.txt +10 -1
app/Activation/Dependencies.php CHANGED
@@ -80,8 +80,10 @@ class Dependencies
80
  public function scripts()
81
  {
82
  $screen = get_current_screen();
 
83
  global $np_env;
84
- if ( strpos( $screen->id, 'nestedpages' ) ) :
 
85
  wp_enqueue_script('suggest');
86
  wp_enqueue_script('jquery-ui-core');
87
  wp_enqueue_script('jquery-ui-sortable');
@@ -144,13 +146,19 @@ class Dependencies
144
  'link_delete_confirmation' => __('Your selection includes link items, which cannot be recovered after deleting. Would you like to continue? (Other items are moved to the trash)', 'wp-nested-pages'),
145
  'link_delete_confirmation_singular' => __('Are you sure you would like to delete this item? This action is not reversable.', 'wp-nested-pages'),
146
  'delete' => __('Delete', 'wp-nested-pages'),
147
- 'trash_delete_links' => __('Trash Posts and Delete Links'),
148
  'manual_menu_sync' => $this->settings->autoMenuDisabled(),
149
  'manual_order_sync' => $this->settings->autoPageOrderDisabled(),
 
 
 
150
  );
151
  $syncmenu = ( get_option('nestedpages_menusync') == 'sync' ) ? true : false;
152
  $localized_data['syncmenu'] = $syncmenu;
153
  $localized_data['post_types'] = $this->post_type_repo->getPostTypesObject();
 
 
 
154
  wp_localize_script(
155
  'nestedpages',
156
  'nestedpages',
80
  public function scripts()
81
  {
82
  $screen = get_current_screen();
83
+ global $np_page_params;
84
  global $np_env;
85
+ $settings_page = ( strpos($screen->id, 'nested-pages-settings') ) ? true : false;
86
+ if ( strpos( $screen->id, 'nestedpages' ) || $settings_page ) :
87
  wp_enqueue_script('suggest');
88
  wp_enqueue_script('jquery-ui-core');
89
  wp_enqueue_script('jquery-ui-sortable');
146
  'link_delete_confirmation' => __('Your selection includes link items, which cannot be recovered after deleting. Would you like to continue? (Other items are moved to the trash)', 'wp-nested-pages'),
147
  'link_delete_confirmation_singular' => __('Are you sure you would like to delete this item? This action is not reversable.', 'wp-nested-pages'),
148
  'delete' => __('Delete', 'wp-nested-pages'),
149
+ 'trash_delete_links' => __('Trash Posts and Delete Links', 'wp-nested-pages'),
150
  'manual_menu_sync' => $this->settings->autoMenuDisabled(),
151
  'manual_order_sync' => $this->settings->autoPageOrderDisabled(),
152
+ 'currently_assigned_to' => __('Currently assigned to:', 'wp-nested-pages'),
153
+ 'remove' => __('Remove', 'wp-nested-pages'),
154
+ 'settings_page' => $settings_page
155
  );
156
  $syncmenu = ( get_option('nestedpages_menusync') == 'sync' ) ? true : false;
157
  $localized_data['syncmenu'] = $syncmenu;
158
  $localized_data['post_types'] = $this->post_type_repo->getPostTypesObject();
159
+ if ( isset($np_page_params) && is_array($np_page_params) && array_key_exists($screen->id, $np_page_params) ){
160
+ $localized_data['current_post_type'] = $np_page_params[$screen->id]['post_type'];
161
+ }
162
  wp_localize_script(
163
  'nestedpages',
164
  'nestedpages',
app/Activation/Updates/CustomFieldsToHidden.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace NestedPages\Activation\Updates;
3
+
4
+ class CustomFieldsToHidden
5
+ {
6
+ /**
7
+ * Meta Keys to Convert
8
+ * @var array
9
+ */
10
+ private $meta_keys;
11
+
12
+ public function __construct()
13
+ {
14
+ if ( get_option('nested_pages_custom_fields_hidden') ) return;
15
+ $this->setKeys();
16
+ $this->convertFields();
17
+ }
18
+
19
+ /**
20
+ * Set the Keys to convert
21
+ */
22
+ private function setKeys()
23
+ {
24
+ $this->meta_keys = array(
25
+ 'np_nav_title',
26
+ 'nested_pages_status',
27
+ 'np_title_attribute',
28
+ 'np_nav_css_classes',
29
+ 'np_link_target',
30
+ 'np_nav_status',
31
+ 'np_nav_menu_item_type',
32
+ 'np_nav_menu_item_object',
33
+ 'np_nav_menu_item_object_id'
34
+ );
35
+ }
36
+
37
+ /**
38
+ * Convert the fields
39
+ */
40
+ private function convertFields()
41
+ {
42
+ global $wpdb;
43
+ $meta_table = $wpdb->prefix . 'postmeta';
44
+ foreach ( $this->meta_keys as $key ){
45
+ $newKey = '_' . $key;
46
+ $sql = $wpdb->update(
47
+ $meta_table,
48
+ array('meta_key' => $newKey),
49
+ array('meta_key' => $key)
50
+ );
51
+ }
52
+ $this->setOption();
53
+ }
54
+
55
+ /**
56
+ * Set the Updated to Hidden Fields Option so this process doesn't run again
57
+ */
58
+ private function setOption()
59
+ {
60
+ update_option('nested_pages_custom_fields_hidden', 'true', true);
61
+ }
62
+ }
app/Activation/Updates/Updates.php CHANGED
@@ -4,6 +4,7 @@ namespace NestedPages\Activation\Updates;
4
 
5
  use NestedPages\Entities\NavMenu\NavMenuRepository;
6
  use NestedPages\Entities\NavMenu\NavMenuSyncListing;
 
7
 
8
  /**
9
  * Required Version Upgrades
@@ -40,6 +41,7 @@ class Updates
40
  $this->convertMenuToID();
41
  $this->enablePagePostType();
42
  $this->enabledDatepicker();
 
43
  }
44
 
45
  /**
@@ -131,4 +133,14 @@ class Updates
131
  }
132
  }
133
 
 
 
 
 
 
 
 
 
 
 
134
  }
4
 
5
  use NestedPages\Entities\NavMenu\NavMenuRepository;
6
  use NestedPages\Entities\NavMenu\NavMenuSyncListing;
7
+ use NestedPages\Activation\Updates\CustomFieldsToHidden;
8
 
9
  /**
10
  * Required Version Upgrades
41
  $this->convertMenuToID();
42
  $this->enablePagePostType();
43
  $this->enabledDatepicker();
44
+ $this->convertCustomFieldsToHidden();
45
  }
46
 
47
  /**
133
  }
134
  }
135
 
136
+ /**
137
+ * Convert the Nested Pages custom fields to hidden fields
138
+ */
139
+ private function convertCustomFieldsToHidden()
140
+ {
141
+ if ( version_compare( $this->current_version, '1.7.0', '<=' ) ){
142
+ new CustomFieldsToHidden;
143
+ }
144
+ }
145
+
146
  }
app/Bootstrap.php CHANGED
@@ -23,7 +23,6 @@ class Bootstrap
23
  {
24
  new Activation\Activate;
25
  new Redirects;
26
- new RedirectsFrontEnd;
27
  }
28
 
29
  /**
23
  {
24
  new Activation\Activate;
25
  new Redirects;
 
26
  }
27
 
28
  /**
app/Config/Settings.php CHANGED
@@ -7,6 +7,8 @@ use NestedPages\Entities\User\UserRepository;
7
  use NestedPages\Entities\PostType\PostTypeRepository;
8
  use NestedPages\Config\SettingsRepository;
9
  use NestedPages\Entities\PluginIntegration\IntegrationFactory;
 
 
10
 
11
  /**
12
  * Plugin Settings
@@ -45,6 +47,16 @@ class Settings
45
  */
46
  private $integrations;
47
 
 
 
 
 
 
 
 
 
 
 
48
  public function __construct()
49
  {
50
  add_action( 'admin_menu', array( $this, 'registerSettingsPage' ) );
@@ -54,6 +66,8 @@ class Settings
54
  $this->settings = new SettingsRepository;
55
  $this->post_type_repo = new PostTypeRepository;
56
  $this->integrations = new IntegrationFactory;
 
 
57
  }
58
 
59
  /**
7
  use NestedPages\Entities\PostType\PostTypeRepository;
8
  use NestedPages\Config\SettingsRepository;
9
  use NestedPages\Entities\PluginIntegration\IntegrationFactory;
10
+ use NestedPages\Entities\Listing\ListingRepository;
11
+ use NestedPages\Entities\Post\PostRepository;
12
 
13
  /**
14
  * Plugin Settings
47
  */
48
  private $integrations;
49
 
50
+ /**
51
+ * Listing Repository
52
+ */
53
+ private $listing_repo;
54
+
55
+ /**
56
+ * Post Repository
57
+ */
58
+ private $post_repo;
59
+
60
  public function __construct()
61
  {
62
  add_action( 'admin_menu', array( $this, 'registerSettingsPage' ) );
66
  $this->settings = new SettingsRepository;
67
  $this->post_type_repo = new PostTypeRepository;
68
  $this->integrations = new IntegrationFactory;
69
+ $this->listing_repo = new ListingRepository;
70
+ $this->post_repo = new PostRepository;
71
  }
72
 
73
  /**
app/Entities/AdminMenu/AdminSubmenuDefault.php CHANGED
@@ -22,6 +22,11 @@ class AdminSubmenuDefault
22
  */
23
  private $post_type_repo;
24
 
 
 
 
 
 
25
  public function __construct($post_type)
26
  {
27
  $this->post_type = $post_type;
@@ -48,7 +53,7 @@ class AdminSubmenuDefault
48
  */
49
  private function addSubMenu($parent_slug)
50
  {
51
- add_submenu_page(
52
  $parent_slug,
53
  $this->post_type_repo->getSubmenuText($this->post_type),
54
  $this->post_type_repo->getSubmenuText($this->post_type),
@@ -58,4 +63,12 @@ class AdminSubmenuDefault
58
  );
59
  }
60
 
 
 
 
 
 
 
 
 
61
  }
22
  */
23
  private $post_type_repo;
24
 
25
+ /**
26
+ * Menu Hook
27
+ */
28
+ private $hook;
29
+
30
  public function __construct($post_type)
31
  {
32
  $this->post_type = $post_type;
53
  */
54
  private function addSubMenu($parent_slug)
55
  {
56
+ $this->hook = add_submenu_page(
57
  $parent_slug,
58
  $this->post_type_repo->getSubmenuText($this->post_type),
59
  $this->post_type_repo->getSubmenuText($this->post_type),
63
  );
64
  }
65
 
66
+ /**
67
+ * Get the Menu Hook
68
+ */
69
+ public function getHook()
70
+ {
71
+ return $this->hook;
72
+ }
73
+
74
  }
app/Entities/AdminMenu/EnabledMenus.php CHANGED
@@ -35,7 +35,6 @@ class EnabledMenus
35
  */
36
  private $user;
37
 
38
-
39
  public function __construct()
40
  {
41
  $this->post_type_repo = new PostTypeRepository;
@@ -58,6 +57,7 @@ class EnabledMenus
58
  private function loopEnabledTypes()
59
  {
60
  $c = 1; // Counter for position
 
61
  foreach($this->enabled_types as $key => $type){
62
  if ( $type->np_enabled !== true ) continue;
63
  if ( $type->replace_menu ) {
@@ -69,9 +69,10 @@ class EnabledMenus
69
  }
70
  } else {
71
  $default = new AdminSubmenuDefault($type);
 
72
  }
73
  $c++;
74
- }
75
  }
76
 
77
  /**
@@ -80,7 +81,8 @@ class EnabledMenus
80
  */
81
  private function addMenu($c)
82
  {
83
- add_menu_page(
 
84
  __($this->post_type->labels->name),
85
  __($this->post_type->labels->name),
86
  $this->post_type->cap->edit_posts,
@@ -89,6 +91,7 @@ class EnabledMenus
89
  $this->menuIcon(),
90
  $this->menuPosition($c)
91
  );
 
92
  }
93
 
94
  /**
35
  */
36
  private $user;
37
 
 
38
  public function __construct()
39
  {
40
  $this->post_type_repo = new PostTypeRepository;
57
  private function loopEnabledTypes()
58
  {
59
  $c = 1; // Counter for position
60
+ global $np_page_params;
61
  foreach($this->enabled_types as $key => $type){
62
  if ( $type->np_enabled !== true ) continue;
63
  if ( $type->replace_menu ) {
69
  }
70
  } else {
71
  $default = new AdminSubmenuDefault($type);
72
+ $np_page_params[$default->getHook()] = array('post_type' => $type->name);
73
  }
74
  $c++;
75
+ }
76
  }
77
 
78
  /**
81
  */
82
  private function addMenu($c)
83
  {
84
+ global $np_page_params;
85
+ $hook = add_menu_page(
86
  __($this->post_type->labels->name),
87
  __($this->post_type->labels->name),
88
  $this->post_type->cap->edit_posts,
91
  $this->menuIcon(),
92
  $this->menuPosition($c)
93
  );
94
+ $np_page_params[$hook] = array('post_type' => $this->post_type->name);
95
  }
96
 
97
  /**
app/Entities/Listing/Listing.php CHANGED
@@ -83,6 +83,18 @@ class Listing
83
  */
84
  private $settings;
85
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  /**
87
  * Plugin Integrations
88
  */
@@ -110,6 +122,7 @@ class Listing
110
  $this->listing_repo = new ListingRepository;
111
  $this->post_data_factory = new PostDataFactory;
112
  $this->settings = new SettingsRepository;
 
113
  $this->setStandardFields();
114
  }
115
 
@@ -160,22 +173,30 @@ class Listing
160
  $this->post_type = get_post_type_object($post_type);
161
  }
162
 
 
 
 
 
 
 
 
 
 
 
163
  /**
164
  * Set the Quick Edit Field Options
165
  */
166
  private function setStandardFields()
167
  {
168
- $type_options = $this->post_type_repo->getSinglePostType($this->post_type->name);
169
-
170
  // The standard fields checkbox is explicitly not set
171
- if ( isset($type_options->standard_fields_enabled) && !$type_options->standard_fields_enabled ){
172
  $this->disabled_standard_fields = array();
173
  return;
174
  }
175
 
176
- if ( isset($type_options->standard_fields) && is_array($type_options->standard_fields) ){
177
- $this->disabled_standard_fields = $type_options->standard_fields;
178
- foreach ( $type_options->standard_fields as $key => $fields ){
179
  if ( $key == 'standard' ) $this->disabled_standard_fields = $fields;
180
  }
181
  return;
@@ -211,6 +232,7 @@ class Listing
211
  private function listOpening($pages, $count, $sortable = true)
212
  {
213
  if ( $this->isSearch() ) $sortable = false;
 
214
 
215
  // Get array of child pages
216
  $children = array();
@@ -222,7 +244,7 @@ class Listing
222
  $compared = array_intersect($this->listing_repo->visiblePages($this->post_type->name), $children);
223
 
224
  $list_classes = 'sortable visible nplist';
225
- if ( !$this->user->canSortPages() && !$sortable || $this->isSearch() ) $list_classes .= ' no-sort';
226
  if ( $this->integrations->plugins->yoast->installed ) $list_classes .= ' has-yoast';
227
  if ( $this->isSearch() ) $list_classes .= ' np-search-results';
228
 
@@ -333,6 +355,9 @@ class Listing
333
  // Post Type
334
  echo ' post-type-' . esc_attr($this->post->post_type);
335
 
 
 
 
336
  // Published?
337
  if ( $this->post->status == 'publish' ) echo ' published';
338
  if ( $this->post->status == 'draft' ) echo ' draft';
83
  */
84
  private $settings;
85
 
86
+ /**
87
+ * Post Type Settings
88
+ * @var object from post type repo
89
+ */
90
+ private $post_type_settings;
91
+
92
+ /**
93
+ * Assigned Pages for post types
94
+ * @var array from post type repo
95
+ */
96
+ private $assigned_pt_pages;
97
+
98
  /**
99
  * Plugin Integrations
100
  */
122
  $this->listing_repo = new ListingRepository;
123
  $this->post_data_factory = new PostDataFactory;
124
  $this->settings = new SettingsRepository;
125
+ $this->setPostTypeSettings();
126
  $this->setStandardFields();
127
  }
128
 
173
  $this->post_type = get_post_type_object($post_type);
174
  }
175
 
176
+ /**
177
+ * Set the Post Type Settings
178
+ * @since 1.6.9
179
+ */
180
+ private function setPostTypeSettings()
181
+ {
182
+ $this->post_type_settings = $this->post_type_repo->getSinglePostType($this->post_type->name);
183
+ $this->assigned_pt_pages = $this->post_type_repo->getAssignedPages();
184
+ }
185
+
186
  /**
187
  * Set the Quick Edit Field Options
188
  */
189
  private function setStandardFields()
190
  {
 
 
191
  // The standard fields checkbox is explicitly not set
192
+ if ( isset($this->post_type_settings->standard_fields_enabled) && !$this->post_type_settings->standard_fields_enabled ){
193
  $this->disabled_standard_fields = array();
194
  return;
195
  }
196
 
197
+ if ( isset($this->post_type_settings->standard_fields) && is_array($this->post_type_settings->standard_fields) ){
198
+ $this->disabled_standard_fields = $this->post_type_settings->standard_fields;
199
+ foreach ( $this->post_type_settings->standard_fields as $key => $fields ){
200
  if ( $key == 'standard' ) $this->disabled_standard_fields = $fields;
201
  }
202
  return;
232
  private function listOpening($pages, $count, $sortable = true)
233
  {
234
  if ( $this->isSearch() ) $sortable = false;
235
+ if ( $this->post_type_settings->disable_sorting ) $sortable = false;
236
 
237
  // Get array of child pages
238
  $children = array();
244
  $compared = array_intersect($this->listing_repo->visiblePages($this->post_type->name), $children);
245
 
246
  $list_classes = 'sortable visible nplist';
247
+ if ( !$this->user->canSortPages() || !$sortable || $this->isSearch() ) $list_classes .= ' no-sort';
248
  if ( $this->integrations->plugins->yoast->installed ) $list_classes .= ' has-yoast';
249
  if ( $this->isSearch() ) $list_classes .= ' np-search-results';
250
 
355
  // Post Type
356
  echo ' post-type-' . esc_attr($this->post->post_type);
357
 
358
+ // Assigned to manage a post type?
359
+ if ( $this->post_type->name == 'page' && array_key_exists($this->post->id, $this->assigned_pt_pages) ) echo ' is-page-assignment';
360
+
361
  // Published?
362
  if ( $this->post->status == 'publish' ) echo ' published';
363
  if ( $this->post->status == 'draft' ) echo ' draft';
app/Entities/NavMenu/NavMenuActions.php CHANGED
@@ -8,10 +8,23 @@ use NestedPages\Entities\NavMenu\NavMenuSyncMenu;
8
  */
9
  class NavMenuActions
10
  {
 
11
 
12
  public function __construct()
13
  {
14
- add_action( 'wp_update_nav_menu', array($this, 'syncMenu'), 10 ,2 );
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
16
 
17
  /**
@@ -19,9 +32,9 @@ class NavMenuActions
19
  */
20
  public function syncMenu($menu_id, $menu_data = null)
21
  {
22
- // Core calls action twice. Only want it to run once.
23
- // Don't need it to run in wp_update_nav_menu_object function
24
  if ( $menu_data == null ) $sync = new NavMenuSyncMenu($menu_id);
 
25
  }
26
 
27
  }
8
  */
9
  class NavMenuActions
10
  {
11
+ private $hookPriority = 10;
12
 
13
  public function __construct()
14
  {
15
+ if ( get_option('nestedpages_menusync') !== 'sync' ) return;
16
+ if ( get_option('nestedpages_disable_menu') == 'true' ) return;
17
+ $this->addUpdateHook();
18
+ }
19
+
20
+ private function addUpdateHook()
21
+ {
22
+ add_action( 'wp_update_nav_menu', array($this, 'syncMenu'), $this->hookPriority, 2 );
23
+ }
24
+
25
+ private function removeUpdateHook()
26
+ {
27
+ remove_action( 'wp_update_nav_menu', array($this, 'syncMenu'), $this->hookPriority);
28
  }
29
 
30
  /**
32
  */
33
  public function syncMenu($menu_id, $menu_data = null)
34
  {
35
+ $this->removeUpdateHook();
 
36
  if ( $menu_data == null ) $sync = new NavMenuSyncMenu($menu_id);
37
+ $this->addUpdateHook();
38
  }
39
 
40
  }
app/Entities/NavMenu/NavMenuRepository.php CHANGED
@@ -88,7 +88,7 @@ class NavMenuRepository
88
  {
89
  $menu_id = get_option('nestedpages_menu');
90
  $term = get_term_by('id', $menu_id, 'nav_menu');
91
- if ( $term ) return get_term_by('id', $menu_id, 'nav_menu');
92
 
93
  // No Menu Yet
94
  $this->createNewMenu();
@@ -159,7 +159,7 @@ class NavMenuRepository
159
  $meta_table = $wpdb->prefix . 'postmeta';
160
  $sql = "SELECT p.ID AS nav_status FROM $post_table AS p LEFT JOIN $meta_table AS m ON p.ID = m.post_id AND m.meta_key = 'np_nav_status' WHERE p.post_type = 'page' AND (m.meta_value = 'show' OR m.meta_value IS NULL)";
161
  $results = $wpdb->get_results($sql, ARRAY_N);
162
- if ( !$results ) return;
163
  foreach($results as $key => $result){
164
  $visible[$key] = $result[0];
165
  }
88
  {
89
  $menu_id = get_option('nestedpages_menu');
90
  $term = get_term_by('id', $menu_id, 'nav_menu');
91
+ if ( $term ) return $term;
92
 
93
  // No Menu Yet
94
  $this->createNewMenu();
159
  $meta_table = $wpdb->prefix . 'postmeta';
160
  $sql = "SELECT p.ID AS nav_status FROM $post_table AS p LEFT JOIN $meta_table AS m ON p.ID = m.post_id AND m.meta_key = 'np_nav_status' WHERE p.post_type = 'page' AND (m.meta_value = 'show' OR m.meta_value IS NULL)";
161
  $results = $wpdb->get_results($sql, ARRAY_N);
162
+ if ( !$results ) return array();
163
  foreach($results as $key => $result){
164
  $visible[$key] = $result[0];
165
  }
app/Entities/NavMenu/NavMenuSync.php CHANGED
@@ -24,7 +24,6 @@ abstract class NavMenuSync
24
 
25
  public function __construct()
26
  {
27
- if ( get_option('nestedpages_menusync') !== 'sync' ) return;
28
  $this->nav_menu_repo = new NavMenuRepository;
29
  $this->setMenuID();
30
  }
24
 
25
  public function __construct()
26
  {
 
27
  $this->nav_menu_repo = new NavMenuRepository;
28
  $this->setMenuID();
29
  }
app/Entities/NavMenu/NavMenuSyncMenu.php CHANGED
@@ -88,7 +88,7 @@ class NavMenuSyncMenu extends NavMenuSync
88
  */
89
  private function updatePost($item)
90
  {
91
- $parent_id = ( $item->menu_item_parent == '0' ) ? 0 : $this->index[$item->menu_item_parent]['ID'];
92
 
93
  if ( $this->nav_menu_repo->isNavMenuItem($parent_id) ) {
94
  $parent_id = $this->nav_menu_repo->getLinkfromTitle($this->index[$item->menu_item_parent]['title']);
88
  */
89
  private function updatePost($item)
90
  {
91
+ $parent_id = ( $item->menu_item_parent == '0' || !isset($this->index[$item->menu_item_parent]['ID']) ) ? 0 : $this->index[$item->menu_item_parent]['ID'];
92
 
93
  if ( $this->nav_menu_repo->isNavMenuItem($parent_id) ) {
94
  $parent_id = $this->nav_menu_repo->getLinkfromTitle($this->index[$item->menu_item_parent]['title']);
app/Entities/Post/PostDataFactory.php CHANGED
@@ -60,15 +60,15 @@ class PostDataFactory
60
  public function addPostMeta($post)
61
  {
62
  $meta = get_metadata('post', $post->ID);
63
- $this->post_data->nav_title = ( isset($meta['np_nav_title'][0]) ) ? $meta['np_nav_title'][0] : null;
64
- $this->post_data->link_target = ( isset($meta['np_link_target'][0]) ) ? $meta['np_link_target'][0] : null;
65
- $this->post_data->nav_title_attr = ( isset($meta['np_title_attribute'][0]) ) ? $meta['np_title_attribute'][0] : null;
66
- $this->post_data->nav_css = ( isset($meta['np_nav_css_classes'][0]) ) ? $meta['np_nav_css_classes'][0] : null;
67
- $this->post_data->nav_object = ( isset($meta['np_nav_menu_item_object'][0]) ) ? $meta['np_nav_menu_item_object'][0] : null;
68
- $this->post_data->nav_object_id = ( isset($meta['np_nav_menu_item_object_id'][0]) ) ? $meta['np_nav_menu_item_object_id'][0] : null;
69
- $this->post_data->nav_type = ( isset($meta['np_nav_menu_item_type'][0]) ) ? $meta['np_nav_menu_item_type'][0] : null;
70
- $this->post_data->nav_status = ( isset($meta['np_nav_status'][0]) && $meta['np_nav_status'][0] == 'hide' ) ? 'hide' : 'show';
71
- $this->post_data->np_status = ( isset($meta['nested_pages_status'][0]) && $meta['nested_pages_status'][0] == 'hide' ) ? 'hide' : 'show';
72
  $this->post_data->template = ( isset($meta['_wp_page_template'][0]) ) ? $meta['_wp_page_template'][0] : false;
73
 
74
  // Yoast Score
60
  public function addPostMeta($post)
61
  {
62
  $meta = get_metadata('post', $post->ID);
63
+ $this->post_data->nav_title = ( isset($meta['_np_nav_title'][0]) ) ? $meta['_np_nav_title'][0] : null;
64
+ $this->post_data->link_target = ( isset($meta['_np_link_target'][0]) ) ? $meta['_np_link_target'][0] : null;
65
+ $this->post_data->nav_title_attr = ( isset($meta['_np_title_attribute'][0]) ) ? $meta['_np_title_attribute'][0] : null;
66
+ $this->post_data->nav_css = ( isset($meta['_np_nav_css_classes'][0]) ) ? $meta['_np_nav_css_classes'][0] : null;
67
+ $this->post_data->nav_object = ( isset($meta['_np_nav_menu_item_object'][0]) ) ? $meta['_np_nav_menu_item_object'][0] : null;
68
+ $this->post_data->nav_object_id = ( isset($meta['_np_nav_menu_item_object_id'][0]) ) ? $meta['_np_nav_menu_item_object_id'][0] : null;
69
+ $this->post_data->nav_type = ( isset($meta['_np_nav_menu_item_type'][0]) ) ? $meta['_np_nav_menu_item_type'][0] : null;
70
+ $this->post_data->nav_status = ( isset($meta['_np_nav_status'][0]) && $meta['_np_nav_status'][0] == 'hide' ) ? 'hide' : 'show';
71
+ $this->post_data->np_status = ( isset($meta['_nested_pages_status'][0]) && $meta['_nested_pages_status'][0] == 'hide' ) ? 'hide' : 'show';
72
  $this->post_data->template = ( isset($meta['_wp_page_template'][0]) ) ? $meta['_wp_page_template'][0] : false;
73
 
74
  // Yoast Score
app/Entities/Post/PostRepository.php CHANGED
@@ -14,7 +14,7 @@ class PostRepository
14
  if ( in_array('page', $type) ) array_push($type, 'np-redirect');
15
  $hidden = new \WP_Query(array(
16
  'post_type' => $type,
17
- 'meta_key' => 'nested_pages_status',
18
  'meta_value' => 'hide',
19
  'perm' => 'readable'));
20
  return $hidden->found_posts;
@@ -132,4 +132,20 @@ class PostRepository
132
  return true;
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  }
14
  if ( in_array('page', $type) ) array_push($type, 'np-redirect');
15
  $hidden = new \WP_Query(array(
16
  'post_type' => $type,
17
+ 'meta_key' => '_nested_pages_status',
18
  'meta_value' => 'hide',
19
  'perm' => 'readable'));
20
  return $hidden->found_posts;
132
  return true;
133
  }
134
 
135
+ /**
136
+ * Does a post exist?
137
+ * @since 1.7.0
138
+ * @param int post_id
139
+ * @return boolean
140
+ */
141
+ public function postExists($post_id, $post_type = 'post')
142
+ {
143
+ $post_q = new \WP_Query(array('post_type' => $post_type, 'p' => $post_id));
144
+ if ( $post_q->have_posts() ){
145
+ wp_reset_postdata();
146
+ return true;
147
+ }
148
+ return false;
149
+ }
150
+
151
  }
app/Entities/Post/PostUpdateRepository.php CHANGED
@@ -170,7 +170,7 @@ class PostUpdateRepository
170
  $id = ( isset($data['post_id']) ) ? $data['post_id'] : $this->new_id;
171
  update_post_meta(
172
  $id,
173
- 'np_nav_status',
174
  $status
175
  );
176
  }
@@ -188,7 +188,7 @@ class PostUpdateRepository
188
  $id = ( isset($data['post_id']) ) ? $data['post_id'] : $this->new_id;
189
  update_post_meta(
190
  $id,
191
- 'nested_pages_status',
192
  $status
193
  );
194
  }
@@ -204,7 +204,7 @@ class PostUpdateRepository
204
  $title = sanitize_text_field($data['np_nav_title']);
205
  update_post_meta(
206
  $data['post_id'],
207
- 'np_nav_title',
208
  $title
209
  );
210
  }
@@ -221,7 +221,7 @@ class PostUpdateRepository
221
  $css_classes = sanitize_text_field($data['np_nav_css_classes']);
222
  update_post_meta(
223
  $data['post_id'],
224
- 'np_nav_css_classes',
225
  $css_classes
226
  );
227
  }
@@ -238,7 +238,7 @@ class PostUpdateRepository
238
  $title_attr = sanitize_text_field($data['np_title_attribute']);
239
  update_post_meta(
240
  $data['post_id'],
241
- 'np_title_attribute',
242
  $title_attr
243
  );
244
  }
@@ -323,7 +323,7 @@ class PostUpdateRepository
323
  $id = ( isset($data['post_id']) ) ? $data['post_id'] : $this->new_id;
324
  update_post_meta(
325
  $id,
326
- 'np_link_target',
327
  $link_target
328
  );
329
  }
@@ -337,20 +337,20 @@ class PostUpdateRepository
337
  {
338
  $id = ( isset($data['post_id']) ) ? $data['post_id'] : $this->new_id;
339
  $link_target = ( isset($data['linkTarget']) ) ? "_blank" : "";
340
- update_post_meta($id, 'np_link_target', $link_target);
341
- update_post_meta($id, 'np_nav_menu_item_type', sanitize_text_field($data['menuType']));
342
- update_post_meta($id, 'np_nav_menu_item_object', sanitize_text_field($data['objectType']));
343
- update_post_meta($id, 'np_nav_menu_item_object_id', sanitize_text_field($data['objectId']));
344
  if ( isset($data['cssClasses']) ){
345
- update_post_meta($id, 'np_nav_css_classes', sanitize_text_field($data['cssClasses']));
346
  }
347
  if ( isset($data['titleAttribute']) ){
348
  $title_attr = sanitize_text_field($data['titleAttribute']);
349
- update_post_meta($id, 'np_title_attribute', $title_attr);
350
  }
351
  if ( isset($data['navigationLabel']) ){
352
  $title = sanitize_text_field($data['navigationLabel']);
353
- update_post_meta($id, 'np_nav_title', $title);
354
  }
355
  }
356
 
170
  $id = ( isset($data['post_id']) ) ? $data['post_id'] : $this->new_id;
171
  update_post_meta(
172
  $id,
173
+ '_np_nav_status',
174
  $status
175
  );
176
  }
188
  $id = ( isset($data['post_id']) ) ? $data['post_id'] : $this->new_id;
189
  update_post_meta(
190
  $id,
191
+ '_nested_pages_status',
192
  $status
193
  );
194
  }
204
  $title = sanitize_text_field($data['np_nav_title']);
205
  update_post_meta(
206
  $data['post_id'],
207
+ '_np_nav_title',
208
  $title
209
  );
210
  }
221
  $css_classes = sanitize_text_field($data['np_nav_css_classes']);
222
  update_post_meta(
223
  $data['post_id'],
224
+ '_np_nav_css_classes',
225
  $css_classes
226
  );
227
  }
238
  $title_attr = sanitize_text_field($data['np_title_attribute']);
239
  update_post_meta(
240
  $data['post_id'],
241
+ '_np_title_attribute',
242
  $title_attr
243
  );
244
  }
323
  $id = ( isset($data['post_id']) ) ? $data['post_id'] : $this->new_id;
324
  update_post_meta(
325
  $id,
326
+ '_np_link_target',
327
  $link_target
328
  );
329
  }
337
  {
338
  $id = ( isset($data['post_id']) ) ? $data['post_id'] : $this->new_id;
339
  $link_target = ( isset($data['linkTarget']) ) ? "_blank" : "";
340
+ update_post_meta($id, '_np_link_target', $link_target);
341
+ update_post_meta($id, '_np_nav_menu_item_type', sanitize_text_field($data['menuType']));
342
+ update_post_meta($id, '_np_nav_menu_item_object', sanitize_text_field($data['objectType']));
343
+ update_post_meta($id, '_np_nav_menu_item_object_id', sanitize_text_field($data['objectId']));
344
  if ( isset($data['cssClasses']) ){
345
+ update_post_meta($id, '_np_nav_css_classes', sanitize_text_field($data['cssClasses']));
346
  }
347
  if ( isset($data['titleAttribute']) ){
348
  $title_attr = sanitize_text_field($data['titleAttribute']);
349
+ update_post_meta($id, '_np_title_attribute', $title_attr);
350
  }
351
  if ( isset($data['navigationLabel']) ){
352
  $title = sanitize_text_field($data['navigationLabel']);
353
+ update_post_meta($id, '_np_nav_title', $title);
354
  }
355
  }
356
 
app/Entities/PostType/PostTypeRepository.php CHANGED
@@ -71,11 +71,15 @@ class PostTypeRepository
71
  $post_types[$type->name]->np_enabled = ( array_key_exists($type->name, $this->enabled_post_types) ) ? true : false;
72
  $post_types[$type->name]->replace_menu = $this->postTypeSetting($type->name, 'replace_menu');
73
  $post_types[$type->name]->hide_default = $this->postTypeSetting($type->name, 'hide_default');
 
74
  $post_types[$type->name]->disable_nesting = $this->postTypeSetting($type->name, 'disable_nesting');
75
  $post_types[$type->name]->custom_fields_enabled = $this->postTypeSetting($type->name, 'custom_fields_enabled');
76
  $post_types[$type->name]->standard_fields_enabled = $this->postTypeSetting($type->name, 'standard_fields_enabled');
77
  $post_types[$type->name]->custom_fields = $this->configuredFields($type->name, 'custom_fields');
78
  $post_types[$type->name]->standard_fields = $this->configuredFields($type->name, 'standard_fields');
 
 
 
79
  }
80
  return $post_types;
81
  }
@@ -248,6 +252,21 @@ class PostTypeRepository
248
  return esc_url( admin_url('edit.php?post_status=trash&post_type=' . $post_type) );
249
  }
250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  /**
252
  * Edit Post Link
253
  * @since 1.2.1
@@ -344,7 +363,7 @@ class PostTypeRepository
344
  private function fieldsArray($results)
345
  {
346
  $fields = array();
347
- $exclude = array('_wp_page_template', '_edit_lock', '_edit_last', '_wp_trash_meta_status', '_wp_trash_meta_time', 'layout', 'position', 'rule', 'hide_on_screen', 'np_link_target', 'np_nav_title', 'np_title_attribute', 'np_nav_status', 'nested_pages_status', 'np_nav_css_classes');
348
  foreach ( $results as $field ){
349
  if ( !in_array($field->meta_key, $exclude) )
350
  array_push($fields, $field->meta_key);
@@ -352,4 +371,17 @@ class PostTypeRepository
352
  return $fields;
353
  }
354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  }
71
  $post_types[$type->name]->np_enabled = ( array_key_exists($type->name, $this->enabled_post_types) ) ? true : false;
72
  $post_types[$type->name]->replace_menu = $this->postTypeSetting($type->name, 'replace_menu');
73
  $post_types[$type->name]->hide_default = $this->postTypeSetting($type->name, 'hide_default');
74
+ $post_types[$type->name]->disable_sorting = $this->postTypeSetting($type->name, 'disable_sorting');
75
  $post_types[$type->name]->disable_nesting = $this->postTypeSetting($type->name, 'disable_nesting');
76
  $post_types[$type->name]->custom_fields_enabled = $this->postTypeSetting($type->name, 'custom_fields_enabled');
77
  $post_types[$type->name]->standard_fields_enabled = $this->postTypeSetting($type->name, 'standard_fields_enabled');
78
  $post_types[$type->name]->custom_fields = $this->configuredFields($type->name, 'custom_fields');
79
  $post_types[$type->name]->standard_fields = $this->configuredFields($type->name, 'standard_fields');
80
+ $post_types[$type->name]->page_assignment = $this->configuredFields($type->name, 'post_type_page_assignment');
81
+ $post_types[$type->name]->page_assignment_id = $this->configuredFields($type->name, 'post_type_page_assignment_page_id');
82
+ $post_types[$type->name]->page_assignment_title = $this->configuredFields($type->name, 'post_type_page_assignment_page_title');
83
  }
84
  return $post_types;
85
  }
252
  return esc_url( admin_url('edit.php?post_status=trash&post_type=' . $post_type) );
253
  }
254
 
255
+ /**
256
+ * All Posts Link
257
+ * @since 1.7.0
258
+ * @param string post_type
259
+ * @return string
260
+ */
261
+ public function allPostsLink($post_type)
262
+ {
263
+ $pt_object = $this->getSinglePostType(esc_attr($post_type));
264
+ if ( $pt_object->replace_menu ){
265
+ return esc_url( admin_url('admin.php?page=nestedpages-' . $post_type) );
266
+ }
267
+ return esc_url( admin_url('edit.php?post_type=' . esc_attr($post_type)) );
268
+ }
269
+
270
  /**
271
  * Edit Post Link
272
  * @since 1.2.1
363
  private function fieldsArray($results)
364
  {
365
  $fields = array();
366
+ $exclude = array('_wp_page_template', '_edit_lock', '_edit_last', '_wp_trash_meta_status', '_wp_trash_meta_time', 'layout', 'position', 'rule', 'hide_on_screen', '_np_link_target', '_np_nav_title', '_np_title_attribute', '_np_nav_status', '_nested_pages_status', '_np_nav_css_classes');
367
  foreach ( $results as $field ){
368
  if ( !in_array($field->meta_key, $exclude) )
369
  array_push($fields, $field->meta_key);
371
  return $fields;
372
  }
373
 
374
+ /**
375
+ * Get an array of assigned page IDs for all post types
376
+ */
377
+ public function getAssignedPages()
378
+ {
379
+ $post_types = $this->getPostTypesObject();
380
+ $array = array();
381
+ foreach($post_types as $type => $options){
382
+ if ( isset($options->page_assignment) && $options->page_assignment == 'true' && isset($options->page_assignment_id) && $options->page_assignment_id !== '' ) $array[$options->page_assignment_id] = $type;
383
+ }
384
+ return $array;
385
+ }
386
+
387
  }
app/Form/Events.php CHANGED
@@ -47,7 +47,8 @@ class Events
47
  'admin_post_npCategoryFilter',
48
  'admin_post_npBulkActions',
49
  'wp_ajax_npmanualMenuSync',
50
- 'admin_post_npBulkEdit'
 
51
  );
52
  $this->setHandlers();
53
  }
47
  'admin_post_npCategoryFilter',
48
  'admin_post_npBulkActions',
49
  'wp_ajax_npmanualMenuSync',
50
+ 'admin_post_npBulkEdit',
51
+ 'wp_ajax_nppostSearch'
52
  );
53
  $this->setHandlers();
54
  }
app/Form/Listeners/BaseHandler.php CHANGED
@@ -88,6 +88,9 @@ abstract class BaseHandler
88
  */
89
  protected function syncMenu()
90
  {
 
 
 
91
  if ( $_POST['post_type'] == 'page' ) {
92
  if ( $_POST['syncmenu'] !== 'sync' ){
93
  return update_option('nestedpages_menusync', 'nosync');
88
  */
89
  protected function syncMenu()
90
  {
91
+ if ( get_option('nestedpages_menusync') !== 'sync' ) return;
92
+ if ( get_option('nestedpages_disable_menu') == 'true' ) return;
93
+
94
  if ( $_POST['post_type'] == 'page' ) {
95
  if ( $_POST['syncmenu'] !== 'sync' ){
96
  return update_option('nestedpages_menusync', 'nosync');
app/Form/Listeners/PostSearch.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace NestedPages\Form\Listeners;
4
+
5
+ class PostSearch extends BaseHandler
6
+ {
7
+ /**
8
+ * Form Data
9
+ */
10
+ protected $data;
11
+
12
+ /**
13
+ * Search Results
14
+ */
15
+ private $results;
16
+
17
+ public function __construct()
18
+ {
19
+ parent::__construct();
20
+ $this->setFormData();
21
+ $this->searchPosts();
22
+ return wp_send_json(array('status' => 'success', 'results' => $this->results));
23
+ }
24
+
25
+ /**
26
+ * Set the search-specific form data
27
+ */
28
+ private function setFormData()
29
+ {
30
+ $this->data['term'] = sanitize_text_field($_POST['term']);
31
+ $this->data['postType'] = sanitize_text_field($_POST['postType']);
32
+ }
33
+
34
+ /**
35
+ * Perform a search on posts
36
+ */
37
+ private function searchPosts()
38
+ {
39
+ $sq = new \WP_Query(array(
40
+ 'post_type' => $this->data['postType'],
41
+ 's' => $this->data['term'],
42
+ 'posts_per_page' => -1
43
+ ));
44
+ if ( $sq->have_posts() ) :
45
+ $this->results = $sq->posts;
46
+ else :
47
+ $this->results = null;
48
+ endif; wp_reset_postdata();
49
+ }
50
+
51
+ }
app/Form/Validation/Validation.php CHANGED
@@ -65,8 +65,12 @@ class Validation
65
  // Make sure fields are filled out
66
  if ( $data['np_date'] == "" || $data['np_time'] == "" ) return $this->sendDateError();
67
 
68
-
69
- $this->checkValidFormattedTime($data['np_time']);
 
 
 
 
70
 
71
  $date = date('Y-m-d H:i:s', strtotime($data['np_date'] . ' ' . $data['np_time'] . ' ' . $data['np_ampm']));
72
  if ( $date == '1970-01-01 00:00:00' ) return $this->sendDateError();
65
  // Make sure fields are filled out
66
  if ( $data['np_date'] == "" || $data['np_time'] == "" ) return $this->sendDateError();
67
 
68
+ $time_format = get_option('time_format');
69
+ if ( $time_format == 'H:i' ){
70
+ $this->checkValidTime($data['np_time']);
71
+ } else {
72
+ $this->checkValidFormattedTime($data['np_time']);
73
+ }
74
 
75
  $date = date('Y-m-d H:i:s', strtotime($data['np_date'] . ' ' . $data['np_time'] . ' ' . $data['np_ampm']));
76
  if ( $date == '1970-01-01 00:00:00' ) return $this->sendDateError();
app/FrontEndBootstrap.php CHANGED
@@ -10,7 +10,7 @@ class FrontEndBootstrap
10
 
11
  public function init()
12
  {
13
- new RedirectsFrontEnd;
14
  new Entities\NavMenu\NavMenuFrontEnd;
15
  }
16
  }
10
 
11
  public function init()
12
  {
13
+ // new RedirectsFrontEnd;
14
  new Entities\NavMenu\NavMenuFrontEnd;
15
  }
16
  }
app/NestedPages.php CHANGED
@@ -12,9 +12,9 @@ class NestedPages
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
- $np_version = '1.6.8';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
- // if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
19
  }
20
  }
12
  $np_env = 'live';
13
 
14
  global $np_version;
15
+ $np_version = '1.7.0';
16
 
17
  if ( is_admin() ) $app = new NestedPages\Bootstrap;
18
+ if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
19
  }
20
  }
app/Views/forms/quickedit-post.php CHANGED
@@ -38,10 +38,12 @@
38
  <input type="text" name="np_date" class="np_datepicker" value="" />
39
  <span><?php _e('@', 'wp-nested-pages'); ?></span>
40
  <div class="np-time-container">
 
41
  <select name="np_ampm" class="np_ampm">
42
  <option value="am"><?php _e('am', 'wp-nested-pages'); ?></option>
43
  <option value="pm"><?php _e('pm', 'wp-nested-pages'); ?></option>
44
  </select>
 
45
  <input type="text" name="np_time" class="np_time" value="" />
46
  </div>
47
  </div>
38
  <input type="text" name="np_date" class="np_datepicker" value="" />
39
  <span><?php _e('@', 'wp-nested-pages'); ?></span>
40
  <div class="np-time-container">
41
+ <?php if ( get_option('time_format') !== 'H:i' ) : ?>
42
  <select name="np_ampm" class="np_ampm">
43
  <option value="am"><?php _e('am', 'wp-nested-pages'); ?></option>
44
  <option value="pm"><?php _e('pm', 'wp-nested-pages'); ?></option>
45
  </select>
46
+ <?php endif; ?>
47
  <input type="text" name="np_time" class="np_time" value="" />
48
  </div>
49
  </div>
app/Views/partials/row.php CHANGED
@@ -6,6 +6,7 @@ $row_classes = '';
6
  if ( !$this->post_type->hierarchical ) $row_classes .= ' non-hierarchical';
7
  if ( !$this->user->canSortPages() ) $row_classes .= ' no-sort';
8
  if ( $this->isSearch() ) $row_classes .= ' search';
 
9
  ?>
10
  <div class="row<?php echo $row_classes; ?>">
11
 
@@ -20,7 +21,7 @@ if ( $this->isSearch() ) $row_classes .= ' search';
20
  <div class="row-inner">
21
  <i class="np-icon-sub-menu"></i>
22
 
23
- <?php if ( $this->user->canSortPages() && !$this->isSearch() ) : ?>
24
  <i class="handle np-icon-menu"></i>
25
  <?php endif; ?>
26
 
@@ -28,8 +29,10 @@ if ( $this->isSearch() ) $row_classes .= ' search';
28
  <span class="title">
29
  <?php
30
  echo apply_filters( 'the_title', $this->post->title, $this->post->id, $view = 'nestedpages_title' );
31
- if ( $this->post->id == get_option('page_on_front') ) echo ' <em class="np-page-type"><strong>&ndash; ' . __('Front Page', 'wp-nested-pages') . '</strong></em>';
32
- if ( $this->post->id == get_option('page_for_posts') ) echo ' <em class="np-page-type"><strong>&ndash; ' . __('Posts Page', 'wp-nested-pages') . '</strong></em>';
 
 
33
  ?>
34
  </span>
35
  <?php
@@ -63,6 +66,15 @@ if ( $this->isSearch() ) $row_classes .= ' search';
63
  ?>
64
  </a>
65
 
 
 
 
 
 
 
 
 
 
66
  <!-- Responsive Toggle Button -->
67
  <a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a>
68
 
@@ -86,13 +98,13 @@ if ( $this->isSearch() ) $row_classes .= ' search';
86
  <?php if ( $this->post->comment_status == 'open' ) : $comments = wp_count_comments($this->post->id); $cs = 'open' ?>
87
 
88
 
 
89
  <a href="<?php echo admin_url( 'edit-comments.php?p=' . get_the_id() ); ?>" class="np-btn">
90
  <i class="np-icon-bubble"></i> <?php echo $comments->total_comments; ?>
91
  </a>
92
 
93
  <?php else : $cs = 'closed'; endif; ?>
94
 
95
-
96
  <?php if ( current_user_can('publish_pages') && $this->post_type->hierarchical && !$this->isSearch() ) : ?>
97
 
98
  <?php if (!$this->settings->menusDisabled()) : ?>
@@ -134,6 +146,7 @@ if ( $this->isSearch() ) $row_classes .= ' search';
134
  data-datepicker="<?php echo date_i18n('n/j/Y', $this->post->date->datepicker); ?>"
135
  data-time="<?php echo date_i18n('H:i', $this->post->date->datepicker); ?>"
136
  data-formattedtime="<?php echo date_i18n('g:i', $this->post->date->datepicker); ?>"
 
137
  data-ampm="<?php echo date('a', $this->post->date->datepicker); ?>">
138
  <?php _e('Quick Edit'); ?>
139
  </a>
6
  if ( !$this->post_type->hierarchical ) $row_classes .= ' non-hierarchical';
7
  if ( !$this->user->canSortPages() ) $row_classes .= ' no-sort';
8
  if ( $this->isSearch() ) $row_classes .= ' search';
9
+ $assigned_pt = ( $this->post_type->name == 'page' && array_key_exists($this->post->id, $this->assigned_pt_pages) ) ? get_post_type_object($this->assigned_pt_pages[$this->post->id]) : false;
10
  ?>
11
  <div class="row<?php echo $row_classes; ?>">
12
 
21
  <div class="row-inner">
22
  <i class="np-icon-sub-menu"></i>
23
 
24
+ <?php if ( $this->user->canSortPages() && !$this->isSearch() && !$this->post_type_settings->disable_sorting ) : ?>
25
  <i class="handle np-icon-menu"></i>
26
  <?php endif; ?>
27
 
29
  <span class="title">
30
  <?php
31
  echo apply_filters( 'the_title', $this->post->title, $this->post->id, $view = 'nestedpages_title' );
32
+ if ( !$assigned_pt ) :
33
+ if ( $this->post->id == get_option('page_on_front') ) echo ' <em class="np-page-type"><strong>&ndash; ' . __('Front Page', 'wp-nested-pages') . '</strong></em>';
34
+ if ( $this->post->id == get_option('page_for_posts') ) echo ' <em class="np-page-type"><strong>&ndash; ' . __('Posts Page', 'wp-nested-pages') . '</strong></em>';
35
+ endif;
36
  ?>
37
  </span>
38
  <?php
66
  ?>
67
  </a>
68
 
69
+ <?php if ( $assigned_pt ) : ?>
70
+ <ul class="np-assigned-pt-actions">
71
+ <?php if ( current_user_can('publish_posts') ) : ?>
72
+ <li><a href="<?php echo $this->post_type_repo->addNewPostLink($assigned_pt->name); ?>" class=""><?php echo $assigned_pt->labels->add_new; ?></a></li>
73
+ <?php endif; ?>
74
+ <li><a href="<?php echo $this->post_type_repo->allPostsLink($assigned_pt->name); ?>" class=""><?php echo $assigned_pt->labels->all_items . ' (' . wp_count_posts($assigned_pt->name)->publish . ')'; ?></a></li>
75
+ </ul>
76
+ <?php endif; ?>
77
+
78
  <!-- Responsive Toggle Button -->
79
  <a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a>
80
 
98
  <?php if ( $this->post->comment_status == 'open' ) : $comments = wp_count_comments($this->post->id); $cs = 'open' ?>
99
 
100
 
101
+
102
  <a href="<?php echo admin_url( 'edit-comments.php?p=' . get_the_id() ); ?>" class="np-btn">
103
  <i class="np-icon-bubble"></i> <?php echo $comments->total_comments; ?>
104
  </a>
105
 
106
  <?php else : $cs = 'closed'; endif; ?>
107
 
 
108
  <?php if ( current_user_can('publish_pages') && $this->post_type->hierarchical && !$this->isSearch() ) : ?>
109
 
110
  <?php if (!$this->settings->menusDisabled()) : ?>
146
  data-datepicker="<?php echo date_i18n('n/j/Y', $this->post->date->datepicker); ?>"
147
  data-time="<?php echo date_i18n('H:i', $this->post->date->datepicker); ?>"
148
  data-formattedtime="<?php echo date_i18n('g:i', $this->post->date->datepicker); ?>"
149
+ data-timeformat="<?php echo get_option('time_format'); ?>"
150
  data-ampm="<?php echo date('a', $this->post->date->datepicker); ?>">
151
  <?php _e('Quick Edit'); ?>
152
  </a>
app/Views/settings/settings-general.php CHANGED
@@ -30,12 +30,14 @@ settings_fields( 'nestedpages-general' );
30
  <tr valign="top">
31
  <th scope="row"><?php _e('Menu Sync', 'wp-nested-pages'); ?></th>
32
  <td>
 
33
  <p data-menu-enabled-option data-menu-hide-checkbox>
34
  <label>
35
  <input type="checkbox" name="nestedpages_ui[hide_menu_sync]" value="true" <?php if ( $this->settings->hideMenuSync() ) echo 'checked'; ?> />
36
  <?php _e('Hide Menu Sync Checkbox', 'wp-nested-pages'); ?> (<?php echo esc_html($sync_status); ?>)
37
  </label>
38
  </p>
 
39
  <p data-menu-enabled-option data-menu-disable-auto>
40
  <label>
41
  <input type="checkbox" name="nestedpages_ui[manual_menu_sync]" value="true" <?php if ( $this->settings->autoMenuDisabled() ) echo 'checked'; ?> data-menu-disable-auto-checkbox />
30
  <tr valign="top">
31
  <th scope="row"><?php _e('Menu Sync', 'wp-nested-pages'); ?></th>
32
  <td>
33
+ <?php if ( !$this->settings->menusDisabled() ) : ?>
34
  <p data-menu-enabled-option data-menu-hide-checkbox>
35
  <label>
36
  <input type="checkbox" name="nestedpages_ui[hide_menu_sync]" value="true" <?php if ( $this->settings->hideMenuSync() ) echo 'checked'; ?> />
37
  <?php _e('Hide Menu Sync Checkbox', 'wp-nested-pages'); ?> (<?php echo esc_html($sync_status); ?>)
38
  </label>
39
  </p>
40
+ <?php endif; ?>
41
  <p data-menu-enabled-option data-menu-disable-auto>
42
  <label>
43
  <input type="checkbox" name="nestedpages_ui[manual_menu_sync]" value="true" <?php if ( $this->settings->autoMenuDisabled() ) echo 'checked'; ?> data-menu-disable-auto-checkbox />
app/Views/settings/settings-posttypes.php CHANGED
@@ -45,6 +45,17 @@ settings_fields( 'nestedpages-posttypes' );
45
  </div>
46
  </div><!-- .row -->
47
  </li>
 
 
 
 
 
 
 
 
 
 
 
48
  <?php if ( $type->hierarchical ) : ?>
49
  <li>
50
  <div class="row">
@@ -58,6 +69,48 @@ settings_fields( 'nestedpages-posttypes' );
58
  </div><!-- .row -->
59
  </li>
60
  <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  <li>
62
  <?php
63
  $thumbnails_enabled = $this->post_type_repo->thumbnails($type->name, 'enabled');
45
  </div>
46
  </div><!-- .row -->
47
  </li>
48
+ <li>
49
+ <div class="row">
50
+ <div class="description">
51
+ <p><strong><?php _e('Disable Sorting', 'wp-nested-pages'); ?></strong><br />
52
+ <?php _e('Remove drag and drop sorting from this post type.', 'wp-nested-pages'); ?></p>
53
+ </div>
54
+ <div class="field">
55
+ <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][disable_sorting]" value="true" <?php if ( $type->disable_sorting ) echo 'checked'; ?> /><?php echo __('Disable Sorting') ?></label>
56
+ </div><!-- .field -->
57
+ </div><!-- .row -->
58
+ </li>
59
  <?php if ( $type->hierarchical ) : ?>
60
  <li>
61
  <div class="row">
69
  </div><!-- .row -->
70
  </li>
71
  <?php endif; ?>
72
+ <li>
73
+ <div class="row">
74
+ <div class="description">
75
+ <p><strong><?php _e('Assign Page for Listing', 'wp-nested-pages'); ?></strong><br />
76
+ <?php _e('Adds contextual links and post counts to the page row for the assigned post type.', 'wp-nested-pages'); ?></p>
77
+ </div>
78
+ <div class="field">
79
+ <label><input type="checkbox" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][post_type_page_assignment]" <?php if ( $type->page_assignment && $this->post_repo->postExists($type->page_assignment_id, 'page') ) echo 'checked'; ?> data-nestedpages-assign-post-type value="true" /><?php _e('Assign Page', 'wp-nested-pages'); ?></label>
80
+ <input type="hidden" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][post_type_page_assignment_page_id]" data-nested-pages-assign-post-type-id value="<?php if ( $type->page_assignment_id ) echo $type->page_assignment_id; ?>" />
81
+ <input type="hidden" name="nestedpages_posttypes[<?php echo esc_attr($type->name); ?>][post_type_page_assignment_page_title]" data-nested-pages-assign-post-type-title value="<?php if ( $type->page_assignment_title ) echo $type->page_assignment_title; ?>" />
82
+
83
+ <div class="nestedpages-assignment-display" style="display:none;">
84
+ <div class="nestedpages-page-pt-assignment-selection" data-nestedpages-page-pt-assignment-selection <?php if ( !$type->page_assignment_id || !$this->post_repo->postExists($type->page_assignment_id, 'page') ) echo 'style="display:none;"'?>>
85
+ <?php if ( $type->page_assignment_id ) : ?>
86
+ <?php _e('Currently assigned to:', 'wp-nested-pages'); ?> <?php echo $type->page_assignment_title; ?> <a href="#" data-nestedpages-page-pt-assignment-remove>(<?php _e('Remove', 'wp-nested-pages'); ?>)</a>
87
+ <?php endif; ?>
88
+ </div>
89
+ <div class="nestedpages-page-pt-assignment" data-nestedpages-post-search-form <?php if ( $type->page_assignment_id && $this->post_repo->postExists($type->page_assignment_id, 'page') ) echo 'style="display:none"';?>>
90
+ <?php
91
+ $recent_pages = $this->listing_repo->recentPosts('page');
92
+ if ( $recent_pages ) :
93
+ ?>
94
+ <input type="search" data-nestedpages-post-search="page" placeholder="<?php _e('Search Pages', 'wp-nested-pages'); ?>" />
95
+ <div class="np-quickedit-info" style="display:none;" data-nestedpages-no-results><?php _e('No pages were found.', 'wp-nested-pages'); ?></div>
96
+ <img src="<?php echo NestedPages\Helpers::plugin_url(); ?>/assets/images/spinner.gif" alt="<?php _e('Loading', 'wp-nested-pages'); ?>" style="display:none;" data-nestedpages-loading />
97
+ <div class="nestedpages-page-search-results" data-nestedpages-search-results>
98
+ <ul>
99
+ <?php foreach($recent_pages as $page) : ?>
100
+ <li><a href="#" data-assignment-page-id="<?php echo esc_attr($page->ID); ?>" data-assignment-page-title="<?php echo esc_html($page->post_title); ?>"><?php echo esc_html($page->post_title); ?></a></li>
101
+ <?php endforeach; ?>
102
+ </ul>
103
+ </div><!-- .nestedpages-page-search-results -->
104
+ <?php else : ?>
105
+ <div class="np-quickedit-info">
106
+ <?php _e('There are currently no pages available.', 'wp-nested-pages'); ?>
107
+ </div>
108
+ <?php endif; ?>
109
+ </div><!-- .nestedpages-page-pt-assignment -->
110
+ </div><!-- .nestedpages-assignment-display -->
111
+ </div><!-- .field -->
112
+ </div><!-- .row -->
113
+ </li>
114
  <li>
115
  <?php
116
  $thumbnails_enabled = $this->post_type_repo->thumbnails($type->name, 'enabled');
assets/css/nestedpages.css CHANGED
@@ -1 +1 @@
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,AAEAAAALAIAAAwAwT1MvMghi/6sAAAC8AAAAYGNtYXCa4JfrAAABHAAAAIxnYXNwAAAAEAAAAagAAAAIZ2x5ZthTIwkAAAGwAAAIVGhlYWQJZzAVAAAKBAAAADZoaGVhA+IB+QAACjwAAAAkaG10eCsABZEAAApgAAAAYGxvY2EUUBJOAAAKwAAAADJtYXhwACAAUwAACvQAAAAgbmFtZdvrS2kAAAsUAAABtnBvc3QAAwAAAAAMzAAAACAAAwH0AZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpAQHg/+AAIAHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAcAAAABgAEAADAAgAAQAg4lTlTuXU5gfmDeYS6JfpAf/9//8AAAAAACDiVOVO5dTmAOYK5hHol+kA//3//wAB/+MdsBq3GjIaBxoFGgIXfhcWAAMAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAIAQAAVAboBjwAJAA4AAAEHJzc2Mh8BFhQFNxcHIwG6J1AnBhIGMgb+gOxQ7FABPydQJwYGMgYS4OxQ7AAAAAACACsAAAHVAaoACwAlAAATMjY1NCYjIgYVFBYFHgEVFAYPAQ4BIyImLwEuAT0BNDY7ATIWF3UNExIODRMSAWIGBgYGlgYPCQkPBsAGBhkRlgkPBgFAEw0OEhIODRNiBg8JCQ8GlgYGBgbABg8JlhIYBgYAAAMA1QAqASsBgAALABcAIwAAJTIWFRQGIyImNTQ2NzIWFRQGIyImNTQ2NyImNTQ2MzIWFRQGAQARGhoRERoaEREaGhERGhoRERoaEREaGoAZEhEaGhESGYAZEhEaGhESGSoaERIZGRIRGgAAAAEAMwBGAc0BegAJAAA3MzUXBzUhNTMVZueAgP7mM8ZNZmdN57QAAAABAG0ATQGTAXQACwAAJQcnByc3JzcXNxcHAY44WF00XVg4WF00XYE0XVg4WF01XVc4WAAAAQCaAHwBkwFTAAYAAAEXByMnNxcBcCOKIk0iPAFTGL9nIDAAAwBNAGABswFgAAMABwALAAABNSEVBTUhFQU1IRUBs/6aAWb+mgFm/poBLTMzZzQ0ZjMzAAEAswB6AYABEwADAAABByczAYBnZs0BE5mZAAABAM0AegFmAUYAAwAAExcHNc2ZmQFGZ2XMAAAAAwAgACAB4AGAAAMABwALAAATIRUhFSEVIRUhFSEgAcD+QAHA/kABwP5AAYBgIGAgYAAAAAEAAP/gAgABwAAeAAABMh4CFRQOAiMiJicOAQc1PgE1NCY1LgE1ND4CAQA1XUYoKEZdNQoUCilfMBomASwzKEZdAcAhOEwrK0w4IQECKhgBDgwsGgQHAx1UMStMOCEAAAcAQP/gAcAB4AAJAA4AHwAvADMANwA7AAABISIGHQEhNTQmJxcjNzM3IyIGDwEGFjsBMjYvAS4BIxchIgYXEx4BOwEyNjcTNiYDIyczFyM1MxcjNTMBkP7gFBwBgBxoB4YHeASAChABCgEMCqAKDAEKARAKWP7QDREBGgEVDfANFQEaARHlMBBAYEBAUDBAAaAcFBAQFBwgMjIgDgpDCg0NCkMKDqATDf7gDRMTDQEgDRP+4ODg4ODgAAAAAwAAAEACAAGAABMAOABEAAABIg4CBx4DMzI+AjcuAxceARcOAQcOASMiJicuASc+ATc+ATcOARUUFjMyNjU0JiceARcHFAYjIiY1NDYzMhYBACpNQjUSEjVCTSoqTUI1EhI1Qk1UFyYODiYXHEAiIkAcFyYODiYXAQMCBARLNTVLBAQCAwF+HBQUHBwUFBwBgBcqOyQkOyoXFyo7JCQ7KhdVDiYXFyYOEhMTEg4mFxcmDgECAQoWDDVLSzUMFgoBAgEYFBwcFBQcHAAABQAAAAACAAHgABkAIwA1AD8AUAAAAR4BFw4DIyImJzceATMyNjc+ATcuASc3ByImJzceARUUBhMjBy4BIyIOAgceARcHFTMBBTIWFwcuATU0Ngc+ATc+ATcOARUUFhcHLgEnAaQdLxASNUJNKhctFicNGQ0iQBwXJg4OJBYjpAkQCJ0CAkurG24ULBcqTUI1EhAuHVsbAcX+8BIbAjYSFxyFDiYXAQMCBAQODB0VIw4BTBU3ICQ7KhcHCCcDAxMSDiYXFiUOI8kCAp0IEAk1SwFdbgcHFyo7JCA2FVobAcWCFxI2AhsSFBxjFyYOAQIBChYMFigQHQ4kFgAABgAA/+ACAAHgAAMABwALABcAIwAvAAATIRUhFSEVIRUhFSEDNDYzMhYVFAYjIiYVNDYzMhYVFAYjIiYVNDYzMhYVFAYjIibAAUD+wAFA/sABQP7AwCUbGyUlGxslJRsbJSUbGyUlGxslJRsbJQHAQIBAgEABoBslJRsbJSWlGyUlGxslJaUbJSUbGyUlAAAAAQAA/+ACAAHgACMAAAEjNTQmKwEiBh0BIyIGHQEUFjsBFRQWOwEyNj0BMzI2PQE0JgHwsAkHYAcJsAcJCQewCQdgBwmwBwkJASCwBwkJB7AJB2AHCbAHCQkHsAkHYAcJAAAAAAIAIwADAd0BvQAjAEgAAAEnJiIPAQYUHwEeARc3LgEvASY0PwE2Mh8BFhQPAR4BBzc2NAcuAScHHgEfARYUDwEGIi8BJjQ/AS4BNwcGFB8BFjI/ATY0LwEB3QIkZCNuIyMCAwcDKAQGAwITE20TNhMCFBQxBwYBTSPEAwcDKAQGAwITE20TNhMCFBQxBwYBTSMjAiRkI24jIwIBuwIjI20kZCQCAgYCKAIFAwITNhNtFBQCEzYTMg8iEU0jZHkCBgIoAgUDAhM2E20UFAITNhMyDyIRTSNkJAIjI20kZCQCAAAAAAMAVQAAAasBwAAIABQALQAAATU0JiMiBh0BFzI2NTQmIyIGFRQWNzIWHQEUBiMhIiY9ATQ2OwE1NDYzMhYdAQFCJxsbJ0IRGhoRERoakREaGhH/ABEaGhEVPywsPwEqKxsnJxsrwBoREhkZEhEawBgS1hEZGRHWEhgrLT4+LSsAAQAlAAkB3QHBAB0AAAE3FwcmBg8BDgEXBycHDgEnJjY/ASc3FjY/AT4BJwELL6MvFDIRFBEFDS4+SAhRCAg6CEg+LxQxEhMSBQ4Bky6iLw0EEhMSMRUuPkgIOwgJUQhHPi8NBBITEjEVAAAAAgBNABMBmgGtAAQACgAANxEhESEHMxUhETOaAQD/ABrN/wAzYAFN/rMaMwFNAAAAAQAAAAEAAPW5O21fDzz1AAsCAAAAAADUI/esAAAAANQj96wAAP/gAgAB4AAAAAgAAgAAAAAAAAABAAAB4P/gAAACAAAAAAACAAABAAAAAAAAAAAAAAAAAAAAGAIAAAAAAAAAAAAAAAEAAAACAABAAgAAKwIAANUCAAAzAgAAbQIAAJoCAABNAgAAswIAAM0CAAAgAgAAAAIAAEACAAAAAgAAAAIAAAACAAAAAgAAIwIAAFUCAAAlAgAATQAAAAAACgAUAB4APgB4AK4AwgDcAO4BCAEWASQBPgFuAcwCMgKwAvgDKgOcA9wEEgQqAAAAAQAAABgAUQAHAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAsAAAABAAAAAAACAAcAhAABAAAAAAADAAsAQgABAAAAAAAEAAsAmQABAAAAAAAFAAsAIQABAAAAAAAGAAsAYwABAAAAAAAKABoAugADAAEECQABABYACwADAAEECQACAA4AiwADAAEECQADABYATQADAAEECQAEABYApAADAAEECQAFABYALAADAAEECQAGABYAbgADAAEECQAKADQA1G5lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAc1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMG5lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAc25lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAc1JlZ3VsYXIAUgBlAGcAdQBsAGEAcm5lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAc0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype");font-weight:normal;font-style:normal}[class^="np-icon-"],[class*=" np-icon-"]{font-family:'nestedpages' !important;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-pencil:before{content:"\e254"}.np-icon-lock:before{content:"\e897"}.np-icon-tag:before{content:"\e54e"}.np-icon-more_vert:before{content:"\e5d4"}.np-icon-page:before{content:"\e901"}.np-icon-post:before{content:"\e900"}.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-bubble:before{content:"\e607"}.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-plus:before{content:"\e611"}.np-btn,.np-toggle-edit{text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:5px 8px;-webkit-transition:all 200ms ease;transition:all 200ms ease}.np-btn:hover,.np-toggle-edit:hover{background-color:#0074a2;color:#fff;-webkit-transition:all 200ms ease;transition:all 200ms ease;border-color:#0074a2}.np-btn:disabled,.np-toggle-edit:disabled,.np-btn.disabled,.disabled.np-toggle-edit{opacity:.6;cursor:not-allowed}.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;color:#fff}.np-btn-trash:hover{background-color:#ba281e;border-color:#ba281e}.np-toggle-edit{display:none;float:right;margin-right:10px;position:relative;top:9px}.np-toggle-edit.active{background-color:#0074a2;color:#fff;-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}.np-quickedit-info{border-left:4px solid #0074a2;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:.85;z-index:9999}.np-modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform 0.3s ease-out;transition:-webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out;transition:transform 0.3s ease-out, -webkit-transform 0.3s ease-out}.np-modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-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:90%;height:80%;margin:10px auto 0px auto;max-width:800px;z-index:9999}.np-modal .modal-content{position:relative;background-color:#fff;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);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;transition:opacity 200ms ease}.np-inline-overlay.active{opacity:1;-webkit-transition:opacity 200ms ease;transition:opacity 200ms ease}.np-inline-modal{position:relative;z-index:999;background-color:#fff;-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.np-btn,.nestedpages-toggleall.np-toggle-edit{float:right}.np-toggle-publish{color:#999}.np-toggle-publish.active{color:#333;font-weight:bold}.np-sync-menu-cont{float:right;margin:0px 15px 0px 0px}.np-sync-menu-cont button{position:relative;top:-5px;padding:5px 8px}.np-sync-menu-cont label{position:relative;top:4px}#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:#fff}.np-tabs ul li a:focus,.np-tabs ul li a:active{outline:none;-webkit-box-shadow:none;box-shadow:none}.nestedpages-datepicker.ui-datepicker{background-color:#fff;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:#fff;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;transition:opacity 200ms ease}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next:hover,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev:hover{opacity:.5;-webkit-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:#fff;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:#fff;-webkit-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:#fff}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a:hover{background-color:#333;color:#fff;-webkit-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:#fff;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;transition:all 200ms ease}.wppages-handle-expand div:hover{background-color:#0074a2;border-color:#0074a2;color:#fff;-webkit-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 .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}.nestedpages ol .np-page-type{color:#333}.nestedpages ol .locked{color:#333;margin-left:20px}.nestedpages ol .locked em{font-style:normal}.nestedpages ol .status{color:#999}.nestedpages ol .np-icon-eye-blocked{color:#999}.nestedpages ol .nav-status{color:#b3b3b3}.nestedpages ol .np-hide{display:none}.nestedpages ol .np-seo-indicator{display:block;position:absolute;right:10px;top:50%;margin-top:-6px;width:12px;height:12px;-webkit-border-radius:50%;border-radius:50%;background-color:#999}.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 .np-search-results .np-hide{display:block}.nestedpages .child-toggle{display:table-cell;width:46px;background-color:#f0f0f0;text-align:center;position:relative}.nestedpages .child-toggle .child-toggle-spacer{height:46px;width:100%}.nestedpages .child-toggle a{position:absolute;top:50%;left:8px;margin-top:-16px;width:28px;height:28px;background-color:#fff;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;transition:all 200ms ease}.nestedpages .child-toggle a i{line-height:26px}.nestedpages .child-toggle a:hover{background-color:#0074a2;color:#fff;border-color:#0074a2}.nestedpages .handle{display:inline-block;cursor:move;font-size:20px;margin-top:-8px;position:relative;top:2px;color:#b3b3b3;-webkit-transition:all 200ms ease;transition:all 200ms ease}.nestedpages .handle:hover{-webkit-transition:all 200ms ease;transition:all 200ms ease;color:#0074a2}.nestedpages .np-icon-sub-menu{display:none;color:#999}.nestedpages .row.no-sort .page-title{padding-left:10px}.nestedpages .np-thumbnail{display:table-cell;width:80px;vertical-align:middle;zoom:1}.nestedpages .np-thumbnail:before,.nestedpages .np-thumbnail:after{content:" ";display:table}.nestedpages .np-thumbnail:after{clear:both}.nestedpages .np-thumbnail img{float:right;width:100%;height:auto}.nestedpages .np-thumbnail.large{width:150px}.nestedpages .np-thumbnail.small{width:50px}.nestedpages .np-thumbnail.link{background-color:#ebebeb;text-align:center}.nestedpages .np-thumbnail.link i{font-size:1.8em;opacity:.5}.nestedpages .np-bulk-checkbox{display:table-cell;width:33px;vertical-align:middle;text-align:center;background-color:#f0f0f0}.nestedpages .np-bulk-checkbox input[type="checkbox"]{margin-right:0}.nestedpages .handle,.nestedpages .np-icon-sub-menu{width:30px;text-align:center;vertical-align:middle}.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 li ol .row.no-sort .np-icon-sub-menu{display:inline-block}.nestedpages .row{background-color:#fff;display:table;width:100%}.nestedpages .row:hover{background-color:#f0f0f0}.nestedpages .row:hover .cell.custom-column{visibility:hidden}.nestedpages .row.np-updated{background-color:#e9f7df;-webkit-transition:background-color 400ms ease;transition:background-color 400ms ease}.nestedpages .row.np-updated-show{background-color:#fff;-webkit-transition:background-color 400ms ease;transition:background-color 400ms ease}.nestedpages .row.search .page-title{padding-left:10px}.nestedpages .non-hierarchical-spacer{height:47px}.nestedpages .row-inner{display:table-cell;vertical-align:middle;position:relative}.nestedpages ol li ol .row-inner{padding-left:0px}.nestedpages ol li ol li ol .row-inner{padding-left:20px}.nestedpages ol li ol li ol li ol .row-inner{padding-left:40px}.nestedpages ol li ol li ol li ol li ol .row-inner{padding-left:60px}.nestedpages ol li ol li ol li ol li ol li ol .row-inner{padding-left:80px}.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:gray;border:0;float:left;margin-left:8px;padding-left:8px;border-left:1px solid #ccc}.nestedpages .np-post-columns ul li:first-child{margin-left:0;padding-left:0;border:0}.nestedpages .has-yoast .np-post-columns{margin-right:30px}.nestedpages .has-custom-columns .np-post-columns{display:none}.nestedpages .action-buttons{display:none;position:absolute;right:10px;top:50%;margin-top:-15px}.nestedpages .action-buttons a{margin:0 0 0 -5px}.nestedpages .action-buttons a.np-btn-trash{margin-left:4px}.np-search{float:right}.nestedpages-list-header{background-color:#fff;border:1px solid #e1e1e1;border-bottom:0;height:46px;zoom:1}.nestedpages-list-header:before,.nestedpages-list-header:after{content:" ";display:table}.nestedpages-list-header:after{clear:both}.nestedpages-list-header .np-check-all{float:right;width:33px;text-align:center;line-height:46px;background-color:#f0f0f0}.nestedpages-list-header .np-check-all input[type="checkbox"]{margin:0}.nestedpages-list-header .np-check-all input[type="checkbox"].check-all-partial:checked:before{content:"-";margin:0;margin-top:-9px}.nestedpages-list-header .np-hidden-select-count{display:none;float:right;margin:0 1em 0 0;line-height:46px;font-style:oblique}.nestedpages-list-header .np-bulk-form{padding-right:3px;float:right;margin-right:5px;position:relative;top:9px}.nestedpages-list-header .np-bulk-form select,.nestedpages-list-header .np-bulk-form input[type="submit"]{display:inline-block}@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:gray}.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.original-link,.nestedpages .new-child .form-control.original-link{background-color:#f9f9f9;border:1px solid #e1e1e1;padding:5px;font-style:oblique;margin-bottom:8px}.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 .form-control.full label,.nestedpages .new-child .form-control.full label{width:100%}.nestedpages .quick-edit .form-control.full.checkbox label,.nestedpages .new-child .form-control.full.checkbox label{padding:5px 0 5px 25%}.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:#fff;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;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 .right .form-control.full label{padding-left:0}.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}.modal-body.np-menu-item-form{height:400px;padding:0;border-top:1px solid #e1e1e1}.np-menu-type-selection{float:left;height:100%;overflow:auto;width:35%;padding:15px;background-color:#f9f9f9;border-right:1px solid #e1e1e1;-webkit-box-sizing:border-box;box-sizing:border-box}.np-menu-type-selection ul{list-style-type:none;margin:0;padding: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;border:0}.np-menu-type-selection ul li{margin:0;border:1px solid #e5e5e5;border-top:0}.np-menu-type-selection ul li a{background-color:#fff;display:block;text-decoration:none;padding:15px 10px;position:relative;color:#333;font-weight:bold;-webkit-transition:all 200ms ease;transition:all 200ms ease}.np-menu-type-selection ul li a:hover{background-color:#ebebeb;-webkit-transition:all 200ms ease;transition:all 200ms ease}.np-menu-type-selection ul li a:after{position:absolute;font-family:"dashicons";content:"\f140";font-size:18px;right:10px;top:15px;color:gray}.np-menu-type-selection ul li a.active:after{content:"\f142"}.np-menu-type-selection ul li a.np-custom-link:after{content:"\f139"}.np-menu-type-selection ul li a.np-custom-link.active{background-color:#0074a2;color:#fff}.np-menu-type-selection ul li a.np-custom-link.active:after{content:"\f335";color:#fff}.np-menu-type-selection ul li a:active,.np-menu-type-selection ul li a:focus{-webkit-box-shadow:none;box-shadow:none}.np-menu-type-selection ul li a.no-terms{color:#b3b3b3}.np-menu-type-selection ul li a.no-terms span{float:right;font-weight:normal;font-style:oblique}.np-menu-type-selection ul li a.no-terms:after{content:''}.np-menu-type-selection ul li a.no-terms:hover{background-color:#fff;cursor:default}.np-menu-type-selection ul li a.no-terms.section{padding:8px 10px;background-color:#333;color:#fff}.np-menu-type-selection ul li:first-child{border-top:1px solid #e5e5e5}.np-menu-type-selection ul li ul{display:none;-webkit-box-shadow:none;box-shadow:none;padding:10px;background-color:#fff}.np-menu-type-selection ul li ul li{border-color:#e0e0e0}.np-menu-type-selection ul li ul li a{padding:8px;background-color:#f9f9f9;font-weight:normal}.np-menu-type-selection ul li ul li a:after{content:"\f139";top:8px;right:5px}.np-menu-type-selection ul li ul li a.active{background-color:#0074a2;color:#fff}.np-menu-type-selection ul li ul li a.active:after{content:"\f335";color:#fff}.np-menu-link-object{width:65%;float:right;height:100%;overflow:auto}.np-menu-link-object-placeholder{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);color:#b3b3b3}.np-menu-search{padding:10px;background-color:#f9f9f9}.np-menu-search input[type="text"]{width:100%;height:35px}.np-menu-search .np-menu-search-loading{display:none;height:30px;background:url("../images/spinner.gif") no-repeat;background-position:center}.np-menu-search .np-menu-search-noresults{display:none;text-align:center;padding-top:8px;font-style:oblique}.np-menu-link-details{padding:20px}.np-menu-link-details h3{margin-top:0}.np-menu-link-details h3 em{float:right;font-size:13px;font-weight:normal;font-style:normal;color:gray}.np-menu-link-details .original-link{border:1px solid #e5e5e5;font-size:12px;margin-bottom:15px;padding:5px;font-style:oblique}.np-menu-link-details .fields{background-color:#f9f9f9;padding:15px}.np-menu-link-details p{margin-top:0}.np-menu-link-details .checkbox{margin-bottom:10px}.np-menu-link-details label{display:block}.np-menu-link-details input[type="text"]{width:100%}.nestedpages .nestedpages-bulk-edit{display:none;background-color:#fff;margin:0;border:1px solid #e1e1e1;border-bottom:0}.nestedpages .nestedpages-bulk-edit h3{padding:1em;margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-edit-link-info{padding:0 1em}.nestedpages .nestedpages-bulk-edit .fields{padding:1em;margin:0}.nestedpages .nestedpages-bulk-edit .np-taxonomies{margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles{list-style-type:none;margin:0;padding:0;background-color:#f9f9f9;border:1px solid #e5e5e5;border-left:0;border-right:0;padding:.5em}.nestedpages .nestedpages-bulk-edit .np-bulk-titles li{padding:0;margin:.5em 0 0 0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles li:first-child{margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles .np-remove{display:inline-block;background-color:#333;width:22px;height:22px;-webkit-border-radius:50%;border-radius:50%;text-align:center;text-decoration:none;color:#fff;line-height:18px;font-size:1.5em;margin-right:.3em}.nestedpages .nestedpages-bulk-edit .np-bulk-titles .np-remove:hover{background-color:gray}.nestedpages .nestedpages-bulk-edit .np-taxonomies{display:block;padding:1em}.nestedpages .nestedpages-bulk-edit .np-bulk-footer{padding:10px;text-align:right;background-color:#404040;zoom:1}.nestedpages .nestedpages-bulk-edit .np-bulk-footer:before,.nestedpages .nestedpages-bulk-edit .np-bulk-footer:after{content:" ";display:table}.nestedpages .nestedpages-bulk-edit .np-bulk-footer:after{clear:both}.nestedpages .nestedpages-bulk-edit .np-bulk-footer .pull-left{float:left}.nestedpages-columns-header{display:table;border-collapse:collapse;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f0f0f0;border:1px solid #e1e1e1;border-bottom:0}.nestedpages-columns-header .cell{font-weight:bold;text-align:left;display:table-cell;padding:1em .5em 1em 0;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.nestedpages-columns-header .toggle-spacer span{display:block;width:50px}.nestedpages-columns-header .bulk-spacer span{display:block;width:33px}.nestedpages-columns-header .thumbnail-spacer span{display:block;width:100%}.nestedpages-columns-header .title{width:30%;padding:0 5px}.nestedpages-row-columns{display:table;width:100%;border-collapse:collapse;-webkit-box-sizing:border-box;box-sizing:border-box}.nestedpages-row-columns .cell{text-align:left;display:table-cell;padding:1em .5em 1em 0;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.nestedpages-row-columns .title-cell{width:30%;position:relative}.nestedpages-row-columns .title-cell-spacer{position:absolute;display:block;width:100%}@media (max-width: 767px){.nestedpages-row-columns .custom-column,.nestedpages-columns-header{display:none}.nestedpages-row-columns .title-cell.cell{width:100%}}.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:#fff}.nestedpages-settings-table i{font-size:20px}.nestedpages-settings-posttypes{-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-settings-posttypes .post-type{background-color:#fff;border-bottom:1px solid #e1e1e1}.nestedpages-settings-posttypes .post-type:last-child{border:0}.nestedpages-settings-posttypes .post-type .head{zoom:1;line-height:46px;background-color:#fff;padding-right:10px}.nestedpages-settings-posttypes .post-type .head:before,.nestedpages-settings-posttypes .post-type .head:after{content:" ";display:table}.nestedpages-settings-posttypes .post-type .head:after{clear:both}.nestedpages-settings-posttypes .post-type .head .checkbox{float:left;width:46px;height:46px;background-color:rgba(51,51,51,0.06);text-align:center;line-height:46px;margin-right:10px}.nestedpages-settings-posttypes .post-type .head label{float:left;line-height:46px;margin:0}.nestedpages-settings-posttypes .post-type .head label em{color:#999}.nestedpages-settings-posttypes .post-type .head .button{float:right;margin-top:10px}.nestedpages-settings-posttypes .post-type.active .head{background-color:#0074a2;color:#fff}.nestedpages-settings-posttypes .post-type .row{display:table;width:100%}.nestedpages-settings-posttypes .post-type .row .description{display:table-cell;width:25%;border-bottom:1px solid #e1e1e1;background-color:#f9f9f9;padding:10px}.nestedpages-settings-posttypes .post-type .row .description p{color:gray;font-size:.9em}.nestedpages-settings-posttypes .post-type .row .description strong{color:#333;font-size:1.2em}.nestedpages-settings-posttypes .post-type .row .field{display:table-cell;width:75%;background-color:#fff;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1;padding:10px}.nestedpages-settings-posttypes .post-type .body{display:none}.nestedpages-settings-posttypes .post-type .body h4{margin:0;padding:10px 0 0 10px}.nestedpages-settings-posttypes .post-type .body .post-type-settings{margin:0}.nestedpages-settings-posttypes .post-type .body li{margin:0}.nestedpages-settings-posttypes .post-type .post-type-settings li:last-child .field,.nestedpages-settings-posttypes .post-type .post-type-settings li:last-child .description{border-bottom:0}.nestedpages-settings-posttypes .post-type .custom-fields,.nestedpages-settings-posttypes .post-type .standard-fields,.nestedpages-settings-posttypes .post-type .columns{display:none;padding-top:20px}.nestedpages-settings-posttypes .post-type .custom-fields .custom-field-group,.nestedpages-settings-posttypes .post-type .standard-fields .custom-field-group,.nestedpages-settings-posttypes .post-type .columns .custom-field-group{height:150px;overflow:auto;background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1}.nestedpages-settings-posttypes .post-type .custom-fields h5,.nestedpages-settings-posttypes .post-type .standard-fields h5,.nestedpages-settings-posttypes .post-type .columns h5{padding:0;font-weight:normal;font-style:oblique;margin:0;color:#999;margin-bottom:6px}.nestedpages-settings-posttypes .post-type .custom-fields p,.nestedpages-settings-posttypes .post-type .standard-fields p,.nestedpages-settings-posttypes .post-type .columns p{margin:0 0 6px 0;font-weight:bold}.nestedpages-settings-posttypes .post-type .custom-fields ul,.nestedpages-settings-posttypes .post-type .standard-fields ul,.nestedpages-settings-posttypes .post-type .columns ul{margin:0}.nestedpages-settings-posttypes .post-type .custom-fields ul.indented,.nestedpages-settings-posttypes .post-type .standard-fields ul.indented,.nestedpages-settings-posttypes .post-type .columns ul.indented{padding-left:15px}.nestedpages-settings-posttypes .post-type .custom-fields ul li,.nestedpages-settings-posttypes .post-type .standard-fields ul li,.nestedpages-settings-posttypes .post-type .columns ul li{margin:3px 0 0 0}.nestedpages-settings-posttypes .post-type .thumbnail-options{background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1;margin-top:1em}.nestedpages-settings-posttypes .post-type .thumbnail-options label{display:block}.nestedpages-settings-posttypes .post-type .thumbnail-options select{margin-bottom:1em}
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,AAEAAAALAIAAAwAwT1MvMghi/6sAAAC8AAAAYGNtYXCa4JfrAAABHAAAAIxnYXNwAAAAEAAAAagAAAAIZ2x5ZthTIwkAAAGwAAAIVGhlYWQJZzAVAAAKBAAAADZoaGVhA+IB+QAACjwAAAAkaG10eCsABZEAAApgAAAAYGxvY2EUUBJOAAAKwAAAADJtYXhwACAAUwAACvQAAAAgbmFtZdvrS2kAAAsUAAABtnBvc3QAAwAAAAAMzAAAACAAAwH0AZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpAQHg/+AAIAHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAcAAAABgAEAADAAgAAQAg4lTlTuXU5gfmDeYS6JfpAf/9//8AAAAAACDiVOVO5dTmAOYK5hHol+kA//3//wAB/+MdsBq3GjIaBxoFGgIXfhcWAAMAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAIAQAAVAboBjwAJAA4AAAEHJzc2Mh8BFhQFNxcHIwG6J1AnBhIGMgb+gOxQ7FABPydQJwYGMgYS4OxQ7AAAAAACACsAAAHVAaoACwAlAAATMjY1NCYjIgYVFBYFHgEVFAYPAQ4BIyImLwEuAT0BNDY7ATIWF3UNExIODRMSAWIGBgYGlgYPCQkPBsAGBhkRlgkPBgFAEw0OEhIODRNiBg8JCQ8GlgYGBgbABg8JlhIYBgYAAAMA1QAqASsBgAALABcAIwAAJTIWFRQGIyImNTQ2NzIWFRQGIyImNTQ2NyImNTQ2MzIWFRQGAQARGhoRERoaEREaGhERGhoRERoaEREaGoAZEhEaGhESGYAZEhEaGhESGSoaERIZGRIRGgAAAAEAMwBGAc0BegAJAAA3MzUXBzUhNTMVZueAgP7mM8ZNZmdN57QAAAABAG0ATQGTAXQACwAAJQcnByc3JzcXNxcHAY44WF00XVg4WF00XYE0XVg4WF01XVc4WAAAAQCaAHwBkwFTAAYAAAEXByMnNxcBcCOKIk0iPAFTGL9nIDAAAwBNAGABswFgAAMABwALAAABNSEVBTUhFQU1IRUBs/6aAWb+mgFm/poBLTMzZzQ0ZjMzAAEAswB6AYABEwADAAABByczAYBnZs0BE5mZAAABAM0AegFmAUYAAwAAExcHNc2ZmQFGZ2XMAAAAAwAgACAB4AGAAAMABwALAAATIRUhFSEVIRUhFSEgAcD+QAHA/kABwP5AAYBgIGAgYAAAAAEAAP/gAgABwAAeAAABMh4CFRQOAiMiJicOAQc1PgE1NCY1LgE1ND4CAQA1XUYoKEZdNQoUCilfMBomASwzKEZdAcAhOEwrK0w4IQECKhgBDgwsGgQHAx1UMStMOCEAAAcAQP/gAcAB4AAJAA4AHwAvADMANwA7AAABISIGHQEhNTQmJxcjNzM3IyIGDwEGFjsBMjYvAS4BIxchIgYXEx4BOwEyNjcTNiYDIyczFyM1MxcjNTMBkP7gFBwBgBxoB4YHeASAChABCgEMCqAKDAEKARAKWP7QDREBGgEVDfANFQEaARHlMBBAYEBAUDBAAaAcFBAQFBwgMjIgDgpDCg0NCkMKDqATDf7gDRMTDQEgDRP+4ODg4ODgAAAAAwAAAEACAAGAABMAOABEAAABIg4CBx4DMzI+AjcuAxceARcOAQcOASMiJicuASc+ATc+ATcOARUUFjMyNjU0JiceARcHFAYjIiY1NDYzMhYBACpNQjUSEjVCTSoqTUI1EhI1Qk1UFyYODiYXHEAiIkAcFyYODiYXAQMCBARLNTVLBAQCAwF+HBQUHBwUFBwBgBcqOyQkOyoXFyo7JCQ7KhdVDiYXFyYOEhMTEg4mFxcmDgECAQoWDDVLSzUMFgoBAgEYFBwcFBQcHAAABQAAAAACAAHgABkAIwA1AD8AUAAAAR4BFw4DIyImJzceATMyNjc+ATcuASc3ByImJzceARUUBhMjBy4BIyIOAgceARcHFTMBBTIWFwcuATU0Ngc+ATc+ATcOARUUFhcHLgEnAaQdLxASNUJNKhctFicNGQ0iQBwXJg4OJBYjpAkQCJ0CAkurG24ULBcqTUI1EhAuHVsbAcX+8BIbAjYSFxyFDiYXAQMCBAQODB0VIw4BTBU3ICQ7KhcHCCcDAxMSDiYXFiUOI8kCAp0IEAk1SwFdbgcHFyo7JCA2FVobAcWCFxI2AhsSFBxjFyYOAQIBChYMFigQHQ4kFgAABgAA/+ACAAHgAAMABwALABcAIwAvAAATIRUhFSEVIRUhFSEDNDYzMhYVFAYjIiYVNDYzMhYVFAYjIiYVNDYzMhYVFAYjIibAAUD+wAFA/sABQP7AwCUbGyUlGxslJRsbJSUbGyUlGxslJRsbJQHAQIBAgEABoBslJRsbJSWlGyUlGxslJaUbJSUbGyUlAAAAAQAA/+ACAAHgACMAAAEjNTQmKwEiBh0BIyIGHQEUFjsBFRQWOwEyNj0BMzI2PQE0JgHwsAkHYAcJsAcJCQewCQdgBwmwBwkJASCwBwkJB7AJB2AHCbAHCQkHsAkHYAcJAAAAAAIAIwADAd0BvQAjAEgAAAEnJiIPAQYUHwEeARc3LgEvASY0PwE2Mh8BFhQPAR4BBzc2NAcuAScHHgEfARYUDwEGIi8BJjQ/AS4BNwcGFB8BFjI/ATY0LwEB3QIkZCNuIyMCAwcDKAQGAwITE20TNhMCFBQxBwYBTSPEAwcDKAQGAwITE20TNhMCFBQxBwYBTSMjAiRkI24jIwIBuwIjI20kZCQCAgYCKAIFAwITNhNtFBQCEzYTMg8iEU0jZHkCBgIoAgUDAhM2E20UFAITNhMyDyIRTSNkJAIjI20kZCQCAAAAAAMAVQAAAasBwAAIABQALQAAATU0JiMiBh0BFzI2NTQmIyIGFRQWNzIWHQEUBiMhIiY9ATQ2OwE1NDYzMhYdAQFCJxsbJ0IRGhoRERoakREaGhH/ABEaGhEVPywsPwEqKxsnJxsrwBoREhkZEhEawBgS1hEZGRHWEhgrLT4+LSsAAQAlAAkB3QHBAB0AAAE3FwcmBg8BDgEXBycHDgEnJjY/ASc3FjY/AT4BJwELL6MvFDIRFBEFDS4+SAhRCAg6CEg+LxQxEhMSBQ4Bky6iLw0EEhMSMRUuPkgIOwgJUQhHPi8NBBITEjEVAAAAAgBNABMBmgGtAAQACgAANxEhESEHMxUhETOaAQD/ABrN/wAzYAFN/rMaMwFNAAAAAQAAAAEAAPW5O21fDzz1AAsCAAAAAADUI/esAAAAANQj96wAAP/gAgAB4AAAAAgAAgAAAAAAAAABAAAB4P/gAAACAAAAAAACAAABAAAAAAAAAAAAAAAAAAAAGAIAAAAAAAAAAAAAAAEAAAACAABAAgAAKwIAANUCAAAzAgAAbQIAAJoCAABNAgAAswIAAM0CAAAgAgAAAAIAAEACAAAAAgAAAAIAAAACAAAAAgAAIwIAAFUCAAAlAgAATQAAAAAACgAUAB4APgB4AK4AwgDcAO4BCAEWASQBPgFuAcwCMgKwAvgDKgOcA9wEEgQqAAAAAQAAABgAUQAHAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAsAAAABAAAAAAACAAcAhAABAAAAAAADAAsAQgABAAAAAAAEAAsAmQABAAAAAAAFAAsAIQABAAAAAAAGAAsAYwABAAAAAAAKABoAugADAAEECQABABYACwADAAEECQACAA4AiwADAAEECQADABYATQADAAEECQAEABYApAADAAEECQAFABYALAADAAEECQAGABYAbgADAAEECQAKADQA1G5lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAc1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMG5lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAc25lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAc1JlZ3VsYXIAUgBlAGcAdQBsAGEAcm5lc3RlZHBhZ2VzAG4AZQBzAHQAZQBkAHAAYQBnAGUAc0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype");font-weight:normal;font-style:normal}[class^="np-icon-"],[class*=" np-icon-"]{font-family:'nestedpages' !important;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-pencil:before{content:"\e254"}.np-icon-lock:before{content:"\e897"}.np-icon-tag:before{content:"\e54e"}.np-icon-more_vert:before{content:"\e5d4"}.np-icon-page:before{content:"\e901"}.np-icon-post:before{content:"\e900"}.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-bubble:before{content:"\e607"}.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-plus:before{content:"\e611"}.np-btn,.np-toggle-edit{text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:5px 8px;-webkit-transition:all 200ms ease;transition:all 200ms ease}.np-btn:hover,.np-toggle-edit:hover{background-color:#0074a2;color:#fff;-webkit-transition:all 200ms ease;transition:all 200ms ease;border-color:#0074a2}.np-btn:disabled,.np-toggle-edit:disabled,.np-btn.disabled,.disabled.np-toggle-edit{opacity:.6;cursor:not-allowed}.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;color:#fff}.np-btn-trash:hover{background-color:#ba281e;border-color:#ba281e}.np-toggle-edit{display:none;float:right;margin-right:10px;position:relative;top:9px}.np-toggle-edit.active{background-color:#0074a2;color:#fff;-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}.np-quickedit-info{border-left:4px solid #0074a2;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:.85;z-index:9999}.np-modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform 0.3s ease-out;transition:-webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out;transition:transform 0.3s ease-out, -webkit-transform 0.3s ease-out}.np-modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-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:90%;height:80%;margin:10px auto 0px auto;max-width:800px;z-index:9999}.np-modal .modal-content{position:relative;background-color:#fff;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);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;transition:opacity 200ms ease}.np-inline-overlay.active{opacity:1;-webkit-transition:opacity 200ms ease;transition:opacity 200ms ease}.np-inline-modal{position:relative;z-index:999;background-color:#fff;-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.np-btn,.nestedpages-toggleall.np-toggle-edit{float:right}.np-toggle-publish{color:#999}.np-toggle-publish.active{color:#333;font-weight:bold}.np-sync-menu-cont{float:right;margin:0px 15px 0px 0px}.np-sync-menu-cont button{position:relative;top:-5px;padding:5px 8px}.np-sync-menu-cont label{position:relative;top:4px}#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:#fff}.np-tabs ul li a:focus,.np-tabs ul li a:active{outline:none;-webkit-box-shadow:none;box-shadow:none}.nestedpages-datepicker.ui-datepicker{background-color:#fff;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:#fff;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;transition:opacity 200ms ease}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next:hover,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev:hover{opacity:.5;-webkit-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:#fff;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:#fff;-webkit-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:#fff}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a:hover{background-color:#333;color:#fff;-webkit-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:#fff;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;transition:all 200ms ease}.wppages-handle-expand div:hover{background-color:#0074a2;border-color:#0074a2;color:#fff;-webkit-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 .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}.nestedpages ol .np-page-type{color:#333}.nestedpages ol .locked{color:#333;margin-left:20px}.nestedpages ol .locked em{font-style:normal}.nestedpages ol .status{color:#999}.nestedpages ol .np-icon-eye-blocked{color:#999}.nestedpages ol .nav-status{color:#b3b3b3}.nestedpages ol .np-hide{display:none}.nestedpages ol .np-assigned-pt-actions{list-style-type:none;margin:0;padding:0;display:inline-block;margin-left:10px}.nestedpages ol .np-assigned-pt-actions li{display:inline-block;background:transparent;border:0}.nestedpages ol .np-assigned-pt-actions li a{color:#333;display:block;border-left:1px solid #e1e1e1;padding:0 5px}.nestedpages ol .np-assigned-pt-actions li:first-child a{border:0;padding-left:0}.nestedpages ol .np-seo-indicator{display:block;position:absolute;right:10px;top:50%;margin-top:-6px;width:12px;height:12px;-webkit-border-radius:50%;border-radius:50%;background-color:#999}.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 .np-search-results .np-hide{display:block}.nestedpages .child-toggle{display:table-cell;width:46px;background-color:#f0f0f0;text-align:center;position:relative}.nestedpages .child-toggle .child-toggle-spacer{height:46px;width:100%}.nestedpages .child-toggle a{position:absolute;top:50%;left:8px;margin-top:-16px;width:28px;height:28px;background-color:#fff;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;transition:all 200ms ease}.nestedpages .child-toggle a i{line-height:26px}.nestedpages .child-toggle a:hover{background-color:#0074a2;color:#fff;border-color:#0074a2}.nestedpages .handle{display:inline-block;cursor:move;font-size:20px;margin-top:-8px;position:relative;top:2px;color:#b3b3b3;-webkit-transition:all 200ms ease;transition:all 200ms ease}.nestedpages .handle:hover{-webkit-transition:all 200ms ease;transition:all 200ms ease;color:#0074a2}.nestedpages .np-icon-sub-menu{display:none;color:#999}.nestedpages .row.no-sort .page-title{padding-left:10px}.nestedpages .np-thumbnail{display:table-cell;width:80px;vertical-align:middle;zoom:1}.nestedpages .np-thumbnail:before,.nestedpages .np-thumbnail:after{content:" ";display:table}.nestedpages .np-thumbnail:after{clear:both}.nestedpages .np-thumbnail img{float:right;width:100%;height:auto}.nestedpages .np-thumbnail.large{width:150px}.nestedpages .np-thumbnail.small{width:50px}.nestedpages .np-thumbnail.link{background-color:#ebebeb;text-align:center}.nestedpages .np-thumbnail.link i{font-size:1.8em;opacity:.5}.nestedpages .np-bulk-checkbox{display:table-cell;width:33px;vertical-align:middle;text-align:center;background-color:#f0f0f0}.nestedpages .np-bulk-checkbox input[type="checkbox"]{margin-right:0}.nestedpages .handle,.nestedpages .np-icon-sub-menu{width:30px;text-align:center;vertical-align:middle}.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 li ol .row.no-sort .np-icon-sub-menu{display:inline-block}.nestedpages .row{background-color:#fff;display:table;width:100%}.nestedpages .row:hover{background-color:#f0f0f0}.nestedpages .row:hover .cell.custom-column{visibility:hidden}.nestedpages .row.np-updated{background-color:#e9f7df;-webkit-transition:background-color 400ms ease;transition:background-color 400ms ease}.nestedpages .row.np-updated-show{background-color:#fff;-webkit-transition:background-color 400ms ease;transition:background-color 400ms ease}.nestedpages .row.search .page-title{padding-left:10px}.nestedpages .non-hierarchical-spacer{height:47px}.nestedpages .row-inner{display:table-cell;vertical-align:middle;position:relative}.nestedpages ol li ol .row-inner{padding-left:0px}.nestedpages ol li ol li ol .row-inner{padding-left:20px}.nestedpages ol li ol li ol li ol .row-inner{padding-left:40px}.nestedpages ol li ol li ol li ol li ol .row-inner{padding-left:60px}.nestedpages ol li ol li ol li ol li ol li ol .row-inner{padding-left:80px}.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:gray;border:0;float:left;margin-left:8px;padding-left:8px;border-left:1px solid #ccc}.nestedpages .np-post-columns ul li:first-child{margin-left:0;padding-left:0;border:0}.nestedpages .has-yoast .np-post-columns{margin-right:30px}.nestedpages .has-custom-columns .np-post-columns{display:none}.nestedpages .action-buttons{display:none;position:absolute;right:10px;top:50%;margin-top:-15px}.nestedpages .action-buttons a{margin:0 0 0 -5px}.nestedpages .action-buttons a.np-btn-trash{margin-left:4px}.np-search{float:right}.nestedpages-list-header{background-color:#fff;border:1px solid #e1e1e1;border-bottom:0;height:46px;zoom:1}.nestedpages-list-header:before,.nestedpages-list-header:after{content:" ";display:table}.nestedpages-list-header:after{clear:both}.nestedpages-list-header .np-check-all{float:right;width:33px;text-align:center;line-height:46px;background-color:#f0f0f0}.nestedpages-list-header .np-check-all input[type="checkbox"]{margin:0}.nestedpages-list-header .np-check-all input[type="checkbox"].check-all-partial:checked:before{content:"-";margin:0;margin-top:-9px}.nestedpages-list-header .np-hidden-select-count{display:none;float:right;margin:0 1em 0 0;line-height:46px;font-style:oblique}.nestedpages-list-header .np-bulk-form{padding-right:3px;float:right;margin-right:5px;position:relative;top:9px}.nestedpages-list-header .np-bulk-form select,.nestedpages-list-header .np-bulk-form input[type="submit"]{display:inline-block}@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:gray}.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.original-link,.nestedpages .new-child .form-control.original-link{background-color:#f9f9f9;border:1px solid #e1e1e1;padding:5px;font-style:oblique;margin-bottom:8px}.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 .form-control.full label,.nestedpages .new-child .form-control.full label{width:100%}.nestedpages .quick-edit .form-control.full.checkbox label,.nestedpages .new-child .form-control.full.checkbox label{padding:5px 0 5px 25%}.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:#fff;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;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 .right .form-control.full label{padding-left:0}.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}.modal-body.np-menu-item-form{height:400px;padding:0;border-top:1px solid #e1e1e1}.np-menu-type-selection{float:left;height:100%;overflow:auto;width:35%;padding:15px;background-color:#f9f9f9;border-right:1px solid #e1e1e1;-webkit-box-sizing:border-box;box-sizing:border-box}.np-menu-type-selection ul{list-style-type:none;margin:0;padding: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;border:0}.np-menu-type-selection ul li{margin:0;border:1px solid #e5e5e5;border-top:0}.np-menu-type-selection ul li a{background-color:#fff;display:block;text-decoration:none;padding:15px 10px;position:relative;color:#333;font-weight:bold;-webkit-transition:all 200ms ease;transition:all 200ms ease}.np-menu-type-selection ul li a:hover{background-color:#ebebeb;-webkit-transition:all 200ms ease;transition:all 200ms ease}.np-menu-type-selection ul li a:after{position:absolute;font-family:"dashicons";content:"\f140";font-size:18px;right:10px;top:15px;color:gray}.np-menu-type-selection ul li a.active:after{content:"\f142"}.np-menu-type-selection ul li a.np-custom-link:after{content:"\f139"}.np-menu-type-selection ul li a.np-custom-link.active{background-color:#0074a2;color:#fff}.np-menu-type-selection ul li a.np-custom-link.active:after{content:"\f335";color:#fff}.np-menu-type-selection ul li a:active,.np-menu-type-selection ul li a:focus{-webkit-box-shadow:none;box-shadow:none}.np-menu-type-selection ul li a.no-terms{color:#b3b3b3}.np-menu-type-selection ul li a.no-terms span{float:right;font-weight:normal;font-style:oblique}.np-menu-type-selection ul li a.no-terms:after{content:''}.np-menu-type-selection ul li a.no-terms:hover{background-color:#fff;cursor:default}.np-menu-type-selection ul li a.no-terms.section{padding:8px 10px;background-color:#333;color:#fff}.np-menu-type-selection ul li:first-child{border-top:1px solid #e5e5e5}.np-menu-type-selection ul li ul{display:none;-webkit-box-shadow:none;box-shadow:none;padding:10px;background-color:#fff}.np-menu-type-selection ul li ul li{border-color:#e0e0e0}.np-menu-type-selection ul li ul li a{padding:8px;background-color:#f9f9f9;font-weight:normal}.np-menu-type-selection ul li ul li a:after{content:"\f139";top:8px;right:5px}.np-menu-type-selection ul li ul li a.active{background-color:#0074a2;color:#fff}.np-menu-type-selection ul li ul li a.active:after{content:"\f335";color:#fff}.np-menu-link-object{width:65%;float:right;height:100%;overflow:auto}.np-menu-link-object-placeholder{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);color:#b3b3b3}.np-menu-search{padding:10px;background-color:#f9f9f9}.np-menu-search input[type="text"]{width:100%;height:35px}.np-menu-search .np-menu-search-loading{display:none;height:30px;background:url("../images/spinner.gif") no-repeat;background-position:center}.np-menu-search .np-menu-search-noresults{display:none;text-align:center;padding-top:8px;font-style:oblique}.np-menu-link-details{padding:20px}.np-menu-link-details h3{margin-top:0}.np-menu-link-details h3 em{float:right;font-size:13px;font-weight:normal;font-style:normal;color:gray}.np-menu-link-details .original-link{border:1px solid #e5e5e5;font-size:12px;margin-bottom:15px;padding:5px;font-style:oblique}.np-menu-link-details .fields{background-color:#f9f9f9;padding:15px}.np-menu-link-details p{margin-top:0}.np-menu-link-details .checkbox{margin-bottom:10px}.np-menu-link-details label{display:block}.np-menu-link-details input[type="text"]{width:100%}.nestedpages .nestedpages-bulk-edit{display:none;background-color:#fff;margin:0;border:1px solid #e1e1e1;border-bottom:0}.nestedpages .nestedpages-bulk-edit h3{padding:1em;margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-edit-link-info{padding:0 1em}.nestedpages .nestedpages-bulk-edit .fields{padding:1em;margin:0}.nestedpages .nestedpages-bulk-edit .np-taxonomies{margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles{list-style-type:none;margin:0;padding:0;background-color:#f9f9f9;border:1px solid #e5e5e5;border-left:0;border-right:0;padding:.5em}.nestedpages .nestedpages-bulk-edit .np-bulk-titles li{padding:0;margin:.5em 0 0 0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles li:first-child{margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles .np-remove{display:inline-block;background-color:#333;width:22px;height:22px;-webkit-border-radius:50%;border-radius:50%;text-align:center;text-decoration:none;color:#fff;line-height:18px;font-size:1.5em;margin-right:.3em}.nestedpages .nestedpages-bulk-edit .np-bulk-titles .np-remove:hover{background-color:gray}.nestedpages .nestedpages-bulk-edit .np-taxonomies{display:block;padding:1em}.nestedpages .nestedpages-bulk-edit .np-bulk-footer{padding:10px;text-align:right;background-color:#404040;zoom:1}.nestedpages .nestedpages-bulk-edit .np-bulk-footer:before,.nestedpages .nestedpages-bulk-edit .np-bulk-footer:after{content:" ";display:table}.nestedpages .nestedpages-bulk-edit .np-bulk-footer:after{clear:both}.nestedpages .nestedpages-bulk-edit .np-bulk-footer .pull-left{float:left}.nestedpages-columns-header{display:table;border-collapse:collapse;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f0f0f0;border:1px solid #e1e1e1;border-bottom:0}.nestedpages-columns-header .cell{font-weight:bold;text-align:left;display:table-cell;padding:1em .5em 1em 0;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.nestedpages-columns-header .toggle-spacer span{display:block;width:50px}.nestedpages-columns-header .bulk-spacer span{display:block;width:33px}.nestedpages-columns-header .thumbnail-spacer span{display:block;width:100%}.nestedpages-columns-header .title{width:30%;padding:0 5px}.nestedpages-row-columns{display:table;width:100%;border-collapse:collapse;-webkit-box-sizing:border-box;box-sizing:border-box}.nestedpages-row-columns .cell{text-align:left;display:table-cell;padding:1em .5em 1em 0;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.nestedpages-row-columns .title-cell{width:30%;position:relative}.nestedpages-row-columns .title-cell-spacer{position:absolute;display:block;width:100%}@media (max-width: 767px){.nestedpages-row-columns .custom-column,.nestedpages-columns-header{display:none}.nestedpages-row-columns .title-cell.cell{width:100%}}.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:#fff}.nestedpages-settings-table i{font-size:20px}.nestedpages-settings-posttypes{-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-settings-posttypes .post-type{background-color:#fff;border-bottom:1px solid #e1e1e1}.nestedpages-settings-posttypes .post-type:last-child{border:0}.nestedpages-settings-posttypes .post-type .head{zoom:1;line-height:46px;background-color:#fff;padding-right:10px}.nestedpages-settings-posttypes .post-type .head:before,.nestedpages-settings-posttypes .post-type .head:after{content:" ";display:table}.nestedpages-settings-posttypes .post-type .head:after{clear:both}.nestedpages-settings-posttypes .post-type .head .checkbox{float:left;width:46px;height:46px;background-color:rgba(51,51,51,0.06);text-align:center;line-height:46px;margin-right:10px}.nestedpages-settings-posttypes .post-type .head label{float:left;line-height:46px;margin:0}.nestedpages-settings-posttypes .post-type .head label em{color:#999}.nestedpages-settings-posttypes .post-type .head .button{float:right;margin-top:10px}.nestedpages-settings-posttypes .post-type.active .head{background-color:#0074a2;color:#fff}.nestedpages-settings-posttypes .post-type .row{display:table;width:100%}.nestedpages-settings-posttypes .post-type .row .description{display:table-cell;width:25%;border-bottom:1px solid #e1e1e1;background-color:#f9f9f9;padding:10px}.nestedpages-settings-posttypes .post-type .row .description p{color:gray;font-size:.9em}.nestedpages-settings-posttypes .post-type .row .description strong{color:#333;font-size:1.2em}.nestedpages-settings-posttypes .post-type .row .field{display:table-cell;width:75%;background-color:#fff;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1;padding:10px}.nestedpages-settings-posttypes .post-type .body{display:none}.nestedpages-settings-posttypes .post-type .body h4{margin:0;padding:10px 0 0 10px}.nestedpages-settings-posttypes .post-type .body .post-type-settings{margin:0}.nestedpages-settings-posttypes .post-type .body li{margin:0}.nestedpages-settings-posttypes .post-type .post-type-settings li:last-child .field,.nestedpages-settings-posttypes .post-type .post-type-settings li:last-child .description{border-bottom:0}.nestedpages-settings-posttypes .post-type .custom-fields,.nestedpages-settings-posttypes .post-type .standard-fields,.nestedpages-settings-posttypes .post-type .columns{display:none;padding-top:20px}.nestedpages-settings-posttypes .post-type .custom-fields .custom-field-group,.nestedpages-settings-posttypes .post-type .standard-fields .custom-field-group,.nestedpages-settings-posttypes .post-type .columns .custom-field-group{height:150px;overflow:auto;background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1}.nestedpages-settings-posttypes .post-type .custom-fields h5,.nestedpages-settings-posttypes .post-type .standard-fields h5,.nestedpages-settings-posttypes .post-type .columns h5{padding:0;font-weight:normal;font-style:oblique;margin:0;color:#999;margin-bottom:6px}.nestedpages-settings-posttypes .post-type .custom-fields p,.nestedpages-settings-posttypes .post-type .standard-fields p,.nestedpages-settings-posttypes .post-type .columns p{margin:0 0 6px 0;font-weight:bold}.nestedpages-settings-posttypes .post-type .custom-fields ul,.nestedpages-settings-posttypes .post-type .standard-fields ul,.nestedpages-settings-posttypes .post-type .columns ul{margin:0}.nestedpages-settings-posttypes .post-type .custom-fields ul.indented,.nestedpages-settings-posttypes .post-type .standard-fields ul.indented,.nestedpages-settings-posttypes .post-type .columns ul.indented{padding-left:15px}.nestedpages-settings-posttypes .post-type .custom-fields ul li,.nestedpages-settings-posttypes .post-type .standard-fields ul li,.nestedpages-settings-posttypes .post-type .columns ul li{margin:3px 0 0 0}.nestedpages-settings-posttypes .post-type .thumbnail-options{background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1;margin-top:1em}.nestedpages-settings-posttypes .post-type .thumbnail-options label{display:block}.nestedpages-settings-posttypes .post-type .thumbnail-options select{margin-bottom:1em}.nestedpages-page-pt-assignment{background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1;margin-top:1em}.nestedpages-page-pt-assignment input[type="search"]{width:100%;margin-bottom:1em}.nestedpages-page-pt-assignment .np-quickedit-info{background-color:#fff;border-right:1px solid #e5e5e5;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5}.nestedpages-page-pt-assignment .nestedpages-page-search-results{height:100px;overflow:auto}.nestedpages-page-pt-assignment .nestedpages-page-search-results ul{list-style-type:none;margin:0;padding:0}.nestedpages-page-pt-assignment .nestedpages-page-search-results a{display:block;text-decoration:none;border-top:1px solid #dcdcdc;padding:3px 0;color:#333;background-color:#f9f9f9}.nestedpages-page-pt-assignment .nestedpages-page-search-results a:hover{background-color:#0074a2;color:#fff;padding-left:5px}.nestedpages-page-pt-assignment .nestedpages-page-search-results li:first-child a{border:0;padding-top:0}.nestedpages-page-pt-assignment-selection{background-color:#f9f9f9;border:1px solid #e1e1e1;margin-top:1em;padding:.5em}
assets/js/lib/nestedpages-factory.js CHANGED
@@ -133,6 +133,7 @@ NestedPages.jsData = {
133
  syncmenu : 'nosync', // Whether to sync the menu
134
  posttype : '', // current Screen's post type
135
  nestable : true, // boolean - whether post type is nestable
 
136
  hierarchical : true, // boolean - whether post type is hierarchical
137
  expandText : nestedpages.expand_text, // Expand all button text
138
  collapseText : nestedpages.collapse_text, // Collapse all button text
@@ -156,7 +157,8 @@ NestedPages.formActions = {
156
  clonePost : 'npclonePost',
157
  search : 'npmenuSearch',
158
  newMenuItem : 'npnewMenuItem',
159
- manualMenuSync : 'npmanualMenuSync'
 
160
  }
161
 
162
 
@@ -185,13 +187,16 @@ NestedPages.Factory = function()
185
  plugin.hiddenItemCount = new NestedPages.HiddenItemCount;
186
  plugin.confirmDelete = new NestedPages.ConfirmDelete;
187
  plugin.manualSync = new NestedPages.ManualSync;
 
188
 
189
  plugin.init = function()
190
  {
 
191
  plugin.bindEvents();
192
  plugin.setPostType();
193
  plugin.setMenuSync();
194
  plugin.setNestable();
 
195
  plugin.formatter.updateSubMenuToggle();
196
  plugin.formatter.setBorders();
197
  plugin.formatter.setNestedMargins();
@@ -225,10 +230,26 @@ NestedPages.Factory = function()
225
  }
226
 
227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  // Set the Screen's Post Type
229
  plugin.setPostType = function()
230
  {
231
- NestedPages.jsData.posttype = $(NestedPages.selectors.sortable).attr('id').substring(3);
 
 
 
232
  NestedPages.jsData.hierarchical = NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical;
233
  }
234
 
133
  syncmenu : 'nosync', // Whether to sync the menu
134
  posttype : '', // current Screen's post type
135
  nestable : true, // boolean - whether post type is nestable
136
+ sortable : true, // boolean - whether post type is sortable
137
  hierarchical : true, // boolean - whether post type is hierarchical
138
  expandText : nestedpages.expand_text, // Expand all button text
139
  collapseText : nestedpages.collapse_text, // Collapse all button text
157
  clonePost : 'npclonePost',
158
  search : 'npmenuSearch',
159
  newMenuItem : 'npnewMenuItem',
160
+ manualMenuSync : 'npmanualMenuSync',
161
+ postSearch: 'nppostSearch'
162
  }
163
 
164
 
187
  plugin.hiddenItemCount = new NestedPages.HiddenItemCount;
188
  plugin.confirmDelete = new NestedPages.ConfirmDelete;
189
  plugin.manualSync = new NestedPages.ManualSync;
190
+ plugin.postSearch = new NestedPages.PostSearch;
191
 
192
  plugin.init = function()
193
  {
194
+ if ( nestedpages.settings_page ) return;
195
  plugin.bindEvents();
196
  plugin.setPostType();
197
  plugin.setMenuSync();
198
  plugin.setNestable();
199
+ plugin.setSortable();
200
  plugin.formatter.updateSubMenuToggle();
201
  plugin.formatter.setBorders();
202
  plugin.formatter.setNestedMargins();
230
  }
231
 
232
 
233
+ // Set whether or not post type is sortable
234
+ plugin.setSortable = function()
235
+ {
236
+ var sortable = true;
237
+ $.each(NestedPages.jsData.allPostTypes, function(i, v){
238
+ if ( v.name !== NestedPages.jsData.posttype ) return;
239
+ if ( typeof v.disable_sorting === 'undefined' || v.disable_sorting === '' ) return;
240
+ if ( v.disable_sorting === "true" ) sortable = false;
241
+ });
242
+ NestedPages.jsData.sortable = sortable;
243
+ }
244
+
245
+
246
  // Set the Screen's Post Type
247
  plugin.setPostType = function()
248
  {
249
+ NestedPages.jsData.posttype = nestedpages.current_post_type;
250
+ if ( typeof NestedPages.jsData.posttype === 'undefined' || NestedPages.jsData.posttype === '' ){
251
+ NestedPages.jsData.posttype = $(NestedPages.selectors.sortable).attr('id').substring(3);
252
+ }
253
  NestedPages.jsData.hierarchical = NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical;
254
  }
255
 
assets/js/lib/nestedpages.formatter.js CHANGED
@@ -56,11 +56,16 @@ NestedPages.Formatter = function()
56
  $.each($(NestedPages.selectors.lists), function(i, v){
57
  var parent_count = $(this).parents(NestedPages.selectors.lists).length;
58
  var padding = 0;
 
59
  if ( parent_count > 0 ){
60
  var padding = ( parent_count * 20 ) + padding;
61
  $(this).find('.row-inner').css('padding-left', padding + 'px');
62
  return;
63
  }
 
 
 
 
64
  $(this).find('.row-inner').css('padding-left', '0px');
65
  });
66
  }
56
  $.each($(NestedPages.selectors.lists), function(i, v){
57
  var parent_count = $(this).parents(NestedPages.selectors.lists).length;
58
  var padding = 0;
59
+ if ( !NestedPages.jsData.sortable ) padding = 10;
60
  if ( parent_count > 0 ){
61
  var padding = ( parent_count * 20 ) + padding;
62
  $(this).find('.row-inner').css('padding-left', padding + 'px');
63
  return;
64
  }
65
+ if ( !NestedPages.jsData.sortable ){
66
+ $(this).find('.row-inner').css('padding-left', '10px');
67
+ return;
68
+ }
69
  $(this).find('.row-inner').css('padding-left', '0px');
70
  });
71
  }
assets/js/lib/nestedpages.post-search.js ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var NestedPages = NestedPages || {};
2
+
3
+ /**
4
+ * Perform an AJAX search for posts by type
5
+ * @package Nested Pages
6
+ * @author Kyle Phillips - https://github.com/kylephillips/wp-nested-pages
7
+ */
8
+ NestedPages.PostSearch = function()
9
+ {
10
+ var plugin = this;
11
+ var $ = jQuery;
12
+
13
+ plugin.selectors = {
14
+ input : 'data-nestedpages-post-search',
15
+ form : 'data-nestedpages-post-search-form',
16
+ loadingIndicator : 'data-nestedpages-loading',
17
+ noResults : 'data-nestedpages-no-results',
18
+ results: 'data-nestedpages-search-results'
19
+ }
20
+
21
+ plugin.changed = false;
22
+ plugin.activeInput = ''; // The active input
23
+ plugin.results = ''; // Search results
24
+ plugin.defaultResults = ''; // The default, loaded results
25
+ plugin.postType = ''; // The type of search (post_type, taxonomy)
26
+ plugin.activeForm = '';
27
+
28
+ plugin.bindEvents = function()
29
+ {
30
+ $('['+ plugin.selectors.input + ']').on('input', function(){
31
+ plugin.activeInput = $(this);
32
+ plugin.setOptions();
33
+ if ( !plugin.changed ) plugin.setDefaultResults();
34
+ if ( $(this).val() === '' ) {
35
+ $(plugin.activeForm).find('[' + plugin.selectors.noResults + ']').hide();
36
+ plugin.showDefaultResults();
37
+ return;
38
+ }
39
+ plugin.query();
40
+ });
41
+ }
42
+
43
+ /**
44
+ * Set the default results
45
+ */
46
+ plugin.setDefaultResults = function()
47
+ {
48
+ plugin.defaultResults = $(plugin.activeForm).find('[' + plugin.selectors.results + ']').html();
49
+ plugin.changed = true;
50
+ }
51
+
52
+ /**
53
+ * Show the default results
54
+ */
55
+ plugin.showDefaultResults = function()
56
+ {
57
+ $(plugin.activeForm).find('[' + plugin.selectors.results + ']').html(plugin.defaultResults);
58
+ }
59
+
60
+ /**
61
+ * Set the options
62
+ */
63
+ plugin.setOptions = function()
64
+ {
65
+ plugin.postType = $(plugin.activeInput).attr(plugin.selectors.input);
66
+ plugin.activeForm = $(plugin.activeInput).parents('[' + plugin.selectors.form + ']');
67
+ }
68
+
69
+ // Perform the search
70
+ plugin.performSearch = function()
71
+ {
72
+ plugin.defaultResults = $(plugin.activeForm).parent('li').siblings(plugin.selectors.defaultResults);
73
+ if ( $(plugin.activeForm).val().length > 2 ){
74
+ $(plugin.defaultResults).hide();
75
+ plugin.toggleLoading(true);
76
+ plugin.query();
77
+ return;
78
+ }
79
+ plugin.toggleLoading(false);
80
+ $(plugin.defaultResults).show();
81
+ }
82
+
83
+
84
+ // Query Search
85
+ plugin.query = function()
86
+ {
87
+ $(plugin.activeForm).find('[' + plugin.selectors.results + ']').empty();
88
+ plugin.toggleLoading(true);
89
+ $.ajax({
90
+ url: NestedPages.jsData.ajaxurl,
91
+ type: 'post',
92
+ datatype: 'json',
93
+ data: {
94
+ action : NestedPages.formActions.postSearch,
95
+ nonce : NestedPages.jsData.nonce,
96
+ term : $(plugin.activeInput).val(),
97
+ postType : plugin.postType
98
+ },
99
+ success: function(data){
100
+ if ( data.results ){
101
+ plugin.results = data.results;
102
+ plugin.loadResults();
103
+ plugin.toggleLoading(false);
104
+ } else {
105
+ plugin.toggleLoading(false);
106
+ $(plugin.activeForm).find('[' + plugin.selectors.noResults + ']').show();
107
+ }
108
+ }
109
+ });
110
+ }
111
+
112
+ // Load the results into view
113
+ plugin.loadResults = function()
114
+ {
115
+ var html = "<ul>";
116
+ $.each(plugin.results, function(i, v){
117
+ html += '<li><a href="#" data-assignment-page-id="' + v.ID + '" data-assignment-page-title="' + v.post_title + '">' + v.post_title + '</a></li>';
118
+ });
119
+ html += '</ul>';
120
+ $(plugin.activeForm).find('[' + plugin.selectors.results + ']').html(html);
121
+ plugin.toggleLoading(false);
122
+ }
123
+
124
+ // Toggle the loading indicator
125
+ plugin.toggleLoading = function(loading)
126
+ {
127
+ var loadingIndicator = $(plugin.activeForm).find('[' + plugin.selectors.loadingIndicator + ']');
128
+ var noResults = $(plugin.activeForm).find('[' + plugin.selectors.noResults + ']');
129
+ $(noResults).hide();
130
+ if ( loading ){
131
+ $(loadingIndicator).show();
132
+ return;
133
+ }
134
+ $(loadingIndicator).hide();
135
+ }
136
+
137
+ return plugin.bindEvents();
138
+ }
assets/js/lib/nestedpages.quickedit-post.js CHANGED
@@ -90,7 +90,7 @@ NestedPages.QuickEditPost = function()
90
  day : $(plugin.button).attr('data-day'),
91
  year : $(plugin.button).attr('data-year'),
92
  hour : $(plugin.button).attr('data-hour'),
93
- minute : $(plugin.button).attr('data-minute'),
94
  navstatus : $(plugin.button).attr('data-navstatus'),
95
  npstatus : $(plugin.button).attr('data-np-status'),
96
  navtitle : $(plugin.button).attr('data-navtitle'),
@@ -100,7 +100,9 @@ NestedPages.QuickEditPost = function()
100
  password : $(plugin.button).attr('data-password'),
101
  datepicker : $(plugin.button).attr('data-datepicker'),
102
  time: $(plugin.button).attr('data-formattedtime'),
103
- ampm: $(plugin.button).attr('data-ampm')
 
 
104
  };
105
 
106
  // Add Array of Taxonomies to the data object using classes applied to the list element
@@ -149,8 +151,6 @@ NestedPages.QuickEditPost = function()
149
  $(plugin.form).find('.np_nav_css_classes').val(plugin.initialData.navcss);
150
  $(plugin.form).find('.post_password').val(plugin.initialData.password);
151
  $(plugin.form).find('.np_datepicker').val(plugin.initialData.datepicker);
152
- $(plugin.form).find('.np_time').val(plugin.initialData.time);
153
- $(plugin.form).find('.np_ampm').val(plugin.initialData.ampm);
154
  if ( plugin.initialData.cs === 'open' ) $(plugin.form).find('.np_cs').attr('checked', 'checked');
155
 
156
  if ( plugin.initialData.template !== '' ){
@@ -187,11 +187,17 @@ NestedPages.QuickEditPost = function()
187
  }
188
 
189
  // Date Fields
190
- $(plugin.form).find('select[name="mm"]').val(plugin.initialData.month);
191
- $(plugin.form).find('input[name="jj"]').val(plugin.initialData.day);
192
- $(plugin.form).find('input[name="aa"]').val(plugin.initialData.year);
193
- $(plugin.form).find('input[name="hh"]').val(plugin.initialData.hour);
194
- $(plugin.form).find('input[name="mn"]').val(plugin.initialData.minute);
 
 
 
 
 
 
195
 
196
  // Populate Hierarchical Taxonomy Checkboxes
197
  if ( plugin.initialData.hasOwnProperty('h_taxonomies') ){
90
  day : $(plugin.button).attr('data-day'),
91
  year : $(plugin.button).attr('data-year'),
92
  hour : $(plugin.button).attr('data-hour'),
93
+ minute : $(plugin.button).attr('data-minute'),
94
  navstatus : $(plugin.button).attr('data-navstatus'),
95
  npstatus : $(plugin.button).attr('data-np-status'),
96
  navtitle : $(plugin.button).attr('data-navtitle'),
100
  password : $(plugin.button).attr('data-password'),
101
  datepicker : $(plugin.button).attr('data-datepicker'),
102
  time: $(plugin.button).attr('data-formattedtime'),
103
+ timeTwentyFour : $(plugin.button).attr('data-time'),
104
+ ampm: $(plugin.button).attr('data-ampm'),
105
+ timeFormat: $(plugin.button).attr('data-timeformat')
106
  };
107
 
108
  // Add Array of Taxonomies to the data object using classes applied to the list element
151
  $(plugin.form).find('.np_nav_css_classes').val(plugin.initialData.navcss);
152
  $(plugin.form).find('.post_password').val(plugin.initialData.password);
153
  $(plugin.form).find('.np_datepicker').val(plugin.initialData.datepicker);
 
 
154
  if ( plugin.initialData.cs === 'open' ) $(plugin.form).find('.np_cs').attr('checked', 'checked');
155
 
156
  if ( plugin.initialData.template !== '' ){
187
  }
188
 
189
  // Date Fields
190
+ if ( plugin.initialData.timeFormat === 'H:i' ){
191
+ $(plugin.form).find('.np_time').val(plugin.initialData.timeTwentyFour);
192
+ } else {
193
+ $(plugin.form).find('.np_time').val(plugin.initialData.time);
194
+ $(plugin.form).find('.np_ampm').val(plugin.initialData.ampm);
195
+ $(plugin.form).find('select[name="mm"]').val(plugin.initialData.month);
196
+ $(plugin.form).find('input[name="jj"]').val(plugin.initialData.day);
197
+ $(plugin.form).find('input[name="aa"]').val(plugin.initialData.year);
198
+ $(plugin.form).find('input[name="hh"]').val(plugin.initialData.hour);
199
+ $(plugin.form).find('input[name="mn"]').val(plugin.initialData.minute);
200
+ }
201
 
202
  // Populate Hierarchical Taxonomy Checkboxes
203
  if ( plugin.initialData.hasOwnProperty('h_taxonomies') ){
assets/js/lib/nestedpages.settings.js CHANGED
@@ -20,6 +20,14 @@ NestedPages.Settings = function()
20
  menuEnabledOption : '[data-menu-enabled-option]', // Options when the menu is enabled
21
  disableMenuCheckbox : '[data-disable-menu-checkbox]', // Checkbox for disabling menus completely
22
  disableAutoCheckbox : '[data-menu-disable-auto-checkbox]', // Checkbox for disabling auto menu sync
 
 
 
 
 
 
 
 
23
  }
24
 
25
  plugin.bindEvents = function()
@@ -30,6 +38,7 @@ NestedPages.Settings = function()
30
  plugin.toogleAllFieldSettings('.standard-fields');
31
  plugin.toggleMenuCheckboxes();
32
  plugin.toggleHideCheckbox();
 
33
  });
34
  $(document).on('click', plugin.selectors.postTypeToggle, function(e){
35
  e.preventDefault();
@@ -56,6 +65,17 @@ NestedPages.Settings = function()
56
  $(document).on('change', plugin.selectors.disableAutoCheckbox, function(){
57
  plugin.toggleHideCheckbox();
58
  });
 
 
 
 
 
 
 
 
 
 
 
59
  }
60
 
61
  /**
@@ -176,6 +196,51 @@ NestedPages.Settings = function()
176
  $(hideCheckboxOption).show();
177
  }
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  plugin.init = function()
180
  {
181
  plugin.bindEvents();
20
  menuEnabledOption : '[data-menu-enabled-option]', // Options when the menu is enabled
21
  disableMenuCheckbox : '[data-disable-menu-checkbox]', // Checkbox for disabling menus completely
22
  disableAutoCheckbox : '[data-menu-disable-auto-checkbox]', // Checkbox for disabling auto menu sync
23
+
24
+ // Page Assignment for Post Types
25
+ assignPostTypeCheckbox : '[data-nestedpages-assign-post-type]', // Checkbox for assigning a post type to a page
26
+ assignPostTypeId : '[data-nested-pages-assign-post-type-id]', // Hidden field containing the assigned page id
27
+ assignPostTypeTitle : '[data-nested-pages-assign-post-type-title]', // Hidden field containing the assigned page title
28
+ assignPostTypeOption : '[data-assignment-page-id]', // Option within the listing to select page for post type assignment
29
+ assignPostTypeRemove : '[data-nestedpages-page-pt-assignment-remove]', // Link to remove the assigned page for the post type,
30
+ assignPostTypeSelection : '[data-nestedpages-page-pt-assignment-selection]', // The div displaying the selection
31
  }
32
 
33
  plugin.bindEvents = function()
38
  plugin.toogleAllFieldSettings('.standard-fields');
39
  plugin.toggleMenuCheckboxes();
40
  plugin.toggleHideCheckbox();
41
+ plugin.toggleAssignPostType();
42
  });
43
  $(document).on('click', plugin.selectors.postTypeToggle, function(e){
44
  e.preventDefault();
65
  $(document).on('change', plugin.selectors.disableAutoCheckbox, function(){
66
  plugin.toggleHideCheckbox();
67
  });
68
+ $(document).on('change', plugin.selectors.assignPostTypeCheckbox, function(){
69
+ plugin.toggleAssignPostType();
70
+ });
71
+ $(document).on('click', plugin.selectors.assignPostTypeOption, function(e){
72
+ e.preventDefault();
73
+ plugin.chooseAssignPostType($(this));
74
+ });
75
+ $(document).on('click', plugin.selectors.assignPostTypeRemove, function(e){
76
+ e.preventDefault();
77
+ plugin.removeAssignPostType($(this));
78
+ });
79
  }
80
 
81
  /**
196
  $(hideCheckboxOption).show();
197
  }
198
 
199
+ /**
200
+ * Toggle the Assign Page to a Post Type Listing
201
+ */
202
+ plugin.toggleAssignPostType = function()
203
+ {
204
+ var checkboxes = $(plugin.selectors.assignPostTypeCheckbox);
205
+ $.each(checkboxes, function(){
206
+ var checkbox = $(this);
207
+ var listing = $(this).parents('.field').find('.nestedpages-assignment-display');
208
+ if ( $(checkbox).is(':checked') ){
209
+ $(listing).show();
210
+ } else {
211
+ $(listing).hide();
212
+ }
213
+ });
214
+ }
215
+
216
+ /**
217
+ * Choose a page assignment
218
+ */
219
+ plugin.chooseAssignPostType = function(element)
220
+ {
221
+ var pageId = $(element).attr('data-assignment-page-id');
222
+ var pageTitle = $(element).attr('data-assignment-page-title');
223
+ var container = $(element).parents('.field');
224
+ var html = nestedpages.currently_assigned_to + ' ' + pageTitle + ' <a href="#" data-nestedpages-page-pt-assignment-remove>(' + nestedpages.remove + ')</a>';
225
+ $(container).find(plugin.selectors.assignPostTypeId).val(pageId);
226
+ $(container).find(plugin.selectors.assignPostTypeTitle).val(pageTitle);
227
+ $(container).find(plugin.selectors.assignPostTypeSelection).html(html).show();
228
+ $(container).find('[data-nestedpages-post-search-form]').hide();
229
+ }
230
+
231
+ /**
232
+ * Remove a page assignment
233
+ */
234
+ plugin.removeAssignPostType = function(element)
235
+ {
236
+ var container = $(element).parents('.field');
237
+ $(container).find(plugin.selectors.assignPostTypeSelection).hide();
238
+ $(container).find('[data-nestedpages-post-search-form]').show();
239
+ $(container).find(plugin.selectors.assignPostTypeId).val('');
240
+ $(container).find(plugin.selectors.assignPostTypeTitle).val('');
241
+ }
242
+
243
+
244
  plugin.init = function()
245
  {
246
  plugin.bindEvents();
assets/js/nestedpages.min.js CHANGED
@@ -1,2 +1,2 @@
1
- var NestedPages=NestedPages||{};NestedPages.Responsive=function(){var e=this,t=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.toggleEditButtons,function(a){a.preventDefault(),e.toggleEdit(t(this))}),t(window).resize(function(){e.timer(function(){t(".action-buttons").removeAttr("style"),t(".np-toggle-edit").removeClass("active")},500)})},e.toggleEdit=function(e){var a=t(e).siblings(".action-buttons");return t(a).is(":visible")?(t(e).removeClass("active"),void t(a).hide()):(t(e).addClass("active"),void t(a).show())},e.timer=function(){var e=0;return function(t,a){clearTimeout(e),e=setTimeout(t,a)}}(),e.init()};var NestedPages=NestedPages||{};NestedPages.Formatter=function(){var e=this,t=jQuery;e.updateSubMenuToggle=function(){for(var e=t(NestedPages.selectors.childToggle),a=0;a<e.length;a++){var s=e[a],n=t(s).parent(".row").parent("li");if(t(n).children("ol").length>0){var o=t(n).children("ol:visible").length>0?NestedPages.cssClasses.iconToggleDown:NestedPages.cssClasses.iconToggleRight;t(s).html('<div class="child-toggle-spacer"></div><a href="#"><i class="'+o+'"></i></a>'),t(n).children("ol").children(".np-hide").length>0&&0===t(n).children("ol").children(".np-hide.shown").length?t(s).find("a").hide():t(n).children("ol").children(".np-hide").length>0&&t(n).children("ol").children(".np-hide.shown").length>0&&t(s).find("a").show()}else t(s).empty().html('<div class="child-toggle-spacer"></div>')}},e.setBorders=function(){t(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),t.each(t(NestedPages.selectors.lists),function(){t(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},e.setNestedMargins=function(){t.each(t(NestedPages.selectors.lists),function(e,a){var s=t(this).parents(NestedPages.selectors.lists).length,n=0;if(s>0){var n=20*s+n;return void t(this).find(".row-inner").css("padding-left",n+"px")}t(this).find(".row-inner").css("padding-left","0px")})},e.updatePlaceholderWidth=function(a){if(NestedPages.jsData.nestable){var s=t(a.placeholder).parents("ol").length,n=t(NestedPages.selectors.sortable).width(),o=40*s-40,i=n-o;t(a.placeholder).width(i).css("margin-left",o+"px")}e.updateListVisibility(a)},e.updateListVisibility=function(e){var a=t(e.placeholder).parent("ol");t(a).is(":visible")||(t(a).addClass("nplist"),t(a).show())},e.removeQuickEdit=function(){t(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),t(".sortable .quick-edit").remove(),t(".row").show()},e.showQuickEdit=function(){t("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){t(".np-inline-overlay").addClass("active")},50)},e.flashRow=function(a){t(a).addClass("np-updated"),e.setBorders(),setTimeout(function(){t(a).addClass("np-updated-show")},1500)},e.showAjaxError=function(e){t(NestedPages.selectors.ajaxError).find("p").text(e),t(NestedPages.selectors.ajaxError).show()},e.hideAjaxError=function(e){t(NestedPages.selectors.ajaxError).hide()},e.sizeLinkThumbnails=function(){var e=t(NestedPages.selectors.thumbnailContainer).not(NestedPages.selectors.thumbnailContainerLink).first().find("img"),a=t(e).width(),s=t(e).height();t.each(t(NestedPages.selectors.thumbnailContainerLink),function(){t(this).width(a),t(this).height(s)})}};var NestedPages=NestedPages||{};NestedPages.CheckAll=function(){var e=this,t=jQuery;return e.activeCheckbox="",e.selectors={checkbox:"[data-np-check-all]"},e.bindEvents=function(){t(document).on("change",e.selectors.checkbox,function(){e.activeCheckbox=t(this),e.toggleCheckboxes()}),t(document).on("change","input[type=checkbox]",function(){e.checkAllStatus(t(this))})},e.init=function(){e.bindEvents()},e.toggleCheckboxes=function(){var a=!!t(e.activeCheckbox).is(":checked"),s=t(e.activeCheckbox).attr("data-np-check-all"),n=t('*[name="'+s+'"]');t.each(n,function(){var e=t(this).parents(NestedPages.selectors.rows);t(this).prop("checked",a),t(e).hasClass("np-hide")&&!t(e).is(":visible")&&t(e).find(NestedPages.selectors.bulkActionsCheckbox).prop("checked",!1)}),e.toggleCheckAll()},e.toggleCheckAll=function(){var a=t(e.activeCheckbox).attr("data-np-check-all"),s=t('*[name="'+a+'"]').length,n=t(".np-hide").find(NestedPages.selectors.bulkActionsCheckbox).length,o=t(".np-hide:visible").find(NestedPages.selectors.bulkActionsCheckbox).length;s=s-n+o;var i=t('*[name="'+a+'"]:checked').length;return s==i?(t(e.activeCheckbox).prop("checked",!0),void t(e.activeCheckbox).removeClass("check-all-partial")):i>0?void t(e.activeCheckbox).addClass("check-all-partial"):(t(e.activeCheckbox).attr("checked",!1),void t(e.activeCheckbox).removeClass("check-all-partial"))},e.checkAllStatus=function(a){var s=t(a).attr("name"),n=t('*[data-np-check-all="'+s+'"]');0!==n.length&&(e.activeCheckbox=t(n)[0],e.toggleCheckAll())},e.init()};var NestedPages=NestedPages||{};NestedPages.BulkActions=function(){var e=this,t=jQuery;return e.selectedNumber=0,e.selectedLinks=[],e.selectedPosts=[],e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleBulkForm()}),t(document).on("submit",NestedPages.selectors.bulkActionsForm,function(a){"edit"===t("select[name=np_bulk_action]").val()&&(a.preventDefault(),e.toggleBulkEdit(!0))}),t(document).on("click",NestedPages.selectors.bulkEditRemoveItem,function(a){a.preventDefault();var s=t(this).siblings("input[type=hidden]").val();e.uncheckBulkItem(s)}),t(document).on("click",NestedPages.selectors.bulkEditCancel,function(t){t.preventDefault(),e.uncheckAllBulkItems()})},e.toggleBulkForm=function(){var a=!1,s="",n="";return e.selectedPosts=[],e.selectedLinks=[],t.each(t(NestedPages.selectors.bulkActionsCheckbox),function(){if(t(this).is(":checked")){var o=t(this).parents(NestedPages.selectors.rows);if(a=!0,t(this).parent("div").hasClass("np-check-all")||t(o).hasClass("post-type-np-redirect")||(s+=t(this).val()+","),t(o).hasClass("post-type-np-redirect")&&(n+=t(this).val()+",",e.selectedLinks.push(t(this).val())),"np-redirect"!==t(this).attr("data-np-post-type")&&!t(this).parent("div").hasClass("np-check-all")){var i=[];i.title=t(this).attr("data-np-bulk-checkbox"),i.id=t(this).val(),e.selectedPosts.push(i)}}}),e.setBulkEditPosts(),e.toggleEditOption(),e.toggleLinkCountAlert(),a?(t(NestedPages.selectors.bulkActionsForm).show(),t(NestedPages.selectors.bulkActionsIds).val(s),t(NestedPages.selectors.bulkActionRedirectIds).val(n),void e.setSelectedNumber()):(t(NestedPages.selectors.bulkActionsIds).val(""),void t(NestedPages.selectors.bulkActionsForm).hide())},e.setBulkEditPosts=function(){for(var a="",s=0;s<e.selectedPosts.length;s++)a+='<li><a href="#" class="np-remove" data-np-remove-bulk-item>&times;</a>',a+=e.selectedPosts[s].title,a+='<input type="hidden" name="post_ids[]" value="'+e.selectedPosts[s].id+'"></li>';t(NestedPages.selectors.bulkEditTitles).html(a)},e.uncheckBulkItem=function(a){t.each(t(NestedPages.selectors.bulkActionsCheckbox),function(){t(this).val()==a&&t(this).prop("checked",!1).change()}),0===t(NestedPages.selectors.bulkEditRemoveItem).length&&e.toggleBulkEdit(!1)},e.uncheckAllBulkItems=function(){t.each(t(NestedPages.selectors.bulkActionsCheckbox),function(){t(this).prop("checked",!1).change()}),e.toggleBulkEdit(!1)},e.setSelectedNumber=function(){var e=t(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").length,a=t(NestedPages.selectors.bulkActionsForm).find("select option").first();t(a).text(nestedpages.bulk_actions+" ("+e+")")},e.toggleEditOption=function(){var a=t(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").not(".np-redirect-bulk").length,s=t(NestedPages.selectors.bulkActionsForm).find("select option[value=edit]");return 0===a?(t(s).prop("disabled",!0),t(NestedPages.selectors.bulkActionsForm).find("select option").first().prop("selected",!0),void e.toggleBulkEdit(!1)):void t(s).prop("disabled",!1)},e.toggleBulkEdit=function(a){return e.toggleLinkCountAlert(),a?(t(NestedPages.selectors.bulkEditForm).show(),t(NestedPages.selectors.bulkActionsForm).hide(),void e.setWPSuggest()):(t(NestedPages.selectors.bulkEditForm).hide(),t(NestedPages.selectors.bulkActionsForm).show(),t(NestedPages.selectors.bulkEditLinkCount).parent("div").hide(),t(NestedPages.selectors.bulkActionsForm).find("select option").first().text(nestedpages.bulk_actions),void e.resetBulkEditFields())},e.toggleLinkCountAlert=function(){var a=e.selectedLinks.length;return 0===a?void t(NestedPages.selectors.bulkEditLinkCount).parent("div").hide():void t(NestedPages.selectors.bulkEditLinkCount).parent("div").show()},e.setWPSuggest=function(){var e=t(NestedPages.selectors.bulkEditForm).find("[data-autotag]");t.each(e,function(e,a){var s=t(this).attr("data-taxonomy");t(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+s,{multiple:!0,multipleSep:","})})},e.resetBulkEditFields=function(){var e=t(NestedPages.selectors.bulkEditForm).find("select");t.each(e,function(){t(this).find("option").first().prop("selected",!0)});var a=t(NestedPages.selectors.bulkEditForm).find(".cat-checklist");t.each(a,function(){t(this).find("input[type=checkbox]").prop("checked",!1)})},e.init()};var NestedPages=NestedPages||{};NestedPages.HiddenItemCount=function(){var e=this,t=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleHiddenCount()}),t(document).on("click",NestedPages.selectors.toggleAll,function(){e.toggleHiddenCount()}),t(document).on("click",NestedPages.selectors.pageToggle,function(){e.toggleHiddenCount()})},e.toggleHiddenCount=function(){var e=0;return t.each(t(NestedPages.selectors.bulkActionsCheckbox),function(){if(t(this).is(":checked")){if(t(this).parent("div").hasClass("np-check-all"))return;var a=t(this).closest(".page-row");t(a).is(":visible")||e++}}),e<1?void t(NestedPages.selectors.hiddenItemCountParent).hide():(t(NestedPages.selectors.hiddenItemCount).text(e),void t(NestedPages.selectors.hiddenItemCountParent).show())},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuToggle=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.bindEvents=function(){t(document).on("click",NestedPages.selectors.childToggleLink,function(a){a.preventDefault(),e.toggleSingleMenu(t(this))}),t(document).on("click",NestedPages.selectors.toggleAll,function(t){t.preventDefault(),e.toggleAllMenus()})},e.toggleSingleMenu=function(a){var s=t(a).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");t(a).find("i").toggleClass(NestedPages.cssClasses.iconToggleDown).toggleClass(NestedPages.cssClasses.iconToggleRight),t(s).toggle(),e.formatter.setBorders(),e.formatter.setNestedMargins(),e.syncUserToggles()},e.toggleAllMenus=function(){var a=NestedPages.selectors.toggleAll;return"closed"===t(a).attr("data-toggle")?(t(NestedPages.selectors.lists).show(),t(a).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),t(NestedPages.selectors.childToggle).find("i").removeClass(NestedPages.cssClasses.iconToggleRight).addClass(NestedPages.cssClasses.iconToggleDown),e.formatter.setBorders(),void e.syncUserToggles()):(t(NestedPages.selectors.lists).not(t(NestedPages.selectors.lists)[0]).hide(),t(a).attr("data-toggle","closed").text(NestedPages.jsData.expandText),t(NestedPages.selectors.childToggle).find("i").removeClass(NestedPages.cssClasses.iconToggleDown).addClass(NestedPages.cssClasses.iconToggleRight),e.formatter.setBorders(),void e.syncUserToggles())},e.visibleRowIDs=function(){var e=[],a=t(NestedPages.selectors.rows+":visible");return t.each(a,function(a,s){var n=t(this).attr("id");e.push(n.replace("menuItem_",""))}),e},e.syncUserToggles=function(){t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:e.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.PageToggle=function(){var e=this,t=jQuery;return e.activeButton="",e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.toggleHidden,function(a){a.preventDefault(),e.activeButton=t(this),e.toggleHidden()}),t(document).on("click",NestedPages.selectors.toggleStatus,function(a){a.preventDefault(),e.toggleStatus(t(this))})},e.toggleHidden=function(){var a=t(e.activeButton),s=t(a).attr("href");return console.log(s),"#show"==s?(t(a).attr("href","#hide").text(NestedPages.jsData.showHiddenText),t(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),e.formatter.updateSubMenuToggle(),void e.formatter.setBorders()):void("#hide"==s&&(t(a).attr("href","#show").text(NestedPages.jsData.hideHiddenText),t(NestedPages.selectors.hiddenRows).addClass("shown").show(),e.formatter.updateSubMenuToggle(),e.formatter.setBorders()))},e.toggleStatus=function(e){var a=t(e).attr("href");return a=a.substring(1),t(NestedPages.selectors.syncCheckbox).attr("disabled",!1),t(NestedPages.selectors.toggleStatus).removeClass("active"),t(e).addClass("active"),"draft"==a&&(t(NestedPages.selectors.syncCheckbox).attr("disabled",!0),t("."+a).addClass("nested-visible")),"all"==a?void t(NestedPages.selectors.rows).show():(t(NestedPages.selectors.rows).hide(),void t("."+a).show())},e.init()};var NestedPages=NestedPages||{};NestedPages.Nesting=function(){var e=this,t=jQuery;e.formatter=new NestedPages.Formatter,e.initializeSortable=function(){maxLevels=NestedPages.jsData.nestable?0:1,t(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",maxLevels:maxLevels,tabSize:56,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(t,a){e.formatter.updatePlaceholderWidth(a)},stop:function(t,a){setTimeout(function(){e.formatter.updateSubMenuToggle(),e.formatter.setBorders(),e.formatter.setNestedMargins()},100),e.syncNesting()}})},e.disableNesting=function(){t(NestedPages.selectors.sortable).sortable("destroy")},e.syncNesting=function(a,s){if("1"!==nestedpages.manual_order_sync||a){t(NestedPages.selectors.errorDiv).hide(),t(NestedPages.selectors.loadingIndicator).show(),list=t(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}),e.disableNesting();var n=NestedPages.jsData.syncmenu;"1"===nestedpages.manual_menu_sync&&(n="nosync"),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:list,post_type:NestedPages.jsData.posttype,syncmenu:n},success:function(a,s){if(e.initializeSortable(),"error"===a.status)t(NestedPages.selectors.errorDiv).text(a.message).show(),t(NestedPages.selectors.loadingIndicator).hide();else{if(s&&"function"==typeof s)return void s();t(NestedPages.selectors.loadingIndicator).hide()}}})}}};var NestedPages=NestedPages||{};NestedPages.SyncMenuSetting=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).ready(function(){"1"!==nestedpages.manual_menu_sync&&"1"===nestedpages.syncmenu&&e.syncSetting()}),t(document).on("change",NestedPages.selectors.syncCheckbox,function(){e.syncSetting()})},e.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==t(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=t(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncMenu,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(t){"error"===t.status&&e.formatter.showAjaxError(t.message)}}))},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.NewPage=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.parent_id=0,e.posts="",e.form="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.openPageModal,function(t){t.preventDefault(),e.openModal()}),t(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),t(document).on("click",NestedPages.selectors.newPageSubmitButton,function(a){a.preventDefault(),e.submitForm(t(this))}),t(document).on("click",NestedPages.selectors.newPageTitle,function(a){a.preventDefault(),e.addTitleField(t(this))}),t(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(a){a.preventDefault(),e.removeTitleField(t(this))}),t(document).on("click",NestedPages.selectors.addChildButton,function(a){a.preventDefault(),e.openQuickEdit(t(this))}),t(NestedPages.selectors.newPageModal).on("hide.bs.modal",function(){e.cancelNewPage()}),t(NestedPages.selectors.newPageModal).on("shown.bs.modal",function(){e.modalOpened(t(this))}),t(document).on("click",NestedPages.selectors.cancelNewChildButton,function(a){a.preventDefault(),e.cancelNewPage(),t(NestedPages.selectors.newPageModal).modal("hide")})},e.openModal=function(){var a=t(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm);t(a).addClass("in-modal"),t(NestedPages.selectors.newPageModal).find(".modal-body").html(a),t(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),t(NestedPages.selectors.newPageModal).find(".page_parent_id").val(e.parent_id),t(NestedPages.selectors.newPageModal).modal("show")},e.modalOpened=function(e){t(e).find(".np_title").focus(),t(e).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},e.openQuickEdit=function(a){var s=t(a).closest(NestedPages.selectors.row).parent("li"),n=t(NestedPages.selectors.newPageFormContainer).clone();if(t(s).children("ol").length>0){var o=t(s).children("ol");t(n).insertBefore(o)}else t(n).appendTo(s);t(n).siblings(NestedPages.selectors.row).hide(),e.formatter.showQuickEdit(),t(n).find(".parent_name").html("<em>Parent:</em> "+t(a).attr("data-parentname")),t(n).find(".page_parent_id").val(t(a).attr("data-id")),t(n).show(),t(n).find(".np_title").focus(),t(n).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},e.cancelNewPage=function(){e.formatter.removeQuickEdit(),t(NestedPages.selectors.newChildError).hide(),t(NestedPages.selectors.newPageModal).find(".modal-body").empty(),t(NestedPages.selectors.sortable).find(".new-child").remove(),t(NestedPages.selectors.row).show()},e.addTitleField=function(e){var a=t(e).parents("form"),s=t(e).siblings(".new-page-titles").children("li").length+1,n='<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="" tabindex="'+s+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';t(e).siblings(".new-page-titles").append(n);t(a).find(".np_title").last().focus(),t(a).find(NestedPages.selectors.newPageTitle).prop("tabindex",s++),t(".new-page-titles").sortable({items:"li",handle:".handle"})},e.removeTitleField=function(e){t(e).parents(".new-child-row").parent("li").remove()},e.submitForm=function(a){e.toggleLoading(!0),e.form=t(a).parents("form");var s=!!t(a).hasClass("add-edit");t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).serialize()+"&action="+NestedPages.formActions.newPage+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){if("error"===a.status)return e.toggleLoading(!1),void t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show();if(s===!0){var n=a.new_pages[0].edit_link;return n=n.replace(/&amp;/g,"&"),void window.location.replace(n)}e.toggleLoading(!1),e.posts=a.new_pages,e.addPosts()},error:function(a){console.log(a),e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},e.addPosts=function(){var a=t(e.form).parent(".new-child").parent(".page-row");if(0===t(a).children("ol").length&&t(a).append('<ol class="nplist"></ol>'),t(e.form).hasClass("in-modal"))var s=t(".nplist.sortable li.page-row:first");else var s=t(a).children("ol");for(i=0;i<e.posts.length;i++)e.appendRows(s,e.posts[i]);t(s).show(),e.formatter.updateSubMenuToggle(),e.cancelNewPage(),t(NestedPages.selectors.newPageModal).modal("hide")},e.appendRows=function(e,a){var s='<li id="menuItem_'+a.id+'" class="page-row';"publish"===a.status&&(s+=" published"),s+='">',NestedPages.jsData.hierarchical?(s+='<div class="row">',s+='<div class="child-toggle"></div>'):(s+='<div class="row non-hierarchical">',s+='<div class="non-hierarchical-spacer"></div>'),s+='<div class="row-inner">',s+='<i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i>',s+='<a href="'+a.edit_link+'" class="page-link page-title">',s+='<span class="title">'+a.title+"</span>",s+="Publish"!==a.status?'<span class="status">('+a.status+")</span>":'<span class="status"></span>',s+='<span class="nav-status">',"hide"===a.np_nav_status&&(s+=" "+nestedpages.hidden),s+="</span>",s+='<span class="edit-indicator"><i class="np-icon-pencil"></i>Edit</span>',s+="</a>",NestedPages.jsData.hierarchical||(s+='<div class="np-post-columns">',s+='<ul class="np-post-info">',s+='<li><span class="np-author-display">'+a.author_formatted+"</span></li>",s+="<li>"+a.date_formatted+"</li>",s+="</ul>",s+="</div>"),t(".nplist").first().hasClass("has-yoast")&&(s+='<span class="np-seo-indicator na"></span>'),s+='<div class="action-buttons">',s+='<a href="#" class="np-btn open-redirect-modal" data-parentid="'+a.id+'"><i class="np-icon-link"></i></a>',s+='<a href="#" class="np-btn add-new-child" data-id="'+a.id+'" data-parentname="'+a.title+'">'+nestedpages.add_child_short+"</a>",s+='<a href="#" class="np-btn np-quick-edit" data-id="'+a.id+'" data-template="'+a.page_template+'" data-title="'+a.title+'" data-slug="'+a.slug+'" data-commentstatus="closed" data-status="'+a.status.toLowerCase()+'" data-np-status="show"\tdata-navstatus="show" data-author="'+a.author+'" data-template="'+a.template+'" data-month="'+a.month+'" data-day="'+a.day+'" data-year="'+a.year+'" data-hour="'+a.hour+'" data-minute="'+a.minute+'" data-datepicker="'+a.datepicker+'" data-time="'+a.time+'" data-formattedtime="'+a.formattedtime+'" data-ampm="'+a.ampm+'">'+nestedpages.quick_edit+"</a>",s+='<a href="'+a.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",s+='<a href="'+a.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',s+="</div><!-- .action-buttons -->",s+="</div><!-- .row-inner --></div><!-- .row -->",s+="</li>",t(e).append(s)},e.toggleLoading=function(e){return e?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.QuickEditPost=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.button="",e.initialData="",e.parent_li="",e.form="",e.flatTerms="",e.termNames="",e.saveButton="",e.newData="",e.row="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditOpen,function(a){a.preventDefault(),e.button=t(this),e.openForm()}),t(document).on("click",NestedPages.selectors.quickEditCancel,function(t){t.preventDefault(),e.formatter.removeQuickEdit()}),t(document).on("click",NestedPages.selectors.quickEditToggleTaxonomies,function(e){e.preventDefault(),t(this).parents("form").find(".np-taxonomies").toggle()}),t(document).on("click",NestedPages.selectors.quickEditToggleMenuOptions,function(e){e.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",NestedPages.selectors.quickEditSaveButton,function(a){a.preventDefault(),e.saveButton=t(this),e.save()}),t(document).on("keydown",function(t){27===t.keyCode&&e.formatter.removeQuickEdit()})},e.openForm=function(){e.setInitialData(),e.createForm(),e.populateForm(),e.populateFlatTaxonomies()},e.setInitialData=function(){e.initialData={id:t(e.button).attr("data-id"),title:t(e.button).attr("data-title"),slug:t(e.button).attr("data-slug"),author:t(e.button).attr("data-author"),cs:t(e.button).attr("data-commentstatus"),status:t(e.button).attr("data-status"),template:t(e.button).attr("data-template"),month:t(e.button).attr("data-month"),day:t(e.button).attr("data-day"),year:t(e.button).attr("data-year"),hour:t(e.button).attr("data-hour"),minute:t(e.button).attr("data-minute"),navstatus:t(e.button).attr("data-navstatus"),npstatus:t(e.button).attr("data-np-status"),navtitle:t(e.button).attr("data-navtitle"),navtitleattr:t(e.button).attr("data-navtitleattr"),navcss:t(e.button).attr("data-navcss"),linktarget:t(e.button).attr("data-linktarget"),password:t(e.button).attr("data-password"),datepicker:t(e.button).attr("data-datepicker"),time:t(e.button).attr("data-formattedtime"),ampm:t(e.button).attr("data-ampm")},e.initialData.h_taxonomies=[],e.initialData.f_taxonomies=[],e.parent_li=t(e.button).closest(NestedPages.selectors.row).parent("li");var a=t(e.parent_li).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&e.initialData.h_taxonomies.push(a[i]),"inf-"===a[i].substring(0,4)&&e.initialData.f_taxonomies.push(a[i])},e.createForm=function(){if(e.form=t(NestedPages.selectors.quickEditPostForm).clone(),t(e.parent_li).children("ol").length>0){var a=t(e.parent_li).children("ol");t(e.form).insertBefore(a)}else t(e.form).appendTo(e.parent_li);t(e.form).siblings(NestedPages.selectors.row).hide(),t(e.form).show()},e.populateForm=function(){if(t(e.form).find(".page_id").html("<em>ID:</em> "+e.initialData.id),t(e.form).find(".np_id").val(e.initialData.id),t(e.form).find(".np_title").val(e.initialData.title),t(e.form).find(".np_slug").val(e.initialData.slug),t(e.form).find(".np_author select").val(e.initialData.author),t(e.form).find(".np_status").val(e.initialData.status),t(e.form).find(".np_nav_title").val(e.initialData.navtitle),t(e.form).find(".np_title_attribute").val(e.initialData.navtitleattr),t(e.form).find(".np_nav_css_classes").val(e.initialData.navcss),t(e.form).find(".post_password").val(e.initialData.password),t(e.form).find(".np_datepicker").val(e.initialData.datepicker),t(e.form).find(".np_time").val(e.initialData.time),t(e.form).find(".np_ampm").val(e.initialData.ampm),"open"===e.initialData.cs&&t(e.form).find(".np_cs").attr("checked","checked"),""!==e.initialData.template?t(e.form).find(".np_template").val(e.initialData.template):t(e.form).find(".np_template").val("default"),"private"===e.initialData.status&&(t(e.form).find(".post_password").attr("readonly",!0),t(e.form).find(".keep_private").attr("checked",!0)),"hide"===e.initialData.npstatus?t(e.form).find(".np_status").attr("checked","checked"):t(e.form).find(".np_status").removeAttr("checked"),"hide"===e.initialData.navstatus?t(e.form).find(".np_nav_status").attr("checked","checked"):t(e.form).find(".np_nav_status").attr("checked",!1),"_blank"===e.initialData.linktarget?t(e.form).find(".link_target").attr("checked","checked"):t(e.form).find(".link_target").attr("checked",!1),"private"===e.initialData.status&&t(e.form).find(".np_status").val("publish"),t(e.form).find('select[name="mm"]').val(e.initialData.month),t(e.form).find('input[name="jj"]').val(e.initialData.day),t(e.form).find('input[name="aa"]').val(e.initialData.year),t(e.form).find('input[name="hh"]').val(e.initialData.hour),t(e.form).find('input[name="mn"]').val(e.initialData.minute),e.initialData.hasOwnProperty("h_taxonomies")){var a=e.initialData.h_taxonomies;for(i=0;i<a.length;i++){var s="#"+a[i];t(e.form).find(s).attr("checked","checked")}}t(e.form).find(".np_datepicker").datepicker({beforeShow:function(e,a){t("#ui-datepicker-div").addClass("nestedpages-datepicker")}}),e.formatter.showQuickEdit(),t(e.form).show()},e.populateFlatTaxonomies=function(){e.initialData.hasOwnProperty("f_taxonomies")&&(e.createTaxonomyObject(),e.getTermNames(),e.setWPSuggest())},e.createTaxonomyObject=function(){var t={};for(i=0;i<e.initialData.f_taxonomies.length;i++){var a=e.initialData.f_taxonomies[i],s=a.split("-"),n=s.indexOf("nps"),o=s.splice(n+1);o=o.join("-");var r=a.split("-").splice(0,n);r.shift("inf");var d=r.join("-");d in t||(t[d]=[]);var l=t[d];l.push(o)}e.flatTerms=t},e.getTermNames=function(){t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:e.flatTerms},success:function(t){e.termNames=t.terms,e.populateFlatTaxonomyFields()}})},e.populateFlatTaxonomyFields=function(){e.termNames&&t.each(e.termNames,function(e,a){var s=t("#"+e+"-quickedit");t(s).val(a.join(","))})},e.setWPSuggest=function(){var a=t(e.form).find("[data-autotag]");t.each(a,function(e,a){var s=t(this).attr("data-taxonomy");t(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+s,{multiple:!0,multipleSep:","})})},e.save=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){"error"===a.status?(e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show()):(e.toggleLoading(!1),e.newData=a.post_data,e.updatePostRow())},error:function(e){console.log(e)}})},e.updatePostRow=function(){e.row=t(e.button).parents(".row-inner"),t(e.row).find(".title").text(e.newData.post_title),t(e.row).find(".np-view-button").attr("href",e.newData.permalink);var a=t(e.row).find(".status");if("publish"!==e.newData._status&&"future"!==e.newData._status?t(a).text("("+e.newData._status+")"):"private"===e.newData.keep_private?t(a).text("("+e.newData.keep_private+")"):t(a).text(""),""!==e.newData.post_password&&"undefined"!=typeof e.newData.post_password){var s=t(a).text();s+=' <i class="np-icon-lock"></i>',t(a).html(s)}var n=t(e.row).find(".nav-status");"hide"==e.newData.nav_status?t(n).text("(Hidden)"):t(n).text("");var o=t(e.row).parent("li");"hide"==e.newData.np_status?(t(o).addClass("np-hide"),t(e.row).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(e.row).find(".np-icon-eye-blocked").remove()),NestedPages.jsData.hierarchical||t(e.row).find(".np-author-display").text(e.newData.author_name);var i=t(e.row).find(NestedPages.selectors.quickEditOpen);t(i).attr("data-id",e.newData.post_id),t(i).attr("data-template",e.newData.page_template),t(i).attr("data-title",e.newData.post_title),t(i).attr("data-slug",e.newData.post_name),t(i).attr("data-commentstatus",e.newData.comment_status),t(i).attr("data-status",e.newData._status),"private"===e.newData.keep_private&&t(i).attr("data-status","private"),t(i).attr("data-author",e.newData.post_author),t(i).attr("data-np-status",e.newData.np_status),t(i).attr("data-password",e.newData.post_password),t(i).attr("data-navstatus",e.newData.nav_status),t(i).attr("data-navtitle",e.newData.np_nav_title),t(i).attr("data-linktarget",e.newData.link_target),t(i).attr("data-navtitleattr",e.newData.np_title_attribute),t(i).attr("data-navcss",e.newData.np_nav_css_classes),
2
- t(i).attr("data-month",e.newData.mm),t(i).attr("data-day",e.newData.jj),t(i).attr("data-year",e.newData.aa),t(i).attr("data-hour",e.newData.hh),t(i).attr("data-minute",e.newData.mn),t(i).attr("data-datepicker",e.newData.np_date),t(i).attr("data-time",e.newData.np_time),t(i).attr("data-formattedtime",e.newData.np_time),t(i).attr("data-ampm",e.newData.np_ampm),e.removeTaxonomyClasses(),e.addCategoryClasses(),e.addHierarchicalClasses(),e.addFlatClasses(),e.addStatusClass(),e.formatter.removeQuickEdit(),e.formatter.flashRow(e.row)},e.addStatusClass=function(){var a=["published","draft","pending","future"];for(i=0;i<a.length;i++)t(e.row).removeClass(a[i]);t(e.row).addClass(e.newData._status)},e.removeTaxonomyClasses=function(){taxonomies=[];var a=t(e.row).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&t(e.row).removeClass(a[i]),"inf-"===a[i].substring(0,4)&&t(e.row).removeClass(a[i])},e.addCategoryClasses=function(){if(e.newData.hasOwnProperty("post_category")){var a=e.newData.post_category;for(i=0;i<a.length;i++){var s="in-category-"+a[i];t(e.row).addClass(s)}}},e.addHierarchicalClasses=function(){if(e.newData.hasOwnProperty("tax_input")){var a=e.newData.tax_input;t.each(a,function(a,s){for(i=0;i<s.length;i++){var n="in-"+a+"-"+s[i];t(e.row).addClass(n)}})}},e.addFlatClasses=function(){if(e.newData.hasOwnProperty("flat_tax")){var a=e.newData.flat_tax;t.each(a,function(a,s){for(i=0;i<s.length;i++){var n="inf-"+a+"-nps-"+s[i];t(e.row).addClass(n)}})}},e.toggleLoading=function(a){return a?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(e.saveButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(e.saveButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.QuickEditLink=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.button="",e.postData="",e.newPostData="",e.form="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditButtonLink,function(a){a.preventDefault(),e.formatter.removeQuickEdit(),e.button=t(this),e.openQuickEdit()}),t(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(t){t.preventDefault(),e.submitForm()}),t(document).on("keydown",function(t){27===t.keyCode&&e.formatter.removeQuickEdit()})},e.openQuickEdit=function(){e.setData(),e.createForm(),e.populateForm()},e.setData=function(){e.postData={id:t(e.button).attr("data-id"),url:t(e.button).attr("data-url"),title:t(e.button).attr("data-title"),status:t(e.button).attr("data-status"),navstatus:t(e.button).attr("data-navstatus"),npstatus:t(e.button).attr("data-np-status"),linktarget:t(e.button).attr("data-linktarget"),parentid:t(e.button).attr("data-parentid"),navtitleattr:t(e.button).attr("data-navtitleattr"),navcss:t(e.button).attr("data-navcss"),navtype:t(e.button).attr("data-nav-type"),navobject:t(e.button).attr("data-nav-object"),navobjectid:t(e.button).attr("data-nav-object-id"),navoriginallink:t(e.button).attr("data-nav-original-link"),navoriginaltitle:t(e.button).attr("data-nav-original-title")}},e.createForm=function(){var a=t(e.button).closest(NestedPages.selectors.row).parent("li");if(e.form=t(NestedPages.selectors.quickEditLinkForm).clone(),t(a).children("ol").length>0){var s=t(a).children("ol");t(e.form).insertBefore(s)}else t(e.form).appendTo(a);t(e.form).siblings(NestedPages.selectors.row).hide()},e.populateForm=function(){if(t(e.form).find(".np_id").val(e.postData.id),t(e.form).find(".np_title").val(e.postData.title),t(e.form).find(".np_author select").val(e.postData.author),t(e.form).find(".np_status").val(e.postData.status),t(e.form).find(".np_content").val(e.postData.url),t(e.form).find(".np_parent_id").val(e.postData.parentid),t(e.form).find(".np_title_attribute").val(e.postData.navtitleattr),t(e.form).find(".np_nav_css_classes").val(e.postData.navcss),"hide"===e.postData.npstatus?t(e.form).find(".np_status").prop("checked","checked"):t(e.form).find(".np_status").removeAttr("checked"),"hide"===e.postData.navstatus?t(e.form).find(".np_nav_status").prop("checked","checked"):t(e.form).find(".np_nav_status").removeAttr("checked"),"_blank"===e.postData.linktarget?t(e.form).find(".link_target").prop("checked","checked"):t(e.form).find(".link_target").removeAttr("checked"),"custom"!==e.postData.navobject&&""!==e.postData.navobject){var a='<div class="form-control original-link">Original: <a href="'+e.postData.navoriginallink+'" target="_blank">'+e.postData.navoriginaltitle+"</a></div>";t(e.form).find("[data-url-field]").remove(),t(a).insertAfter(t(e.form).find("h3")),t(e.form).find("[data-np-menu-object-input]").val(e.postData.navobject),t(e.form).find("[data-np-menu-objectid-input]").val(e.postData.navobjectid),t(e.form).find("[data-np-menu-type-input]").val(e.postData.navtype),t(e.form).find("h3").text("Link: "+e.postData.navoriginaltitle)}else t(e.form).find("h3").text("Link"),t(e.form).find("[data-np-menu-object-input]").val("custom"),t(e.form).find("[data-np-menu-type-input]").val("custom");e.formatter.showQuickEdit(),t(e.form).show()},e.submitForm=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){"error"===a.status?(e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show()):(e.toggleLoading(!1),e.newPostData=a.post_data,e.updateRow())},error:function(a){e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},e.updateRow=function(){console.log(e.newPostData);var a=t(e.form).siblings(".row");t(a).find(".title").html(e.newPostData.post_title+' <i class="np-icon-link"></i>');var s=t(a).find(".status");"publish"!==e.newPostData._status&&"future"!==e.newPostData._status?t(s).text("("+e.newPostData._status+")"):t(s).text("");var n=t(a).find(".nav-status");"hide"==e.newPostData.nav_status?t(n).text("("+NestedPages.jsData.hiddenText+")"):t(n).text("");var o=t(a).parent("li");"hide"==e.newPostData.np_status?(t(o).addClass("np-hide"),t(a).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(a).find(".np-icon-eye-blocked").remove());var i=t(a).find(NestedPages.selectors.quickEditButtonLink);t(i).attr("data-id",e.newPostData.post_id),t(i).attr("data-title",e.newPostData.post_title),t(i).attr("data-url",e.newPostData.post_content),t(i).attr("data-status",e.newPostData._status),t(i).attr("data-navstatus",e.newPostData.nav_status),t(i).attr("data-np-status",e.newPostData.np_status),t(i).attr("data-linkTarget",e.newPostData.linkTarget),t(i).attr("data-navtitleattr",e.newPostData.titleAttribute),t(i).attr("data-navcss",e.newPostData.cssClasses),e.formatter.removeQuickEdit(),e.formatter.flashRow(a)},e.toggleLoading=function(e){return t(".row").removeClass("np-updated").removeClass("np-updated-show"),e?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.Clone=function(){var e=this,t=jQuery;return e.parent_id="",e.parent_title="",e.parentLi=null,e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.cloneButton,function(a){a.preventDefault(),e.parent_id=t(this).attr("data-id"),e.parent_title=t(this).attr("data-parentname"),e.parentLi=t(this).parent(".row").parent(".page-row").parent(".npList"),e.openModal()}),t(document).on("click",NestedPages.selectors.confirmClone,function(t){t.preventDefault(),e.clone()})},e.openModal=function(){t(NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(e.parent_title),t(NestedPages.selectors.cloneModal).modal("show")},e.clone=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:e.parent_id,quantity:t(NestedPages.selectors.cloneQuantity).val(),status:t(NestedPages.selectors.cloneStatus).val(),author:t(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(a){e.toggleLoading(!1),t(NestedPages.selectors.cloneModal).modal("hide"),location.reload()}})},e.toggleLoading=function(e){return e?(t(NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void t(NestedPages.selectors.confirmClone).attr("disabled","disabled")):(t(NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),void t(NestedPages.selectors.confirmClone).attr("disabled",!1))},e.init()};var NestedPages=NestedPages||{};NestedPages.Tabs=function(){var e=this,t=jQuery;return e.activeContent="",e.activeButton="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.tabButton,function(a){a.preventDefault(),e.activeButton=t(this),e.toggleTabs()})},e.toggleTabs=function(){e.activeContent=t(e.activeButton).attr("href"),t(NestedPages.selectors.tabContent).hide(),t(e.activeContent).show(),t(e.activeButton).parents(NestedPages.selectors.tabButtonParent).find(NestedPages.selectors.tabButton).removeClass("active"),t(e.activeButton).addClass("active")},e.init()},jQuery(document).ready(function(){new NestedPages.Factory});var NestedPages=NestedPages||{};NestedPages.selectors={childToggle:".child-toggle",childToggleLink:".child-toggle a",toggleAll:".nestedpages-toggleall",toggleHidden:".np-toggle-hidden",toggleStatus:".np-toggle-publish",lists:".nplist",rows:".page-row",row:".row",sortable:".sortable",notSortable:".no-sort",handle:".handle",published:".published",hiddenRows:".np-hide",errorDiv:"#np-error",loadingIndicator:"#nested-loading",syncCheckbox:".np-sync-menu",syncForm:".np-sync-menu-cont",ajaxError:"[data-nestedpages-error]",toggleEditButtons:".np-toggle-edit",bulkActionsHeader:".nestedpages-list-header",bulkActionsForm:"[data-np-bulk-form]",bulkActionsCheckbox:"[data-np-bulk-checkbox]",bulkActionsIds:"[data-np-bulk-ids]",bulkActionRedirectIds:"[data-np-bulk-redirect-ids]",hiddenItemCount:"[data-np-hidden-count]",hiddenItemCountParent:"[data-np-hidden-count-parent]",bulkEditForm:"[data-np-bulk-edit-form]",bulkEditTitles:"[data-np-bulk-titles]",bulkEditRemoveItem:"[data-np-remove-bulk-item]",bulkEditCancel:"[data-np-cancel-bulk-edit]",bulkEditLinkCount:"[data-bulk-edit-link-count]",quickEditOverlay:".np-inline-overlay",quickEditLoadingIndicator:".np-qe-loading",quickEditErrorDiv:".np-quickedit-error",quickEditCancel:".np-cancel-quickedit",quickEditToggleTaxonomies:".np-toggle-taxonomies",quickEditToggleMenuOptions:".np-toggle-menuoptions",quickEditButtonLink:".np-quick-edit-redirect",quickEditLinkForm:".quick-edit-form-redirect",quickEditLinkSaveButton:".np-save-quickedit-redirect",quickEditOpen:".np-quick-edit",quickEditPostForm:".quick-edit-form",quickEditSaveButton:".np-save-quickedit",openLinkModal:".open-redirect-modal",linkModal:"#np-link-modal",saveLink:".np-save-link",linkLoadingIndicator:".np-link-loading",linkErrorDiv:".np-new-link-error",linkForm:".np-new-link-form",linkDeleteButton:"[data-np-confirm-delete]",linkDeleteConfirmationButton:"[data-delete-confirmation]",linkDeleteConfirmationModal:"#np-delete-confirmation-modal",linkDeleteConfirmationModalText:"[data-np-link-delete-text]",openPageModal:".open-bulk-modal",newPageModal:"#np-bulk-modal",newPageFormContainer:".new-child-form",newPageForm:".np-new-child-form",newPageSubmitButton:".np-save-newchild",newPageTitle:".add-new-child-row",newPageRemoveTitle:".np-remove-child",addChildButton:".add-new-child",newChildError:".np-newchild-error",cancelNewChildButton:".np-cancel-newchild",cloneButton:".clone-post",confirmClone:"[data-confirm-clone]",cloneModal:"#np-clone-modal",cloneQuantity:"[data-clone-quantity]",cloneStatus:"[data-clone-status]",cloneAuthor:"[data-clone-author]",tabButtonParent:"[data-np-tabs]",tabButton:"[data-np-tab]",tabContent:"[data-np-tab-pane]",thumbnailContainer:".np-thumbnail",thumbnailContainerLink:".np-thumbnail.link",manualMenuSync:"[data-np-manual-menu-sync]",manualOrderSync:"[data-np-manual-order-sync]"},NestedPages.cssClasses={iconToggleDown:"np-icon-arrow-down",iconToggleRight:"np-icon-arrow-right",noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,hierarchical:!0,expandText:nestedpages.expand_text,collapseText:nestedpages.collapse_text,showHiddenText:nestedpages.show_hidden,hideHiddenText:nestedpages.hide_hidden,quickEditText:nestedpages.quick_edit,hiddenText:nestedpages.hidden,titleText:nestedpages.title},NestedPages.formActions={syncToggles:"npnestToggle",syncNesting:"npsort",syncMenu:"npsyncMenu",newPage:"npnewChild",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem",manualMenuSync:"npmanualMenuSync"},NestedPages.Factory=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.responsive=new NestedPages.Responsive,e.checkAll=new NestedPages.CheckAll,e.bulkActions=new NestedPages.BulkActions,e.menuToggle=new NestedPages.MenuToggle,e.pageToggle=new NestedPages.PageToggle,e.nesting=new NestedPages.Nesting,e.syncMenuSetting=new NestedPages.SyncMenuSetting,e.newPage=new NestedPages.NewPage,e.quickEditLink=new NestedPages.QuickEditLink,e.quickEditPost=new NestedPages.QuickEditPost,e.clone=new NestedPages.Clone,e.tabs=new NestedPages.Tabs,e.menuLinks=new NestedPages.MenuLinks,e.hiddenItemCount=new NestedPages.HiddenItemCount,e.confirmDelete=new NestedPages.ConfirmDelete,e.manualSync=new NestedPages.ManualSync,e.init=function(){e.bindEvents(),e.setPostType(),e.setMenuSync(),e.setNestable(),e.formatter.updateSubMenuToggle(),e.formatter.setBorders(),e.formatter.setNestedMargins(),e.nesting.initializeSortable()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditOverlay,function(t){e.formatter.removeQuickEdit(),e.newPage.cancelNewPage()}),t(document).ready(function(){e.formatter.hideAjaxError(),e.formatter.sizeLinkThumbnails()})},e.setNestable=function(){var e=!1;t.each(NestedPages.jsData.allPostTypes,function(t,a){a.name===NestedPages.jsData.posttype&&(a.hierarchical===!0&&(e=!0),a.disable_nesting===!0&&(e=!1))}),NestedPages.jsData.nestable=e},e.setPostType=function(){NestedPages.jsData.posttype=t(NestedPages.selectors.sortable).attr("id").substring(3),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},e.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuLinks=function(){var e=this,t=jQuery;return e.typeButton="",e.post="",e.formatter=new NestedPages.Formatter,e.selectors={form:"[data-np-menu-item-form]",typeSelect:"[data-np-menu-selection]",accordion:"[data-np-menu-accordion]",accordionItem:"[data-np-menu-accordion-item]",formPlaceholder:".np-menu-link-object-placeholder",formDetails:".np-menu-link-details",searchResults:"[data-np-search-result]",defaultResults:"[data-default-result]",originalLink:"[data-np-original-link]",saveButton:"[data-np-save-link]",urlInputCont:"[data-np-menu-url-cont]",errorDiv:"[data-np-error]"},e.fields={object:"[data-np-menu-object-input]",objectid:"[data-np-menu-objectid-input]",itemType:"[data-np-menu-type-input]",url:"[data-np-menu-url]",navigationLabel:"[data-np-menu-navigation-label]",titleAttribute:"[data-np-menu-title-attr]",cssClasses:"[data-np-menu-css-classes]",npStatus:"[data-np-menu-np-status]",linkTarget:"[data-np-menu-link-target]",menuTitle:"[data-np-menu-title]"},e.search=new NestedPages.MenuSearch,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.openLinkModal,function(a){a.preventDefault(),e.postParent=t(this).attr("data-parentid"),t(e.selectors.form).find(".parent_id").val(t(this).attr("data-parentid")),e.openModal()}),t(document).on("click",e.selectors.accordionItem,function(a){a.preventDefault(),e.accordion(t(this))}),t(document).on("click",e.selectors.typeSelect,function(a){a.preventDefault(),e.typeButton=t(this),e.setLinkType()}),t(document).on("keyup",e.fields.navigationLabel,function(){e.updateTitle()}),t(document).on("click",e.selectors.saveButton,function(t){t.preventDefault(),e.submitForm()}),t(document).on("keydown",function(e){27===e.keyCode&&t("#np-link-modal").modal("hide")})},e.openModal=function(){t(NestedPages.selectors.linkErrorDiv).hide(),t(NestedPages.selectors.linkModal).find("input").val(""),t(NestedPages.selectors.linkModal).find(".parent_id").val(e.postParent),e.clearForm(),t(e.selectors.accordion).find("ul").hide(),t(e.selectors.typeSelect).removeClass("active"),t(NestedPages.selectors.linkModal).modal("show")},e.accordion=function(a){e.clearForm();var s=t(a).siblings("ul");return t(s).is(":visible")?(t(a).removeClass("active"),void t(s).slideUp("fast")):(t(e.selectors.accordionItem).removeClass("active"),t(a).addClass("active"),t(a).parents(e.selectors.accordion).find("ul").slideUp("fast"),void t(s).slideDown("fast"))},e.setLinkType=function(){return t(e.typeButton).hasClass("active")?void e.clearForm():(t(e.typeButton).hasClass("np-custom-link")&&(t(e.selectors.accordionItem).removeClass("active"),t(e.selectors.accordion).find("ul").slideUp("fast")),t(e.selectors.formPlaceholder).hide(),void e.populateForm())},e.populateForm=function(){t(e.selectors.saveButton).show(),t(e.selectors.typeSelect).removeClass("active"),t(e.typeButton).addClass("active"),t(e.fields.menuTitle).text(t(e.typeButton).text()).val(t(e.typeButton).text()),t(e.selectors.form).find("h3").find("em").text(t(e.typeButton).attr("data-np-object-name")),""!==t(e.typeButton).attr("data-np-permalink")?(t(e.selectors.form).find(e.selectors.urlInputCont).hide(),t(e.selectors.form).find(e.selectors.originalLink).html('<a href="'+t(e.typeButton).attr("data-np-permalink")+'">'+t(e.typeButton).text()+"</a>"),t(e.selectors.form).find(e.selectors.originalLink).parent(".original-link").show()):(t(e.selectors.form).find(e.selectors.urlInputCont).show(),t(e.selectors.form).find(e.selectors.originalLink).parent(".original-link").hide()),t(e.fields.object).val(t(e.typeButton).attr("data-np-menu-object")),t(e.fields.objectid).val(t(e.typeButton).attr("data-np-menu-objectid")),t(e.fields.itemType).val(t(e.typeButton).attr("data-np-menu-type")),t(e.selectors.formDetails).show()},e.clearForm=function(){t(e.selectors.form).find(e.selectors.errorDiv).hide(),t(e.selectors.saveButton).hide(),t(e.selectors.formDetails).hide(),t(e.selectors.formPlaceholder).show(),t(e.selectors.form).find("input").not(".parent_id").val(""),t(e.selectors.form).find(e.fields.linkTarget).val("_blank"),t(e.selectors.form).find('input[type="checkbox"]').attr("checked",!1),t(e.selectors.typeSelect).removeClass("active"),e.search.toggleLoading(!1),t(e.selectors.searchResults).remove(),t(e.selectors.defaultResults).show()},e.updateTitle=function(){var a=t(e.fields.navigationLabel).val(),s=t(e.selectors.form).find("h3").find("span");""!==a?(t(e.fields.menuTitle).val(a),t(s).text(a)):(t(e.fields.menuTitle).val(t(e.typeButton).text()),t(s).text(t(e.typeButton).text()))},e.submitForm=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:t(e.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(a){return e.toggleLoading(!1),"error"===a.status?void t(e.selectors.form).find(e.selectors.errorDiv).text(a.message).show():(e.post=a.post_data,void e.createRow())},error:function(e){console.log(e)}})},e.createRow=function(){var a='<li id="menuItem_'+e.post.id+'" class="page-row published';a+='">',a+='<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="'+e.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+e.post.menuTitle+' <i class="np-icon-link"></i></span>',a+='</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" ',a+='data-id="'+e.post.id+'"',a+='data-parentid="'+e.post.parent_id+'"',a+='data-title="'+e.post.menuTitle+'" ',a+='data-url="'+e.post.url+'" ',a+='data-status="publish" ',a+='data-np-status="show" ',a+='data-navstatus="show" ',a+='data-navcss="'+e.post.cssClasses+'" ',a+='data-navtitleattr="'+e.post.titleAttribute+'" ',a+='data-nav-type="'+e.post.menuType+'" ',a+='data-nav-object="'+e.post.objectType+'" ',a+='data-nav-object-id="'+e.post.objectId+'" ',a+='data-nav-original-link="'+e.post.original_link+'" ',a+='data-nav-original-title="'+e.post.original_title+'" ',a+='data-linktarget="'+e.post.link_target+'">',a+=NestedPages.jsData.quickEditText,a+="</a>",a+='<a href="'+e.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',a+="</div></div></div></li>","0"===e.post.parent_id?t(".nplist:first li:first").after(a):e.appendChildRow(a),t(NestedPages.selectors.linkModal).modal("hide"),e.row=t("#menuItem_"+e.post.id).find(".row"),e.formatter.flashRow(e.row)},e.appendChildRow=function(a){var s=t("#menuItem_"+e.post.parent_id);0===t(s).children("ol").length?(a='<ol class="sortable nplist" style="display:block;">'+a+"</ol>",t(s).append(a)):t(s).find("ol:first").prepend(a),e.formatter.updateSubMenuToggle()},e.toggleLoading=function(a){return a?(t(e.selectors.form).find(e.selectors.errorDiv).hide(),t(e.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void t(e.selectors.saveButton).attr("disabled","disabled")):(t(e.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),void t(e.selectors.saveButton).attr("disabled",!1))},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuSearch=function(){var e=this,t=jQuery;return e.selectors={searchForms:"*[data-np-menu-search]",defaultResults:"[data-default-result]",loadingIndicator:".np-menu-search-loading",noResults:".np-menu-search-noresults",searchType:"data-search-type",searchObject:"data-search-object",searchResults:"[data-np-search-result]"},e.activeForm="",e.results="",e.defaultResults="",e.searchType="",e.searchObject="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("keyup",e.selectors.searchForms,function(){e.activeForm=t(this),t(e.selectors.searchResults).remove(),e.performSearch()})},e.performSearch=function(){return e.defaultResults=t(e.activeForm).parent("li").siblings(e.selectors.defaultResults),t(e.activeForm).val().length>2?(t(e.defaultResults).hide(),e.toggleLoading(!0),void e.query()):(e.toggleLoading(!1),void t(e.defaultResults).show())},e.query=function(){e.searchType=t(e.activeForm).attr(e.selectors.searchType),e.searchObject=t(e.activeForm).attr(e.selectors.searchObject),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:t(e.activeForm).val(),searchType:e.searchType,searchObject:e.searchObject},success:function(a){console.log(a),a.results?(e.results=a.results,e.toggleLoading(!1),"post_type"===e.searchType?e.appendPosts():e.appendTaxonomies()):(e.toggleLoading(!1),t(e.activeForm).siblings(e.selectors.noResults).show())}})},e.appendPosts=function(){var a="";t.each(e.results,function(t,s){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+e.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+s.ID+'" data-np-permalink="'+s.permalink+'" data-np-object-name="'+s.singular_name+'" data-np-menu-selection>'+s.post_title+"</a></li>"}),t(a).insertAfter(t(e.activeForm).parent("li")),e.toggleLoading(!1)},e.appendTaxonomies=function(){var a="";t.each(e.results,function(t,s){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+e.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+s.term_id+'" data-np-permalink="'+s.permalink+'" data-np-object-name="'+s.taxonomy+'" data-np-menu-selection>'+s.name+"</a></li>"}),t(a).insertAfter(t(e.activeForm).parent("li")),e.toggleLoading(!1)},e.toggleLoading=function(a){var s=t(e.activeForm).siblings(e.selectors.loadingIndicator);return t(e.selectors.noResults).hide(),a?void t(s).show():void t(s).hide()},e.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPagesTrash=function(){var e=this,t=jQuery;return e.trashButton=".np-empty-trash",e.confirmButton=".np-trash-confirm",e.warningModal="#np-trash-modal",e.errorAlert="#np-error",e.loadingIndicator="#nested-loading",e.trashLinks=".np-trash-links",e.postType=t("#np-trash-posttype").val(),e.nonce=nestedpages.np_nonce,e.formAction="npEmptyTrash",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",e.trashButton,function(a){a.preventDefault(),t(e.warningModal).modal("show")}),t(document).on("click",e.confirmButton,function(t){t.preventDefault(),e.confirmEmpty()})},e.confirmEmpty=function(){e.loading(!0),t(e.warningModal).hide(),t(e.errorAlert).hide(),e.emptyTrash()},e.emptyTrash=function(){t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:e.formAction,nonce:e.nonce,posttype:e.postType},success:function(a){e.loading(!1),"error"===a.status?t(e.errorAlert).text(a.message).show():t(e.trashLinks).hide()}})},e.loading=function(a){return a?void t(e.loadingIndicator).show():void t(e.loadingIndicator).hide()},e.init()},NestedPages=NestedPages||{};NestedPages.ConfirmDelete=function(){var e=this,t=jQuery;return e.deleteLink="",e.bindEvents=function(){t(document).on("click",NestedPages.selectors.linkDeleteButton,function(a){a.preventDefault(),e.confirmSingle(t(this))}),t(document).on("click",NestedPages.selectors.linkDeleteConfirmationButton,function(a){return a.preventDefault(),t(this).hasClass("bulk")?void e.deleteMultiple():void e.deleteSingle()}),t(document).on("submit",NestedPages.selectors.bulkActionsForm,function(t){e.confirmMultiple(t)})},e.confirmSingle=function(a){e.deleteLink=t(a).attr("href"),t(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation_singular),t(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.delete).removeClass("bulk"),t(NestedPages.selectors.linkDeleteConfirmationModal).modal("show")},e.confirmMultiple=function(e){if("trash"===t('select[name="np_bulk_action"]').val()){var a=t(NestedPages.selectors.bulkActionRedirectIds).val();""!==a&&(e.preventDefault(),t(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation),t(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.trash_delete_links).addClass("bulk"),t(NestedPages.selectors.linkDeleteConfirmationModal).modal("show"))}},e.deleteMultiple=function(){t(NestedPages.selectors.bulkActionsForm)[0].submit()},e.deleteSingle=function(){window.location.replace(e.deleteLink)},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.ManualSync=function(){var e=this,t=jQuery;return e.activeBtn="",e.bindEvents=function(){t(document).on("click",NestedPages.selectors.manualMenuSync,function(a){a.preventDefault(),e.activeBtn=t(this),e.syncMenu()}),t(document).on("click",NestedPages.selectors.manualOrderSync,function(a){a.preventDefault(),e.activeBtn=t(this),e.syncOrder()})},e.syncMenu=function(){e.loading(!0),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.manualMenuSync,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:"sync"},success:function(a){"error"===a.status?(t(NestedPages.selectors.errorDiv).text(a.message).show(),t(NestedPages.selectors.loadingIndicator).hide()):e.loading(!1)}})},e.syncOrder=function(){e.loading(!0);var t=new NestedPages.Nesting;t.syncNesting(!0,e.loading(!1))},e.loading=function(a){return a?(t(e.activeBtn).addClass("disabled"),void t(NestedPages.selectors.loadingIndicator).show()):(t(e.activeBtn).removeClass("disabled"),void t(NestedPages.selectors.loadingIndicator).hide())},e.bindEvents()};
1
+ var NestedPages=NestedPages||{};NestedPages.Responsive=function(){var e=this,t=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.toggleEditButtons,function(a){a.preventDefault(),e.toggleEdit(t(this))}),t(window).resize(function(){e.timer(function(){t(".action-buttons").removeAttr("style"),t(".np-toggle-edit").removeClass("active")},500)})},e.toggleEdit=function(e){var a=t(e).siblings(".action-buttons");return t(a).is(":visible")?(t(e).removeClass("active"),void t(a).hide()):(t(e).addClass("active"),void t(a).show())},e.timer=function(){var e=0;return function(t,a){clearTimeout(e),e=setTimeout(t,a)}}(),e.init()};var NestedPages=NestedPages||{};NestedPages.Formatter=function(){var e=this,t=jQuery;e.updateSubMenuToggle=function(){for(var e=t(NestedPages.selectors.childToggle),a=0;a<e.length;a++){var s=e[a],n=t(s).parent(".row").parent("li");if(t(n).children("ol").length>0){var o=t(n).children("ol:visible").length>0?NestedPages.cssClasses.iconToggleDown:NestedPages.cssClasses.iconToggleRight;t(s).html('<div class="child-toggle-spacer"></div><a href="#"><i class="'+o+'"></i></a>'),t(n).children("ol").children(".np-hide").length>0&&0===t(n).children("ol").children(".np-hide.shown").length?t(s).find("a").hide():t(n).children("ol").children(".np-hide").length>0&&t(n).children("ol").children(".np-hide.shown").length>0&&t(s).find("a").show()}else t(s).empty().html('<div class="child-toggle-spacer"></div>')}},e.setBorders=function(){t(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),t.each(t(NestedPages.selectors.lists),function(){t(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},e.setNestedMargins=function(){t.each(t(NestedPages.selectors.lists),function(e,a){var s=t(this).parents(NestedPages.selectors.lists).length,n=0;if(NestedPages.jsData.sortable||(n=10),s>0){var n=20*s+n;return void t(this).find(".row-inner").css("padding-left",n+"px")}return NestedPages.jsData.sortable?void t(this).find(".row-inner").css("padding-left","0px"):void t(this).find(".row-inner").css("padding-left","10px")})},e.updatePlaceholderWidth=function(a){if(NestedPages.jsData.nestable){var s=t(a.placeholder).parents("ol").length,n=t(NestedPages.selectors.sortable).width(),o=40*s-40,i=n-o;t(a.placeholder).width(i).css("margin-left",o+"px")}e.updateListVisibility(a)},e.updateListVisibility=function(e){var a=t(e.placeholder).parent("ol");t(a).is(":visible")||(t(a).addClass("nplist"),t(a).show())},e.removeQuickEdit=function(){t(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),t(".sortable .quick-edit").remove(),t(".row").show()},e.showQuickEdit=function(){t("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){t(".np-inline-overlay").addClass("active")},50)},e.flashRow=function(a){t(a).addClass("np-updated"),e.setBorders(),setTimeout(function(){t(a).addClass("np-updated-show")},1500)},e.showAjaxError=function(e){t(NestedPages.selectors.ajaxError).find("p").text(e),t(NestedPages.selectors.ajaxError).show()},e.hideAjaxError=function(e){t(NestedPages.selectors.ajaxError).hide()},e.sizeLinkThumbnails=function(){var e=t(NestedPages.selectors.thumbnailContainer).not(NestedPages.selectors.thumbnailContainerLink).first().find("img"),a=t(e).width(),s=t(e).height();t.each(t(NestedPages.selectors.thumbnailContainerLink),function(){t(this).width(a),t(this).height(s)})}};var NestedPages=NestedPages||{};NestedPages.CheckAll=function(){var e=this,t=jQuery;return e.activeCheckbox="",e.selectors={checkbox:"[data-np-check-all]"},e.bindEvents=function(){t(document).on("change",e.selectors.checkbox,function(){e.activeCheckbox=t(this),e.toggleCheckboxes()}),t(document).on("change","input[type=checkbox]",function(){e.checkAllStatus(t(this))})},e.init=function(){e.bindEvents()},e.toggleCheckboxes=function(){var a=!!t(e.activeCheckbox).is(":checked"),s=t(e.activeCheckbox).attr("data-np-check-all"),n=t('*[name="'+s+'"]');t.each(n,function(){var e=t(this).parents(NestedPages.selectors.rows);t(this).prop("checked",a),t(e).hasClass("np-hide")&&!t(e).is(":visible")&&t(e).find(NestedPages.selectors.bulkActionsCheckbox).prop("checked",!1)}),e.toggleCheckAll()},e.toggleCheckAll=function(){var a=t(e.activeCheckbox).attr("data-np-check-all"),s=t('*[name="'+a+'"]').length,n=t(".np-hide").find(NestedPages.selectors.bulkActionsCheckbox).length,o=t(".np-hide:visible").find(NestedPages.selectors.bulkActionsCheckbox).length;s=s-n+o;var i=t('*[name="'+a+'"]:checked').length;return s==i?(t(e.activeCheckbox).prop("checked",!0),void t(e.activeCheckbox).removeClass("check-all-partial")):i>0?void t(e.activeCheckbox).addClass("check-all-partial"):(t(e.activeCheckbox).attr("checked",!1),void t(e.activeCheckbox).removeClass("check-all-partial"))},e.checkAllStatus=function(a){var s=t(a).attr("name"),n=t('*[data-np-check-all="'+s+'"]');0!==n.length&&(e.activeCheckbox=t(n)[0],e.toggleCheckAll())},e.init()};var NestedPages=NestedPages||{};NestedPages.BulkActions=function(){var e=this,t=jQuery;return e.selectedNumber=0,e.selectedLinks=[],e.selectedPosts=[],e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleBulkForm()}),t(document).on("submit",NestedPages.selectors.bulkActionsForm,function(a){"edit"===t("select[name=np_bulk_action]").val()&&(a.preventDefault(),e.toggleBulkEdit(!0))}),t(document).on("click",NestedPages.selectors.bulkEditRemoveItem,function(a){a.preventDefault();var s=t(this).siblings("input[type=hidden]").val();e.uncheckBulkItem(s)}),t(document).on("click",NestedPages.selectors.bulkEditCancel,function(t){t.preventDefault(),e.uncheckAllBulkItems()})},e.toggleBulkForm=function(){var a=!1,s="",n="";return e.selectedPosts=[],e.selectedLinks=[],t.each(t(NestedPages.selectors.bulkActionsCheckbox),function(){if(t(this).is(":checked")){var o=t(this).parents(NestedPages.selectors.rows);if(a=!0,t(this).parent("div").hasClass("np-check-all")||t(o).hasClass("post-type-np-redirect")||(s+=t(this).val()+","),t(o).hasClass("post-type-np-redirect")&&(n+=t(this).val()+",",e.selectedLinks.push(t(this).val())),"np-redirect"!==t(this).attr("data-np-post-type")&&!t(this).parent("div").hasClass("np-check-all")){var i=[];i.title=t(this).attr("data-np-bulk-checkbox"),i.id=t(this).val(),e.selectedPosts.push(i)}}}),e.setBulkEditPosts(),e.toggleEditOption(),e.toggleLinkCountAlert(),a?(t(NestedPages.selectors.bulkActionsForm).show(),t(NestedPages.selectors.bulkActionsIds).val(s),t(NestedPages.selectors.bulkActionRedirectIds).val(n),void e.setSelectedNumber()):(t(NestedPages.selectors.bulkActionsIds).val(""),void t(NestedPages.selectors.bulkActionsForm).hide())},e.setBulkEditPosts=function(){for(var a="",s=0;s<e.selectedPosts.length;s++)a+='<li><a href="#" class="np-remove" data-np-remove-bulk-item>&times;</a>',a+=e.selectedPosts[s].title,a+='<input type="hidden" name="post_ids[]" value="'+e.selectedPosts[s].id+'"></li>';t(NestedPages.selectors.bulkEditTitles).html(a)},e.uncheckBulkItem=function(a){t.each(t(NestedPages.selectors.bulkActionsCheckbox),function(){t(this).val()==a&&t(this).prop("checked",!1).change()}),0===t(NestedPages.selectors.bulkEditRemoveItem).length&&e.toggleBulkEdit(!1)},e.uncheckAllBulkItems=function(){t.each(t(NestedPages.selectors.bulkActionsCheckbox),function(){t(this).prop("checked",!1).change()}),e.toggleBulkEdit(!1)},e.setSelectedNumber=function(){var e=t(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").length,a=t(NestedPages.selectors.bulkActionsForm).find("select option").first();t(a).text(nestedpages.bulk_actions+" ("+e+")")},e.toggleEditOption=function(){var a=t(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").not(".np-redirect-bulk").length,s=t(NestedPages.selectors.bulkActionsForm).find("select option[value=edit]");return 0===a?(t(s).prop("disabled",!0),t(NestedPages.selectors.bulkActionsForm).find("select option").first().prop("selected",!0),void e.toggleBulkEdit(!1)):void t(s).prop("disabled",!1)},e.toggleBulkEdit=function(a){return e.toggleLinkCountAlert(),a?(t(NestedPages.selectors.bulkEditForm).show(),t(NestedPages.selectors.bulkActionsForm).hide(),void e.setWPSuggest()):(t(NestedPages.selectors.bulkEditForm).hide(),t(NestedPages.selectors.bulkActionsForm).show(),t(NestedPages.selectors.bulkEditLinkCount).parent("div").hide(),t(NestedPages.selectors.bulkActionsForm).find("select option").first().text(nestedpages.bulk_actions),void e.resetBulkEditFields())},e.toggleLinkCountAlert=function(){var a=e.selectedLinks.length;return 0===a?void t(NestedPages.selectors.bulkEditLinkCount).parent("div").hide():void t(NestedPages.selectors.bulkEditLinkCount).parent("div").show()},e.setWPSuggest=function(){var e=t(NestedPages.selectors.bulkEditForm).find("[data-autotag]");t.each(e,function(e,a){var s=t(this).attr("data-taxonomy");t(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+s,{multiple:!0,multipleSep:","})})},e.resetBulkEditFields=function(){var e=t(NestedPages.selectors.bulkEditForm).find("select");t.each(e,function(){t(this).find("option").first().prop("selected",!0)});var a=t(NestedPages.selectors.bulkEditForm).find(".cat-checklist");t.each(a,function(){t(this).find("input[type=checkbox]").prop("checked",!1)})},e.init()};var NestedPages=NestedPages||{};NestedPages.HiddenItemCount=function(){var e=this,t=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleHiddenCount()}),t(document).on("click",NestedPages.selectors.toggleAll,function(){e.toggleHiddenCount()}),t(document).on("click",NestedPages.selectors.pageToggle,function(){e.toggleHiddenCount()})},e.toggleHiddenCount=function(){var e=0;return t.each(t(NestedPages.selectors.bulkActionsCheckbox),function(){if(t(this).is(":checked")){if(t(this).parent("div").hasClass("np-check-all"))return;var a=t(this).closest(".page-row");t(a).is(":visible")||e++}}),e<1?void t(NestedPages.selectors.hiddenItemCountParent).hide():(t(NestedPages.selectors.hiddenItemCount).text(e),void t(NestedPages.selectors.hiddenItemCountParent).show())},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuToggle=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.bindEvents=function(){t(document).on("click",NestedPages.selectors.childToggleLink,function(a){a.preventDefault(),e.toggleSingleMenu(t(this))}),t(document).on("click",NestedPages.selectors.toggleAll,function(t){t.preventDefault(),e.toggleAllMenus()})},e.toggleSingleMenu=function(a){var s=t(a).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");t(a).find("i").toggleClass(NestedPages.cssClasses.iconToggleDown).toggleClass(NestedPages.cssClasses.iconToggleRight),t(s).toggle(),e.formatter.setBorders(),e.formatter.setNestedMargins(),e.syncUserToggles()},e.toggleAllMenus=function(){var a=NestedPages.selectors.toggleAll;return"closed"===t(a).attr("data-toggle")?(t(NestedPages.selectors.lists).show(),t(a).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),t(NestedPages.selectors.childToggle).find("i").removeClass(NestedPages.cssClasses.iconToggleRight).addClass(NestedPages.cssClasses.iconToggleDown),e.formatter.setBorders(),void e.syncUserToggles()):(t(NestedPages.selectors.lists).not(t(NestedPages.selectors.lists)[0]).hide(),t(a).attr("data-toggle","closed").text(NestedPages.jsData.expandText),t(NestedPages.selectors.childToggle).find("i").removeClass(NestedPages.cssClasses.iconToggleDown).addClass(NestedPages.cssClasses.iconToggleRight),e.formatter.setBorders(),void e.syncUserToggles())},e.visibleRowIDs=function(){var e=[],a=t(NestedPages.selectors.rows+":visible");return t.each(a,function(a,s){var n=t(this).attr("id");e.push(n.replace("menuItem_",""))}),e},e.syncUserToggles=function(){t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:e.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.PageToggle=function(){var e=this,t=jQuery;return e.activeButton="",e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.toggleHidden,function(a){a.preventDefault(),e.activeButton=t(this),e.toggleHidden()}),t(document).on("click",NestedPages.selectors.toggleStatus,function(a){a.preventDefault(),e.toggleStatus(t(this))})},e.toggleHidden=function(){var a=t(e.activeButton),s=t(a).attr("href");return console.log(s),"#show"==s?(t(a).attr("href","#hide").text(NestedPages.jsData.showHiddenText),t(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),e.formatter.updateSubMenuToggle(),void e.formatter.setBorders()):void("#hide"==s&&(t(a).attr("href","#show").text(NestedPages.jsData.hideHiddenText),t(NestedPages.selectors.hiddenRows).addClass("shown").show(),e.formatter.updateSubMenuToggle(),e.formatter.setBorders()))},e.toggleStatus=function(e){var a=t(e).attr("href");return a=a.substring(1),t(NestedPages.selectors.syncCheckbox).attr("disabled",!1),t(NestedPages.selectors.toggleStatus).removeClass("active"),t(e).addClass("active"),"draft"==a&&(t(NestedPages.selectors.syncCheckbox).attr("disabled",!0),t("."+a).addClass("nested-visible")),"all"==a?void t(NestedPages.selectors.rows).show():(t(NestedPages.selectors.rows).hide(),void t("."+a).show())},e.init()};var NestedPages=NestedPages||{};NestedPages.Nesting=function(){var e=this,t=jQuery;e.formatter=new NestedPages.Formatter,e.initializeSortable=function(){maxLevels=NestedPages.jsData.nestable?0:1,t(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",maxLevels:maxLevels,tabSize:56,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(t,a){e.formatter.updatePlaceholderWidth(a)},stop:function(t,a){setTimeout(function(){e.formatter.updateSubMenuToggle(),e.formatter.setBorders(),e.formatter.setNestedMargins()},100),e.syncNesting()}})},e.disableNesting=function(){t(NestedPages.selectors.sortable).sortable("destroy")},e.syncNesting=function(a,s){if("1"!==nestedpages.manual_order_sync||a){t(NestedPages.selectors.errorDiv).hide(),t(NestedPages.selectors.loadingIndicator).show(),list=t(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}),e.disableNesting();var n=NestedPages.jsData.syncmenu;"1"===nestedpages.manual_menu_sync&&(n="nosync"),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:list,post_type:NestedPages.jsData.posttype,syncmenu:n},success:function(a,s){if(e.initializeSortable(),"error"===a.status)t(NestedPages.selectors.errorDiv).text(a.message).show(),t(NestedPages.selectors.loadingIndicator).hide();else{if(s&&"function"==typeof s)return void s();t(NestedPages.selectors.loadingIndicator).hide()}}})}}};var NestedPages=NestedPages||{};NestedPages.SyncMenuSetting=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).ready(function(){"1"!==nestedpages.manual_menu_sync&&"1"===nestedpages.syncmenu&&e.syncSetting()}),t(document).on("change",NestedPages.selectors.syncCheckbox,function(){e.syncSetting()})},e.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==t(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=t(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncMenu,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(t){"error"===t.status&&e.formatter.showAjaxError(t.message)}}))},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.NewPage=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.parent_id=0,e.posts="",e.form="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.openPageModal,function(t){t.preventDefault(),e.openModal()}),t(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),t(document).on("click",NestedPages.selectors.newPageSubmitButton,function(a){a.preventDefault(),e.submitForm(t(this))}),t(document).on("click",NestedPages.selectors.newPageTitle,function(a){a.preventDefault(),e.addTitleField(t(this))}),t(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(a){a.preventDefault(),e.removeTitleField(t(this))}),t(document).on("click",NestedPages.selectors.addChildButton,function(a){a.preventDefault(),e.openQuickEdit(t(this))}),t(NestedPages.selectors.newPageModal).on("hide.bs.modal",function(){e.cancelNewPage()}),t(NestedPages.selectors.newPageModal).on("shown.bs.modal",function(){e.modalOpened(t(this))}),t(document).on("click",NestedPages.selectors.cancelNewChildButton,function(a){a.preventDefault(),e.cancelNewPage(),t(NestedPages.selectors.newPageModal).modal("hide")})},e.openModal=function(){var a=t(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm);t(a).addClass("in-modal"),t(NestedPages.selectors.newPageModal).find(".modal-body").html(a),t(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),t(NestedPages.selectors.newPageModal).find(".page_parent_id").val(e.parent_id),t(NestedPages.selectors.newPageModal).modal("show")},e.modalOpened=function(e){t(e).find(".np_title").focus(),t(e).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},e.openQuickEdit=function(a){var s=t(a).closest(NestedPages.selectors.row).parent("li"),n=t(NestedPages.selectors.newPageFormContainer).clone();if(t(s).children("ol").length>0){var o=t(s).children("ol");t(n).insertBefore(o)}else t(n).appendTo(s);t(n).siblings(NestedPages.selectors.row).hide(),e.formatter.showQuickEdit(),t(n).find(".parent_name").html("<em>Parent:</em> "+t(a).attr("data-parentname")),t(n).find(".page_parent_id").val(t(a).attr("data-id")),t(n).show(),t(n).find(".np_title").focus(),t(n).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},e.cancelNewPage=function(){e.formatter.removeQuickEdit(),t(NestedPages.selectors.newChildError).hide(),t(NestedPages.selectors.newPageModal).find(".modal-body").empty(),t(NestedPages.selectors.sortable).find(".new-child").remove(),t(NestedPages.selectors.row).show()},e.addTitleField=function(e){var a=t(e).parents("form"),s=t(e).siblings(".new-page-titles").children("li").length+1,n='<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="" tabindex="'+s+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';t(e).siblings(".new-page-titles").append(n);t(a).find(".np_title").last().focus(),t(a).find(NestedPages.selectors.newPageTitle).prop("tabindex",s++),t(".new-page-titles").sortable({items:"li",handle:".handle"})},e.removeTitleField=function(e){t(e).parents(".new-child-row").parent("li").remove()},e.submitForm=function(a){e.toggleLoading(!0),e.form=t(a).parents("form");var s=!!t(a).hasClass("add-edit");t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).serialize()+"&action="+NestedPages.formActions.newPage+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){if("error"===a.status)return e.toggleLoading(!1),void t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show();if(s===!0){var n=a.new_pages[0].edit_link;return n=n.replace(/&amp;/g,"&"),void window.location.replace(n)}e.toggleLoading(!1),e.posts=a.new_pages,e.addPosts()},error:function(a){console.log(a),e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},e.addPosts=function(){var a=t(e.form).parent(".new-child").parent(".page-row");if(0===t(a).children("ol").length&&t(a).append('<ol class="nplist"></ol>'),t(e.form).hasClass("in-modal"))var s=t(".nplist.sortable li.page-row:first");else var s=t(a).children("ol");for(i=0;i<e.posts.length;i++)e.appendRows(s,e.posts[i]);t(s).show(),e.formatter.updateSubMenuToggle(),e.cancelNewPage(),t(NestedPages.selectors.newPageModal).modal("hide")},e.appendRows=function(e,a){var s='<li id="menuItem_'+a.id+'" class="page-row';"publish"===a.status&&(s+=" published"),s+='">',NestedPages.jsData.hierarchical?(s+='<div class="row">',s+='<div class="child-toggle"></div>'):(s+='<div class="row non-hierarchical">',s+='<div class="non-hierarchical-spacer"></div>'),s+='<div class="row-inner">',s+='<i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i>',s+='<a href="'+a.edit_link+'" class="page-link page-title">',s+='<span class="title">'+a.title+"</span>",s+="Publish"!==a.status?'<span class="status">('+a.status+")</span>":'<span class="status"></span>',s+='<span class="nav-status">',"hide"===a.np_nav_status&&(s+=" "+nestedpages.hidden),s+="</span>",s+='<span class="edit-indicator"><i class="np-icon-pencil"></i>Edit</span>',s+="</a>",NestedPages.jsData.hierarchical||(s+='<div class="np-post-columns">',s+='<ul class="np-post-info">',s+='<li><span class="np-author-display">'+a.author_formatted+"</span></li>",s+="<li>"+a.date_formatted+"</li>",s+="</ul>",s+="</div>"),t(".nplist").first().hasClass("has-yoast")&&(s+='<span class="np-seo-indicator na"></span>'),s+='<div class="action-buttons">',s+='<a href="#" class="np-btn open-redirect-modal" data-parentid="'+a.id+'"><i class="np-icon-link"></i></a>',s+='<a href="#" class="np-btn add-new-child" data-id="'+a.id+'" data-parentname="'+a.title+'">'+nestedpages.add_child_short+"</a>",s+='<a href="#" class="np-btn np-quick-edit" data-id="'+a.id+'" data-template="'+a.page_template+'" data-title="'+a.title+'" data-slug="'+a.slug+'" data-commentstatus="closed" data-status="'+a.status.toLowerCase()+'" data-np-status="show"\tdata-navstatus="show" data-author="'+a.author+'" data-template="'+a.template+'" data-month="'+a.month+'" data-day="'+a.day+'" data-year="'+a.year+'" data-hour="'+a.hour+'" data-minute="'+a.minute+'" data-datepicker="'+a.datepicker+'" data-time="'+a.time+'" data-formattedtime="'+a.formattedtime+'" data-ampm="'+a.ampm+'">'+nestedpages.quick_edit+"</a>",s+='<a href="'+a.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",s+='<a href="'+a.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',s+="</div><!-- .action-buttons -->",s+="</div><!-- .row-inner --></div><!-- .row -->",s+="</li>",t(e).append(s)},e.toggleLoading=function(e){return e?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.QuickEditPost=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.button="",e.initialData="",e.parent_li="",e.form="",e.flatTerms="",e.termNames="",e.saveButton="",e.newData="",e.row="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditOpen,function(a){a.preventDefault(),e.button=t(this),e.openForm()}),t(document).on("click",NestedPages.selectors.quickEditCancel,function(t){t.preventDefault(),e.formatter.removeQuickEdit()}),t(document).on("click",NestedPages.selectors.quickEditToggleTaxonomies,function(e){e.preventDefault(),t(this).parents("form").find(".np-taxonomies").toggle()}),t(document).on("click",NestedPages.selectors.quickEditToggleMenuOptions,function(e){e.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",NestedPages.selectors.quickEditSaveButton,function(a){a.preventDefault(),e.saveButton=t(this),e.save()}),t(document).on("keydown",function(t){27===t.keyCode&&e.formatter.removeQuickEdit()})},e.openForm=function(){e.setInitialData(),e.createForm(),e.populateForm(),e.populateFlatTaxonomies()},e.setInitialData=function(){e.initialData={id:t(e.button).attr("data-id"),title:t(e.button).attr("data-title"),slug:t(e.button).attr("data-slug"),author:t(e.button).attr("data-author"),cs:t(e.button).attr("data-commentstatus"),status:t(e.button).attr("data-status"),template:t(e.button).attr("data-template"),month:t(e.button).attr("data-month"),day:t(e.button).attr("data-day"),year:t(e.button).attr("data-year"),hour:t(e.button).attr("data-hour"),minute:t(e.button).attr("data-minute"),navstatus:t(e.button).attr("data-navstatus"),npstatus:t(e.button).attr("data-np-status"),navtitle:t(e.button).attr("data-navtitle"),navtitleattr:t(e.button).attr("data-navtitleattr"),navcss:t(e.button).attr("data-navcss"),linktarget:t(e.button).attr("data-linktarget"),password:t(e.button).attr("data-password"),datepicker:t(e.button).attr("data-datepicker"),time:t(e.button).attr("data-formattedtime"),timeTwentyFour:t(e.button).attr("data-time"),ampm:t(e.button).attr("data-ampm"),timeFormat:t(e.button).attr("data-timeformat")},e.initialData.h_taxonomies=[],e.initialData.f_taxonomies=[],e.parent_li=t(e.button).closest(NestedPages.selectors.row).parent("li");var a=t(e.parent_li).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&e.initialData.h_taxonomies.push(a[i]),"inf-"===a[i].substring(0,4)&&e.initialData.f_taxonomies.push(a[i])},e.createForm=function(){if(e.form=t(NestedPages.selectors.quickEditPostForm).clone(),t(e.parent_li).children("ol").length>0){var a=t(e.parent_li).children("ol");t(e.form).insertBefore(a)}else t(e.form).appendTo(e.parent_li);t(e.form).siblings(NestedPages.selectors.row).hide(),t(e.form).show()},e.populateForm=function(){if(t(e.form).find(".page_id").html("<em>ID:</em> "+e.initialData.id),t(e.form).find(".np_id").val(e.initialData.id),t(e.form).find(".np_title").val(e.initialData.title),t(e.form).find(".np_slug").val(e.initialData.slug),t(e.form).find(".np_author select").val(e.initialData.author),t(e.form).find(".np_status").val(e.initialData.status),t(e.form).find(".np_nav_title").val(e.initialData.navtitle),t(e.form).find(".np_title_attribute").val(e.initialData.navtitleattr),t(e.form).find(".np_nav_css_classes").val(e.initialData.navcss),t(e.form).find(".post_password").val(e.initialData.password),t(e.form).find(".np_datepicker").val(e.initialData.datepicker),"open"===e.initialData.cs&&t(e.form).find(".np_cs").attr("checked","checked"),""!==e.initialData.template?t(e.form).find(".np_template").val(e.initialData.template):t(e.form).find(".np_template").val("default"),"private"===e.initialData.status&&(t(e.form).find(".post_password").attr("readonly",!0),t(e.form).find(".keep_private").attr("checked",!0)),"hide"===e.initialData.npstatus?t(e.form).find(".np_status").attr("checked","checked"):t(e.form).find(".np_status").removeAttr("checked"),"hide"===e.initialData.navstatus?t(e.form).find(".np_nav_status").attr("checked","checked"):t(e.form).find(".np_nav_status").attr("checked",!1),"_blank"===e.initialData.linktarget?t(e.form).find(".link_target").attr("checked","checked"):t(e.form).find(".link_target").attr("checked",!1),"private"===e.initialData.status&&t(e.form).find(".np_status").val("publish"),"H:i"===e.initialData.timeFormat?t(e.form).find(".np_time").val(e.initialData.timeTwentyFour):(t(e.form).find(".np_time").val(e.initialData.time),t(e.form).find(".np_ampm").val(e.initialData.ampm),t(e.form).find('select[name="mm"]').val(e.initialData.month),t(e.form).find('input[name="jj"]').val(e.initialData.day),t(e.form).find('input[name="aa"]').val(e.initialData.year),t(e.form).find('input[name="hh"]').val(e.initialData.hour),t(e.form).find('input[name="mn"]').val(e.initialData.minute)),e.initialData.hasOwnProperty("h_taxonomies")){var a=e.initialData.h_taxonomies;for(i=0;i<a.length;i++){var s="#"+a[i];t(e.form).find(s).attr("checked","checked")}}t(e.form).find(".np_datepicker").datepicker({beforeShow:function(e,a){t("#ui-datepicker-div").addClass("nestedpages-datepicker")}}),e.formatter.showQuickEdit(),t(e.form).show()},e.populateFlatTaxonomies=function(){e.initialData.hasOwnProperty("f_taxonomies")&&(e.createTaxonomyObject(),e.getTermNames(),e.setWPSuggest())},e.createTaxonomyObject=function(){var t={};for(i=0;i<e.initialData.f_taxonomies.length;i++){var a=e.initialData.f_taxonomies[i],s=a.split("-"),n=s.indexOf("nps"),o=s.splice(n+1);o=o.join("-");var r=a.split("-").splice(0,n);r.shift("inf");var d=r.join("-");d in t||(t[d]=[]);var l=t[d];l.push(o)}e.flatTerms=t},e.getTermNames=function(){t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:e.flatTerms},success:function(t){e.termNames=t.terms,e.populateFlatTaxonomyFields()}})},e.populateFlatTaxonomyFields=function(){e.termNames&&t.each(e.termNames,function(e,a){var s=t("#"+e+"-quickedit");t(s).val(a.join(","))})},e.setWPSuggest=function(){var a=t(e.form).find("[data-autotag]");t.each(a,function(e,a){var s=t(this).attr("data-taxonomy");t(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+s,{multiple:!0,multipleSep:","})})},e.save=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){"error"===a.status?(e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show()):(e.toggleLoading(!1),e.newData=a.post_data,e.updatePostRow())},error:function(e){console.log(e)}})},e.updatePostRow=function(){e.row=t(e.button).parents(".row-inner"),t(e.row).find(".title").text(e.newData.post_title),t(e.row).find(".np-view-button").attr("href",e.newData.permalink);var a=t(e.row).find(".status");if("publish"!==e.newData._status&&"future"!==e.newData._status?t(a).text("("+e.newData._status+")"):"private"===e.newData.keep_private?t(a).text("("+e.newData.keep_private+")"):t(a).text(""),""!==e.newData.post_password&&"undefined"!=typeof e.newData.post_password){var s=t(a).text();s+=' <i class="np-icon-lock"></i>',t(a).html(s)}var n=t(e.row).find(".nav-status");"hide"==e.newData.nav_status?t(n).text("(Hidden)"):t(n).text("");var o=t(e.row).parent("li");"hide"==e.newData.np_status?(t(o).addClass("np-hide"),t(e.row).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(e.row).find(".np-icon-eye-blocked").remove()),NestedPages.jsData.hierarchical||t(e.row).find(".np-author-display").text(e.newData.author_name);var i=t(e.row).find(NestedPages.selectors.quickEditOpen);t(i).attr("data-id",e.newData.post_id),t(i).attr("data-template",e.newData.page_template),t(i).attr("data-title",e.newData.post_title),t(i).attr("data-slug",e.newData.post_name),t(i).attr("data-commentstatus",e.newData.comment_status),t(i).attr("data-status",e.newData._status),"private"===e.newData.keep_private&&t(i).attr("data-status","private"),t(i).attr("data-author",e.newData.post_author),t(i).attr("data-np-status",e.newData.np_status),
2
+ t(i).attr("data-password",e.newData.post_password),t(i).attr("data-navstatus",e.newData.nav_status),t(i).attr("data-navtitle",e.newData.np_nav_title),t(i).attr("data-linktarget",e.newData.link_target),t(i).attr("data-navtitleattr",e.newData.np_title_attribute),t(i).attr("data-navcss",e.newData.np_nav_css_classes),t(i).attr("data-month",e.newData.mm),t(i).attr("data-day",e.newData.jj),t(i).attr("data-year",e.newData.aa),t(i).attr("data-hour",e.newData.hh),t(i).attr("data-minute",e.newData.mn),t(i).attr("data-datepicker",e.newData.np_date),t(i).attr("data-time",e.newData.np_time),t(i).attr("data-formattedtime",e.newData.np_time),t(i).attr("data-ampm",e.newData.np_ampm),e.removeTaxonomyClasses(),e.addCategoryClasses(),e.addHierarchicalClasses(),e.addFlatClasses(),e.addStatusClass(),e.formatter.removeQuickEdit(),e.formatter.flashRow(e.row)},e.addStatusClass=function(){var a=["published","draft","pending","future"];for(i=0;i<a.length;i++)t(e.row).removeClass(a[i]);t(e.row).addClass(e.newData._status)},e.removeTaxonomyClasses=function(){taxonomies=[];var a=t(e.row).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&t(e.row).removeClass(a[i]),"inf-"===a[i].substring(0,4)&&t(e.row).removeClass(a[i])},e.addCategoryClasses=function(){if(e.newData.hasOwnProperty("post_category")){var a=e.newData.post_category;for(i=0;i<a.length;i++){var s="in-category-"+a[i];t(e.row).addClass(s)}}},e.addHierarchicalClasses=function(){if(e.newData.hasOwnProperty("tax_input")){var a=e.newData.tax_input;t.each(a,function(a,s){for(i=0;i<s.length;i++){var n="in-"+a+"-"+s[i];t(e.row).addClass(n)}})}},e.addFlatClasses=function(){if(e.newData.hasOwnProperty("flat_tax")){var a=e.newData.flat_tax;t.each(a,function(a,s){for(i=0;i<s.length;i++){var n="inf-"+a+"-nps-"+s[i];t(e.row).addClass(n)}})}},e.toggleLoading=function(a){return a?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(e.saveButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(e.saveButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.QuickEditLink=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.button="",e.postData="",e.newPostData="",e.form="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditButtonLink,function(a){a.preventDefault(),e.formatter.removeQuickEdit(),e.button=t(this),e.openQuickEdit()}),t(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(t){t.preventDefault(),e.submitForm()}),t(document).on("keydown",function(t){27===t.keyCode&&e.formatter.removeQuickEdit()})},e.openQuickEdit=function(){e.setData(),e.createForm(),e.populateForm()},e.setData=function(){e.postData={id:t(e.button).attr("data-id"),url:t(e.button).attr("data-url"),title:t(e.button).attr("data-title"),status:t(e.button).attr("data-status"),navstatus:t(e.button).attr("data-navstatus"),npstatus:t(e.button).attr("data-np-status"),linktarget:t(e.button).attr("data-linktarget"),parentid:t(e.button).attr("data-parentid"),navtitleattr:t(e.button).attr("data-navtitleattr"),navcss:t(e.button).attr("data-navcss"),navtype:t(e.button).attr("data-nav-type"),navobject:t(e.button).attr("data-nav-object"),navobjectid:t(e.button).attr("data-nav-object-id"),navoriginallink:t(e.button).attr("data-nav-original-link"),navoriginaltitle:t(e.button).attr("data-nav-original-title")}},e.createForm=function(){var a=t(e.button).closest(NestedPages.selectors.row).parent("li");if(e.form=t(NestedPages.selectors.quickEditLinkForm).clone(),t(a).children("ol").length>0){var s=t(a).children("ol");t(e.form).insertBefore(s)}else t(e.form).appendTo(a);t(e.form).siblings(NestedPages.selectors.row).hide()},e.populateForm=function(){if(t(e.form).find(".np_id").val(e.postData.id),t(e.form).find(".np_title").val(e.postData.title),t(e.form).find(".np_author select").val(e.postData.author),t(e.form).find(".np_status").val(e.postData.status),t(e.form).find(".np_content").val(e.postData.url),t(e.form).find(".np_parent_id").val(e.postData.parentid),t(e.form).find(".np_title_attribute").val(e.postData.navtitleattr),t(e.form).find(".np_nav_css_classes").val(e.postData.navcss),"hide"===e.postData.npstatus?t(e.form).find(".np_status").prop("checked","checked"):t(e.form).find(".np_status").removeAttr("checked"),"hide"===e.postData.navstatus?t(e.form).find(".np_nav_status").prop("checked","checked"):t(e.form).find(".np_nav_status").removeAttr("checked"),"_blank"===e.postData.linktarget?t(e.form).find(".link_target").prop("checked","checked"):t(e.form).find(".link_target").removeAttr("checked"),"custom"!==e.postData.navobject&&""!==e.postData.navobject){var a='<div class="form-control original-link">Original: <a href="'+e.postData.navoriginallink+'" target="_blank">'+e.postData.navoriginaltitle+"</a></div>";t(e.form).find("[data-url-field]").remove(),t(a).insertAfter(t(e.form).find("h3")),t(e.form).find("[data-np-menu-object-input]").val(e.postData.navobject),t(e.form).find("[data-np-menu-objectid-input]").val(e.postData.navobjectid),t(e.form).find("[data-np-menu-type-input]").val(e.postData.navtype),t(e.form).find("h3").text("Link: "+e.postData.navoriginaltitle)}else t(e.form).find("h3").text("Link"),t(e.form).find("[data-np-menu-object-input]").val("custom"),t(e.form).find("[data-np-menu-type-input]").val("custom");e.formatter.showQuickEdit(),t(e.form).show()},e.submitForm=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:t(e.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(a){"error"===a.status?(e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text(a.message).show()):(e.toggleLoading(!1),e.newPostData=a.post_data,e.updateRow())},error:function(a){e.toggleLoading(!1),t(e.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},e.updateRow=function(){console.log(e.newPostData);var a=t(e.form).siblings(".row");t(a).find(".title").html(e.newPostData.post_title+' <i class="np-icon-link"></i>');var s=t(a).find(".status");"publish"!==e.newPostData._status&&"future"!==e.newPostData._status?t(s).text("("+e.newPostData._status+")"):t(s).text("");var n=t(a).find(".nav-status");"hide"==e.newPostData.nav_status?t(n).text("("+NestedPages.jsData.hiddenText+")"):t(n).text("");var o=t(a).parent("li");"hide"==e.newPostData.np_status?(t(o).addClass("np-hide"),t(a).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(a).find(".np-icon-eye-blocked").remove());var i=t(a).find(NestedPages.selectors.quickEditButtonLink);t(i).attr("data-id",e.newPostData.post_id),t(i).attr("data-title",e.newPostData.post_title),t(i).attr("data-url",e.newPostData.post_content),t(i).attr("data-status",e.newPostData._status),t(i).attr("data-navstatus",e.newPostData.nav_status),t(i).attr("data-np-status",e.newPostData.np_status),t(i).attr("data-linkTarget",e.newPostData.linkTarget),t(i).attr("data-navtitleattr",e.newPostData.titleAttribute),t(i).attr("data-navcss",e.newPostData.cssClasses),e.formatter.removeQuickEdit(),e.formatter.flashRow(a)},e.toggleLoading=function(e){return t(".row").removeClass("np-updated").removeClass("np-updated-show"),e?(t(NestedPages.selectors.quickEditErrorDiv).hide(),t(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void t(NestedPages.selectors.quickEditLoadingIndicator).show()):(t(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),void t(NestedPages.selectors.quickEditLoadingIndicator).hide())},e.init()};var NestedPages=NestedPages||{};NestedPages.Clone=function(){var e=this,t=jQuery;return e.parent_id="",e.parent_title="",e.parentLi=null,e.formatter=new NestedPages.Formatter,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.cloneButton,function(a){a.preventDefault(),e.parent_id=t(this).attr("data-id"),e.parent_title=t(this).attr("data-parentname"),e.parentLi=t(this).parent(".row").parent(".page-row").parent(".npList"),e.openModal()}),t(document).on("click",NestedPages.selectors.confirmClone,function(t){t.preventDefault(),e.clone()})},e.openModal=function(){t(NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(e.parent_title),t(NestedPages.selectors.cloneModal).modal("show")},e.clone=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:e.parent_id,quantity:t(NestedPages.selectors.cloneQuantity).val(),status:t(NestedPages.selectors.cloneStatus).val(),author:t(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(a){e.toggleLoading(!1),t(NestedPages.selectors.cloneModal).modal("hide"),location.reload()}})},e.toggleLoading=function(e){return e?(t(NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void t(NestedPages.selectors.confirmClone).attr("disabled","disabled")):(t(NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),void t(NestedPages.selectors.confirmClone).attr("disabled",!1))},e.init()};var NestedPages=NestedPages||{};NestedPages.Tabs=function(){var e=this,t=jQuery;return e.activeContent="",e.activeButton="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.tabButton,function(a){a.preventDefault(),e.activeButton=t(this),e.toggleTabs()})},e.toggleTabs=function(){e.activeContent=t(e.activeButton).attr("href"),t(NestedPages.selectors.tabContent).hide(),t(e.activeContent).show(),t(e.activeButton).parents(NestedPages.selectors.tabButtonParent).find(NestedPages.selectors.tabButton).removeClass("active"),t(e.activeButton).addClass("active")},e.init()},jQuery(document).ready(function(){new NestedPages.Factory});var NestedPages=NestedPages||{};NestedPages.selectors={childToggle:".child-toggle",childToggleLink:".child-toggle a",toggleAll:".nestedpages-toggleall",toggleHidden:".np-toggle-hidden",toggleStatus:".np-toggle-publish",lists:".nplist",rows:".page-row",row:".row",sortable:".sortable",notSortable:".no-sort",handle:".handle",published:".published",hiddenRows:".np-hide",errorDiv:"#np-error",loadingIndicator:"#nested-loading",syncCheckbox:".np-sync-menu",syncForm:".np-sync-menu-cont",ajaxError:"[data-nestedpages-error]",toggleEditButtons:".np-toggle-edit",bulkActionsHeader:".nestedpages-list-header",bulkActionsForm:"[data-np-bulk-form]",bulkActionsCheckbox:"[data-np-bulk-checkbox]",bulkActionsIds:"[data-np-bulk-ids]",bulkActionRedirectIds:"[data-np-bulk-redirect-ids]",hiddenItemCount:"[data-np-hidden-count]",hiddenItemCountParent:"[data-np-hidden-count-parent]",bulkEditForm:"[data-np-bulk-edit-form]",bulkEditTitles:"[data-np-bulk-titles]",bulkEditRemoveItem:"[data-np-remove-bulk-item]",bulkEditCancel:"[data-np-cancel-bulk-edit]",bulkEditLinkCount:"[data-bulk-edit-link-count]",quickEditOverlay:".np-inline-overlay",quickEditLoadingIndicator:".np-qe-loading",quickEditErrorDiv:".np-quickedit-error",quickEditCancel:".np-cancel-quickedit",quickEditToggleTaxonomies:".np-toggle-taxonomies",quickEditToggleMenuOptions:".np-toggle-menuoptions",quickEditButtonLink:".np-quick-edit-redirect",quickEditLinkForm:".quick-edit-form-redirect",quickEditLinkSaveButton:".np-save-quickedit-redirect",quickEditOpen:".np-quick-edit",quickEditPostForm:".quick-edit-form",quickEditSaveButton:".np-save-quickedit",openLinkModal:".open-redirect-modal",linkModal:"#np-link-modal",saveLink:".np-save-link",linkLoadingIndicator:".np-link-loading",linkErrorDiv:".np-new-link-error",linkForm:".np-new-link-form",linkDeleteButton:"[data-np-confirm-delete]",linkDeleteConfirmationButton:"[data-delete-confirmation]",linkDeleteConfirmationModal:"#np-delete-confirmation-modal",linkDeleteConfirmationModalText:"[data-np-link-delete-text]",openPageModal:".open-bulk-modal",newPageModal:"#np-bulk-modal",newPageFormContainer:".new-child-form",newPageForm:".np-new-child-form",newPageSubmitButton:".np-save-newchild",newPageTitle:".add-new-child-row",newPageRemoveTitle:".np-remove-child",addChildButton:".add-new-child",newChildError:".np-newchild-error",cancelNewChildButton:".np-cancel-newchild",cloneButton:".clone-post",confirmClone:"[data-confirm-clone]",cloneModal:"#np-clone-modal",cloneQuantity:"[data-clone-quantity]",cloneStatus:"[data-clone-status]",cloneAuthor:"[data-clone-author]",tabButtonParent:"[data-np-tabs]",tabButton:"[data-np-tab]",tabContent:"[data-np-tab-pane]",thumbnailContainer:".np-thumbnail",thumbnailContainerLink:".np-thumbnail.link",manualMenuSync:"[data-np-manual-menu-sync]",manualOrderSync:"[data-np-manual-order-sync]"},NestedPages.cssClasses={iconToggleDown:"np-icon-arrow-down",iconToggleRight:"np-icon-arrow-right",noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,sortable:!0,hierarchical:!0,expandText:nestedpages.expand_text,collapseText:nestedpages.collapse_text,showHiddenText:nestedpages.show_hidden,hideHiddenText:nestedpages.hide_hidden,quickEditText:nestedpages.quick_edit,hiddenText:nestedpages.hidden,titleText:nestedpages.title},NestedPages.formActions={syncToggles:"npnestToggle",syncNesting:"npsort",syncMenu:"npsyncMenu",newPage:"npnewChild",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem",manualMenuSync:"npmanualMenuSync",postSearch:"nppostSearch"},NestedPages.Factory=function(){var e=this,t=jQuery;return e.formatter=new NestedPages.Formatter,e.responsive=new NestedPages.Responsive,e.checkAll=new NestedPages.CheckAll,e.bulkActions=new NestedPages.BulkActions,e.menuToggle=new NestedPages.MenuToggle,e.pageToggle=new NestedPages.PageToggle,e.nesting=new NestedPages.Nesting,e.syncMenuSetting=new NestedPages.SyncMenuSetting,e.newPage=new NestedPages.NewPage,e.quickEditLink=new NestedPages.QuickEditLink,e.quickEditPost=new NestedPages.QuickEditPost,e.clone=new NestedPages.Clone,e.tabs=new NestedPages.Tabs,e.menuLinks=new NestedPages.MenuLinks,e.hiddenItemCount=new NestedPages.HiddenItemCount,e.confirmDelete=new NestedPages.ConfirmDelete,e.manualSync=new NestedPages.ManualSync,e.postSearch=new NestedPages.PostSearch,e.init=function(){nestedpages.settings_page||(e.bindEvents(),e.setPostType(),e.setMenuSync(),e.setNestable(),e.setSortable(),e.formatter.updateSubMenuToggle(),e.formatter.setBorders(),e.formatter.setNestedMargins(),e.nesting.initializeSortable())},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.quickEditOverlay,function(t){e.formatter.removeQuickEdit(),e.newPage.cancelNewPage()}),t(document).ready(function(){e.formatter.hideAjaxError(),e.formatter.sizeLinkThumbnails()})},e.setNestable=function(){var e=!1;t.each(NestedPages.jsData.allPostTypes,function(t,a){a.name===NestedPages.jsData.posttype&&(a.hierarchical===!0&&(e=!0),a.disable_nesting===!0&&(e=!1))}),NestedPages.jsData.nestable=e},e.setSortable=function(){var e=!0;t.each(NestedPages.jsData.allPostTypes,function(t,a){a.name===NestedPages.jsData.posttype&&"undefined"!=typeof a.disable_sorting&&""!==a.disable_sorting&&"true"===a.disable_sorting&&(e=!1)}),NestedPages.jsData.sortable=e},e.setPostType=function(){NestedPages.jsData.posttype=nestedpages.current_post_type,"undefined"!=typeof NestedPages.jsData.posttype&&""!==NestedPages.jsData.posttype||(NestedPages.jsData.posttype=t(NestedPages.selectors.sortable).attr("id").substring(3)),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},e.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuLinks=function(){var e=this,t=jQuery;return e.typeButton="",e.post="",e.formatter=new NestedPages.Formatter,e.selectors={form:"[data-np-menu-item-form]",typeSelect:"[data-np-menu-selection]",accordion:"[data-np-menu-accordion]",accordionItem:"[data-np-menu-accordion-item]",formPlaceholder:".np-menu-link-object-placeholder",formDetails:".np-menu-link-details",searchResults:"[data-np-search-result]",defaultResults:"[data-default-result]",originalLink:"[data-np-original-link]",saveButton:"[data-np-save-link]",urlInputCont:"[data-np-menu-url-cont]",errorDiv:"[data-np-error]"},e.fields={object:"[data-np-menu-object-input]",objectid:"[data-np-menu-objectid-input]",itemType:"[data-np-menu-type-input]",url:"[data-np-menu-url]",navigationLabel:"[data-np-menu-navigation-label]",titleAttribute:"[data-np-menu-title-attr]",cssClasses:"[data-np-menu-css-classes]",npStatus:"[data-np-menu-np-status]",linkTarget:"[data-np-menu-link-target]",menuTitle:"[data-np-menu-title]"},e.search=new NestedPages.MenuSearch,e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",NestedPages.selectors.openLinkModal,function(a){a.preventDefault(),e.postParent=t(this).attr("data-parentid"),t(e.selectors.form).find(".parent_id").val(t(this).attr("data-parentid")),e.openModal()}),t(document).on("click",e.selectors.accordionItem,function(a){a.preventDefault(),e.accordion(t(this))}),t(document).on("click",e.selectors.typeSelect,function(a){a.preventDefault(),e.typeButton=t(this),e.setLinkType()}),t(document).on("keyup",e.fields.navigationLabel,function(){e.updateTitle()}),t(document).on("click",e.selectors.saveButton,function(t){t.preventDefault(),e.submitForm()}),t(document).on("keydown",function(e){27===e.keyCode&&t("#np-link-modal").modal("hide")})},e.openModal=function(){t(NestedPages.selectors.linkErrorDiv).hide(),t(NestedPages.selectors.linkModal).find("input").val(""),t(NestedPages.selectors.linkModal).find(".parent_id").val(e.postParent),e.clearForm(),t(e.selectors.accordion).find("ul").hide(),t(e.selectors.typeSelect).removeClass("active"),t(NestedPages.selectors.linkModal).modal("show")},e.accordion=function(a){e.clearForm();var s=t(a).siblings("ul");return t(s).is(":visible")?(t(a).removeClass("active"),void t(s).slideUp("fast")):(t(e.selectors.accordionItem).removeClass("active"),t(a).addClass("active"),t(a).parents(e.selectors.accordion).find("ul").slideUp("fast"),void t(s).slideDown("fast"))},e.setLinkType=function(){return t(e.typeButton).hasClass("active")?void e.clearForm():(t(e.typeButton).hasClass("np-custom-link")&&(t(e.selectors.accordionItem).removeClass("active"),t(e.selectors.accordion).find("ul").slideUp("fast")),t(e.selectors.formPlaceholder).hide(),void e.populateForm())},e.populateForm=function(){t(e.selectors.saveButton).show(),t(e.selectors.typeSelect).removeClass("active"),t(e.typeButton).addClass("active"),t(e.fields.menuTitle).text(t(e.typeButton).text()).val(t(e.typeButton).text()),t(e.selectors.form).find("h3").find("em").text(t(e.typeButton).attr("data-np-object-name")),""!==t(e.typeButton).attr("data-np-permalink")?(t(e.selectors.form).find(e.selectors.urlInputCont).hide(),t(e.selectors.form).find(e.selectors.originalLink).html('<a href="'+t(e.typeButton).attr("data-np-permalink")+'">'+t(e.typeButton).text()+"</a>"),t(e.selectors.form).find(e.selectors.originalLink).parent(".original-link").show()):(t(e.selectors.form).find(e.selectors.urlInputCont).show(),t(e.selectors.form).find(e.selectors.originalLink).parent(".original-link").hide()),t(e.fields.object).val(t(e.typeButton).attr("data-np-menu-object")),t(e.fields.objectid).val(t(e.typeButton).attr("data-np-menu-objectid")),t(e.fields.itemType).val(t(e.typeButton).attr("data-np-menu-type")),t(e.selectors.formDetails).show()},e.clearForm=function(){t(e.selectors.form).find(e.selectors.errorDiv).hide(),t(e.selectors.saveButton).hide(),t(e.selectors.formDetails).hide(),t(e.selectors.formPlaceholder).show(),t(e.selectors.form).find("input").not(".parent_id").val(""),t(e.selectors.form).find(e.fields.linkTarget).val("_blank"),t(e.selectors.form).find('input[type="checkbox"]').attr("checked",!1),t(e.selectors.typeSelect).removeClass("active"),e.search.toggleLoading(!1),t(e.selectors.searchResults).remove(),t(e.selectors.defaultResults).show()},e.updateTitle=function(){var a=t(e.fields.navigationLabel).val(),s=t(e.selectors.form).find("h3").find("span");""!==a?(t(e.fields.menuTitle).val(a),t(s).text(a)):(t(e.fields.menuTitle).val(t(e.typeButton).text()),t(s).text(t(e.typeButton).text()))},e.submitForm=function(){e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:t(e.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(a){return e.toggleLoading(!1),"error"===a.status?void t(e.selectors.form).find(e.selectors.errorDiv).text(a.message).show():(e.post=a.post_data,void e.createRow())},error:function(e){console.log(e)}})},e.createRow=function(){var a='<li id="menuItem_'+e.post.id+'" class="page-row published';a+='">',a+='<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="'+e.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+e.post.menuTitle+' <i class="np-icon-link"></i></span>',a+='</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" ',a+='data-id="'+e.post.id+'"',a+='data-parentid="'+e.post.parent_id+'"',a+='data-title="'+e.post.menuTitle+'" ',a+='data-url="'+e.post.url+'" ',a+='data-status="publish" ',a+='data-np-status="show" ',a+='data-navstatus="show" ',a+='data-navcss="'+e.post.cssClasses+'" ',a+='data-navtitleattr="'+e.post.titleAttribute+'" ',a+='data-nav-type="'+e.post.menuType+'" ',a+='data-nav-object="'+e.post.objectType+'" ',a+='data-nav-object-id="'+e.post.objectId+'" ',a+='data-nav-original-link="'+e.post.original_link+'" ',a+='data-nav-original-title="'+e.post.original_title+'" ',a+='data-linktarget="'+e.post.link_target+'">',a+=NestedPages.jsData.quickEditText,a+="</a>",a+='<a href="'+e.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',a+="</div></div></div></li>","0"===e.post.parent_id?t(".nplist:first li:first").after(a):e.appendChildRow(a),t(NestedPages.selectors.linkModal).modal("hide"),e.row=t("#menuItem_"+e.post.id).find(".row"),e.formatter.flashRow(e.row)},e.appendChildRow=function(a){var s=t("#menuItem_"+e.post.parent_id);0===t(s).children("ol").length?(a='<ol class="sortable nplist" style="display:block;">'+a+"</ol>",t(s).append(a)):t(s).find("ol:first").prepend(a),e.formatter.updateSubMenuToggle()},e.toggleLoading=function(a){return a?(t(e.selectors.form).find(e.selectors.errorDiv).hide(),t(e.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void t(e.selectors.saveButton).attr("disabled","disabled")):(t(e.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),void t(e.selectors.saveButton).attr("disabled",!1))},e.init()};var NestedPages=NestedPages||{};NestedPages.MenuSearch=function(){var e=this,t=jQuery;return e.selectors={searchForms:"*[data-np-menu-search]",defaultResults:"[data-default-result]",loadingIndicator:".np-menu-search-loading",noResults:".np-menu-search-noresults",searchType:"data-search-type",searchObject:"data-search-object",searchResults:"[data-np-search-result]"},e.activeForm="",e.results="",e.defaultResults="",e.searchType="",e.searchObject="",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("keyup",e.selectors.searchForms,function(){e.activeForm=t(this),t(e.selectors.searchResults).remove(),e.performSearch()})},e.performSearch=function(){return e.defaultResults=t(e.activeForm).parent("li").siblings(e.selectors.defaultResults),t(e.activeForm).val().length>2?(t(e.defaultResults).hide(),e.toggleLoading(!0),void e.query()):(e.toggleLoading(!1),void t(e.defaultResults).show())},e.query=function(){e.searchType=t(e.activeForm).attr(e.selectors.searchType),e.searchObject=t(e.activeForm).attr(e.selectors.searchObject),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:t(e.activeForm).val(),searchType:e.searchType,searchObject:e.searchObject},success:function(a){console.log(a),a.results?(e.results=a.results,e.toggleLoading(!1),"post_type"===e.searchType?e.appendPosts():e.appendTaxonomies()):(e.toggleLoading(!1),t(e.activeForm).siblings(e.selectors.noResults).show())}})},e.appendPosts=function(){var a="";t.each(e.results,function(t,s){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+e.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+s.ID+'" data-np-permalink="'+s.permalink+'" data-np-object-name="'+s.singular_name+'" data-np-menu-selection>'+s.post_title+"</a></li>"}),t(a).insertAfter(t(e.activeForm).parent("li")),e.toggleLoading(!1)},e.appendTaxonomies=function(){var a="";t.each(e.results,function(t,s){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+e.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+s.term_id+'" data-np-permalink="'+s.permalink+'" data-np-object-name="'+s.taxonomy+'" data-np-menu-selection>'+s.name+"</a></li>"}),t(a).insertAfter(t(e.activeForm).parent("li")),e.toggleLoading(!1)},e.toggleLoading=function(a){var s=t(e.activeForm).siblings(e.selectors.loadingIndicator);return t(e.selectors.noResults).hide(),a?void t(s).show():void t(s).hide()},e.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPagesTrash=function(){var e=this,t=jQuery;return e.trashButton=".np-empty-trash",e.confirmButton=".np-trash-confirm",e.warningModal="#np-trash-modal",e.errorAlert="#np-error",e.loadingIndicator="#nested-loading",e.trashLinks=".np-trash-links",e.postType=t("#np-trash-posttype").val(),e.nonce=nestedpages.np_nonce,e.formAction="npEmptyTrash",e.init=function(){e.bindEvents()},e.bindEvents=function(){t(document).on("click",e.trashButton,function(a){a.preventDefault(),t(e.warningModal).modal("show")}),t(document).on("click",e.confirmButton,function(t){t.preventDefault(),e.confirmEmpty()})},e.confirmEmpty=function(){e.loading(!0),t(e.warningModal).hide(),t(e.errorAlert).hide(),e.emptyTrash()},e.emptyTrash=function(){t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:e.formAction,nonce:e.nonce,posttype:e.postType},success:function(a){e.loading(!1),"error"===a.status?t(e.errorAlert).text(a.message).show():t(e.trashLinks).hide()}})},e.loading=function(a){return a?void t(e.loadingIndicator).show():void t(e.loadingIndicator).hide()},e.init()},NestedPages=NestedPages||{};NestedPages.ConfirmDelete=function(){var e=this,t=jQuery;return e.deleteLink="",e.bindEvents=function(){t(document).on("click",NestedPages.selectors.linkDeleteButton,function(a){a.preventDefault(),e.confirmSingle(t(this))}),t(document).on("click",NestedPages.selectors.linkDeleteConfirmationButton,function(a){return a.preventDefault(),t(this).hasClass("bulk")?void e.deleteMultiple():void e.deleteSingle()}),t(document).on("submit",NestedPages.selectors.bulkActionsForm,function(t){e.confirmMultiple(t)})},e.confirmSingle=function(a){e.deleteLink=t(a).attr("href"),t(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation_singular),t(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.delete).removeClass("bulk"),t(NestedPages.selectors.linkDeleteConfirmationModal).modal("show")},e.confirmMultiple=function(e){if("trash"===t('select[name="np_bulk_action"]').val()){var a=t(NestedPages.selectors.bulkActionRedirectIds).val();""!==a&&(e.preventDefault(),t(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation),t(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.trash_delete_links).addClass("bulk"),t(NestedPages.selectors.linkDeleteConfirmationModal).modal("show"))}},e.deleteMultiple=function(){t(NestedPages.selectors.bulkActionsForm)[0].submit()},e.deleteSingle=function(){window.location.replace(e.deleteLink)},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.ManualSync=function(){var e=this,t=jQuery;return e.activeBtn="",e.bindEvents=function(){t(document).on("click",NestedPages.selectors.manualMenuSync,function(a){a.preventDefault(),e.activeBtn=t(this),e.syncMenu()}),t(document).on("click",NestedPages.selectors.manualOrderSync,function(a){a.preventDefault(),e.activeBtn=t(this),e.syncOrder()})},e.syncMenu=function(){e.loading(!0),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.manualMenuSync,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:"sync"},success:function(a){"error"===a.status?(t(NestedPages.selectors.errorDiv).text(a.message).show(),t(NestedPages.selectors.loadingIndicator).hide()):e.loading(!1)}})},e.syncOrder=function(){e.loading(!0);var t=new NestedPages.Nesting;t.syncNesting(!0,e.loading(!1))},e.loading=function(a){return a?(t(e.activeBtn).addClass("disabled"),void t(NestedPages.selectors.loadingIndicator).show()):(t(e.activeBtn).removeClass("disabled"),void t(NestedPages.selectors.loadingIndicator).hide())},e.bindEvents()};var NestedPages=NestedPages||{};NestedPages.PostSearch=function(){var e=this,t=jQuery;return e.selectors={input:"data-nestedpages-post-search",form:"data-nestedpages-post-search-form",loadingIndicator:"data-nestedpages-loading",noResults:"data-nestedpages-no-results",results:"data-nestedpages-search-results"},e.changed=!1,e.activeInput="",e.results="",e.defaultResults="",e.postType="",e.activeForm="",e.bindEvents=function(){t("["+e.selectors.input+"]").on("input",function(){return e.activeInput=t(this),e.setOptions(),e.changed||e.setDefaultResults(),""===t(this).val()?(t(e.activeForm).find("["+e.selectors.noResults+"]").hide(),void e.showDefaultResults()):void e.query()})},e.setDefaultResults=function(){e.defaultResults=t(e.activeForm).find("["+e.selectors.results+"]").html(),e.changed=!0},e.showDefaultResults=function(){t(e.activeForm).find("["+e.selectors.results+"]").html(e.defaultResults)},e.setOptions=function(){e.postType=t(e.activeInput).attr(e.selectors.input),e.activeForm=t(e.activeInput).parents("["+e.selectors.form+"]")},e.performSearch=function(){return e.defaultResults=t(e.activeForm).parent("li").siblings(e.selectors.defaultResults),t(e.activeForm).val().length>2?(t(e.defaultResults).hide(),e.toggleLoading(!0),void e.query()):(e.toggleLoading(!1),void t(e.defaultResults).show())},e.query=function(){t(e.activeForm).find("["+e.selectors.results+"]").empty(),e.toggleLoading(!0),t.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.postSearch,nonce:NestedPages.jsData.nonce,term:t(e.activeInput).val(),postType:e.postType},success:function(a){a.results?(e.results=a.results,e.loadResults(),e.toggleLoading(!1)):(e.toggleLoading(!1),t(e.activeForm).find("["+e.selectors.noResults+"]").show())}})},e.loadResults=function(){var a="<ul>";t.each(e.results,function(e,t){a+='<li><a href="#" data-assignment-page-id="'+t.ID+'" data-assignment-page-title="'+t.post_title+'">'+t.post_title+"</a></li>"}),a+="</ul>",t(e.activeForm).find("["+e.selectors.results+"]").html(a),e.toggleLoading(!1)},e.toggleLoading=function(a){var s=t(e.activeForm).find("["+e.selectors.loadingIndicator+"]"),n=t(e.activeForm).find("["+e.selectors.noResults+"]");return t(n).hide(),a?void t(s).show():void t(s).hide()},e.bindEvents()};
assets/js/nestedpages.settings.min.js CHANGED
@@ -1 +1 @@
1
- var NestedPages=NestedPages||{};NestedPages.Settings=function(){var e=this,t=jQuery;return e.selectors={postTypeToggle:"[data-toggle-nestedpages-pt-settings]",postTypeCheckbox:"[data-nestedpages-pt-checkbox]",customFieldsCheckbox:"[data-toggle-nestedpages-cf-settings]",standardFieldsCheckbox:"[data-toggle-nestedpages-sf-settings]",taxonomiesFieldCheckbox:"[data-hide-taxonomies]",thumbnailsCheckbox:"[data-enable-thumbnails]",menuEnabledOption:"[data-menu-enabled-option]",disableMenuCheckbox:"[data-disable-menu-checkbox]",disableAutoCheckbox:"[data-menu-disable-auto-checkbox]"},e.bindEvents=function(){t(document).ready(function(){e.toggleAllSettingsButtons(),e.toogleAllFieldSettings(".custom-fields"),e.toogleAllFieldSettings(".standard-fields"),e.toggleMenuCheckboxes(),e.toggleHideCheckbox()}),t(document).on("click",e.selectors.postTypeToggle,function(o){o.preventDefault(),e.togglePostTypeSettings(t(this))}),t(document).on("change",e.selectors.postTypeCheckbox,function(){e.toggleSettingsButton(t(this))}),t(document).on("change",e.selectors.customFieldsCheckbox,function(){e.toogleFieldSettings(t(this),".custom-fields")}),t(document).on("change",e.selectors.standardFieldsCheckbox,function(){e.toogleFieldSettings(t(this),".standard-fields")}),t(document).on("change",e.selectors.taxonomiesFieldCheckbox,function(){e.toggleTaxonomyCheckboxes(t(this))}),t(document).on("change",e.selectors.thumbnailsCheckbox,function(){e.toggleThumbnailSettings(t(this))}),t(document).on("change",e.selectors.disableMenuCheckbox,function(){e.toggleMenuCheckboxes()}),t(document).on("change",e.selectors.disableAutoCheckbox,function(){e.toggleHideCheckbox()})},e.togglePostTypeSettings=function(e){t(e).parent(".head").siblings(".body").toggle(),t(e).parents(".post-type").toggleClass("active")},e.toggleSettingsButton=function(o){var n=t(o).parents(".head").find(e.selectors.postTypeToggle);return t(o).is(":checked")?void t(n).show():(t(n).hide(),t(n).parents(".head").siblings(".body").hide(),t(n).parents(".post-type").removeClass("active"),t(n).parents(".head").siblings(".body").find('input[type="checkbox"]').attr("checked",!1),void t(n).parents(".head").siblings(".body").find("select").val(!1))},e.toggleAllSettingsButtons=function(){var o=t(e.selectors.postTypeCheckbox);t.each(o,function(){e.toggleSettingsButton(t(this))})},e.toogleFieldSettings=function(e,o){var n=t(e).parents(".body").find(o);return t(e).is(":checked")?void t(n).show():void t(n).hide()},e.toogleAllFieldSettings=function(o){var n=t(e.selectors.customFieldsCheckbox);if(".standard-fields"==o)var n=t(e.selectors.standardFieldsCheckbox);t.each(n,function(){e.toogleFieldSettings(t(this),o)})},e.toggleTaxonomyCheckboxes=function(e){var o=t(e).parents("ul").find(t("*[data-taxonomy-single]"));return t(e).is(":checked")?void t(o).hide():void t(o).show()},e.toggleThumbnailSettings=function(e){var o=t(e).parents(".field").find(t("*[data-thumbnail-options]"));return t(e).is(":checked")?void t(o).show():void t(o).hide()},e.toggleMenuCheckboxes=function(){var o=t(e.selectors.disableMenuCheckbox),n=t(e.selectors.menuEnabledOption);return t(o).is(":checked")?void t(n).hide():void t(n).show()},e.toggleHideCheckbox=function(){var o=t(e.selectors.disableAutoCheckbox),n=t("[data-menu-hide-checkbox]");return t(o).is(":checked")?void t(n).hide():void t(n).show()},e.init=function(){e.bindEvents()},e.init()},new NestedPages.Settings;
1
+ var NestedPages=NestedPages||{};NestedPages.Settings=function(){var e=this,t=jQuery;return e.selectors={postTypeToggle:"[data-toggle-nestedpages-pt-settings]",postTypeCheckbox:"[data-nestedpages-pt-checkbox]",customFieldsCheckbox:"[data-toggle-nestedpages-cf-settings]",standardFieldsCheckbox:"[data-toggle-nestedpages-sf-settings]",taxonomiesFieldCheckbox:"[data-hide-taxonomies]",thumbnailsCheckbox:"[data-enable-thumbnails]",menuEnabledOption:"[data-menu-enabled-option]",disableMenuCheckbox:"[data-disable-menu-checkbox]",disableAutoCheckbox:"[data-menu-disable-auto-checkbox]",assignPostTypeCheckbox:"[data-nestedpages-assign-post-type]",assignPostTypeId:"[data-nested-pages-assign-post-type-id]",assignPostTypeTitle:"[data-nested-pages-assign-post-type-title]",assignPostTypeOption:"[data-assignment-page-id]",assignPostTypeRemove:"[data-nestedpages-page-pt-assignment-remove]",assignPostTypeSelection:"[data-nestedpages-page-pt-assignment-selection]"},e.bindEvents=function(){t(document).ready(function(){e.toggleAllSettingsButtons(),e.toogleAllFieldSettings(".custom-fields"),e.toogleAllFieldSettings(".standard-fields"),e.toggleMenuCheckboxes(),e.toggleHideCheckbox(),e.toggleAssignPostType()}),t(document).on("click",e.selectors.postTypeToggle,function(s){s.preventDefault(),e.togglePostTypeSettings(t(this))}),t(document).on("change",e.selectors.postTypeCheckbox,function(){e.toggleSettingsButton(t(this))}),t(document).on("change",e.selectors.customFieldsCheckbox,function(){e.toogleFieldSettings(t(this),".custom-fields")}),t(document).on("change",e.selectors.standardFieldsCheckbox,function(){e.toogleFieldSettings(t(this),".standard-fields")}),t(document).on("change",e.selectors.taxonomiesFieldCheckbox,function(){e.toggleTaxonomyCheckboxes(t(this))}),t(document).on("change",e.selectors.thumbnailsCheckbox,function(){e.toggleThumbnailSettings(t(this))}),t(document).on("change",e.selectors.disableMenuCheckbox,function(){e.toggleMenuCheckboxes()}),t(document).on("change",e.selectors.disableAutoCheckbox,function(){e.toggleHideCheckbox()}),t(document).on("change",e.selectors.assignPostTypeCheckbox,function(){e.toggleAssignPostType()}),t(document).on("click",e.selectors.assignPostTypeOption,function(s){s.preventDefault(),e.chooseAssignPostType(t(this))}),t(document).on("click",e.selectors.assignPostTypeRemove,function(s){s.preventDefault(),e.removeAssignPostType(t(this))})},e.togglePostTypeSettings=function(e){t(e).parent(".head").siblings(".body").toggle(),t(e).parents(".post-type").toggleClass("active")},e.toggleSettingsButton=function(s){var o=t(s).parents(".head").find(e.selectors.postTypeToggle);return t(s).is(":checked")?void t(o).show():(t(o).hide(),t(o).parents(".head").siblings(".body").hide(),t(o).parents(".post-type").removeClass("active"),t(o).parents(".head").siblings(".body").find('input[type="checkbox"]').attr("checked",!1),void t(o).parents(".head").siblings(".body").find("select").val(!1))},e.toggleAllSettingsButtons=function(){var s=t(e.selectors.postTypeCheckbox);t.each(s,function(){e.toggleSettingsButton(t(this))})},e.toogleFieldSettings=function(e,s){var o=t(e).parents(".body").find(s);return t(e).is(":checked")?void t(o).show():void t(o).hide()},e.toogleAllFieldSettings=function(s){var o=t(e.selectors.customFieldsCheckbox);if(".standard-fields"==s)var o=t(e.selectors.standardFieldsCheckbox);t.each(o,function(){e.toogleFieldSettings(t(this),s)})},e.toggleTaxonomyCheckboxes=function(e){var s=t(e).parents("ul").find(t("*[data-taxonomy-single]"));return t(e).is(":checked")?void t(s).hide():void t(s).show()},e.toggleThumbnailSettings=function(e){var s=t(e).parents(".field").find(t("*[data-thumbnail-options]"));return t(e).is(":checked")?void t(s).show():void t(s).hide()},e.toggleMenuCheckboxes=function(){var s=t(e.selectors.disableMenuCheckbox),o=t(e.selectors.menuEnabledOption);return t(s).is(":checked")?void t(o).hide():void t(o).show()},e.toggleHideCheckbox=function(){var s=t(e.selectors.disableAutoCheckbox),o=t("[data-menu-hide-checkbox]");return t(s).is(":checked")?void t(o).hide():void t(o).show()},e.toggleAssignPostType=function(){var s=t(e.selectors.assignPostTypeCheckbox);t.each(s,function(){var e=t(this),s=t(this).parents(".field").find(".nestedpages-assignment-display");t(e).is(":checked")?t(s).show():t(s).hide()})},e.chooseAssignPostType=function(s){var o=t(s).attr("data-assignment-page-id"),n=t(s).attr("data-assignment-page-title"),i=t(s).parents(".field"),a=nestedpages.currently_assigned_to+" "+n+' <a href="#" data-nestedpages-page-pt-assignment-remove>('+nestedpages.remove+")</a>";t(i).find(e.selectors.assignPostTypeId).val(o),t(i).find(e.selectors.assignPostTypeTitle).val(n),t(i).find(e.selectors.assignPostTypeSelection).html(a).show(),t(i).find("[data-nestedpages-post-search-form]").hide()},e.removeAssignPostType=function(s){var o=t(s).parents(".field");t(o).find(e.selectors.assignPostTypeSelection).hide(),t(o).find("[data-nestedpages-post-search-form]").show(),t(o).find(e.selectors.assignPostTypeId).val(""),t(o).find(e.selectors.assignPostTypeTitle).val("")},e.init=function(){e.bindEvents()},e.init()},new NestedPages.Settings;
languages/nestedpages-cs_CZ.mo ADDED
Binary file
languages/nestedpages-cs_CZ.po ADDED
@@ -0,0 +1,758 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "MIME-Version: 1.0\n"
4
+ "Content-Type: text/plain; charset=UTF-8\n"
5
+ "Content-Transfer-Encoding: 8bit\n"
6
+ "X-Generator: POEditor.com\n"
7
+ "Project-Id-Version: Nested Pages\n"
8
+ "Language: cs\n"
9
+
10
+ #: app/Activation/Dependencies.php:124 app/Views/listing.php:40
11
+ #: app/Views/partials/list-header.php:19
12
+ msgid "Expand All"
13
+ msgstr "Rozbalit vše"
14
+
15
+ #: app/Activation/Dependencies.php:125
16
+ msgid "Collapse All"
17
+ msgstr "Sbalit vše"
18
+
19
+ #: app/Activation/Dependencies.php:126 app/Views/partials/tool-list.php:19
20
+ msgid "Show Hidden"
21
+ msgstr "Zobrazit skryté"
22
+
23
+ #: app/Activation/Dependencies.php:127 app/Views/partials/tool-list.php:21
24
+ msgid "Hide Hidden"
25
+ msgstr "skrytí skrytých"
26
+
27
+ #: app/Activation/Dependencies.php:128 app/Views/listing.php:25
28
+ #: app/Views/listing.php:26
29
+ msgid "Add Link"
30
+ msgstr "Vytvořit odkaz"
31
+
32
+ #: app/Activation/Dependencies.php:129
33
+ msgid "Add Child Link"
34
+ msgstr "Přidat Child odkaz"
35
+
36
+ #: app/Activation/Dependencies.php:130
37
+ #: app/Entities/Post/PostUpdateRepository.php:92
38
+ #: app/Views/forms/new-child.php:19 app/Views/forms/new-child.php:21
39
+ #: app/Views/forms/quickedit-post.php:21 app/Views/partials/tool-list.php:69
40
+ msgid "Title"
41
+ msgstr "Název"
42
+
43
+ #: app/Activation/Dependencies.php:131 app/Views/forms/quickedit-post.php:11
44
+ #: app/Views/partials/row-link.php:68 app/Views/partials/row.php:138
45
+ msgid "Quick Edit"
46
+ msgstr "Rychlé úpravy"
47
+
48
+ #: app/Activation/Dependencies.php:132
49
+ msgid "Page Title"
50
+ msgstr "Titulek stránky"
51
+
52
+ #: app/Activation/Dependencies.php:133 app/Views/partials/row.php:143
53
+ msgid "View"
54
+ msgstr "Zobrazení"
55
+
56
+ #: app/Activation/Dependencies.php:134 app/Views/forms/new-child.php:7
57
+ #: app/Views/partials/row.php:102
58
+ msgid "Add Child"
59
+ msgstr "Vytvořit potomka"
60
+
61
+ #: app/Activation/Dependencies.php:135
62
+ msgid "Add Child Page"
63
+ msgstr "Přidat podřízené stránky"
64
+
65
+ #: app/Activation/Dependencies.php:136
66
+ msgid "Add Child Pages"
67
+ msgstr "Přidat podstránky"
68
+
69
+ #: app/Activation/Dependencies.php:137 app/Views/forms/link-form.php:105
70
+ #: app/Views/forms/new-child.php:102
71
+ msgid "Add"
72
+ msgstr "Přidat"
73
+
74
+ #: app/Activation/Dependencies.php:138
75
+ msgid "Add Page"
76
+ msgstr "Přidat stránku"
77
+
78
+ #: app/Activation/Dependencies.php:139
79
+ msgid "Add Pages"
80
+ msgstr "Přidat stránky"
81
+
82
+ #: app/Activation/Dependencies.php:140 app/Views/listing.php:19
83
+ #: app/Views/listing.php:20
84
+ msgid "Add Multiple"
85
+ msgstr "Hromadná tvorba"
86
+
87
+ #: app/Activation/Dependencies.php:141
88
+ msgid "Are you sure you would like to empty the trash? This action is not reversable."
89
+ msgstr "Jsi si jistý, že chcete vysypat koš? Tato akce je nevratná?"
90
+
91
+ #: app/Activation/Dependencies.php:142 app/Views/partials/row-link.php:40
92
+ #: app/Views/partials/row.php:48
93
+ msgid "Hidden"
94
+ msgstr "Skrytý"
95
+
96
+ #: app/Activation/Dependencies.php:143 app/Views/partials/list-header.php:11
97
+ msgid "Bulk Actions"
98
+ msgstr "Hromadné úpravy"
99
+
100
+ #: app/Activation/Dependencies.php:144
101
+ msgid "Your selection includes link items, which cannot be recovered after deleting. Would you like to continue? (Other items are moved to the trash)"
102
+ msgstr "Váš výběr zahrnuje odkaz položky, které nebudou moci být obnoveny po smazání. Chtěli byste, aby i nadále? (Ostatní položky jsou přesunuty do koše)"
103
+
104
+ #: app/Activation/Dependencies.php:145
105
+ msgid "Are you sure you would like to delete this item? This action is not reversable."
106
+ msgstr "Jsi si jistý, že chcete tuto položku smazat? Tato akce není reverzibilní."
107
+
108
+ #: app/Activation/Dependencies.php:146
109
+ #: app/Views/forms/delete-confirmation-modal.php:12
110
+ msgid "Delete"
111
+ msgstr "Smazat"
112
+
113
+ #: app/Activation/Dependencies.php:147
114
+ msgid "Trash Posts and Delete Links"
115
+ msgstr "Odpadkové příspěvků a mazat odkazy"
116
+
117
+ #: app/Bootstrap.php:69 app/Views/settings/settings-posttypes.php:22
118
+ msgid "Settings"
119
+ msgstr "Nastavení"
120
+
121
+ #: app/Config/Settings.php:66 app/Views/settings/settings.php:2
122
+ msgid "Nested Pages Settings"
123
+ msgstr "Nastavení Nested Pages"
124
+
125
+ #: app/Config/Settings.php:67
126
+ msgid "Nested Pages"
127
+ msgstr "Nested Pages"
128
+
129
+ #: app/Config/SettingsRepository.php:79
130
+ msgid "Post Title"
131
+ msgstr "Název příspěvku"
132
+
133
+ #: app/Config/SettingsRepository.php:80 app/Views/forms/quickedit-post.php:28
134
+ msgid "Slug"
135
+ msgstr "Název v URL"
136
+
137
+ #: app/Config/SettingsRepository.php:81
138
+ msgid "Post Date"
139
+ msgstr "Datum vystavení"
140
+
141
+ #: app/Config/SettingsRepository.php:82 app/Views/forms/clone-form.php:50
142
+ #: app/Views/forms/new-child.php:61 app/Views/forms/quickedit-post.php:74
143
+ #: app/Views/partials/bulk-edit.php:35
144
+ msgid "Author"
145
+ msgstr "Autor"
146
+
147
+ #: app/Config/SettingsRepository.php:83
148
+ msgid "Post Status"
149
+ msgstr "Stav Post"
150
+
151
+ #: app/Config/SettingsRepository.php:84
152
+ msgid "Password/Private"
153
+ msgstr "Heslo / Private"
154
+
155
+ #: app/Config/SettingsRepository.php:85 app/Views/forms/quickedit-post.php:129
156
+ msgid "Allow Comments"
157
+ msgstr "Povolit komentáře"
158
+
159
+ #: app/Config/SettingsRepository.php:89 app/Views/forms/new-child.php:71
160
+ #: app/Views/forms/quickedit-post.php:103 app/Views/partials/bulk-edit.php:58
161
+ msgid "Template"
162
+ msgstr "Šablona"
163
+
164
+ #: app/Config/SettingsRepository.php:90 app/Views/forms/quickedit-post.php:145
165
+ msgid "Menu Options"
166
+ msgstr "Možnosti nabídky"
167
+
168
+ #: app/Config/SettingsRepository.php:93 app/Views/forms/quickedit-link.php:60
169
+ #: app/Views/forms/quickedit-post.php:138
170
+ msgid "Hide in Nested Pages"
171
+ msgstr "Skrýt v Nested Pages"
172
+
173
+ #: app/Config/SettingsRepository.php:101
174
+ #: app/Views/forms/quickedit-post.php:149
175
+ msgid "Taxonomies"
176
+ msgstr "taxonomie"
177
+
178
+ #: app/Entities/AdminMenu/AdminSubmenu.php:75
179
+ #: app/Views/partials/tool-list.php:38
180
+ msgid "Default"
181
+ msgstr "Výchozí"
182
+
183
+ #: app/Entities/Confirmation/LinkDeletedConfirmation.php:12
184
+ msgid "Link successfully deleted."
185
+ msgstr "Link byla úspěšně odstraněna."
186
+
187
+ #: app/Entities/Confirmation/TrashConfirmation.php:20
188
+ msgid "Links Removed."
189
+ msgstr "Odkazy Odstraněn."
190
+
191
+ #: app/Entities/Confirmation/TrashConfirmation.php:21
192
+ msgid "Link Removed."
193
+ msgstr "Link Odstraněno."
194
+
195
+ #: app/Entities/Confirmation/TrashConfirmation.php:30
196
+ #: app/Entities/Confirmation/TrashConfirmation.php:31
197
+ msgid "moved to the Trash."
198
+ msgstr "přesunuta do koše."
199
+
200
+ #: app/Entities/Confirmation/TrashConfirmation.php:35
201
+ msgid "Undo"
202
+ msgstr "Zpět"
203
+
204
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:14
205
+ msgid "items"
206
+ msgstr "položky"
207
+
208
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:14
209
+ msgid "item"
210
+ msgstr "položka"
211
+
212
+ #: app/Entities/Confirmation/TrashRestoredConfirmation.php:15
213
+ msgid "restored from trash."
214
+ msgstr "obnovena z koše."
215
+
216
+ #: app/Entities/PostType/PostTypeRepository.php:317
217
+ msgid "Nested View"
218
+ msgstr "Stromová struktura"
219
+
220
+ #: app/Entities/PostType/PostTypeRepository.php:317
221
+ msgid "Sort View"
222
+ msgstr "Řazení"
223
+
224
+ #: app/Entities/PostType/RegisterPostTypes.php:22
225
+ msgid "Redirects"
226
+ msgstr "přesměrování"
227
+
228
+ #: app/Entities/PostType/RegisterPostTypes.php:23
229
+ msgid "Redirect"
230
+ msgstr "Přesměrovat"
231
+
232
+ #: app/Form/Listeners/BaseHandler.php:80
233
+ msgid "Incorrect Form Field"
234
+ msgstr "Nesprávné pole formuláře"
235
+
236
+ #: app/Form/Listeners/BaseHandler.php:113
237
+ msgid "There was an error updating the page."
238
+ msgstr "Došlo k chybě při aktualizaci stránky."
239
+
240
+ #: app/Form/Listeners/ClonePost.php:36
241
+ msgid "Post Not Found"
242
+ msgstr "Příspěvek nebyl nalezen"
243
+
244
+ #: app/Form/Listeners/EmptyTrash.php:19
245
+ msgid "Trash successfully emptied."
246
+ msgstr "Trash úspěšně vyprázdněna."
247
+
248
+ #: app/Form/Listeners/NewMenuItem.php:27
249
+ msgid "Custom Links must have a label."
250
+ msgstr "Vlastní odkazy musí mít etiketu."
251
+
252
+ #: app/Form/Listeners/NewMenuItem.php:28
253
+ #: app/Form/Validation/Validation.php:148
254
+ msgid "Please provide a valid URL."
255
+ msgstr "Uveďte platnou adresu URL."
256
+
257
+ #: app/Form/Listeners/NewMenuItem.php:47
258
+ #: app/Form/Listeners/QuickEditLink.php:30
259
+ msgid "Link successfully updated."
260
+ msgstr "Odkaz byl úspěšně aktualizován."
261
+
262
+ #: app/Form/Listeners/QuickEdit.php:32
263
+ msgid "Post successfully updated."
264
+ msgstr "Příspěvek byl úspěšně aktualizován."
265
+
266
+ #: app/Form/Listeners/Sort.php:29
267
+ msgid "Page order successfully updated."
268
+ msgstr "Aby strana byla úspěšně aktualizována."
269
+
270
+ #: app/Form/Listeners/Sort.php:31
271
+ msgid "There was an error updating the page order."
272
+ msgstr "Došlo k chybě při aktualizaci pořadí stránek."
273
+
274
+ #: app/Form/Listeners/SyncMenu.php:26
275
+ msgid "Menu sync disabled."
276
+ msgstr "Synchronizace menu zakázána."
277
+
278
+ #: app/Form/Listeners/SyncMenu.php:36
279
+ msgid "Menu sync enabled."
280
+ msgstr "Synchronizace menu povolena."
281
+
282
+ #: app/Form/Validation/Validation.php:134
283
+ msgid "Please provide a valid date."
284
+ msgstr "Uveďte prosím platné datum."
285
+
286
+ #: app/Form/Validation/Validation.php:145
287
+ msgid "Please provide a menu title."
288
+ msgstr "Uveďte prosím název menu."
289
+
290
+ #: app/Form/Validation/Validation.php:158
291
+ msgid "Please provide a "
292
+ msgstr "Prosím poskytovat"
293
+
294
+ #: app/Form/Validation/Validation.php:171
295
+ msgid "A valid parent page was not provided."
296
+ msgstr "Platný rodič stránka nebyla k dispozici."
297
+
298
+ #: app/Form/Validation/Validation.php:178
299
+ msgid "Please provide at least one page title."
300
+ msgstr "Uveďte alespoň jeden titul stránky."
301
+
302
+ #: app/Form/Validation/Validation.php:186
303
+ msgid "Page titles cannot be blank."
304
+ msgstr "Názvy stránek nemůže být prázdný."
305
+
306
+ #: app/Views/forms/clone-form.php:9 app/Views/forms/clone-form.php:65
307
+ #: app/Views/partials/row.php:107
308
+ msgid "Clone"
309
+ msgstr "Duplikovat"
310
+
311
+ #: app/Views/forms/clone-form.php:14
312
+ msgid "Number of Copies"
313
+ msgstr "Počet kopií"
314
+
315
+ #: app/Views/forms/clone-form.php:26 app/Views/forms/new-child.php:35
316
+ #: app/Views/forms/quickedit-link.php:27 app/Views/forms/quickedit-post.php:85
317
+ #: app/Views/partials/bulk-edit.php:44
318
+ msgid "Status"
319
+ msgstr "Status"
320
+
321
+ #: app/Views/forms/clone-form.php:29 app/Views/forms/new-child.php:38
322
+ #: app/Views/forms/quickedit-link.php:30 app/Views/forms/quickedit-post.php:88
323
+ #: app/Views/partials/bulk-edit.php:48 app/Views/partials/tool-list.php:10
324
+ msgid "Published"
325
+ msgstr "Publikováno"
326
+
327
+ #: app/Views/forms/clone-form.php:31 app/Views/forms/quickedit-link.php:33
328
+ #: app/Views/forms/quickedit-post.php:91 app/Views/partials/bulk-edit.php:51
329
+ msgid "Pending Review"
330
+ msgstr "Čekající na schválení"
331
+
332
+ #: app/Views/forms/clone-form.php:32 app/Views/forms/new-child.php:40
333
+ #: app/Views/forms/quickedit-link.php:34 app/Views/forms/quickedit-post.php:92
334
+ #: app/Views/partials/bulk-edit.php:52 app/Views/partials/tool-list.php:14
335
+ msgid "Draft"
336
+ msgstr "Koncept"
337
+
338
+ #: app/Views/forms/clone-form.php:62
339
+ #: app/Views/forms/delete-confirmation-modal.php:11
340
+ #: app/Views/forms/empty-trash-modal.php:11 app/Views/forms/link-form.php:101
341
+ #: app/Views/forms/new-child.php:99 app/Views/forms/quickedit-link.php:84
342
+ #: app/Views/forms/quickedit-post.php:231 app/Views/partials/bulk-edit.php:127
343
+ msgid "Cancel"
344
+ msgstr "Zrušit"
345
+
346
+ #: app/Views/forms/empty-trash-modal.php:12
347
+ msgid "Empty Trash"
348
+ msgstr "Vysypat koš"
349
+
350
+ #: app/Views/forms/link-form.php:18
351
+ msgid "Custom Link"
352
+ msgstr "Custom Link"
353
+
354
+ #: app/Views/forms/link-form.php:27 app/Views/forms/link-form.php:44
355
+ msgid "Search"
356
+ msgstr "Hledat"
357
+
358
+ #: app/Views/forms/link-form.php:27 app/Views/forms/link-form.php:44
359
+ msgid "No Results"
360
+ msgstr "Žádné výsledky"
361
+
362
+ #: app/Views/forms/link-form.php:58
363
+ msgid "Select an item"
364
+ msgstr "Vyberte položku"
365
+
366
+ #: app/Views/forms/link-form.php:63
367
+ msgid "Original"
368
+ msgstr "Originál"
369
+
370
+ #: app/Views/forms/link-form.php:68 app/Views/forms/quickedit-link.php:22
371
+ msgid "URL"
372
+ msgstr "Adresa URL"
373
+
374
+ #: app/Views/forms/link-form.php:72 app/Views/forms/quickedit-link.php:17
375
+ #: app/Views/forms/quickedit-post.php:195
376
+ msgid "Navigation Label"
377
+ msgstr "Text odkazu"
378
+
379
+ #: app/Views/forms/link-form.php:76 app/Views/forms/quickedit-link.php:44
380
+ #: app/Views/forms/quickedit-post.php:199
381
+ msgid "Title Attribute"
382
+ msgstr "Atribut title"
383
+
384
+ #: app/Views/forms/link-form.php:80
385
+ msgid "CSS Classes (optional)"
386
+ msgstr "CSS třídy (volitelné)"
387
+
388
+ #: app/Views/forms/link-form.php:86 app/Views/forms/quickedit-link.php:66
389
+ #: app/Views/forms/quickedit-post.php:217
390
+ msgid "Open link in a new window/tab"
391
+ msgstr "Otevřít odkaz v novém okně / záložce"
392
+
393
+ #: app/Views/forms/new-child.php:28
394
+ msgid "+"
395
+ msgstr "+"
396
+
397
+ #: app/Views/forms/new-child.php:73 app/Views/forms/quickedit-post.php:105
398
+ #: app/Views/partials/bulk-edit.php:61
399
+ msgid "Default Template"
400
+ msgstr "Výchozí šablona"
401
+
402
+ #: app/Views/forms/new-child.php:83 app/Views/forms/quickedit-link.php:54
403
+ #: app/Views/forms/quickedit-post.php:211 app/Views/partials/bulk-edit.php:92
404
+ msgid "Hide in Nav Menu"
405
+ msgstr "Skrýt v Nav Menu"
406
+
407
+ #: app/Views/forms/new-child.php:105
408
+ msgid "Add & Edit"
409
+ msgstr "Přidat & Edit"
410
+
411
+ #: app/Views/forms/quickedit-link.php:8
412
+ #: app/Views/settings/settings-posttypes.php:44
413
+ msgid "Link"
414
+ msgstr "Odkaz"
415
+
416
+ #: app/Views/forms/quickedit-link.php:31 app/Views/forms/quickedit-post.php:89
417
+ msgid "Scheduled"
418
+ msgstr "Naplánováno"
419
+
420
+ #: app/Views/forms/quickedit-link.php:48
421
+ #: app/Views/forms/quickedit-post.php:203
422
+ msgid "CSS Classes"
423
+ msgstr "CSS třídy"
424
+
425
+ #: app/Views/forms/quickedit-link.php:87
426
+ #: app/Views/forms/quickedit-post.php:234 app/Views/partials/bulk-edit.php:130
427
+ msgid "Update"
428
+ msgstr "Aktualizovat"
429
+
430
+ #: app/Views/forms/quickedit-post.php:36 app/Views/forms/quickedit-post.php:51
431
+ #: app/Views/partials/tool-list.php:68
432
+ msgid "Date"
433
+ msgstr "Datum"
434
+
435
+ #: app/Views/forms/quickedit-post.php:39
436
+ msgid "@"
437
+ msgstr "@"
438
+
439
+ #: app/Views/forms/quickedit-post.php:42
440
+ msgid "am"
441
+ msgstr "am"
442
+
443
+ #: app/Views/forms/quickedit-post.php:43
444
+ msgid "pm"
445
+ msgstr "pm"
446
+
447
+ #: app/Views/forms/quickedit-post.php:113
448
+ msgid "Password"
449
+ msgstr "Heslo"
450
+
451
+ #: app/Views/forms/quickedit-post.php:116
452
+ msgid "&ndash;OR&ndash;"
453
+ msgstr "&ndash;NEBO&ndash;"
454
+
455
+ #: app/Views/forms/quickedit-post.php:119 app/Views/partials/bulk-edit.php:50
456
+ msgid "Private"
457
+ msgstr "Soukromý"
458
+
459
+ #: app/Views/listing.php:47
460
+ msgid "Sync"
461
+ msgstr "Synchronizovat"
462
+
463
+ #: app/Views/listing.php:47
464
+ msgid "Order"
465
+ msgstr "Pořadí"
466
+
467
+ #: app/Views/listing.php:54 app/Views/listing.php:57
468
+ msgid "Sync Menu"
469
+ msgstr "Sync Menu"
470
+
471
+ #: app/Views/partials/bulk-edit.php:10
472
+ msgid "Bulk Edit"
473
+ msgstr "Hromadné úpravy"
474
+
475
+ #: app/Views/partials/bulk-edit.php:13
476
+ msgid "There are links selected. Bulk edit will not apply to links."
477
+ msgstr "Existují odkazy zaregistrování. Hromadná úprava se nebude vztahovat na odkazy."
478
+
479
+ #: app/Views/partials/bulk-edit.php:25 app/Views/partials/bulk-edit.php:46
480
+ #: app/Views/partials/bulk-edit.php:60 app/Views/partials/bulk-edit.php:74
481
+ #: app/Views/partials/bulk-edit.php:84 app/Views/partials/bulk-edit.php:94
482
+ msgid "No Change"
483
+ msgstr "beze změn"
484
+
485
+ #: app/Views/partials/bulk-edit.php:72
486
+ msgid "Comments"
487
+ msgstr "Komentáře"
488
+
489
+ #: app/Views/partials/bulk-edit.php:75
490
+ msgid "Allow"
491
+ msgstr "Povolit"
492
+
493
+ #: app/Views/partials/bulk-edit.php:76
494
+ msgid "Do not allow"
495
+ msgstr "Nepovolit"
496
+
497
+ #: app/Views/partials/bulk-edit.php:82
498
+ msgid "Display in Nested View"
499
+ msgstr "Zobrazení v Stromová struktura"
500
+
501
+ #: app/Views/partials/bulk-edit.php:85 app/Views/partials/bulk-edit.php:95
502
+ msgid "Hide"
503
+ msgstr "Skrýt"
504
+
505
+ #: app/Views/partials/bulk-edit.php:86 app/Views/partials/bulk-edit.php:96
506
+ msgid "Show"
507
+ msgstr "Zobrazit"
508
+
509
+ #: app/Views/partials/list-header.php:13
510
+ msgid "Move to Trash"
511
+ msgstr "Přesunout do koše"
512
+
513
+ #: app/Views/partials/list-header.php:15 app/Views/partials/row.php:60
514
+ msgid "Edit"
515
+ msgstr "Upravit"
516
+
517
+ #: app/Views/partials/list-header.php:19
518
+ msgid "Nested Items Selected"
519
+ msgstr "Vnořených položek Vybrané"
520
+
521
+ #: app/Views/partials/row.php:31
522
+ msgid "Front Page"
523
+ msgstr "Hlavní stránka"
524
+
525
+ #: app/Views/partials/row.php:32
526
+ msgid "Posts Page"
527
+ msgstr "příspěvky Page"
528
+
529
+ #: app/Views/partials/row.php:56
530
+ msgid "currently editing"
531
+ msgstr "V současné době editace"
532
+
533
+ #: app/Views/partials/tool-list.php:6
534
+ msgid "All"
535
+ msgstr "Vše"
536
+
537
+ #: app/Views/partials/tool-list.php:29
538
+ msgid "Trash"
539
+ msgstr "Koš"
540
+
541
+ #: app/Views/partials/tool-list.php:30
542
+ msgid "Empty"
543
+ msgstr "Vysypat"
544
+
545
+ #: app/Views/partials/tool-list.php:52
546
+ msgid "All Authors"
547
+ msgstr "Všichni autoři"
548
+
549
+ #: app/Views/partials/tool-list.php:67
550
+ msgid "Menu Order"
551
+ msgstr "Menu Objednávka"
552
+
553
+ #: app/Views/partials/tool-list.php:71
554
+ msgid "Order By"
555
+ msgstr "Seřadit podle"
556
+
557
+ #: app/Views/partials/tool-list.php:85
558
+ msgid "Ascending"
559
+ msgstr "Vzestupně"
560
+
561
+ #: app/Views/partials/tool-list.php:86
562
+ msgid "Descending"
563
+ msgstr "Sestupně"
564
+
565
+ #: app/Views/partials/tool-list.php:115
566
+ msgid "All "
567
+ msgstr "Vše"
568
+
569
+ #: app/Views/settings/settings-general.php:4
570
+ msgid "Currently Enabled"
571
+ msgstr "V současné době Enabled"
572
+
573
+ #: app/Views/settings/settings-general.php:4
574
+ msgid "Currently Disabled"
575
+ msgstr "V současné době zakázán"
576
+
577
+ #: app/Views/settings/settings-general.php:9
578
+ msgid "Nested Pages Version"
579
+ msgstr "Verze Nested Pages"
580
+
581
+ #: app/Views/settings/settings-general.php:14
582
+ msgid "Menu Name"
583
+ msgstr "Jméno v menu"
584
+
585
+ #: app/Views/settings/settings-general.php:17
586
+ msgid "Important: Once the menu name has changed, theme files should be updated to reference the new name."
587
+ msgstr "Důležité: Jakmile je název menu změnila, by měly být tématické soubory aktualizovány tak, aby odkazovat na nový název."
588
+
589
+ #: app/Views/settings/settings-general.php:22
590
+ msgid "Display Options"
591
+ msgstr "Volby zobrazení"
592
+
593
+ #: app/Views/settings/settings-general.php:26
594
+ msgid "Enable Date Picker in Quick Edit"
595
+ msgstr "Povolit výběr data z kalendáře v rychlé editaci"
596
+
597
+ #: app/Views/settings/settings-general.php:31
598
+ msgid "Menu Sync"
599
+ msgstr "Synchronizace menu"
600
+
601
+ #: app/Views/settings/settings-general.php:36
602
+ msgid "Hide Menu Sync Checkbox"
603
+ msgstr "Skrýt zatržítko synchronizace menu"
604
+
605
+ #: app/Views/settings/settings-general.php:42
606
+ msgid "Manually sync menu."
607
+ msgstr "Ručně synchronizovat nabídku."
608
+
609
+ #: app/Views/settings/settings-general.php:48
610
+ msgid "Manually sync page order."
611
+ msgstr "Ručně synchronizovat pořadí stránek."
612
+
613
+ #: app/Views/settings/settings-general.php:54
614
+ msgid "Disable menu sync completely"
615
+ msgstr "Zcela vypnout synchronizaci menu"
616
+
617
+ #: app/Views/settings/settings-general.php:60
618
+ msgid "Allow Page Sorting"
619
+ msgstr "Řazení stránek povolit pro"
620
+
621
+ #: app/Views/settings/settings-general.php:70
622
+ msgid "Admins always have sorting ability."
623
+ msgstr "Administrátoři mají řazení vždy povoleno."
624
+
625
+ #: app/Views/settings/settings-posttypes.php:7
626
+ msgid "Enable Nested Pages for:"
627
+ msgstr "Nested Pages povolit pro:"
628
+
629
+ #: app/Views/settings/settings-posttypes.php:19
630
+ msgid "Hierarchical"
631
+ msgstr "Hierarchický"
632
+
633
+ #: app/Views/settings/settings-posttypes.php:29
634
+ msgid "Replace Default Menu"
635
+ msgstr "Nahradit defaultně Menu"
636
+
637
+ #: app/Views/settings/settings-posttypes.php:30
638
+ msgid "Replace the default top-level item with the nested view link."
639
+ msgstr "Nahraďte výchozí položky nejvyšší úrovně s výhledem na odkaz vnořené."
640
+
641
+ #: app/Views/settings/settings-posttypes.php:33
642
+ msgid "Replace Default"
643
+ msgstr "nahradit výchozí"
644
+
645
+ #: app/Views/settings/settings-posttypes.php:33
646
+ msgid "Menu"
647
+ msgstr "Menu"
648
+
649
+ #: app/Views/settings/settings-posttypes.php:40
650
+ msgid "Remove Default Link"
651
+ msgstr "Odebrat výchozí odkaz"
652
+
653
+ #: app/Views/settings/settings-posttypes.php:41
654
+ msgid "If the default menu is replaced, a link to the default view will be added. Select this to remove the link"
655
+ msgstr "Je-li výchozí nabídka vyměnit, bude přidán odkaz na výchozí zobrazení. Vyberte tuto možnost k odstranění odkazu"
656
+
657
+ #: app/Views/settings/settings-posttypes.php:44
658
+ msgid "Hide Default"
659
+ msgstr "Hide Výchozí"
660
+
661
+ #: app/Views/settings/settings-posttypes.php:52
662
+ msgid "Disable Nesting"
663
+ msgstr "Zakázat Hnízdění"
664
+
665
+ #: app/Views/settings/settings-posttypes.php:53
666
+ msgid "To disable nesting on hierarchical post types, select this option."
667
+ msgstr "Povolte pro znemožnění noření hierarchických druhů příspěvků."
668
+
669
+ #: app/Views/settings/settings-posttypes.php:56
670
+ msgid "Disable Nesting for"
671
+ msgstr "Zakázat Hnízdění pro"
672
+
673
+ #: app/Views/settings/settings-posttypes.php:69
674
+ msgid "Display Thumbnails"
675
+ msgstr "Zobrazit náhledy"
676
+
677
+ #: app/Views/settings/settings-posttypes.php:70
678
+ msgid "Display the thumbnail in the list sort view."
679
+ msgstr "Zobrazení miniatur v zobrazení seznamu třídění."
680
+
681
+ #: app/Views/settings/settings-posttypes.php:71
682
+ msgid "Note: Thumbnail width is displayed at a maximum of 80px in the nested pages view. The image is scaled proportionally."
683
+ msgstr "Poznámka: V Nested Pages zobrazení je maximální velikost náhledu 80px. je zmenšen proporcionálně."
684
+
685
+ #: app/Views/settings/settings-posttypes.php:74
686
+ msgid "Display Thumbnails for"
687
+ msgstr "Zobrazit náhledy pro:"
688
+
689
+ #: app/Views/settings/settings-posttypes.php:77
690
+ msgid "Thumbnail Source"
691
+ msgstr "náhledy Zdroj"
692
+
693
+ #: app/Views/settings/settings-posttypes.php:88
694
+ msgid "Thumbnail Display Size"
695
+ msgstr "Zobrazení miniatur Velikost"
696
+
697
+ #: app/Views/settings/settings-posttypes.php:90
698
+ msgid "Small"
699
+ msgstr "Malý"
700
+
701
+ #: app/Views/settings/settings-posttypes.php:91
702
+ msgid "Medium"
703
+ msgstr "Střední"
704
+
705
+ #: app/Views/settings/settings-posttypes.php:92
706
+ msgid "Large"
707
+ msgstr "Velký"
708
+
709
+ #: app/Views/settings/settings-posttypes.php:101
710
+ #: app/Views/settings/settings-posttypes.php:105
711
+ msgid "Configure Standard Fields"
712
+ msgstr "Konfigurace standardních polí"
713
+
714
+ #: app/Views/settings/settings-posttypes.php:102
715
+ msgid "Remove standard fields from the quick edit form."
716
+ msgstr "Vyjměte standardní pole z rychlého editačním formuláři."
717
+
718
+ #: app/Views/settings/settings-posttypes.php:108
719
+ msgid "Check to remove from Quick Edit."
720
+ msgstr "Zkontrolujte, zda odstranit z Quick Edit."
721
+
722
+ #: app/Views/settings/settings-posttypes.php:150
723
+ #: app/Views/settings/settings-posttypes.php:154
724
+ msgid "Configure Custom Fields"
725
+ msgstr "Konfigurace vlastní pole"
726
+
727
+ #: app/Views/settings/settings-posttypes.php:151
728
+ msgid "Set which custom fields display in the quick edit form."
729
+ msgstr "Set, který vlastní pole zobrazí v rychlém editačním formuláři."
730
+
731
+ #: app/Views/settings/settings-posttypes.php:157
732
+ msgid "Check to Include in Quick Edit."
733
+ msgstr "Zkontrolujte, zda zahrnout do Quick Edit."
734
+
735
+ #: app/Views/settings/settings-posttypes.php:163
736
+ msgid "Advanced Custom Fields"
737
+ msgstr "Advanced Vlastní pole"
738
+
739
+ #: app/Views/settings/settings-posttypes.php:178
740
+ msgid "No ACF Fields configured for this post type"
741
+ msgstr "Žádné ACF Fields nakonfigurované pro tento typ příspěvek"
742
+
743
+ #: app/Views/settings/settings-posttypes.php:194
744
+ msgid "If default menu is not replaced, an additional submenu item will be added for \"Nested/Sort View\""
745
+ msgstr "Není-li výchozí nabídka není nahrazen, bude další položku podmenu být přidány pro \"vnořené / Druh View\""
746
+
747
+ #: app/Views/settings/settings-posttypes.php:197
748
+ msgid "<strong>Important:</strong> Changing page structures on live sites may effect SEO and existing inbound links. Limit URL structure changes on live sites by disabling nesting. Sorting within the current nesting structure will still be available. If nesting changes are made to a live site, it may help to add a 301 redirect from the old location to the new one."
749
+ msgstr "<Strong> Důležité: </ strong> Změna struktury stránek na živých stránkách mohou ovlivnit SEO a existující příchozí spojení. Limit změny struktury URL na živých stránkách vypnutím hnízdění. Třídění v rámci stávající hnízdní struktura bude stále k dispozici. Jsou-li hnízdění provedeny změny k živému místě, může pomoci přidat přesměrování 301 ze starého umístění do nového."
750
+
751
+ #: app/Views/settings/settings.php:6
752
+ msgid "General"
753
+ msgstr "Obecné"
754
+
755
+ #: app/Views/settings/settings.php:10
756
+ msgid "Post Types"
757
+ msgstr "Druhy příspěvků"
758
+
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 enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
6
- Version: 1.6.8
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
  Text Domain: wp-nested-pages
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 enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
6
+ Version: 1.7.0
7
  Author: Kyle Phillips
8
  Author URI: https://github.com/kylephillips
9
  Text Domain: wp-nested-pages
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.7
7
- Stable tag: 1.6.7
8
 
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -99,6 +99,15 @@ As of version 1.6, yes. Visit Settings > Nested Pages > Post Types to configure
99
 
100
  == Changelog ==
101
 
 
 
 
 
 
 
 
 
 
102
  = 1.6.8 =
103
  * Bug fix where admin bars were not displaying in Safari until hover
104
  * Bug fixes in display of post titles with html tags
4
  Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
5
  Requires at least: 3.8
6
  Tested up to: 4.7
7
+ Stable tag: 1.6.8
8
 
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
99
 
100
  == Changelog ==
101
 
102
+ = 1.7.0 =
103
+ * Added option to disable sorting per post type
104
+ * Added option to assign a post type page. Assigning a page to a post type adds "Add New" and "All" links to the page row for the given post type, along with a count of published posts for that type
105
+ * 24 hour time format support added to datepicker time field (follows General Time Format settings)
106
+ * Custom fields generated by the plugin converted to hidden fields, preventing them from displaying in the post custom field meta box
107
+ * Bug fix where selecting "Hide in Nested Pages" was not saving in the quick edit interface
108
+ * rel=page removed from generated nav menu links which was causing errors in W3C validation
109
+ * Bug fix where menu sync was firing in the background when "Disable menu sync completely" option was selected
110
+
111
  = 1.6.8 =
112
  * Bug fix where admin bars were not displaying in Safari until hover
113
  * Bug fixes in display of post titles with html tags