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

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: 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 | « no previous file | 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;
xiyuan 2016/09/09 17:06:22 Do we need to worry about RTL?
malaykeshav 2016/09/09 18:00:32 As of now the survey is only in English.
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';
32 };
33
34 var done = function() {
35 window.close();
17 }; 36 };
18 </script> 37 </script>
19 <script src="$SCRIPT_SRC"></script> 38 <script src="$SCRIPT_SRC"></script>
20 </head> 39 </head>
40 <body>
41 <a href="javascript:done()" role="button">
xiyuan 2016/09/09 17:06:22 Typically, we do something like this instead of in
malaykeshav 2016/09/09 18:00:32 Done
42 <div id="id-done-button" class="done-button">Done</div>
xiyuan 2016/09/09 17:06:22 We should use a placeholder similar to what we did
malaykeshav 2016/09/09 18:00:32 Done
43 </a>
44 </body>
21 </html> 45 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698