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