MINOR Moved CMSMain.GridField.js logic into LeftAndMain.js (applies to all CMS interfaces), fixed event bugs with GridField overloading in AssetAdmin.js

This commit is contained in:
Ingo Schommer 2012-03-01 00:15:28 +01:00
parent 6860c5dd9f
commit 18e612e65b
6 changed files with 4 additions and 22 deletions

View File

@ -88,9 +88,9 @@ JS
new GridFieldSortableHeader(),
new GridFieldFilter(),
new GridFieldDefaultColumns(),
new GridFieldPaginator(10),
new GridFieldAction_Delete(),
new GridFieldPaginator(15),
new GridFieldAction_Edit(),
new GridFieldAction_Delete(),
new GridFieldPopupForms()
);
$files = DataList::create('File')

View File

@ -67,7 +67,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
CMS_DIR . '/javascript/CMSMain.js',
CMS_DIR . '/javascript/CMSMain.EditForm.js',
CMS_DIR . '/javascript/CMSMain.AddForm.js',
CMS_DIR . '/javascript/CMSMain.GridField.js',
CMS_DIR . '/javascript/CMSPageHistoryController.js',
// CMS_DIR . '/javascript/CMSPagesController.Tree.js',
CMS_DIR . '/javascript/SilverStripeNavigator.js'

View File

@ -15,4 +15,3 @@
.cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail img { width: 32px; height: 32px; }
.cms .AssetAdmin #Form_EditForm_File tr[data-class=Folder] td.col-StripThumbnail { background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-folder-horizontal.png) no-repeat top left; }
.cms .AssetAdmin #Form_EditForm_File tr[data-class=File] td.col-StripThumbnail { background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-document.png) no-repeat top left; }
.cms .AssetAdmin #Form_EditForm_File td.col-Title { cursor: pointer; }

View File

@ -32,7 +32,7 @@
onclick: function(e) {
// Let actions do their own thing
if($(e.target).is('.action')) {
this._super();
this._super(e);
return;
}
@ -40,7 +40,7 @@
if(this.data('class') == 'Folder') {
var url = grid.data('urlFolderTemplate').replace('%s', this.data('id'));
$('.cms-container').loadPanel(url);
e.preventDefault();
return false;
}
}
});

View File

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

View File

@ -27,8 +27,5 @@
background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-document.png) no-repeat top left;
}
}
td.col-Title {
cursor: pointer;
}
}
}