adjust toggle to not display block when showing

This commit is contained in:
Christopher Joe 2016-10-06 09:05:35 +13:00 committed by Damian Mooyman
parent b8b35de82d
commit 2b00bdfdd6
2 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -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();
}
}
});