Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/browser/resources/chromeos/hats/hats.html

Issue 2325883002: Adds a 'Done' button at the end of hats survey (Closed)
Patch Set: Adds a 'Done' button at the end of hats survey Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/hats/hats_dialog.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style>
4 .done-button {
5 bottom: 17px;
6 color: rgb(33, 150, 243);
7 display: none;
8 filter: none;
9 font: 400 16px Roboto,RobotoDraft,Helvetica,sans-serif;
10 position: fixed;
11 right: 25px;
12 text-shadow: none;
13 text-transform: uppercase;
14 z-index: 10;
15 }
16 </style>
3 <script> 17 <script>
4 /** 18 /**
5 * Handles the callback when the survey is submitted or when the survey 19 * Handles the callback when the survey is submitted or when the survey
6 * has already been submitted in the past. 20 * has already been submitted in the past.
7 * @param {boolean} isFirstRun Will be true when the user just earned 21 * @param {boolean} isFirstRun Will be true when the user just earned
8 * access to the content and false if the user had already had access 22 * access to the content and false if the user had already had access
9 * previously. 23 * previously.
10 */ 24 */
11 var didFinishSurvey = function(isFirstRun) { 25 var didFinishSurvey = function(isFirstRun) {
12 if (!isFirstRun) { 26 if (!isFirstRun) {
13 return; 27 return;
14 } 28 }
15 /* Resize the window to match the size of thank you message. */ 29
16 window.resizeTo(400, 110); 30 /* Display the done button at the end of the survey. */
31 document.getElementById('id-done-button').style.display = 'block';
17 }; 32 };
33
34 document.addEventListener('DOMContentLoaded', function() {
35 document.getElementById('id-link-done-button').onclick = function() {
36 window.close();
37 }
38 })
18 </script> 39 </script>
19 <script src="$SCRIPT_SRC"></script> 40 <script src="$SCRIPT_SRC"></script>
20 </head> 41 </head>
42 <body>
43 <a id="id-link-done-button" href="#" role="button">
44 <div id="id-done-button" class="done-button">$DONE_BUTTON_LABEL</div>
45 </a>
46 </body>
21 </html> 47 </html>
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/hats/hats_dialog.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698