From 84ecac633cdab67d66757fb53f3f6a681dc8acbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Tue, 12 Jul 2016 19:49:06 +0300 Subject: [PATCH] "Usage Examples" item in check's menu --- static/css/my_checks.css | 8 +++ static/css/my_checks_desktop.css | 4 ++ static/js/checks.js | 13 +++++ templates/front/my_checks.html | 78 ++++++++++++++++++++++++++ templates/front/my_checks_desktop.html | 11 +++- 5 files changed, 112 insertions(+), 2 deletions(-) diff --git a/static/css/my_checks.css b/static/css/my_checks.css index 63f39916..4d184c8d 100644 --- a/static/css/my_checks.css +++ b/static/css/my_checks.css @@ -62,3 +62,11 @@ color: #555; } + +#show-usage-modal .modal-dialog { + width: 1100px; + } + + #show-usage-modal .tab-content { + margin-top: 15px; + } diff --git a/static/css/my_checks_desktop.css b/static/css/my_checks_desktop.css index 5d2543c7..057b8998 100644 --- a/static/css/my_checks_desktop.css +++ b/static/css/my_checks_desktop.css @@ -62,6 +62,10 @@ table.table tr > th.th-name { visibility: hidden; } +.dropdown-menu > li > a.check-menu-remove { + color: #B71C1C; +} + button.copy-link { opacity: 0; diff --git a/static/js/checks.js b/static/js/checks.js index 5ed5838f..2dd74d67 100644 --- a/static/js/checks.js +++ b/static/js/checks.js @@ -176,6 +176,19 @@ $(function () { }); + $(".usage-examples").click(function(e) { + var a = e.target; + var url = a.getAttribute("data-url"); + var email = a.getAttribute("data-email"); + + $(".ex", "#show-usage-modal").text(url); + $(".em", "#show-usage-modal").text(email); + + $("#show-usage-modal").modal("show"); + return false; + }); + + var clipboard = new Clipboard('button.copy-link'); $("button.copy-link").mouseout(function(e) { setTimeout(function() { diff --git a/templates/front/my_checks.html b/templates/front/my_checks.html index a78ef2ff..46408180 100644 --- a/templates/front/my_checks.html +++ b/templates/front/my_checks.html @@ -196,6 +196,84 @@ + + {% endblock %} {% block scripts %} diff --git a/templates/front/my_checks_desktop.html b/templates/front/my_checks_desktop.html index 7a319f31..2c2a9367 100644 --- a/templates/front/my_checks_desktop.html +++ b/templates/front/my_checks_desktop.html @@ -77,16 +77,23 @@