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);
this.setBarFixed(Conf['Fixed Header']);
this.setBarVisibility(Conf['Header auto-hide']);
this.setBarPosition(Conf['Bottom Header']);
$.sync('Fixed Header', Header.setBarFixed);
$.sync('Bottom Header', Header.setBarPosition);
$.sync('Header auto-hide', Header.setBarVisibility);
@ -4811,28 +4810,20 @@
$.asap((function() {
return $.id('boardNavMobile') || d.readyState === 'complete';
}), Header.setBoardList);
return $.prepend(d.body, _this.bar);
});
$.ready(function() {
var a;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
return a.className = 'current';
}
$.prepend(d.body, _this.bar);
return _this.setBarPosition(Conf['Bottom Header']);
});
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);
Header.footer = footer = $.id('boardNavDesktopFoot');
this.footer = $.id('boardNavDesktopFoot');
_this.footer = $.id('boardNavDesktopFoot');
Header.setFooterVisibility(Conf['Footer auto-hide']);
$.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);
});
},
@ -4945,10 +4936,12 @@
Header.barPositionToggler.checked = bottom;
if (bottom) {
$.rmClass(doc, 'top');
return $.addClass(doc, 'bottom');
$.addClass(doc, 'bottom');
return $.after(Header.bar, Header.notify);
} else {
$.rmClass(doc, 'bottom');
return $.addClass(doc, 'top');
$.addClass(doc, 'top');
return $.add(Header.bar, Header.notify);
}
},
toggleBarPosition: function() {
@ -5012,7 +5005,7 @@
cust = $('#custom-board-list', Header.bar);
full = $('#full-board-list', Header.bar);
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() {
$.cb.checked.call(this);

View File

@ -4764,7 +4764,6 @@
$.on(editCustomNav, 'click', this.editCustomNav);
this.setBarFixed(Conf['Fixed Header']);
this.setBarVisibility(Conf['Header auto-hide']);
this.setBarPosition(Conf['Bottom Header']);
$.sync('Fixed Header', Header.setBarFixed);
$.sync('Bottom Header', Header.setBarPosition);
$.sync('Header auto-hide', Header.setBarVisibility);
@ -4802,28 +4801,20 @@
$.asap((function() {
return $.id('boardNavMobile') || d.readyState === 'complete';
}), Header.setBoardList);
return $.prepend(d.body, _this.bar);
});
$.ready(function() {
var a;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
return a.className = 'current';
}
$.prepend(d.body, _this.bar);
return _this.setBarPosition(Conf['Bottom Header']);
});
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);
Header.footer = footer = $.id('boardNavDesktopFoot');
this.footer = $.id('boardNavDesktopFoot');
_this.footer = $.id('boardNavDesktopFoot');
Header.setFooterVisibility(Conf['Footer auto-hide']);
$.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);
});
},
@ -4936,10 +4927,12 @@
Header.barPositionToggler.checked = bottom;
if (bottom) {
$.rmClass(doc, 'top');
return $.addClass(doc, 'bottom');
$.addClass(doc, 'bottom');
return $.after(Header.bar, Header.notify);
} else {
$.rmClass(doc, 'bottom');
return $.addClass(doc, 'top');
$.addClass(doc, 'top');
return $.add(Header.bar, Header.notify);
}
},
toggleBarPosition: function() {
@ -5003,7 +4996,7 @@
cust = $('#custom-board-list', Header.bar);
full = $('#full-board-list', Header.bar);
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() {
$.cb.checked.call(this);

View File

@ -4628,7 +4628,6 @@
$.on(editCustomNav, 'click', this.editCustomNav);
this.setBarFixed(Conf['Fixed Header']);
this.setBarVisibility(Conf['Header auto-hide']);
this.setBarPosition(Conf['Bottom Header']);
$.sync('Fixed Header', Header.setBarFixed);
$.sync('Bottom Header', Header.setBarPosition);
$.sync('Header auto-hide', Header.setBarVisibility);
@ -4666,28 +4665,20 @@
$.asap((function() {
return $.id('boardNavMobile') || d.readyState === 'complete';
}), Header.setBoardList);
return $.prepend(d.body, _this.bar);
});
$.ready(function() {
var a;
if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) {
return a.className = 'current';
}
$.prepend(d.body, _this.bar);
return _this.setBarPosition(Conf['Bottom Header']);
});
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);
Header.footer = footer = $.id('boardNavDesktopFoot');
this.footer = $.id('boardNavDesktopFoot');
_this.footer = $.id('boardNavDesktopFoot');
Header.setFooterVisibility(Conf['Footer auto-hide']);
$.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);
});
},
@ -4800,10 +4791,12 @@
Header.barPositionToggler.checked = bottom;
if (bottom) {
$.rmClass(doc, 'top');
return $.addClass(doc, 'bottom');
$.addClass(doc, 'bottom');
return $.after(Header.bar, Header.notify);
} else {
$.rmClass(doc, 'bottom');
return $.addClass(doc, 'top');
$.addClass(doc, 'top');
return $.add(Header.bar, Header.notify);
}
},
toggleBarPosition: function() {
@ -4867,7 +4860,7 @@
cust = $('#custom-board-list', Header.bar);
full = $('#full-board-list', Header.bar);
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() {
$.cb.checked.call(this);

View File

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