From 2b00bdfdd6b53d70df4b1c596d875f196965782f Mon Sep 17 00:00:00 2001 From: Christopher Joe Date: Thu, 6 Oct 2016 09:05:35 +1300 Subject: [PATCH] adjust toggle to not display block when showing --- client/dist/js/bundle.js | 3 ++- client/src/legacy/CMSPageHistoryController.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 94e543e6..dc5b2d05 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -140,7 +140,8 @@ s=r["default"].sprintf(this.data("linkTmplShow"),i,l) t(".cms-container").loadPanel(s,"",{pjax:"CurrentForm"})}}),t("#Form_VersionsForm input[name=ShowUnpublished]").entwine({onmatch:function a(){this.toggle(),this._super()},onunmatch:function o(){this._super() },onchange:function s(){this.toggle()},toggle:function d(){var e=t(this),n=e.parents("form") -e.attr("checked")?n.find("tr[data-published=false]").show():n.find("tr[data-published=false]").hide()._unselect()}}),t("#Form_VersionsForm tbody tr").entwine({onclick:function l(t){var e,n +e.attr("checked")?n.find("tr[data-published=false]").css("display",""):n.find("tr[data-published=false]").css("display","none")._unselect()}}),t("#Form_VersionsForm tbody tr").entwine({onclick:function l(t){ +var e,n return e=this.parents("form").find(":input[name=CompareMode]").attr("checked"),n=this.siblings(".active"),e&&this.hasClass("active")?void this._unselect():e?n.length>1?alert(r["default"]._t("ONLYSELECTTWO","You can only compare two versions at this time.")):(this._select(), void(1==n.length&&this.parents("form").submit())):(this._select(),n._unselect(),this.parents("form").submit(),void 0)},_unselect:function c(){this.removeClass("active"),this.find(":input[type=checkbox]").attr("checked",!1) diff --git a/client/src/legacy/CMSPageHistoryController.js b/client/src/legacy/CMSPageHistoryController.js index f9817ab1..577a9eb3 100644 --- a/client/src/legacy/CMSPageHistoryController.js +++ b/client/src/legacy/CMSPageHistoryController.js @@ -96,9 +96,9 @@ $.entwine('ss', function($){ var form = self.parents('form'); if(self.attr('checked')) { - form.find('tr[data-published=false]').show(); + form.find('tr[data-published=false]').css('display', ''); } else { - form.find("tr[data-published=false]").hide()._unselect(); + form.find("tr[data-published=false]").css('display', 'none')._unselect(); } } });