diff --git a/code/controller/CMSPagesController.php b/code/controller/CMSPagesController.php index 60db51bb..db7e66b0 100644 --- a/code/controller/CMSPagesController.php +++ b/code/controller/CMSPagesController.php @@ -21,4 +21,13 @@ class CMSPagesController extends CMSMain { } } + 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); + } + } + } \ No newline at end of file diff --git a/javascript/CMSPagesController.Tree.js b/javascript/CMSPagesController.Tree.js index 3aeca1d9..e69de29b 100644 --- a/javascript/CMSPagesController.Tree.js +++ b/javascript/CMSPagesController.Tree.js @@ -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)); \ No newline at end of file