MINOR Redirecting page links in CMSPagesController to CMSPageEditController (admin/pages/show/99 to admin/page/show/99)

This commit is contained in:
Ingo Schommer 2011-07-04 16:09:07 +02:00
parent c4c3d21fa9
commit c4a99dfc09
2 changed files with 9 additions and 7 deletions

View File

@ -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);
}
}
}

View File

@ -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));