ENHANCEMENT Moved sitetree filter functionality back into CMSMain->SearchForm() to simplify both serverside and clientside processing, and save precious UI real estate above the tree panel

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92725 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 03:15:47 +00:00
parent 898665e54b
commit fec71a06eb
2 changed files with 0 additions and 44 deletions

View File

@ -4,42 +4,6 @@ SiteTreeHandlers.orderChanged_url = 'admin/ajaxupdatesort';
SiteTreeHandlers.loadPage_url = 'admin/getitem';
SiteTreeHandlers.loadTree_url = 'admin/getsubtree';
SiteTreeFilter = Class.create();
SiteTreeFilter.applyTo('#siteTreeFilterList');
SiteTreeFilter.prototype = {
initialize: function () {
},
onchange : function() {
var value = this.options[this.selectedIndex].value;
if(value != 'all') {
$('sitetree').setCustomURL(SiteTreeHandlers.controller_url+'/getfilteredsubtree?filter='+escape(value));
} else {
$('sitetree').clearCustomURL();
}
// We can't update the tree while it's draggable; it gets b0rked.
var __makeDraggableAfterUpdate = false;
if($('sitetree').isDraggable) {
$('sitetree').stopBeingDraggable();
__makeDraggableAfterUpdate = true;
}
var indicator = $('siteTreeFilterActionIndicator');
indicator.style.display = 'inline';
$('sitetree').reload({
onSuccess: function() {
indicator.style.display = 'none';
if(__makeDraggableAfterUpdate) $('sitetree').makeDraggable();
},
onFailure: function(response) {
errorMessage('Could not update tree', response);
}
});
}
}
/**
* Tree context menu
*/

View File

@ -31,14 +31,6 @@
</div>
</div>
<div class="checkboxAboveTree" style="border-bottom:none">
Show: <select id="siteTreeFilterList">
<% control SiteTreeFilters %>
<option value="$ClassName">$Title</option>
<% end_control %>
</select> <img id="siteTreeFilterActionIndicator" style="display:none" src="cms/images/network-save.gif">
</div>
<div class="checkboxAboveTree">
<img id="checkboxActionIndicator" src="cms/images/network-save.gif">