CMS Tree Page View - Version 0.10

Version Description

  • Fixed position of action div. Now it's always to the right of the page name.
  • Fixed so action div never is below the fold of the browser. Instead it's moved up until it's visible.
  • Fixed problem related to hoverIntent and mouseover and drag and drop. There was just to many wierd things going on so I switched to my own solution instead. Let me know if it works ok for you too now again!
Download this release

Release Info

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

Code changes from version 0.9 to 0.10

functions.php CHANGED
@@ -76,7 +76,7 @@ function cms_admin_enqueue_scripts() {
76
  wp_enqueue_script( "jquery-cookie", CMS_TPV_URL . "scripts/jquery.biscuit.js", array("jquery")); // renamed from cookie to fix problems with mod_security
77
  wp_enqueue_script( "jquery-jstree", CMS_TPV_URL . "scripts/jquery.jstree.js", false, CMS_TPV_VERSION);
78
  wp_enqueue_script( "jquery-alerts", CMS_TPV_URL . "scripts/jquery.alerts.js", false, CMS_TPV_VERSION);
79
- wp_enqueue_script( "hoverIntent");
80
  wp_enqueue_script( "cms_tree_page_view", CMS_TPV_URL . "scripts/cms_tree_page_view.js", false, CMS_TPV_VERSION);
81
 
82
  wp_enqueue_style( "cms_tpv_styles", CMS_TPV_URL . "styles/styles.css", false, CMS_TPV_VERSION );
76
  wp_enqueue_script( "jquery-cookie", CMS_TPV_URL . "scripts/jquery.biscuit.js", array("jquery")); // renamed from cookie to fix problems with mod_security
77
  wp_enqueue_script( "jquery-jstree", CMS_TPV_URL . "scripts/jquery.jstree.js", false, CMS_TPV_VERSION);
78
  wp_enqueue_script( "jquery-alerts", CMS_TPV_URL . "scripts/jquery.alerts.js", false, CMS_TPV_VERSION);
79
+ // wp_enqueue_script( "hoverIntent");
80
  wp_enqueue_script( "cms_tree_page_view", CMS_TPV_URL . "scripts/cms_tree_page_view.js", false, CMS_TPV_VERSION);
81
 
82
  wp_enqueue_style( "cms_tpv_styles", CMS_TPV_URL . "styles/styles.css", false, CMS_TPV_VERSION );
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. Use the tree view to edit, view, add pages and search pages (very 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.9
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
@@ -28,7 +28,7 @@ License: GPL2
28
  #require("functions.php");
29
  require(dirname(__FILE__)."/functions.php");
30
 
31
- define( "CMS_TPV_VERSION", "0.9");
32
  define( "CMS_TPV_NAME", "CMS Tree Page View");
33
 
34
  // Find the plugin directory URL
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. Use the tree view to edit, view, add pages and search pages (very 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.10
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
28
  #require("functions.php");
29
  require(dirname(__FILE__)."/functions.php");
30
 
31
+ define( "CMS_TPV_VERSION", "0.10");
32
  define( "CMS_TPV_NAME", "CMS Tree Page View");
33
 
34
  // Find the plugin directory URL
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://eskapism.se/sida/donate/
4
  Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin
5
  Requires at least: 3.0
6
  Tested up to: 3.5
7
- Stable tag: 0.9
8
 
9
  Adds a tree of all your pages or custom posts. Use drag & drop to reorder your pages, and edit, view, add, and search your pages.
10
 
@@ -88,6 +88,11 @@ Now the tree with the pages will be visible both on the dashboard and in the men
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
91
  = 0.9 =
92
  - Only output scripts and styles on pages that the plugin uses. This should speed up other parts of the WordPress admin a little tiny itsy bitsy bit.
93
  - Added a hopefully not to spammy box about donation and stuff. Hopefully it it encourages some of you to give it a good review or maybe even donate some money. I've spent a lot, lot, LOT of time developing this plugin you know ;)
4
  Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin
5
  Requires at least: 3.0
6
  Tested up to: 3.5
7
+ Stable tag: 0.10
8
 
9
  Adds a tree of all your pages or custom posts. Use drag & drop to reorder your pages, and edit, view, add, and search your pages.
10
 
88
 
89
  == Changelog ==
90
 
91
+ = 0.10 =
92
+ - Fixed position of action div. Now it's always to the right of the page name.
93
+ - Fixed so action div never is below the fold of the browser. Instead it's moved up until it's visible.
94
+ - Fixed problem related to hoverIntent and mouseover and drag and drop. There was just to many wierd things going on so I switched to my own solution instead. Let me know if it works ok for you too now again!
95
+
96
  = 0.9 =
97
  - Only output scripts and styles on pages that the plugin uses. This should speed up other parts of the WordPress admin a little tiny itsy bitsy bit.
98
  - Added a hopefully not to spammy box about donation and stuff. Hopefully it it encourages some of you to give it a good review or maybe even donate some money. I've spent a lot, lot, LOT of time developing this plugin you know ;)
scripts/cms_tree_page_view.js CHANGED
@@ -8,7 +8,7 @@ jQuery(function($) {
8
  div_actions = $("div.cms_tpv_page_actions");
9
 
10
  // try to override css
11
- var height = "20", height2 = "18", ins_height = "18";
12
  css_string = '' +
13
  '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' +
14
  '.jstree li { display:block; min-height:'+height+'px; line-height:'+height+'px; white-space:nowrap; margin-left:18px; min-width:18px; } ' +
@@ -79,7 +79,7 @@ jQuery(function($) {
79
  treeOptionsTmp.json_data.data = cms_tpv_jsondata[post_type]; // get from js
80
 
81
  var isHierarchical = $(elm).closest(".cms_tpv_wrapper").find("[name=cms_tpv_meta_post_type_hierarchical]").val();
82
- if (isHierarchical == 0) {
83
  // no move to children if not hierarchical
84
  treeOptionsTmp.types = {
85
  "types": {
@@ -97,8 +97,9 @@ jQuery(function($) {
97
  }
98
  });
99
 
100
- $elm.bind("loaded.jstree open_node.jstree", cms_tpv_tree_loaded);
101
- //$wrapper.find(".cms_tpv_container").bind("loaded.jstree refresh.jstree open_node.jstree reopen.jstree after_open.jstree load_node.jstree", cms_tpv_tree_loaded);
 
102
  $elm.jstree(treeOptionsTmp);
103
 
104
  });
@@ -106,37 +107,56 @@ jQuery(function($) {
106
  }); // end ondomready
107
 
108
 
 
 
 
 
 
 
 
 
 
 
109
  /**
110
  * When tree is loaded: start hoverindenting stuff
111
- * @todo: this is fireded several times, why not only once
112
  */
113
  function cms_tpv_tree_loaded(event, data) {
114
 
115
- // console.log("loaded");
116
 
117
- var $target = jQuery(event.target);
118
- var $lis = $target.find("li a");
119
- var $hoverIntentWrap = $target.find("div.cmstpv-hoverIntent-wrap");
 
120
 
121
- // Bind hoverIntent
122
- $hoverIntentWrap.hoverIntent({
123
- over: cms_tpv_mouseover,
124
- out: cms_tpv_mouseout,
125
- timeout: 500, // default 0, 500 is good
126
- sensitivity: 4 // default 7
127
- });
 
 
 
 
128
 
129
- function cms_tpv_mouseover(e) {
130
- var $this = jQuery(this);
131
- var $li = $this.closest("li");
132
- cms_tpv_mouseover_li(e, $li.get(0));
133
- }
134
 
135
- function cms_tpv_mouseout(e) {
136
- var $this = jQuery(this);
137
- var $li = $this.closest("li");
138
- cms_tpv_mouseout_li(e, $li.get(0));
139
- }
 
 
 
 
 
 
 
 
140
 
141
  }
142
 
@@ -245,31 +265,17 @@ function cms_tpv_is_dragging() {
245
  return eDrag.is(":visible");
246
  }
247
 
248
- /*
249
- jQuery(".jstree li").live("mouseover", function(e) {
250
- var $li = jQuery(this);
251
- var li_id = $li.attr("id");
252
- cms_tpv_mouseover_li(this);
253
- });
254
- // ..and hide them again
255
- jQuery(".jstree li").live("mouseout", function() {
256
- //cms_tpv_current_li_id = null;
257
- //console.log("out");
258
- cms_tpv_mouseout_li(this);
259
- });
260
- */
261
-
262
-
263
-
264
  // fired when mouse is over li
265
- function cms_tpv_mouseover_li(e, li) {
 
266
 
267
- var $li = jQuery(li);
 
268
 
269
- var div_actions_for_post_type = cms_tpv_get_page_actions_div(li);
270
  var $cms_tpv_container = $li.closest("div.cms_tpv_container");
271
 
272
- if (cms_tpv_is_dragging() == false) {
273
 
274
  var is_visible = div_actions_for_post_type.is(":visible");
275
  is_visible = false;
@@ -300,37 +306,44 @@ function cms_tpv_mouseover_li(e, li) {
300
  // ..and some extras
301
  div_actions_for_post_type.find(".cms_tpv_page_actions_modified_time").text($li.data("modified_time"));
302
  div_actions_for_post_type.find(".cms_tpv_page_actions_modified_by").text($li.data("modified_author"));
303
- div_actions_for_post_type.find(".cms_tpv_page_actions_page_id").text($li.data("post_id"));
304
-
305
  div_actions_for_post_type.find(".cms_tpv_page_actions_columns").html( unescape($li.data("columns")) );
306
 
307
  // add post title as headline
308
  div_actions_for_post_type.find(".cms_tpv_page_actions_headline").html( $li.data("post_title") );
309
 
310
  // position and show action div
311
- // put it inside cmstpv-hoverIntent-wrap so hoverIndent is cool with it
312
- var $overIntentWrap = $li.find("div.cmstpv-hoverIntent-wrap:first");
313
- //console.log( $overIntentWrap.length );
 
314
  var $a = $li.find("a");
315
  var width = $a.outerWidth(true);
316
- //$li.append(div_actions_for_post_type);
317
-
318
- $overIntentWrap.append(div_actions_for_post_type);
319
-
320
  var new_offset = div_actions_for_post_type.offset();
321
  var new_offset_left = e.pageX + 35;
322
- // check that new left offset is not to close to the left of the a
323
- // i.e. the mouse be x px more than the a for the experience to be optimal IMHO
324
- var diff = e.pageX - $a.offset().left;
325
- if (diff < 25) new_offset_left = new_offset_left + 25;
326
-
327
  new_offset.left = new_offset_left;
328
  new_offset.top = $a.offset().top - 30;
329
  div_actions_for_post_type.offset(new_offset);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
 
331
  // check if user is allowed to edit page
332
  var $cms_tpv_action_add_and_edit_page = div_actions_for_post_type.find(".cms_tpv_action_add_and_edit_page");
333
- if ($li.data("user_can_edit_page") == 0) {
334
  // nooope
335
  $edit.hide();
336
  $cms_tpv_action_add_and_edit_page.hide();
@@ -346,76 +359,69 @@ function cms_tpv_mouseover_li(e, li) {
346
 
347
  }
348
 
349
- // When mouse leaves the whole cms tree page view-area/div
 
 
 
350
  jQuery(document).on("mouseleave", "div.cms_tpv_container", function(e) {
351
- // hide actions div after moving mouse out of a page and not moving it on again for...a while
352
 
353
- //var div_actions_for_post_type = cms_tpv_get_page_actions_div(li);
354
- //var $cms_tpv_container = $li.closest("div.cms_tpv_container");
355
- // console.log("mouse outside container");
356
- var $container = jQuery(this);
357
- jQuery.data(this, "cmstpv_do_hide_after_timeout", true);
358
  var t = this;
 
 
 
 
 
 
359
 
360
- setTimeout(function() {
361
- //(function() {
362
-
363
- // check if container has data value that still tells us to hide
364
- // this value is reseted when we enter the div again
365
- //$cms_tpv_container
366
- //console.log("timeout passed; hide?");
367
- //console.log( jQuery.data(t, "cmstpv_do_hide_after_timeout") );
368
- if (jQuery.data(t, "cmstpv_do_hide_after_timeout")) {
369
- $container.find("li.has-visible-actions").removeClass("has-visible-actions");
370
- $container.find("a.hover").removeClass("hover");
371
- $container.find("div.cms_tpv_page_actions").removeClass("cms_tpv_page_actions_visible");
372
- }
373
 
374
- //})();
375
- }, 1000);
 
376
 
377
  });
378
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
  // When mouse enter the whole cms tree page view-area/div
380
  jQuery(document).on("mouseenter", "div.cms_tpv_container", function(e) {
381
 
382
- // console.log("mouse inside container, reset hide data");
383
  var $container = jQuery(this);
384
  jQuery.data(this, "cmstpv_do_hide_after_timeout", false);
385
 
386
  });
387
 
388
 
389
- // fired when mouse leaves li
390
- function cms_tpv_mouseout_li(e, li) {
391
-
392
- var $li = jQuery(li);
393
- var $cms_tpv_container = $li.closest("div.cms_tpv_container");
394
-
395
- /*
396
- var div_actions_for_post_type = cms_tpv_get_page_actions_div(li);
397
- var $cms_tpv_container = $li.closest("div.cms_tpv_container");
398
- var is_visible = div_actions_for_post_type.is(":visible");
399
- */
400
-
401
- // Remove classes if we are not viewing any
402
- // This function can get called also when a new li has been hoverIndent:ed
403
- /*
404
- $li.find("a:first").removeClass("hover");
405
- $li.removeClass("has-visible-actions");
406
- if (!is_visible) {
407
- $cms_tpv_container.removeClass("has-visible-actions");
408
- }
409
- */
410
- //div_actions.hide();
411
- }
412
-
413
-
414
- // hide action links on drag
415
- jQuery.jstree.drag_start = function() {
416
- jQuery(".cms_tpv_action_view, .cms_tpv_action_edit, .cms_tpv_action_add_page, .cms_tpv_action_add_page_after, .cms_tpv_action_add_page_inside").hide();
417
- }
418
-
419
  /**
420
  * add childcount and other things to each li
421
  */
@@ -516,15 +522,8 @@ function cms_tpv_bind_clean_node() {
516
  }
517
 
518
  // To make hoverindent work we must wrap something around the a bla bla bla
519
-
520
- //li.find()
521
- var div_wrap = jQuery("<div class='cmstpv-hoverIntent-wrap' />");
522
- div_wrap.css({
523
- "display": "inline-block",
524
- "xwidth": "100%"
525
- });
526
- aFirst.wrap(div_wrap);
527
-
528
 
529
  });
530
  }
@@ -542,7 +541,7 @@ jQuery(document).on("submit", "form.cms_tree_view_search_form", function(e) {
542
  if (s) {
543
  $wrapper.find(".cms_tree_view_search_form_no_hits").fadeOut("fast");
544
  $wrapper.find(".cms_tree_view_search_form_working").fadeIn("fast");
545
- $wrapper.find(".cms_tree_view_search_form_reset")
546
  $wrapper.find(".cms_tpv_container").jstree("search", s);
547
  $wrapper.find(".cms_tree_view_search_form_reset").fadeIn("fast");
548
  } else {
8
  div_actions = $("div.cms_tpv_page_actions");
9
 
10
  // try to override css
11
+ var height = "20", height2 = "18", ins_height = "20";
12
  css_string = '' +
13
  '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' +
14
  '.jstree li { display:block; min-height:'+height+'px; line-height:'+height+'px; white-space:nowrap; margin-left:18px; min-width:18px; } ' +
79
  treeOptionsTmp.json_data.data = cms_tpv_jsondata[post_type]; // get from js
80
 
81
  var isHierarchical = $(elm).closest(".cms_tpv_wrapper").find("[name=cms_tpv_meta_post_type_hierarchical]").val();
82
+ if (isHierarchical === "0") {
83
  // no move to children if not hierarchical
84
  treeOptionsTmp.types = {
85
  "types": {
97
  }
98
  });
99
 
100
+ // whole tre loaded
101
+ $elm.bind("loaded.jstree", cms_tpv_tree_loaded);
102
+
103
  $elm.jstree(treeOptionsTmp);
104
 
105
  });
107
  }); // end ondomready
108
 
109
 
110
+ function cms_tpv_mouseover(e) {
111
+
112
+ var $this = jQuery(this);
113
+ var $li = $this.closest("li");
114
+ cms_tpv_mouseover_li(e, $li.get(0));
115
+ return true;
116
+
117
+ }
118
+
119
+
120
  /**
121
  * When tree is loaded: start hoverindenting stuff
122
+ * @todo: this is fireded several times? why not only once?
123
  */
124
  function cms_tpv_tree_loaded(event, data) {
125
 
126
+ var $container = jQuery(event.target);
127
 
128
+ // when mouse enters a/link
129
+ // start timer and if no other a/link has been moused over since it started it's ok to show this one
130
+ jQuery($container).on("mouseenter", "a", function(e) {
131
+ var global_timer = $container.data("cmstpv_global_link_timer");
132
 
133
+ if (global_timer) {
134
+ // global timer exists, so overwrite it with our new one
135
+ // stop that timer before setting ours
136
+ clearTimeout(global_timer);
137
+ } else {
138
+ // no timer exists, overwrite with ours
139
+ }
140
+ // create new timer, no matter if one exists already
141
+ var timeoutID = setTimeout(function(e) {
142
+ cms_tpv_mouseover_li(e);
143
+ }, 500, e);
144
 
145
+ $container.data("cmstpv_global_link_timer", timeoutID);
 
 
 
 
146
 
147
+ });
148
+
149
+ /**
150
+ * When mouse down then hide the action div
151
+ */
152
+ jQuery($container).on("mousedown", "a", function(e) {
153
+ var $target = jQuery(e.target);
154
+ var $container = $target.closest("div.cms_tpv_container");
155
+ var $wrapper = $container.closest("div.cms_tpv_wrapper");
156
+ $container.find("li.has-visible-actions").removeClass("has-visible-actions");
157
+ $container.find("a.hover").removeClass("hover");
158
+ $wrapper.find("div.cms_tpv_page_actions").removeClass("cms_tpv_page_actions_visible");
159
+ });
160
 
161
  }
162
 
265
  return eDrag.is(":visible");
266
  }
267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  // fired when mouse is over li
269
+ // actually when over a, old name :/
270
+ function cms_tpv_mouseover_li(e) {
271
 
272
+ var $target = jQuery(e.target);
273
+ var $li = $target.closest("li");
274
 
275
+ var div_actions_for_post_type = cms_tpv_get_page_actions_div($li);
276
  var $cms_tpv_container = $li.closest("div.cms_tpv_container");
277
 
278
+ if (cms_tpv_is_dragging() === false) {
279
 
280
  var is_visible = div_actions_for_post_type.is(":visible");
281
  is_visible = false;
306
  // ..and some extras
307
  div_actions_for_post_type.find(".cms_tpv_page_actions_modified_time").text($li.data("modified_time"));
308
  div_actions_for_post_type.find(".cms_tpv_page_actions_modified_by").text($li.data("modified_author"));
309
+ div_actions_for_post_type.find(".cms_tpv_page_actions_page_id").text($li.data("post_id"));
 
310
  div_actions_for_post_type.find(".cms_tpv_page_actions_columns").html( unescape($li.data("columns")) );
311
 
312
  // add post title as headline
313
  div_actions_for_post_type.find(".cms_tpv_page_actions_headline").html( $li.data("post_title") );
314
 
315
  // position and show action div
316
+
317
+ //console.log( jQuery(window).position() );
318
+ //console.log( jQuery(window).offset() );
319
+
320
  var $a = $li.find("a");
321
  var width = $a.outerWidth(true);
 
 
 
 
322
  var new_offset = div_actions_for_post_type.offset();
323
  var new_offset_left = e.pageX + 35;
324
+
325
+ new_offset_left = $a.offset().left + $a.width() + 20;
 
 
 
326
  new_offset.left = new_offset_left;
327
  new_offset.top = $a.offset().top - 30;
328
  div_actions_for_post_type.offset(new_offset);
329
+
330
+ // check if action div bottom is visible in browser window, if not move it up until it is
331
+ var pos_diff = (div_actions_for_post_type.offset().top + div_actions_for_post_type.height()) - (jQuery(window).height() + jQuery(window).scrollTop());
332
+ if (pos_diff > 0) {
333
+
334
+ // set action div to begin at bottom of link instead
335
+ new_offset.top = $a.offset().top - div_actions_for_post_type.height() + 15; // <- ska bli botten på vår div
336
+ div_actions_for_post_type.offset( new_offset );
337
+ div_actions_for_post_type.addClass("cms_tpv_page_actions_visible_from_bottom");
338
+
339
+ } else {
340
+ div_actions_for_post_type.removeClass("cms_tpv_page_actions_visible_from_bottom");
341
+ }
342
+
343
 
344
  // check if user is allowed to edit page
345
  var $cms_tpv_action_add_and_edit_page = div_actions_for_post_type.find(".cms_tpv_action_add_and_edit_page");
346
+ if ($li.data("user_can_edit_page") === "0") {
347
  // nooope
348
  $edit.hide();
349
  $cms_tpv_action_add_and_edit_page.hide();
359
 
360
  }
361
 
362
+ /**
363
+ * When mouse leaves the whole cms tree page view-area/div
364
+ * hide actions div after moving mouse out of a page and not moving it on again for...a while
365
+ */
366
  jQuery(document).on("mouseleave", "div.cms_tpv_container", function(e) {
 
367
 
368
+ var $container = jQuery(e.target).closest("div.cms_tpv_container");
369
+ var $wrapper = $container.closest("div.cms_tpv_wrapper");
 
 
 
370
  var t = this;
371
+
372
+ // reset global timer
373
+ var global_timer = $container.data("cmstpv_global_link_timer");
374
+ if (global_timer) {
375
+ clearTimeout(global_timer);
376
+ }
377
 
378
+ // hide popup after a short while
379
+ var hideTimer = setTimeout(function() {
380
+
381
+ // But don't hide if we are inside the popup
382
+ var $toElement = jQuery(e.toElement);
383
+ if ($toElement.hasClass("cms_tpv_page_actions")) {
384
+ // we are over the actions div, so don't hide
385
+ } else {
386
+ // somewhere else, do hide
387
+ $container.find("li.has-visible-actions").removeClass("has-visible-actions");
388
+ $container.find("a.hover").removeClass("hover");
389
+ $wrapper.find("div.cms_tpv_page_actions").removeClass("cms_tpv_page_actions_visible");
390
+ }
391
 
392
+ }, 500);
393
+
394
+ $container.data("cmstpv_global_hide_timer", hideTimer);
395
 
396
  });
397
 
398
+ /// When mouse enters actions div then cancel possibly global hide timer
399
+ /*
400
+ jQuery(document).on("mouseenter", "div.cms_tpv_page_actions", function(e) {
401
+
402
+ var $this = jQuery(this);
403
+ var $wrapper = $this.closest("div.cms_tpv_wrapper");
404
+ var $container = $wrapper.find("div.cms_tpv_container");
405
+ var hideTimer = $container.data("cmstpv_global_hide_timer");
406
+ console.log(hideTimer, "hidetimer");
407
+ if (hideTimer) {
408
+ console.log("clearedIt!");
409
+ clearTimeout(hideTimer);
410
+ }
411
+
412
+ });
413
+ */
414
+
415
+
416
  // When mouse enter the whole cms tree page view-area/div
417
  jQuery(document).on("mouseenter", "div.cms_tpv_container", function(e) {
418
 
 
419
  var $container = jQuery(this);
420
  jQuery.data(this, "cmstpv_do_hide_after_timeout", false);
421
 
422
  });
423
 
424
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425
  /**
426
  * add childcount and other things to each li
427
  */
522
  }
523
 
524
  // To make hoverindent work we must wrap something around the a bla bla bla
525
+ //var div_wrap = jQuery("<div class='cmstpv-hoverIntent-wrap' />");
526
+ //aFirst.wrap(div_wrap);
 
 
 
 
 
 
 
527
 
528
  });
529
  }
541
  if (s) {
542
  $wrapper.find(".cms_tree_view_search_form_no_hits").fadeOut("fast");
543
  $wrapper.find(".cms_tree_view_search_form_working").fadeIn("fast");
544
+ $wrapper.find(".cms_tree_view_search_form_reset");
545
  $wrapper.find(".cms_tpv_container").jstree("search", s);
546
  $wrapper.find(".cms_tree_view_search_form_reset").fadeIn("fast");
547
  } else {
scripts/jquery.jstree.js CHANGED
@@ -235,6 +235,7 @@
235
  rslt = func.apply(
236
  $.extend({}, this, {
237
  __callback : function (data) {
 
238
  this.get_container().triggerHandler( i + '.jstree', { "inst" : this, "args" : args, "rslt" : data, "rlbk" : rlbk });
239
  },
240
  __rollback : function () {
235
  rslt = func.apply(
236
  $.extend({}, this, {
237
  __callback : function (data) {
238
+ //console.log(i);
239
  this.get_container().triggerHandler( i + '.jstree', { "inst" : this, "args" : args, "rslt" : data, "rlbk" : rlbk });
240
  },
241
  __rollback : function () {
styles/styles.css CHANGED
@@ -267,6 +267,11 @@
267
  overflow: hidden;
268
  }
269
 
 
 
 
 
 
270
  .cms_tpv_page_actions.cms_tpv_page_actions_visible {
271
  /*display: block;*/
272
  visibility: visible;
@@ -283,9 +288,13 @@ div.cms_tpv_container.has-visible-actions li.has-visible-actions {
283
  opacity: 1;
284
  }
285
  */
286
- li.has-visible-actions > div.cmstpv-hoverIntent-wrap:first-of-type > a:first-of-type {
287
  /*font-weight: bold;*/
288
- background-color: lightyellow;
 
 
 
 
289
  }
290
 
291
  .cms_tpv_page_actions p {
267
  overflow: hidden;
268
  }
269
 
270
+ .cms_tpv_page_actions_visible_from_bottom:before {
271
+ top: auto;
272
+ bottom: 10px;
273
+ }
274
+
275
  .cms_tpv_page_actions.cms_tpv_page_actions_visible {
276
  /*display: block;*/
277
  visibility: visible;
288
  opacity: 1;
289
  }
290
  */
291
+ li.has-visible-actions > a:first-of-type {
292
  /*font-weight: bold;*/
293
+ background-color: #d8f5fa;
294
+ }
295
+
296
+ .jstree a > ins {
297
+
298
  }
299
 
300
  .cms_tpv_page_actions p {