Skip to content

Commit

Permalink
MINOR Redirecting page links in CMSPagesController to CMSPageEditCont…
Browse files Browse the repository at this point in the history
…roller (admin/pages/show/99 to admin/page/show/99)
  • Loading branch information
chillu committed Jul 8, 2011
1 parent c4c3d21 commit c4a99df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 9 additions & 0 deletions code/controller/CMSPagesController.php
Expand Up @@ -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);
}
}

} }
7 changes: 0 additions & 7 deletions 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));

0 comments on commit c4a99df

Please sign in to comment.