We're using an overlay, no need to use toggles for the links.

This commit is contained in:
Nicolas Stepien 2011-06-15 20:22:25 +02:00
parent 234c05f1db
commit ec699ecfe3
2 changed files with 8 additions and 20 deletions

View File

@ -944,23 +944,15 @@
a = $.el('a', {
textContent: '4chan X'
});
$.bind(a, 'click', options.toggle);
$.bind(a, 'click', options.dialog);
$.replace(home, a);
home = $('#navbotr a');
a = $.el('a', {
textContent: '4chan X'
});
$.bind(a, 'click', options.toggle);
$.bind(a, 'click', options.dialog);
return $.replace(home, a);
},
toggle: function() {
var dialog;
if (dialog = $('#options')) {
return $.rm(dialog);
} else {
return options.dialog();
}
},
dialog: function() {
var arr, checked, description, dialog, hiddenNum, hiddenThreads, html, input, key, li, link, main, obj, ul, _i, _j, _len, _len2, _ref, _ref2, _ref3;
hiddenThreads = $.getValue("hiddenThreads/" + g.BOARD + "/", {});
@ -1011,7 +1003,9 @@
$.bind($('input[name=time]', dialog), 'keyup', options.cb.time);
$.append(d.body, dialog);
options.cb.time.call($('input[name=time]', dialog));
$.bind(dialog, 'click', options.toggle);
$.bind(dialog, 'click', function() {
return $.rm(dialog);
});
return $.bind(dialog.firstElementChild, 'click', function(e) {
return e.stopPropagation();
});

View File

@ -707,20 +707,14 @@ options =
home = $ '#navtopr a'
a = $.el 'a',
textContent: '4chan X'
$.bind a, 'click', options.toggle
$.bind a, 'click', options.dialog
$.replace home, a
home = $ '#navbotr a'
a = $.el 'a',
textContent: '4chan X'
$.bind a, 'click', options.toggle
$.bind a, 'click', options.dialog
$.replace home, a
toggle: ->
if dialog = $ '#options'
$.rm dialog
else
options.dialog()
dialog: ->
hiddenThreads = $.getValue "hiddenThreads/#{g.BOARD}/", {}
hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length
@ -793,7 +787,7 @@ options =
options.cb.time.call $('input[name=time]', dialog)
$.bind dialog, 'click', options.toggle
$.bind dialog, 'click', -> $.rm dialog
$.bind dialog.firstElementChild, 'click', (e) -> e.stopPropagation()
tab: ->