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

Unified Diff: chrome/browser/resources/repost_form_warning.html

Issue 7828065: chromeos: Add WebUI implementation of form repost dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge. again. Created 9 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/resources/http_auth.html ('k') | chrome/browser/ui/views/dialog_stubs_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/repost_form_warning.html
diff --git a/chrome/browser/resources/repost_form_warning.html b/chrome/browser/resources/repost_form_warning.html
new file mode 100644
index 0000000000000000000000000000000000000000..a2d8834a536e2860999bb90c6e7ad9417b311b46
--- /dev/null
+++ b/chrome/browser/resources/repost_form_warning.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html i18n-values="dir:textdirection">
+<head>
+ <link rel="stylesheet" href="dialog.css">
+ <style>
+ body {
+ -webkit-user-select: none;
+ margin: 10px 10px 0 10px;
+ }
+
+ form {
+ margin: 0;
+ }
+
+ #explanation {
+ cursor: default;
+ }
+
+ #buttons {
+ padding: 10px 0;
+ text-align: end;
+ }
+
+ </style>
+ <script>
+ function $(o) {
+ return document.getElementById(o);
+ }
+
+ function disableControls() {
+ $('cancel').disabled = true;
+ $('resend').disabled = true;
+ }
+
+ function cancel() {
+ disableControls();
+ chrome.send('DialogClose', [JSON.stringify(false)]);
+ }
+
+ function handleSubmit(e) {
+ disableControls();
+ e.preventDefault();
+ chrome.send('DialogClose', [JSON.stringify(true)]);
+ }
+
+ function handleKeyDown(e) {
+ if (e.keyCode == 27) { // Escape
+ e.preventDefault();
+ cancel();
+ }
+ }
+
+ function load() {
+ document.addEventListener('keydown', handleKeyDown);
+ $('form').onsubmit = handleSubmit;
+ $('cancel').onclick = cancel;
+ $('cancel').focus();
+ }
+
+ document.addEventListener('DOMContentLoaded', load);
+ </script>
+</head>
+<body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
+ <div id="explanation" i18n-content="explanation"></div>
+ <form id="form">
+ <div id="buttons">
+ <input id="cancel" type="reset" i18n-values="value:cancel" autofocus>
+ <input id="resend" type="submit" i18n-values="value:resend">
+ </div>
+ </form>
+</body>
+</html>
« no previous file with comments | « chrome/browser/resources/http_auth.html ('k') | chrome/browser/ui/views/dialog_stubs_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698