OLD | NEW |
---|---|
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> |
OLD | NEW |