Remove JS from filter height and replace with flexbox

This commit is contained in:
Paul Clarke 2016-10-21 14:08:42 +13:00
parent 13d40f96f3
commit 172072df03
5 changed files with 8 additions and 22 deletions

View File

@ -123,10 +123,9 @@ label:r["default"]._t("Tree.Duplicate"),submenu:[{label:r["default"]._t("Tree.Th
}},{label:r["default"]._t("Tree.ThisPageAndSubpages"),action:function f(n){t(".cms-container").entwine(".ss").loadPanel(t.path.addSearchParams(r["default"].sprintf(e.data("urlDuplicatewithchildren"),n.data("id")),e.data("extraParams")))
}}]}),i}},n}}),t(".cms-tree a.jstree-clicked").entwine({onmatch:function a(){var t=this,e=t.parents(".cms-panel-content"),n;(t.offset().top<0||t.offset().top>e.height()-t.height())&&(n=e.scrollTop()+t.offset().top+e.height()/2,
e.animate({scrollTop:n},"slow"))}}),t(".cms-tree-filtered .clear-filter").entwine({onclick:function o(){window.location=location.protocol+"//"+location.host+location.pathname}}),t(".cms-tree-filtered").entwine({
onmatch:function s(){var e=this,n=function i(){var n=t(".cms-content-tools .cms-panel-content").height()-e.parent().siblings(".cms-content-toolbar").outerHeight(!0)
e.css("height",n+"px")}
n(),t(window).on("resize",window.ss.debounce(n,300))}})})},function(t,e,n){"use strict"
e.animate({scrollTop:n},"slow"))}}),t(".cms-tree-filtered .clear-filter").entwine({onclick:function o(){window.location=location.protocol+"//"+location.host+location.pathname}})})},function(t,e,n){"use strict"
function i(t){return t&&t.__esModule?t:{"default":t}}var a=n(2),o=i(a),s=n(5),r=i(s)
o["default"].entwine("ss",function(t){t("#Form_VersionsForm").entwine({onmatch:function e(){this._super()},onunmatch:function n(){this._super()},onsubmit:function i(e,n){e.preventDefault()
var i,a=this

View File

@ -163,17 +163,4 @@ $.entwine('ss.tree', function($){
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));
}
});
});

View File

@ -14,12 +14,12 @@
</div>
</div>
</div>
<div class="panel panel--scrollable flexbox-area-grow cms-panel-content">
<div class="panel panel--scrollable flexbox-area-grow fill-height cms-panel-content">
<div class="cms-content-filters">
$SearchForm
</div>
<div class="panel panel--padded cms-content-view cms-tree-view-sidebar cms-panel-deferred" id="cms-content-treeview" data-url="$LinkTreeView">
<div class="panel panel--padded flexbox-area-grow fill-height cms-content-view cms-tree-view-sidebar cms-panel-deferred" id="cms-content-treeview" data-url="$LinkTreeView">
<%-- Lazy-loaded via ajax --%>
</div>
</div>

View File

@ -6,7 +6,7 @@
$ExtraTreeTools
<div class="center">
<div class="flexbox-area-grow">
<% if $TreeIsFiltered %>
<div class="cms-tree-filtered cms-notice">
<strong><% _t('CMSMain.TreeFiltered', 'Showing search results.') %></strong>

View File

@ -20,10 +20,10 @@
</div>
</div>
<div class="cms-content-fields center ui-widget-content cms-panel-padded">
<div class="cms-content-fields center ui-widget-content cms-panel-padded flexbox-area-grow fill-height">
$Tools
<div class="cms-content-view cms-panel-deferred" id="cms-content-treeview" data-url="$LinkTreeView" data-deferred-no-cache="true">
<div class="cms-content-view cms-panel-deferred fill-height flexbox-display" id="cms-content-treeview" data-url="$LinkTreeView" data-deferred-no-cache="true">
<%-- Lazy-loaded via ajax --%>
</div>