From 0d4059764a441e775db823650ef240796371cec5 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Wed, 22 Nov 2017 11:37:29 +0000 Subject: [PATCH 1/2] Add tooltips for V1 badges with dummy copy --- services/web/app/views/layout.pug | 1 + services/web/app/views/project/list/side-bar.pug | 2 ++ services/web/app/views/project/list/v1-item.pug | 6 +++++- services/web/app/views/v1-tooltip.pug | 6 ++++++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 services/web/app/views/v1-tooltip.pug diff --git a/services/web/app/views/layout.pug b/services/web/app/views/layout.pug index 30f454f72a..822923ac08 100644 --- a/services/web/app/views/layout.pug +++ b/services/web/app/views/layout.pug @@ -148,6 +148,7 @@ html(itemscope, itemtype='http://schema.org/Product') ) include contact-us-modal + include v1-tooltip include sentry diff --git a/services/web/app/views/project/list/side-bar.pug b/services/web/app/views/project/list/side-bar.pug index 9fceb4cc86..c1ffb6e30c 100644 --- a/services/web/app/views/project/list/side-bar.pug +++ b/services/web/app/views/project/list/side-bar.pug @@ -69,6 +69,8 @@ ng-if="tag.isV1", ng-cloak, aria-label=translate("v1_badge") + tooltip-template="'v1TagTooltipTemplate'" + tooltip-append-to-body="true" ) span.dropdown.tag-menu(dropdown) a.dropdown-toggle( diff --git a/services/web/app/views/project/list/v1-item.pug b/services/web/app/views/project/list/v1-item.pug index 3a5e86e791..45cf4ec07a 100644 --- a/services/web/app/views/project/list/v1-item.pug +++ b/services/web/app/views/project/list/v1-item.pug @@ -1,5 +1,9 @@ .col-xs-8 - span.v1-badge(aria-label=translate("v1_badge")) + span.v1-badge( + aria-label=translate("v1_badge") + tooltip-template="'v1ProjectTooltipTemplate'" + tooltip-append-to-body="true" + ) span if settings.overleaf && settings.overleaf.host a.projectName( diff --git a/services/web/app/views/v1-tooltip.pug b/services/web/app/views/v1-tooltip.pug new file mode 100644 index 0000000000..22af68e3ba --- /dev/null +++ b/services/web/app/views/v1-tooltip.pug @@ -0,0 +1,6 @@ +script(type='text/ng-template', id='v1ProjectTooltipTemplate') + span This project is from Overleaf V1 and has not been imported to the beta yet + + +script(type='text/ng-template', id='v1TagTooltipTemplate') + span This folder is from Overleaf V1 and has not been imported to the beta yet \ No newline at end of file From b1c8e7a95a2ee7b158435334ea87d9c721331c71 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Wed, 22 Nov 2017 12:19:32 +0000 Subject: [PATCH 2/2] Improve wording slightly --- services/web/app/views/v1-tooltip.pug | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/app/views/v1-tooltip.pug b/services/web/app/views/v1-tooltip.pug index 22af68e3ba..2934adbe8b 100644 --- a/services/web/app/views/v1-tooltip.pug +++ b/services/web/app/views/v1-tooltip.pug @@ -1,6 +1,6 @@ -script(type='text/ng-template', id='v1ProjectTooltipTemplate') - span This project is from Overleaf V1 and has not been imported to the beta yet +script(type="text/ng-template", id="v1ProjectTooltipTemplate") + span This project is from Overleaf version 1 and has not been imported to the beta yet -script(type='text/ng-template', id='v1TagTooltipTemplate') - span This folder is from Overleaf V1 and has not been imported to the beta yet \ No newline at end of file +script(type="text/ng-template", id="v1TagTooltipTemplate") + span This folder is from Overleaf version 1 and has not been imported to the beta yet \ No newline at end of file