fix qr again

This commit is contained in:
James Campos 2011-01-15 12:57:39 -08:00
parent fd94f7da60
commit 00b7413b65
2 changed files with 5 additions and 4 deletions

View File

@ -622,7 +622,8 @@ qrText = (link) ->
selection = window.getSelection() selection = window.getSelection()
id = x('preceding::span[@id][1]', selection.anchorNode)?.id id = x('preceding::span[@id][1]', selection.anchorNode)?.id
text += '>' + selection.toString() if id is link.parentNode.id if (s = selection.toString()) and (id is link.parentNode.id)
text += ">#{s}"
text text

View File

@ -791,12 +791,12 @@
return quickReply(link, text); return quickReply(link, text);
}; };
qrText = function(link) { qrText = function(link) {
var id, selection, text, _ref; var id, s, selection, text, _ref;
text = '>>' + link.parentNode.id.match(/\d+$/)[0] + '\n'; text = '>>' + link.parentNode.id.match(/\d+$/)[0] + '\n';
selection = window.getSelection(); selection = window.getSelection();
id = (_ref = x('preceding::span[@id][1]', selection.anchorNode)) != null ? _ref.id : void 0; id = (_ref = x('preceding::span[@id][1]', selection.anchorNode)) != null ? _ref.id : void 0;
if (id === link.parentNode.id) { if ((s = selection.toString()) && (id === link.parentNode.id)) {
text += '>' + selection.toString(); text += ">" + s;
} }
return text; return text;
}; };