diff --git a/zephyr/static/js/ui.js b/zephyr/static/js/ui.js
index a9dbfdbaee..22a48dcbf4 100644
--- a/zephyr/static/js/ui.js
+++ b/zephyr/static/js/ui.js
@@ -56,7 +56,7 @@ $(document).bind('copy', function (e) {
// To ensure we can't enter an infinite loop, bail out (and let the
// browser handle the copy-paste on its own) if we don't hit what we
// are looking for within 10 rows.
- for (j = 0; start_tr.attr('zid') === undefined && j < 10; j++) {
+ for (j = 0; (!start_tr.is('.message_row')) && j < 10; j++) {
start_tr = start_tr.next();
}
if (j === 10) {
@@ -67,7 +67,7 @@ $(document).bind('copy', function (e) {
// (In fact, we need to because it won't work correctly in this case)
skip_same_td_check = true;
}
- startid = start_tr.attr('zid');
+ startid = rows.id(start_tr);
endc = $(range.endContainer);
// If the selection ends in the bottom whitespace, we should act as
@@ -91,7 +91,7 @@ $(document).bind('copy', function (e) {
// To ensure we can't enter an infinite loop, bail out (and let the
// browser handle the copy-paste on its own) if we don't hit what we
// are looking for within 10 rows.
- for (j = 0; end_tr.attr('zid') === undefined && j < 10; j++) {
+ for (j = 0; (!end_tr.is('.message_row')) && j < 10; j++) {
end_tr = end_tr.prev();
}
if (j === 10) {
@@ -102,7 +102,7 @@ $(document).bind('copy', function (e) {
// (In fact, we need to because it won't work correctly in this case)
skip_same_td_check = true;
}
- endid = end_tr.attr('zid');
+ endid = rows.id(end_tr);
// If the selection starts and ends in the same td,
// we should let the browser handle the copy-paste entirely on its own
@@ -124,7 +124,7 @@ $(document).bind('copy', function (e) {
p.html(p.html() + "" + content.text() + "" + "
");
}
- message = message_dict[row.attr('zid')];
+ message = message_dict[rows.id(row)];
content = $('