Skip to content
Browse files

ENHANCEMENT Moved sitetree filter functionality back into CMSMain->Se…

…archForm() 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
  • Loading branch information...
1 parent 898665e commit fec71a06ebcf0a4a6dd17d597a30c99ccbe775b8 @chillu chillu committed Nov 21, 2009
Showing with 0 additions and 44 deletions.
  1. +0 −36 javascript/CMSMain_left.js
  2. +0 −8 templates/Includes/CMSMain_TreeTools.ss
View
36 javascript/CMSMain_left.js
@@ -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
8 templates/Includes/CMSMain_TreeTools.ss
@@ -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">

0 comments on commit fec71a0

Please sign in to comment.
Something went wrong with that request. Please try again.