Tao Zhou | 3ea3a37 | 2019-11-05 08:32:34 +0000 | [diff] [blame^] | 1 | <!-- |
| 2 | @license |
| 3 | Copyright (C) 2019 The Android Open Source Project |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | <link rel="import" href="/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html"> |
| 19 | <link rel="import" href="/bower_components/polymer/polymer.html"> |
| 20 | <link rel="import" href="../../../behaviors/fire-behavior/fire-behavior.html"> |
| 21 | <link rel="import" href="../../shared/gr-dialog/gr-dialog.html"> |
| 22 | <link rel="import" href="../../../styles/shared-styles.html"> |
| 23 | |
| 24 | <dom-module id="gr-confirm-revert-submission-dialog"> |
| 25 | <template> |
| 26 | <!-- TODO(taoalpha): move all shared styles to a style module. --> |
| 27 | <style include="shared-styles"> |
| 28 | :host { |
| 29 | display: block; |
| 30 | } |
| 31 | :host([disabled]) { |
| 32 | opacity: .5; |
| 33 | pointer-events: none; |
| 34 | } |
| 35 | label { |
| 36 | cursor: pointer; |
| 37 | display: block; |
| 38 | width: 100%; |
| 39 | } |
| 40 | iron-autogrow-textarea { |
| 41 | font-family: var(--monospace-font-family); |
| 42 | padding: 0; |
| 43 | width: 73ch; /* Add a char to account for the border. */ |
| 44 | |
| 45 | --iron-autogrow-textarea { |
| 46 | border: 1px solid var(--border-color); |
| 47 | box-sizing: border-box; |
| 48 | font-family: var(--monospace-font-family); |
| 49 | } |
| 50 | } |
| 51 | </style> |
| 52 | <gr-dialog |
| 53 | confirm-label="Revert Submission" |
| 54 | on-confirm="_handleConfirmTap" |
| 55 | on-cancel="_handleCancelTap"> |
| 56 | <div class="header" slot="header">Revert Submission</div> |
| 57 | <div class="main" slot="main"> |
| 58 | <label for="messageInput"> |
| 59 | Revert Commit Message |
| 60 | </label> |
| 61 | <iron-autogrow-textarea |
| 62 | id="messageInput" |
| 63 | class="message" |
| 64 | autocomplete="on" |
| 65 | max-rows="15" |
| 66 | bind-value="{{message}}"></iron-autogrow-textarea> |
| 67 | </div> |
| 68 | </gr-dialog> |
| 69 | </template> |
| 70 | <script src="gr-confirm-revert-submission-dialog.js"></script> |
| 71 | </dom-module> |