OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.HBox} | 7 * @extends {WebInspector.HBox} |
8 * @param {function(string)} callback | 8 * @param {function(string)} callback |
9 */ | 9 */ |
10 WebInspector.AddSourceMapURLDialog = function(callback) | 10 WebInspector.AddSourceMapURLDialog = function(callback) |
11 { | 11 { |
12 WebInspector.HBox.call(this, true); | 12 WebInspector.HBox.call(this, true); |
13 this.registerRequiredCSS("sources/addSourceMapURLDialog.css"); | 13 this.registerRequiredCSS("ui_lazy/dialog.css"); |
14 this.contentElement.createChild("label").textContent = WebInspector.UIString
("Source map URL: "); | 14 this.contentElement.createChild("label").textContent = WebInspector.UIString
("Source map URL: "); |
15 | 15 |
16 this._input = this.contentElement.createChild("input"); | 16 this._input = this.contentElement.createChild("input"); |
17 this._input.setAttribute("type", "text"); | 17 this._input.setAttribute("type", "text"); |
18 this._input.addEventListener("keydown", this._onKeyDown.bind(this), false); | 18 this._input.addEventListener("keydown", this._onKeyDown.bind(this), false); |
19 | 19 |
20 var addButton = this.contentElement.createChild("button"); | 20 var addButton = this.contentElement.createChild("button"); |
21 addButton.textContent = WebInspector.UIString("Add"); | 21 addButton.textContent = WebInspector.UIString("Add"); |
22 addButton.addEventListener("click", this._apply.bind(this), false); | 22 addButton.addEventListener("click", this._apply.bind(this), false); |
23 | 23 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 _onKeyDown: function(event) | 59 _onKeyDown: function(event) |
60 { | 60 { |
61 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Enter.code) { | 61 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Enter.code) { |
62 event.preventDefault(); | 62 event.preventDefault(); |
63 this._apply(); | 63 this._apply(); |
64 } | 64 } |
65 }, | 65 }, |
66 | 66 |
67 __proto__: WebInspector.HBox.prototype | 67 __proto__: WebInspector.HBox.prototype |
68 } | 68 } |
OLD | NEW |