merge QR.node into QR.init

This commit is contained in:
James Campos 2011-09-02 00:39:03 -07:00
parent 288fede1ca
commit e5239d8947
2 changed files with 8 additions and 10 deletions

View File

@ -1227,7 +1227,11 @@
QR = {
init: function() {
var holder;
g.callbacks.push(QR.node);
g.callbacks.push(function(root) {
var quote;
quote = $('a.quotejs + a', root);
return $.bind(quote, 'click', QR.quote);
});
$.append(d.body, $.el('iframe', {
name: 'iframe'
}));
@ -1275,11 +1279,6 @@
$.rm(QR.el);
return QR.el = null;
},
node: function(root) {
var quote;
quote = $('a.quotejs + a', root);
return $.bind(quote, 'click', QR.quote);
},
dialog: function(text) {
var el, l, ta;
if (text == null) {

View File

@ -963,7 +963,9 @@ cooldown =
QR =
init: ->
g.callbacks.push QR.node
g.callbacks.push (root) ->
quote = $ 'a.quotejs + a', root
$.bind quote, 'click', QR.quote
$.append d.body, $.el 'iframe',
name: 'iframe'
$.bind window, 'message', QR.receive
@ -998,9 +1000,6 @@ QR =
close: ->
$.rm QR.el
QR.el = null
node: (root) ->
quote = $ 'a.quotejs + a', root
$.bind quote, 'click', QR.quote
dialog: (text='') ->
QR.el = el = ui.dialog 'qr', top: '0', left: '0', "
<a class=close title=close>X</a><input type=checkbox id=autohide title=autohide>