From cf80d0da268178561ce1e607e7c90e9035ab5834 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 25 Apr 2017 16:01:14 +0100 Subject: [PATCH 1/2] Make position of letter edit links absolute Previously they were relative (ie percentages). This made sure that they worked on mobile, when the letter might be narrower. However it broke when the preview was more than one page, because 13% of the height of 2 pages is different to 13% of the height of one pages. This commit changes the positions to be pixel values, which match the calculated percentage values when the preview is one page. --- app/assets/stylesheets/views/template.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/views/template.scss b/app/assets/stylesheets/views/template.scss index a059504e8..8e8c891ad 100644 --- a/app/assets/stylesheets/views/template.scss +++ b/app/assets/stylesheets/views/template.scss @@ -25,7 +25,7 @@ .edit-template-link-letter-contact { @extend %edit-template-link; right: -25px; - top: 13.3%; // align to top of contact block + top: 138px; // align to top of contact block } .edit-template-link-letter-address { @@ -36,6 +36,6 @@ .edit-template-link-letter-body { @extend %edit-template-link; - top: 38.5%; // aligns to top of subject + top: 400px; // aligns to top of subject left: -5px; } From cca5145e54fe69c144a035687ff7aed91d8becac Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Tue, 25 Apr 2017 15:32:12 +0100 Subject: [PATCH 2/2] updated run_tests to not use venv in the app if VIRTUAL_ENV is set --- scripts/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 01e109020..584ff8e5a 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -24,7 +24,7 @@ function display_result { fi } -if [ -d venv ]; then +if [[ -z "$VIRTUAL_ENV" ]] && [[ -d venv ]]; then source ./venv/bin/activate fi pycodestyle .