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

Unified Diff: appengine/chromium_rietveld/new_static/components/cr-dialog.html

Issue 1001723003: Create a common directory of widgets and css. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 years, 9 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
Index: appengine/chromium_rietveld/new_static/components/cr-dialog.html
diff --git a/appengine/chromium_rietveld/new_static/components/cr-dialog.html b/appengine/chromium_rietveld/new_static/components/cr-dialog.html
deleted file mode 100644
index 855d9d6913504978fa1194f40380e68fb8e14af1..0000000000000000000000000000000000000000
--- a/appengine/chromium_rietveld/new_static/components/cr-dialog.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!-- Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file. -->
-
-<link rel="import" href="cr-dialog-backdrop.html">
-<link rel="import" href="cr-keyboard.html">
-
-<polymer-element name="cr-dialog" extends="dialog">
- <template>
- <style>
- :host(.polyfill) {
- position: absolute;
- top: 100px;
- left: 0;
- right: 0;
- width: -webkit-fit-content;
- height: -webkit-fit-content;
- margin: auto;
- background: white;
- z-index: 100;
- }
-
- :host(.polyfill:not([open])) {
- display: none;
- }
- </style>
- <content></content>
- <template if="{{ polyfill && open }}">
- <cr-keyboard on-key-escape="{{ fireCancelEvent }}"></cr-keyboard>
- </template>
- </template>
- <script>
- (function() {
- var backdrop = document.createElement("cr-dialog-backdrop");
- Polymer("cr-dialog", {
- created: function() {
- if (window.HTMLDialogElement)
- return;
- this.classList.add("polyfill");
- this.showModal = function() {
- this.open = true;
- this.setAttribute("open", "");
- document.body.appendChild(backdrop);
- this.async(function() {
- // Focus the first input.
- var input = this.querySelector("input, textarea, * /deep/ input, * /deep/ textarea");
- if (input)
- input.focus();
- });
- };
- this.close = function() {
- if (!this.open)
- return;
- this.removeAttribute("open");
- backdrop.remove();
- };
- this.fireCancelEvent = function(event) {
- event.preventDefault();
- if (!this.fire("cancel").defaultPrevented)
- this.close();
- };
- },
- });
- })();
- </script>
-</ploymer-element>

Powered by Google App Engine
This is Rietveld 408576698