mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Fixed CMSMain.js search clearing logic, wasnt clearing the first field properly. Fixed LeftAndMain->getsubtree() filtering in AssetAdmin and SecurityAdmin.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92849 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9c3ecea1e7
commit
990ae9f145
@ -260,6 +260,11 @@ HTML;
|
||||
return $this->getSiteTreeFor($this->stat('tree_class'), null, 'ChildFolders');
|
||||
}
|
||||
|
||||
function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $filterFunction = null, $minNodeCount = 30) {
|
||||
if (!$childrenMethod) $childrenMethod = 'ChildFolders';
|
||||
return parent::getSiteTreeFor($className, $rootID, $childrenMethod, $filterFunction, $minNodeCount);
|
||||
}
|
||||
|
||||
public function getCMSTreeTitle() {
|
||||
return Director::absoluteBaseURL() . "assets";
|
||||
}
|
||||
|
@ -492,6 +492,7 @@ class LeftAndMain extends Controller {
|
||||
. '".$child->class."\" >" . ($child->TreeTitle) .
|
||||
"</a>"
|
||||
';
|
||||
|
||||
$siteTree = $obj->getChildrenAsUL(
|
||||
"",
|
||||
$titleEval,
|
||||
@ -525,7 +526,7 @@ class LeftAndMain extends Controller {
|
||||
$this->stat('tree_class'),
|
||||
$request->getVar('ID'),
|
||||
null,
|
||||
array($this->getMarkingFilter($request->requestVars()), 'mark'),
|
||||
null,
|
||||
$request->getVar('minNodeCount')
|
||||
);
|
||||
|
||||
|
@ -183,6 +183,11 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
return FormResponse::respond();
|
||||
}
|
||||
|
||||
function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $filterFunction = null, $minNodeCount = 30) {
|
||||
if (!$childrenMethod) $childrenMethod = 'stageChildren';
|
||||
return parent::getSiteTreeFor($className, $rootID, $childrenMethod, $filterFunction, $minNodeCount);
|
||||
}
|
||||
|
||||
function getCMSTreeTitle() {
|
||||
return _t('SecurityAdmin.SGROUPS', 'Security Groups');
|
||||
}
|
||||
|
@ -44,12 +44,16 @@ var _HANDLER_FORMS = {
|
||||
jQuery(this).attr('action'),
|
||||
function() {
|
||||
button.removeClass('loading');
|
||||
// reload current
|
||||
// reload current form and tree
|
||||
var currNode = $('#sitetree')[0].firstSelected();
|
||||
if(currNode) {
|
||||
var url = $(currNode).find('a').attr('href');
|
||||
$('#Form_EditForm').loadForm(url);
|
||||
}
|
||||
$('#sitetree')[0].setCustomURL('admin/assets/getsubtree');
|
||||
$('#sitetree')[0].reload({onSuccess: function() {
|
||||
// TODO Reset current tree node
|
||||
}});
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -99,7 +99,8 @@
|
||||
},
|
||||
|
||||
onreset: function(e) {
|
||||
this.find('.field').clearFields().not(':first').hide();
|
||||
this.find('.field :input').clearFields();
|
||||
this.find('.field').not(':first').hide();
|
||||
|
||||
// Reset URL to default
|
||||
$('#sitetree')[0].clearCustomURL();
|
||||
|
Loading…
Reference in New Issue
Block a user