From 5190a9692a4ec2da1f05593775ea334c1f785899 Mon Sep 17 00:00:00 2001 From: Jeff Arnold Date: Wed, 17 Jul 2013 16:53:07 -0400 Subject: [PATCH] Hide text for the > icon so that copy paste captures it Addresses Trac #1296 (imported from commit 650672b971f18b4e1bfb185987768b55504ee1e8) --- zephyr/static/styles/zephyr.css | 8 ++++++++ zephyr/static/templates/message.handlebars | 2 +- zephyr/tests/frontend/tests/01-site.js | 4 ++-- zephyr/tests/frontend/tests/02-narrow.js | 16 ++++++++-------- zephyr/tests/frontend/tests/07-stars.js | 2 +- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/zephyr/static/styles/zephyr.css b/zephyr/static/styles/zephyr.css index 685b6f4fd0..c851460a97 100644 --- a/zephyr/static/styles/zephyr.css +++ b/zephyr/static/styles/zephyr.css @@ -608,6 +608,14 @@ td.pointer { top: -1px; } +.copy-paste-text { + /* Hide the text that we want copy paste to capture */ + position: absolute; + text-indent: -99999px; + float: left; + width: 0px; +} + .message_header_colorblock { border-radius: 3px 0px 0px 0px; /* box-shadow: 0px 2px 3px #ccc; */ diff --git a/zephyr/static/templates/message.handlebars b/zephyr/static/templates/message.handlebars index 0ca19d2d9f..af34ada11b 100644 --- a/zephyr/static/templates/message.handlebars +++ b/zephyr/static/templates/message.handlebars @@ -37,7 +37,7 @@ {{#if invite_only}}{{/if}} {{display_recipient}} -    +  >  {{#if ../../../../use_match_properties}}{{{match_subject}}}{{else}}{{subject}}{{/if}} {{#if your_empty_subject}}{{/if}} diff --git a/zephyr/tests/frontend/tests/01-site.js b/zephyr/tests/frontend/tests/01-site.js index 00b94b9c49..64942a09f3 100644 --- a/zephyr/tests/frontend/tests/01-site.js +++ b/zephyr/tests/frontend/tests/01-site.js @@ -57,8 +57,8 @@ common.send_many([ common.wait_for_receive(function () { common.expected_messages('zhome', [ - 'Verona frontend test', - 'Verona other subject', + 'Verona > frontend test', + 'Verona > other subject', 'You and Cordelia Lear, King Hamlet', 'You and Cordelia Lear' ], [ diff --git a/zephyr/tests/frontend/tests/02-narrow.js b/zephyr/tests/frontend/tests/02-narrow.js index 4099447e44..b99c302602 100644 --- a/zephyr/tests/frontend/tests/02-narrow.js +++ b/zephyr/tests/frontend/tests/02-narrow.js @@ -47,7 +47,7 @@ common.send_many([ function expect_home() { common.expected_messages('zhome', [ - 'Verona frontend test', + 'Verona > frontend test', 'You and Cordelia Lear, King Hamlet', 'You and Cordelia Lear' ], [ @@ -59,9 +59,9 @@ function expect_home() { function expect_stream() { common.expected_messages('zfilt', [ - 'Verona frontend test', - 'Verona other subject', - 'Verona frontend test' + 'Verona > frontend test', + 'Verona > other subject', + 'Verona > frontend test' ], [ '

test message A

', '

test message B

', @@ -72,7 +72,7 @@ function expect_stream() { function expect_stream_subject() { common.expected_messages('zfilt', [ - 'Verona frontend test' + 'Verona > frontend test' ], [ '

test message A

', '

test message B

', @@ -82,9 +82,9 @@ function expect_stream_subject() { function expect_subject() { common.expected_messages('zfilt', [ - 'Verona frontend test', - 'Venice frontend test', - 'Verona frontend test' + 'Verona > frontend test', + 'Venice > frontend test', + 'Verona > frontend test' ], [ '

test message A

', '

test message B

', diff --git a/zephyr/tests/frontend/tests/07-stars.js b/zephyr/tests/frontend/tests/07-stars.js index 72813151fb..a2f3dae7fe 100644 --- a/zephyr/tests/frontend/tests/07-stars.js +++ b/zephyr/tests/frontend/tests/07-stars.js @@ -41,7 +41,7 @@ casper.then(function () { casper.waitUntilVisible('#zfilt', function () { // You can narrow to your starred messages. - common.expected_messages('zfilt', ['Verona stars'], ['

test star

']); + common.expected_messages('zfilt', ['Verona > stars'], ['

test star

']); common.un_narrow(); });