mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00: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');
|
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() {
|
public function getCMSTreeTitle() {
|
||||||
return Director::absoluteBaseURL() . "assets";
|
return Director::absoluteBaseURL() . "assets";
|
||||||
}
|
}
|
||||||
|
@ -492,6 +492,7 @@ class LeftAndMain extends Controller {
|
|||||||
. '".$child->class."\" >" . ($child->TreeTitle) .
|
. '".$child->class."\" >" . ($child->TreeTitle) .
|
||||||
"</a>"
|
"</a>"
|
||||||
';
|
';
|
||||||
|
|
||||||
$siteTree = $obj->getChildrenAsUL(
|
$siteTree = $obj->getChildrenAsUL(
|
||||||
"",
|
"",
|
||||||
$titleEval,
|
$titleEval,
|
||||||
@ -525,7 +526,7 @@ class LeftAndMain extends Controller {
|
|||||||
$this->stat('tree_class'),
|
$this->stat('tree_class'),
|
||||||
$request->getVar('ID'),
|
$request->getVar('ID'),
|
||||||
null,
|
null,
|
||||||
array($this->getMarkingFilter($request->requestVars()), 'mark'),
|
null,
|
||||||
$request->getVar('minNodeCount')
|
$request->getVar('minNodeCount')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -183,6 +183,11 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
return FormResponse::respond();
|
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() {
|
function getCMSTreeTitle() {
|
||||||
return _t('SecurityAdmin.SGROUPS', 'Security Groups');
|
return _t('SecurityAdmin.SGROUPS', 'Security Groups');
|
||||||
}
|
}
|
||||||
|
@ -44,12 +44,16 @@ var _HANDLER_FORMS = {
|
|||||||
jQuery(this).attr('action'),
|
jQuery(this).attr('action'),
|
||||||
function() {
|
function() {
|
||||||
button.removeClass('loading');
|
button.removeClass('loading');
|
||||||
// reload current
|
// reload current form and tree
|
||||||
var currNode = $('#sitetree')[0].firstSelected();
|
var currNode = $('#sitetree')[0].firstSelected();
|
||||||
if(currNode) {
|
if(currNode) {
|
||||||
var url = $(currNode).find('a').attr('href');
|
var url = $(currNode).find('a').attr('href');
|
||||||
$('#Form_EditForm').loadForm(url);
|
$('#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) {
|
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
|
// Reset URL to default
|
||||||
$('#sitetree')[0].clearCustomURL();
|
$('#sitetree')[0].clearCustomURL();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user