Permalink
Browse files

MINOR Redirecting page links in CMSPagesController to CMSPageEditCont…

…roller (admin/pages/show/99 to admin/page/show/99)
  • Loading branch information...
1 parent c4c3d21 commit c4a99dfc095d85ec639d7e9523a2cf683c6cbcbb @chillu chillu committed Jul 4, 2011
Showing with 9 additions and 7 deletions.
  1. +9 −0 code/controller/CMSPagesController.php
  2. +0 −7 javascript/CMSPagesController.Tree.js
@@ -21,4 +21,13 @@ function show($request) {
}
}
+ function Link($action = null) {
+ // Special case: All show links should redirect to the page edit interface instead (mostly from tree nodes)
+ if(preg_match('/^show/', $action)) {
+ return singleton('CMSPageEditController')->Link($action);
+ } else {
+ return parent::Link($action);
+ }
+ }
+
}
@@ -1,7 +0,0 @@
-(function($) {
- $('.cms-tree').bind('select_node.jstree', function(e, data) {
- var node = data.rslt.obj, url = $(node).find('a:first').attr('href');
- if(url && url != '#') document.location.href = url;
- return false;
- });
-}(jQuery));

0 comments on commit c4a99df

Please sign in to comment.