bind instead of call

This commit is contained in:
James Campos 2011-07-21 18:18:46 -07:00
parent 8357c51c3b
commit 407738f553
2 changed files with 7 additions and 7 deletions

View File

@ -1588,6 +1588,7 @@
$.bind(verbose, 'click', updater.cb.verbose);
$.bind(autoUpT, 'click', updater.cb.autoUpdate);
$.bind(interva, 'change', updater.cb.interval);
$.bind(interva, 'change', $.cb.value);
$.bind(updNow, 'click', updater.updateNow);
updater.count = $('#count', dialog);
updater.timer = $('#timer', dialog);
@ -1616,8 +1617,7 @@
}
},
interval: function() {
updater.interval = this.value = this.value.match(/\d+/)[0];
return $.cb.value.call(this);
return updater.interval = this.value = this.value.match(/\d+/)[0];
},
update: function() {
var arr, body, br, id, input, replies, reply, _i, _len, _ref, _ref2;
@ -2140,7 +2140,8 @@
}
$.bind(quote, 'mouseover', quotePreview.mouseover);
$.bind(quote, 'mousemove', ui.hover);
_results.push($.bind(quote, 'mouseout', quotePreview.mouseout));
$.bind(quote, 'mouseout', quotePreview.mouseout);
_results.push($.bind(quote, 'msoueout', ui.hoverend));
}
return _results;
});
@ -2179,9 +2180,8 @@
mouseout: function() {
var el;
if (el = d.getElementById(this.hash.slice(1))) {
$.removeClass(el, 'qphl');
return $.removeClass(el, 'qphl');
}
return ui.hoverend();
},
parse: function(req, id, threadID) {
var body, html, op, qp, reply, _i, _len, _ref;

View File

@ -1292,6 +1292,7 @@ updater =
$.bind verbose, 'click', updater.cb.verbose
$.bind autoUpT, 'click', updater.cb.autoUpdate
$.bind interva, 'change', updater.cb.interval
$.bind interva, 'change', $.cb.value
$.bind updNow, 'click', updater.updateNow
updater.count = $ '#count', dialog
@ -1319,7 +1320,6 @@ updater =
window.clearInterval updater.intervalID
interval: ->
updater.interval = @value = @value.match(/\d+/)[0]
$.cb.value.call @
update: ->
if @status is 404
updater.timer.textContent = ''
@ -1663,6 +1663,7 @@ quotePreview =
$.bind quote, 'mouseover', quotePreview.mouseover
$.bind quote, 'mousemove', ui.hover
$.bind quote, 'mouseout', quotePreview.mouseout
$.bind quote, 'msoueout', ui.hoverend
mouseover: (e) ->
qp = ui.el = $.el 'div',
id: 'qp'
@ -1684,7 +1685,6 @@ quotePreview =
$.cache @pathname, (-> quotePreview.parse @, id, threadID)
mouseout: ->
$.removeClass el, 'qphl' if el = d.getElementById @hash[1..]
ui.hoverend()
parse: (req, id, threadID) ->
return unless (qp = ui.el) and (qp.innerHTML is "Loading #{id}...")