We're using an overlay, no need to use toggles for the links.
This commit is contained in:
parent
234c05f1db
commit
ec699ecfe3
@ -944,23 +944,15 @@
|
|||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
textContent: '4chan X'
|
textContent: '4chan X'
|
||||||
});
|
});
|
||||||
$.bind(a, 'click', options.toggle);
|
$.bind(a, 'click', options.dialog);
|
||||||
$.replace(home, a);
|
$.replace(home, a);
|
||||||
home = $('#navbotr a');
|
home = $('#navbotr a');
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
textContent: '4chan X'
|
textContent: '4chan X'
|
||||||
});
|
});
|
||||||
$.bind(a, 'click', options.toggle);
|
$.bind(a, 'click', options.dialog);
|
||||||
return $.replace(home, a);
|
return $.replace(home, a);
|
||||||
},
|
},
|
||||||
toggle: function() {
|
|
||||||
var dialog;
|
|
||||||
if (dialog = $('#options')) {
|
|
||||||
return $.rm(dialog);
|
|
||||||
} else {
|
|
||||||
return options.dialog();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dialog: function() {
|
dialog: function() {
|
||||||
var arr, checked, description, dialog, hiddenNum, hiddenThreads, html, input, key, li, link, main, obj, ul, _i, _j, _len, _len2, _ref, _ref2, _ref3;
|
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 + "/", {});
|
hiddenThreads = $.getValue("hiddenThreads/" + g.BOARD + "/", {});
|
||||||
@ -1011,7 +1003,9 @@
|
|||||||
$.bind($('input[name=time]', dialog), 'keyup', options.cb.time);
|
$.bind($('input[name=time]', dialog), 'keyup', options.cb.time);
|
||||||
$.append(d.body, dialog);
|
$.append(d.body, dialog);
|
||||||
options.cb.time.call($('input[name=time]', 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 $.bind(dialog.firstElementChild, 'click', function(e) {
|
||||||
return e.stopPropagation();
|
return e.stopPropagation();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -707,20 +707,14 @@ options =
|
|||||||
home = $ '#navtopr a'
|
home = $ '#navtopr a'
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
textContent: '4chan X'
|
textContent: '4chan X'
|
||||||
$.bind a, 'click', options.toggle
|
$.bind a, 'click', options.dialog
|
||||||
$.replace home, a
|
$.replace home, a
|
||||||
home = $ '#navbotr a'
|
home = $ '#navbotr a'
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
textContent: '4chan X'
|
textContent: '4chan X'
|
||||||
$.bind a, 'click', options.toggle
|
$.bind a, 'click', options.dialog
|
||||||
$.replace home, a
|
$.replace home, a
|
||||||
|
|
||||||
toggle: ->
|
|
||||||
if dialog = $ '#options'
|
|
||||||
$.rm dialog
|
|
||||||
else
|
|
||||||
options.dialog()
|
|
||||||
|
|
||||||
dialog: ->
|
dialog: ->
|
||||||
hiddenThreads = $.getValue "hiddenThreads/#{g.BOARD}/", {}
|
hiddenThreads = $.getValue "hiddenThreads/#{g.BOARD}/", {}
|
||||||
hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length
|
hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length
|
||||||
@ -793,7 +787,7 @@ options =
|
|||||||
|
|
||||||
options.cb.time.call $('input[name=time]', dialog)
|
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()
|
$.bind dialog.firstElementChild, 'click', (e) -> e.stopPropagation()
|
||||||
|
|
||||||
tab: ->
|
tab: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user