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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/hats/hats_dialog.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/hats/hats.html
diff --git a/chrome/browser/resources/chromeos/hats/hats.html b/chrome/browser/resources/chromeos/hats/hats.html
index 6fcc35db87cc0fe05fb393cdd0c3a5aff9adfb1f..0d6552b1e52e5e52ad16eaba0b41f5a20665be7a 100644
--- a/chrome/browser/resources/chromeos/hats/hats.html
+++ b/chrome/browser/resources/chromeos/hats/hats.html
@@ -1,5 +1,19 @@
<html>
<head>
+ <style>
+ .done-button {
+ bottom: 17px;
+ color: rgb(33, 150, 243);
+ display: none;
+ filter: none;
+ font: 400 16px Roboto,RobotoDraft,Helvetica,sans-serif;
+ position: fixed;
+ right: 25px;
+ text-shadow: none;
+ text-transform: uppercase;
+ z-index: 10;
+ }
+ </style>
<script>
/**
* Handles the callback when the survey is submitted or when the survey
@@ -12,10 +26,22 @@
if (!isFirstRun) {
return;
}
- /* Resize the window to match the size of thank you message. */
- window.resizeTo(400, 110);
+
+ /* Display the done button at the end of the survey. */
+ document.getElementById('id-done-button').style.display = 'block';
};
+
+ document.addEventListener('DOMContentLoaded', function() {
+ document.getElementById('id-link-done-button').onclick = function() {
+ window.close();
+ }
+ })
</script>
<script src="$SCRIPT_SRC"></script>
</head>
+ <body>
+ <a id="id-link-done-button" href="#" role="button">
+ <div id="id-done-button" class="done-button">$DONE_BUTTON_LABEL</div>
+ </a>
+ </body>
</html>
« 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