CMS Tree Page View - Version 0.5.6

Version Description

  • password protected posts now show a lock icon (thanks to Seebz for contributing)
Download this release

Release Info

Developer eskapism
Plugin Icon wp plugin CMS Tree Page View
Version 0.5.6
Comparing to
See all releases

Code changes from version 0.5.5 to 0.5.6

functions.php CHANGED
@@ -52,7 +52,13 @@ function cms_tpv_admin_init() {
52
  "Add_new_page_after" => __("Add new page after", 'cms-tree-page-view'),
53
  "after" => __("after", 'cms-tree-page-view'),
54
  "inside" => __("inside", 'cms-tree-page-view'),
55
- "Add_new_page_inside" => __("Add new page inside", 'cms-tree-page-view')
 
 
 
 
 
 
56
  );
57
  wp_localize_script( "cms_tree_page_view", 'cmstpv_l10n', $oLocale);
58
 
52
  "Add_new_page_after" => __("Add new page after", 'cms-tree-page-view'),
53
  "after" => __("after", 'cms-tree-page-view'),
54
  "inside" => __("inside", 'cms-tree-page-view'),
55
+ "Add_new_page_inside" => __("Add new page inside", 'cms-tree-page-view'),
56
+ "Status_draft" => __("draft", 'cms-tree-page-view'),
57
+ "Status_future" => __("future", 'cms-tree-page-view'),
58
+ "Status_password" => __("protected", 'cms-tree-page-view'), // is "protected" word better than "password" ?
59
+ "Status_pending" => __("pending", 'cms-tree-page-view'),
60
+ "Status_private" => __("private", 'cms-tree-page-view'),
61
+ "Password_protected_page" => __("Password protected page", 'cms-tree-page-view')
62
  );
63
  wp_localize_script( "cms_tree_page_view", 'cmstpv_l10n', $oLocale);
64
 
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: CMS Tree Page View
4
  Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/
5
  Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. By using the tree you can edit, view, add pages and even search pages (useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this!
6
- Version: 0.5.5
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
@@ -27,7 +27,7 @@ License: GPL2
27
 
28
  require("functions.php");
29
 
30
- define( "CMS_TPV_VERSION", "0.5.5");
31
  define( "CMS_TPV_URL", WP_PLUGIN_URL . '/cms-tree-page-view/');
32
  define( "CMS_TPV_NAME", "CMS Tree Page View");
33
 
3
  Plugin Name: CMS Tree Page View
4
  Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/
5
  Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. By using the tree you can edit, view, add pages and even search pages (useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this!
6
+ Version: 0.5.6
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
27
 
28
  require("functions.php");
29
 
30
+ define( "CMS_TPV_VERSION", "0.5.6");
31
  define( "CMS_TPV_URL", WP_PLUGIN_URL . '/cms-tree-page-view/');
32
  define( "CMS_TPV_NAME", "CMS Tree Page View");
33
 
readme.txt CHANGED
@@ -47,6 +47,9 @@ Now the tree with the pages will be visible both on the dashboard and in the men
47
 
48
  == Changelog ==
49
 
 
 
 
50
  = 0.5.5 =
51
  - ok, now the texts should be translated. for real! thanks for the bug report!
52
 
47
 
48
  == Changelog ==
49
 
50
+ = 0.5.6 =
51
+ - password protected posts now show a lock icon (thanks to [Seebz](seebz.net) for contributing)
52
+
53
  = 0.5.5 =
54
  - ok, now the texts should be translated. for real! thanks for the bug report!
55
 
scripts/cms_tree_page_view.js CHANGED
@@ -227,10 +227,16 @@ function cms_tpv_bind_clean_node() {
227
  aFirst.append("<span title='" + childCount + " " + cmstpv_l10n.child_pages + "' class='child_count'>("+childCount+")</span>");
228
  }
229
 
 
 
 
 
 
 
230
  // add page type
231
  var post_status = li.data("jstree").post_status;
232
  if (post_status != "publish") {
233
- aFirst.find("ins").after("<span class='post_type post_type_"+post_status+"'>"+post_status+"</span>");
234
  }
235
 
236
  // add div for mega super über cool mouseover/dropdown actions
227
  aFirst.append("<span title='" + childCount + " " + cmstpv_l10n.child_pages + "' class='child_count'>("+childCount+")</span>");
228
  }
229
 
230
+ // add protection type
231
+ var rel = li.data("jstree").rel;
232
+ if(rel == "password") {
233
+ aFirst.find("ins").after("<span class='post_protected' title='" + cmstpv_l10n.Password_protected_page + "'>&nbsp;</span>");
234
+ }
235
+
236
  // add page type
237
  var post_status = li.data("jstree").post_status;
238
  if (post_status != "publish") {
239
+ aFirst.find("ins").first().after("<span class='post_type post_type_"+post_status+"'>" + cmstpv_l10n["Status_"+post_status] + "</span>");
240
  }
241
 
242
  // add div for mega super über cool mouseover/dropdown actions
styles/images/lock.png ADDED
Binary file
styles/styles.css CHANGED
@@ -98,6 +98,15 @@ li span.cms_tpv_action_add_page {
98
  margin-left: .5em;
99
  }
100
 
 
 
 
 
 
 
 
 
 
101
  .tree-default span.post_type {
102
  background-color: #f85b11;
103
  -moz-border-radius: 3px;
98
  margin-left: .5em;
99
  }
100
 
101
+ .tree-default span.post_protected {
102
+ display:inline-block;
103
+ margin:0 3px 0 0; padding:0;
104
+ width:16px; height:16px;
105
+ /* icon source => http://www.famfamfam.com/lab/icons/silk/ */
106
+ background:transparent url(images/lock.png) center no-repeat;
107
+ }
108
+
109
+
110
  .tree-default span.post_type {
111
  background-color: #f85b11;
112
  -moz-border-radius: 3px;