Merge Zixaphir/v3

This commit is contained in:
Jordan Bates 2013-04-24 12:09:21 -07:00
commit c3eab3ab7c
4 changed files with 41 additions and 65 deletions

View File

@ -4773,7 +4773,6 @@
$.on(editCustomNav, 'click', this.editCustomNav); $.on(editCustomNav, 'click', this.editCustomNav);
this.setBarFixed(Conf['Fixed Header']); this.setBarFixed(Conf['Fixed Header']);
this.setBarVisibility(Conf['Header auto-hide']); this.setBarVisibility(Conf['Header auto-hide']);
this.setBarPosition(Conf['Bottom Header']);
$.sync('Fixed Header', Header.setBarFixed); $.sync('Fixed Header', Header.setBarFixed);
$.sync('Bottom Header', Header.setBarPosition); $.sync('Bottom Header', Header.setBarPosition);
$.sync('Header auto-hide', Header.setBarVisibility); $.sync('Header auto-hide', Header.setBarVisibility);
@ -4811,28 +4810,20 @@
$.asap((function() { $.asap((function() {
return $.id('boardNavMobile') || d.readyState === 'complete'; return $.id('boardNavMobile') || d.readyState === 'complete';
}), Header.setBoardList); }), Header.setBoardList);
return $.prepend(d.body, _this.bar); $.prepend(d.body, _this.bar);
}); return _this.setBarPosition(Conf['Bottom Header']);
$.ready(function() {
var a;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
return a.className = 'current';
}
}); });
return $.ready(function() { return $.ready(function() {
var cs, footer; var a, footer;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
a.className = 'current';
}
$.add(d.body, Header.hover); $.add(d.body, Header.hover);
Header.footer = footer = $.id('boardNavDesktopFoot'); Header.footer = footer = $.id('boardNavDesktopFoot');
this.footer = $.id('boardNavDesktopFoot'); _this.footer = $.id('boardNavDesktopFoot');
Header.setFooterVisibility(Conf['Footer auto-hide']); Header.setFooterVisibility(Conf['Footer auto-hide']);
$.sync('Footer auto-hide', Header.setFooterVisibility); $.sync('Footer auto-hide', Header.setFooterVisibility);
cs = $.id('settingsWindowLink');
cs.textContent = 'Catalog Settings';
if (g.VIEW === 'catalog') {
Header.addShortcut(cs);
}
return $.sync('Bottom Board List', Header.setFooterVisibility); return $.sync('Bottom Board List', Header.setFooterVisibility);
}); });
}, },
@ -4945,10 +4936,12 @@
Header.barPositionToggler.checked = bottom; Header.barPositionToggler.checked = bottom;
if (bottom) { if (bottom) {
$.rmClass(doc, 'top'); $.rmClass(doc, 'top');
return $.addClass(doc, 'bottom'); $.addClass(doc, 'bottom');
return $.after(Header.bar, Header.notify);
} else { } else {
$.rmClass(doc, 'bottom'); $.rmClass(doc, 'bottom');
return $.addClass(doc, 'top'); $.addClass(doc, 'top');
return $.add(Header.bar, Header.notify);
} }
}, },
toggleBarPosition: function() { toggleBarPosition: function() {
@ -5012,7 +5005,7 @@
cust = $('#custom-board-list', Header.bar); cust = $('#custom-board-list', Header.bar);
full = $('#full-board-list', Header.bar); full = $('#full-board-list', Header.bar);
btn = $('.hide-board-list-button', full); btn = $('.hide-board-list-button', full);
return _ref = show ? [false, true, false] : [true, false, true], cust.hidden = _ref[0], full.hidden = _ref[1], _ref; return _ref = show ? [false, true] : [true, false], cust.hidden = _ref[0], full.hidden = _ref[1], _ref;
}, },
toggleCustomNav: function() { toggleCustomNav: function() {
$.cb.checked.call(this); $.cb.checked.call(this);

View File

@ -4764,7 +4764,6 @@
$.on(editCustomNav, 'click', this.editCustomNav); $.on(editCustomNav, 'click', this.editCustomNav);
this.setBarFixed(Conf['Fixed Header']); this.setBarFixed(Conf['Fixed Header']);
this.setBarVisibility(Conf['Header auto-hide']); this.setBarVisibility(Conf['Header auto-hide']);
this.setBarPosition(Conf['Bottom Header']);
$.sync('Fixed Header', Header.setBarFixed); $.sync('Fixed Header', Header.setBarFixed);
$.sync('Bottom Header', Header.setBarPosition); $.sync('Bottom Header', Header.setBarPosition);
$.sync('Header auto-hide', Header.setBarVisibility); $.sync('Header auto-hide', Header.setBarVisibility);
@ -4802,28 +4801,20 @@
$.asap((function() { $.asap((function() {
return $.id('boardNavMobile') || d.readyState === 'complete'; return $.id('boardNavMobile') || d.readyState === 'complete';
}), Header.setBoardList); }), Header.setBoardList);
return $.prepend(d.body, _this.bar); $.prepend(d.body, _this.bar);
}); return _this.setBarPosition(Conf['Bottom Header']);
$.ready(function() {
var a;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
return a.className = 'current';
}
}); });
return $.ready(function() { return $.ready(function() {
var cs, footer; var a, footer;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
a.className = 'current';
}
$.add(d.body, Header.hover); $.add(d.body, Header.hover);
Header.footer = footer = $.id('boardNavDesktopFoot'); Header.footer = footer = $.id('boardNavDesktopFoot');
this.footer = $.id('boardNavDesktopFoot'); _this.footer = $.id('boardNavDesktopFoot');
Header.setFooterVisibility(Conf['Footer auto-hide']); Header.setFooterVisibility(Conf['Footer auto-hide']);
$.sync('Footer auto-hide', Header.setFooterVisibility); $.sync('Footer auto-hide', Header.setFooterVisibility);
cs = $.id('settingsWindowLink');
cs.textContent = 'Catalog Settings';
if (g.VIEW === 'catalog') {
Header.addShortcut(cs);
}
return $.sync('Bottom Board List', Header.setFooterVisibility); return $.sync('Bottom Board List', Header.setFooterVisibility);
}); });
}, },
@ -4936,10 +4927,12 @@
Header.barPositionToggler.checked = bottom; Header.barPositionToggler.checked = bottom;
if (bottom) { if (bottom) {
$.rmClass(doc, 'top'); $.rmClass(doc, 'top');
return $.addClass(doc, 'bottom'); $.addClass(doc, 'bottom');
return $.after(Header.bar, Header.notify);
} else { } else {
$.rmClass(doc, 'bottom'); $.rmClass(doc, 'bottom');
return $.addClass(doc, 'top'); $.addClass(doc, 'top');
return $.add(Header.bar, Header.notify);
} }
}, },
toggleBarPosition: function() { toggleBarPosition: function() {
@ -5003,7 +4996,7 @@
cust = $('#custom-board-list', Header.bar); cust = $('#custom-board-list', Header.bar);
full = $('#full-board-list', Header.bar); full = $('#full-board-list', Header.bar);
btn = $('.hide-board-list-button', full); btn = $('.hide-board-list-button', full);
return _ref = show ? [false, true, false] : [true, false, true], cust.hidden = _ref[0], full.hidden = _ref[1], _ref; return _ref = show ? [false, true] : [true, false], cust.hidden = _ref[0], full.hidden = _ref[1], _ref;
}, },
toggleCustomNav: function() { toggleCustomNav: function() {
$.cb.checked.call(this); $.cb.checked.call(this);

View File

@ -4628,7 +4628,6 @@
$.on(editCustomNav, 'click', this.editCustomNav); $.on(editCustomNav, 'click', this.editCustomNav);
this.setBarFixed(Conf['Fixed Header']); this.setBarFixed(Conf['Fixed Header']);
this.setBarVisibility(Conf['Header auto-hide']); this.setBarVisibility(Conf['Header auto-hide']);
this.setBarPosition(Conf['Bottom Header']);
$.sync('Fixed Header', Header.setBarFixed); $.sync('Fixed Header', Header.setBarFixed);
$.sync('Bottom Header', Header.setBarPosition); $.sync('Bottom Header', Header.setBarPosition);
$.sync('Header auto-hide', Header.setBarVisibility); $.sync('Header auto-hide', Header.setBarVisibility);
@ -4666,28 +4665,20 @@
$.asap((function() { $.asap((function() {
return $.id('boardNavMobile') || d.readyState === 'complete'; return $.id('boardNavMobile') || d.readyState === 'complete';
}), Header.setBoardList); }), Header.setBoardList);
return $.prepend(d.body, _this.bar); $.prepend(d.body, _this.bar);
}); return _this.setBarPosition(Conf['Bottom Header']);
$.ready(function() {
var a;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
return a.className = 'current';
}
}); });
return $.ready(function() { return $.ready(function() {
var cs, footer; var a, footer;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
a.className = 'current';
}
$.add(d.body, Header.hover); $.add(d.body, Header.hover);
Header.footer = footer = $.id('boardNavDesktopFoot'); Header.footer = footer = $.id('boardNavDesktopFoot');
this.footer = $.id('boardNavDesktopFoot'); _this.footer = $.id('boardNavDesktopFoot');
Header.setFooterVisibility(Conf['Footer auto-hide']); Header.setFooterVisibility(Conf['Footer auto-hide']);
$.sync('Footer auto-hide', Header.setFooterVisibility); $.sync('Footer auto-hide', Header.setFooterVisibility);
cs = $.id('settingsWindowLink');
cs.textContent = 'Catalog Settings';
if (g.VIEW === 'catalog') {
Header.addShortcut(cs);
}
return $.sync('Bottom Board List', Header.setFooterVisibility); return $.sync('Bottom Board List', Header.setFooterVisibility);
}); });
}, },
@ -4800,10 +4791,12 @@
Header.barPositionToggler.checked = bottom; Header.barPositionToggler.checked = bottom;
if (bottom) { if (bottom) {
$.rmClass(doc, 'top'); $.rmClass(doc, 'top');
return $.addClass(doc, 'bottom'); $.addClass(doc, 'bottom');
return $.after(Header.bar, Header.notify);
} else { } else {
$.rmClass(doc, 'bottom'); $.rmClass(doc, 'bottom');
return $.addClass(doc, 'top'); $.addClass(doc, 'top');
return $.add(Header.bar, Header.notify);
} }
}, },
toggleBarPosition: function() { toggleBarPosition: function() {
@ -4867,7 +4860,7 @@
cust = $('#custom-board-list', Header.bar); cust = $('#custom-board-list', Header.bar);
full = $('#full-board-list', Header.bar); full = $('#full-board-list', Header.bar);
btn = $('.hide-board-list-button', full); btn = $('.hide-board-list-button', full);
return _ref = show ? [false, true, false] : [true, false, true], cust.hidden = _ref[0], full.hidden = _ref[1], _ref; return _ref = show ? [false, true] : [true, false], cust.hidden = _ref[0], full.hidden = _ref[1], _ref;
}, },
toggleCustomNav: function() { toggleCustomNav: function() {
$.cb.checked.call(this); $.cb.checked.call(this);

View File

@ -35,7 +35,6 @@ Header =
@setBarFixed Conf['Fixed Header'] @setBarFixed Conf['Fixed Header']
@setBarVisibility Conf['Header auto-hide'] @setBarVisibility Conf['Header auto-hide']
@setBarPosition Conf['Bottom Header']
$.sync 'Fixed Header', Header.setBarFixed $.sync 'Fixed Header', Header.setBarFixed
$.sync 'Bottom Header', Header.setBarPosition $.sync 'Bottom Header', Header.setBarPosition
@ -66,21 +65,17 @@ Header =
# it might be incomplete otherwise. # it might be incomplete otherwise.
$.asap (-> $.id('boardNavMobile') or d.readyState is 'complete'), Header.setBoardList $.asap (-> $.id('boardNavMobile') or d.readyState is 'complete'), Header.setBoardList
$.prepend d.body, @bar $.prepend d.body, @bar
@setBarPosition Conf['Bottom Header']
$.ready => $.ready =>
if a = $ "a[href*='/#{g.BOARD}/']", $.id 'boardNavDesktopFoot' if a = $ "a[href*='/#{g.BOARD}/']", $.id 'boardNavDesktopFoot'
a.className = 'current' a.className = 'current'
$.ready ->
$.add d.body, Header.hover $.add d.body, Header.hover
Header.footer = footer = $.id 'boardNavDesktopFoot' Header.footer = footer = $.id 'boardNavDesktopFoot'
@footer = $.id 'boardNavDesktopFoot' @footer = $.id 'boardNavDesktopFoot'
Header.setFooterVisibility Conf['Footer auto-hide'] Header.setFooterVisibility Conf['Footer auto-hide']
$.sync 'Footer auto-hide', Header.setFooterVisibility $.sync 'Footer auto-hide', Header.setFooterVisibility
cs = $.id('settingsWindowLink')
cs.textContent = 'Catalog Settings'
if g.VIEW is 'catalog'
Header.addShortcut cs
$.sync 'Bottom Board List', Header.setFooterVisibility $.sync 'Bottom Board List', Header.setFooterVisibility
bar: $.el 'div', bar: $.el 'div',
@ -175,9 +170,11 @@ Header =
if bottom if bottom
$.rmClass doc, 'top' $.rmClass doc, 'top'
$.addClass doc, 'bottom' $.addClass doc, 'bottom'
$.after Header.bar, Header.notify
else else
$.rmClass doc, 'bottom' $.rmClass doc, 'bottom'
$.addClass doc, 'top' $.addClass doc, 'top'
$.add Header.bar, Header.notify
toggleBarPosition: -> toggleBarPosition: ->
$.event 'CloseMenu' $.event 'CloseMenu'
@ -248,9 +245,9 @@ Header =
full = $ '#full-board-list', Header.bar full = $ '#full-board-list', Header.bar
btn = $ '.hide-board-list-button', full btn = $ '.hide-board-list-button', full
[cust.hidden, full.hidden] = if show [cust.hidden, full.hidden] = if show
[false, true, false] [false, true]
else else
[true, false, true] [true, false]
toggleCustomNav: -> toggleCustomNav: ->
$.cb.checked.call @ $.cb.checked.call @