From 377f924ae2d8d214cd9e84d0e98eff18184fd8c8 Mon Sep 17 00:00:00 2001 From: Teresa Date: Mon, 7 Dec 2015 22:44:35 -0800 Subject: [PATCH] Moved feedback script to _scripts-include.jade --- public/_includes/_scripts-include.jade | 18 +++++++++++++++++- public/docs/ts/latest/help-new.jade | 20 ++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/public/_includes/_scripts-include.jade b/public/_includes/_scripts-include.jade index 647214a014..c0b2805a44 100644 --- a/public/_includes/_scripts-include.jade +++ b/public/_includes/_scripts-include.jade @@ -42,4 +42,20 @@ if current.path[0] == "docs" e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e); })(window,document,'script','//s.swiftypecdn.com/install/v1/st.js','_st'); - _st('install','VsuU7kH5Hnnj9tfyNvfK'); \ No newline at end of file + _st('install','VsuU7kH5Hnnj9tfyNvfK'); + + +script(src="//www.gstatic.com/feedback/api.js" type="text/javascript") + +script. + var btn = document.getElementById("feedback-btn"); + var submitFeedback = function() { + var dropdown = document.getElementById("feedback-dropdown"); + var configuration = { + 'productId': 'Angular', + 'authuser': '1', + 'bucket': dropdown.options[dropdown.selectedIndex].value + } + userfeedback.api.startFeedback(configuration); + } + btn.addEventListener("click", submitFeedback); diff --git a/public/docs/ts/latest/help-new.jade b/public/docs/ts/latest/help-new.jade index 42f4561286..1034233e75 100644 --- a/public/docs/ts/latest/help-new.jade +++ b/public/docs/ts/latest/help-new.jade @@ -1,24 +1,8 @@ div(flex) p. What's your question about? - select#dropdown(name="Angular Version" class="dropdown") + select#feedback-dropdown(name="Angular Version") option(value="Angular2") Angular2 option(value="AngularJS") AngularJS - button#btn(class="btn"). + button#feedback-btn. Submit - -script(src="//www.gstatic.com/feedback/api.js" type="text/javascript") - -script. - var btn = document.getElementById("btn"); - var submitFeedback = function() { - var dropdown = document.getElementById("dropdown"); - var configuration = { - 'productId': 'Angular', - 'authuser': '1', - 'bucket': dropdown.options[dropdown.selectedIndex].value - } - userfeedback.api.startFeedback(configuration); - } - btn.addEventListener("click", submitFeedback); -