Merge branch 'master' into integration

This commit is contained in:
Ingo Schommer 2012-02-28 20:17:49 +01:00
commit 477c319cac
3 changed files with 21 additions and 4 deletions

View File

@ -38,10 +38,12 @@ class AssetAdmin extends LeftAndMain {
* Return fake-ID "root" if no ID is found (needed to upload files into the root-folder)
*/
public function currentPageID() {
if(isset($_REQUEST['ID']) && is_numeric($_REQUEST['ID'])) {
return $_REQUEST['ID'];
if($this->request->requestVar('ID')) {
return $this->request->requestVar('ID');
} elseif (is_numeric($this->urlParams['ID'])) {
return $this->urlParams['ID'];
} elseif(Session::get("{$this->class}.currentPage")) {
return Session::get("{$this->class}.currentPage");
} else {
return "root";
}
@ -474,6 +476,18 @@ JS
return array_diff($allThumbnails, $usedThumbnails);
}
/**
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false) {
$items = parent::Breadcrumbs($unlinked);
// The root element should explicitly point to the root node
$items[0]->Link = Controller::join_links($this->Link('show'), 'root');
return $items;
}
}
/**

View File

@ -31,7 +31,10 @@
$('#Form_EditForm_File .ss-gridfield-item').entwine({
onclick: function(e) {
// Let actions do their own thing
if($(e.target).is('.action')) return;
if($(e.target).is('.action')) {
this._super();
return;
}
var grid = this.closest('.ss-gridfield');
if(this.data('class') == 'Folder') {

View File

@ -1,5 +1,5 @@
jQuery(function($){
$('fieldset.ss-gridfield').entwine({
$('.ss-gridfield').entwine({
onopennewview: function(e, url) {
$('.cms-container').entwine('ss').loadPanel(url);
return false;