mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1264 from scott1702/filtered-tree
Update the filtered tree styling
This commit is contained in:
commit
1ada2dab1d
@ -158,6 +158,19 @@
|
||||
window.location = location.protocol + '//' + location.host + location.pathname;
|
||||
}
|
||||
});
|
||||
|
||||
$('.cms-tree-filtered').entwine({
|
||||
onmatch: function () {
|
||||
var self = this,
|
||||
setHeight = function () {
|
||||
var height = $('.cms-content-tools .cms-panel-content').height() - self.parent().siblings('.cms-content-toolbar').outerHeight(true);
|
||||
self.css('height', height + 'px');
|
||||
};
|
||||
|
||||
setHeight();
|
||||
$(window).on('resize', window.ss.debounce(setHeight, 300));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
|
@ -94,7 +94,7 @@ en:
|
||||
DUPLICATEDWITHCHILDREN: 'Duplicated ''{title}'' and children successfully'
|
||||
EMAIL: Email
|
||||
EditTree: 'Edit Tree'
|
||||
ListFiltered: 'Filtered list.'
|
||||
ListFiltered: 'Showing search results.'
|
||||
MENUTITLE: 'Edit Page'
|
||||
NEWPAGE: 'New {pagetype}'
|
||||
PAGENOTEXISTS: 'This page doesn''t exist'
|
||||
@ -122,7 +122,7 @@ en:
|
||||
TabContent: Content
|
||||
TabHistory: History
|
||||
TabSettings: Settings
|
||||
TreeFiltered: 'Search results.'
|
||||
TreeFiltered: 'Showing search results.'
|
||||
TreeFilteredClear: Clear
|
||||
MENUTITLE: 'Edit Page'
|
||||
ARCHIVE: Archive
|
||||
|
@ -6,15 +6,20 @@
|
||||
|
||||
<div class="cms-panel-content center">
|
||||
<% if $TreeIsFiltered %>
|
||||
<div class="cms-tree-filtered cms-notice">
|
||||
<strong><% _t('CMSMain.ListFiltered', 'Filtered list.') %></strong>
|
||||
<div class="cms-notice cms-tree-filtered">
|
||||
<strong><% _t('CMSMain.ListFiltered', 'Showing search results.') %></strong>
|
||||
<a href="$LinkPages" class="cms-panel-link">
|
||||
<% _t('CMSMain.TreeFilteredClear', 'Clear') %>
|
||||
</a>
|
||||
|
||||
<div class="cms-list" data-url-list="$Link(getListViewHTML)">
|
||||
$ListViewForm
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<% else %>
|
||||
|
||||
<div class="cms-list" data-url-list="$Link(getListViewHTML)">
|
||||
$ListViewForm
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
@ -9,12 +9,28 @@ $ExtraTreeTools
|
||||
<div class="center">
|
||||
<% if $TreeIsFiltered %>
|
||||
<div class="cms-tree-filtered cms-notice">
|
||||
<strong><% _t('CMSMain.TreeFiltered', 'Search results.') %></strong>
|
||||
<strong><% _t('CMSMain.TreeFiltered', 'Showing search results.') %></strong>
|
||||
<a href="javascript:void(0)" class="clear-filter">
|
||||
<% _t('CMSMain.TreeFilteredClear', 'Clear') %>
|
||||
</a>
|
||||
|
||||
<div class="cms-tree <% if $TreeIsFiltered %>filtered-list<% end_if %>"
|
||||
data-url-tree="$LinkWithSearch($Link(getsubtree))"
|
||||
data-url-savetreenode="$Link(savetreenode)"
|
||||
data-url-updatetreenodes="$Link(updatetreenodes)"
|
||||
data-url-addpage="{$LinkPageAdd('AddForm/?action_doAdd=1', 'ParentID=%s&PageType=%s')}"
|
||||
data-url-editpage="$LinkPageEdit('%s')"
|
||||
data-url-duplicate="{$Link('duplicate/%s')}"
|
||||
data-url-duplicatewithchildren="{$Link('duplicatewithchildren/%s')}"
|
||||
data-url-listview="{$Link('?view=list')}"
|
||||
data-hints="$SiteTreeHints.XML"
|
||||
data-childfilter="$Link('childfilter')"
|
||||
data-extra-params="SecurityID=$SecurityID">
|
||||
$SiteTreeAsUL
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% else %>
|
||||
|
||||
<div class="cms-tree <% if $TreeIsFiltered %>filtered-list<% end_if %>"
|
||||
data-url-tree="$LinkWithSearch($Link(getsubtree))"
|
||||
@ -30,4 +46,6 @@ $ExtraTreeTools
|
||||
data-extra-params="SecurityID=$SecurityID">
|
||||
$SiteTreeAsUL
|
||||
</div>
|
||||
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user