background-color: #DADADA;
border-left: 1px solid #8A8A8A;
}
-#kiwi.narrow .right_bar { display:none; }
+#kiwi.narrow .right_bar { width:100%; }
+#kiwi.narrow .right_bar.disabled { width:0; }
+
#kiwi .memberlists ul { list-style: none; }
#kiwi .memberlists ul.active { }
#kiwi .memberlists ul li { padding: 0.2em 1em; }
}
// Determine if we have a narrow window (mobile/tablet/or even small desktop window)
- if (el_kiwi.outerWidth() < 400) {
+ if (el_kiwi.outerWidth() < 420) {
el_kiwi.addClass('narrow');
+ if (this.model.rightbar && this.model.rightbar.keep_hidden !== true)
+ this.model.rightbar.toggle(true);
} else {
el_kiwi.removeClass('narrow');
+ if (this.model.rightbar && this.model.rightbar.keep_hidden !== false)
+ this.model.rightbar.toggle(false);
}
// Set the panels width depending on the memberlist visibility
// Toggle if the rightbar should be shown or not
- toggle: function() {
- this.keep_hidden = !this.keep_hidden;
+ toggle: function(keep_hidden) {
+ // Hacky, but we need to ignore the toggle() call from doLayout() as we are overriding it
+ if (this.ignore_layout)
+ return true;
+
+ if (typeof keep_hidden === 'undefined') {
+ this.keep_hidden = !this.keep_hidden;
+ } else {
+ this.keep_hidden = keep_hidden;
+ }
if (this.keep_hidden || this.hidden) {
this.$el.addClass('disabled');
onClickToggle: function(event) {
this.toggle();
+
+ // Hacky, but we need to ignore the toggle() call from doLayout() as we are overriding it
+ this.ignore_layout = true;
_kiwi.app.view.doLayout();
+
+ // No longer ignoring the toggle() call from doLayout()
+ delete this.ignore_layout;
}
});
\ No newline at end of file