A bit deeper.

This commit is contained in:
Nicolas Stepien 2011-05-04 01:58:39 +02:00
parent fa2ebec87a
commit ca2051313d
2 changed files with 3 additions and 13 deletions

View File

@ -1461,7 +1461,7 @@
}; };
watcher = { watcher = {
init: function() { init: function() {
var board, dialog, favicon, html, id, input, inputs, props, src, watched, watchedBoard, _i, _len, _ref, _results; var dialog, favicon, html, id, input, inputs, src, watched, watchedBoard, _i, _len, _results;
html = '<div class=move>Thread Watcher</div>'; html = '<div class=move>Thread Watcher</div>';
dialog = ui.dialog('watcher', { dialog = ui.dialog('watcher', {
top: '50px', top: '50px',
@ -1469,13 +1469,7 @@
}, html); }, html);
$.append(d.body, dialog); $.append(d.body, dialog);
watched = $.getValue('watched', {}); watched = $.getValue('watched', {});
for (board in watched) { watcher.list(watched);
_ref = watched[board];
for (id in _ref) {
props = _ref[id];
watcher.addLink(props, dialog);
}
}
watchedBoard = watched[g.BOARD] || {}; watchedBoard = watched[g.BOARD] || {};
inputs = $$('form > input[value=delete], div.thread > input[value=delete]'); inputs = $$('form > input[value=delete], div.thread > input[value=delete]');
_results = []; _results = [];
@ -1520,7 +1514,6 @@
}, },
addLink: function(props, dialog) { addLink: function(props, dialog) {
var div, link, x; var div, link, x;
dialog || (dialog = $('#watcher'));
div = $.el('div'); div = $.el('div');
x = $.el('a', { x = $.el('a', {
textContent: 'X' textContent: 'X'

View File

@ -1165,9 +1165,7 @@ watcher =
#populate watcher #populate watcher
watched = $.getValue 'watched', {} watched = $.getValue 'watched', {}
for board of watched watcher.list watched
for id, props of watched[board]
watcher.addLink props, dialog
#add watch buttons #add watch buttons
watchedBoard = watched[g.BOARD] or {} watchedBoard = watched[g.BOARD] or {}
@ -1194,7 +1192,6 @@ watcher =
watcher.addLink props, $ '#watcher' watcher.addLink props, $ '#watcher'
addLink: (props, dialog) -> addLink: (props, dialog) ->
dialog or= $ '#watcher'
div = $.el 'div' div = $.el 'div'
x = $.el 'a', x = $.el 'a',
textContent: 'X' textContent: 'X'