| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 /** | 140 /** |
| 141 * @unrestricted | 141 * @unrestricted |
| 142 */ | 142 */ |
| 143 Sources.FilesNavigatorView = class extends Sources.NavigatorView { | 143 Sources.FilesNavigatorView = class extends Sources.NavigatorView { |
| 144 constructor() { | 144 constructor() { |
| 145 super(); | 145 super(); |
| 146 var toolbar = new UI.Toolbar('navigator-toolbar'); | 146 var toolbar = new UI.Toolbar('navigator-toolbar'); |
| 147 var title = Common.UIString('Add folder to workspace'); | 147 var title = Common.UIString('Add folder to workspace'); |
| 148 var addButton = new UI.ToolbarButton(title, 'largeicon-add', title); | 148 var addButton = new UI.ToolbarButton(title, 'largeicon-add', title); |
| 149 addButton.addEventListener('click', () => Workspace.isolatedFileSystemManage
r.addFileSystem()); | 149 addButton.addEventListener( |
| 150 UI.ToolbarButton.Events.Click, () => Workspace.isolatedFileSystemManager
.addFileSystem()); |
| 150 toolbar.appendToolbarItem(addButton); | 151 toolbar.appendToolbarItem(addButton); |
| 151 this.element.insertBefore(toolbar.element, this.element.firstChild); | 152 this.element.insertBefore(toolbar.element, this.element.firstChild); |
| 152 } | 153 } |
| 153 | 154 |
| 154 /** | 155 /** |
| 155 * @override | 156 * @override |
| 156 * @param {!Workspace.UISourceCode} uiSourceCode | 157 * @param {!Workspace.UISourceCode} uiSourceCode |
| 157 * @return {boolean} | 158 * @return {boolean} |
| 158 */ | 159 */ |
| 159 accept(uiSourceCode) { | 160 accept(uiSourceCode) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 190 }; | 191 }; |
| 191 | 192 |
| 192 /** | 193 /** |
| 193 * @unrestricted | 194 * @unrestricted |
| 194 */ | 195 */ |
| 195 Sources.SnippetsNavigatorView = class extends Sources.NavigatorView { | 196 Sources.SnippetsNavigatorView = class extends Sources.NavigatorView { |
| 196 constructor() { | 197 constructor() { |
| 197 super(); | 198 super(); |
| 198 var toolbar = new UI.Toolbar('navigator-toolbar'); | 199 var toolbar = new UI.Toolbar('navigator-toolbar'); |
| 199 var newButton = new UI.ToolbarButton('', 'largeicon-add', Common.UIString('N
ew Snippet')); | 200 var newButton = new UI.ToolbarButton('', 'largeicon-add', Common.UIString('N
ew Snippet')); |
| 200 newButton.addEventListener('click', this._handleCreateSnippet.bind(this)); | 201 newButton.addEventListener(UI.ToolbarButton.Events.Click, this._handleCreate
Snippet.bind(this)); |
| 201 toolbar.appendToolbarItem(newButton); | 202 toolbar.appendToolbarItem(newButton); |
| 202 this.element.insertBefore(toolbar.element, this.element.firstChild); | 203 this.element.insertBefore(toolbar.element, this.element.firstChild); |
| 203 } | 204 } |
| 204 | 205 |
| 205 /** | 206 /** |
| 206 * @override | 207 * @override |
| 207 * @param {!Workspace.UISourceCode} uiSourceCode | 208 * @param {!Workspace.UISourceCode} uiSourceCode |
| 208 * @return {boolean} | 209 * @return {boolean} |
| 209 */ | 210 */ |
| 210 accept(uiSourceCode) { | 211 accept(uiSourceCode) { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 this.create(Snippets.scriptSnippetModel.project(), ''); | 271 this.create(Snippets.scriptSnippetModel.project(), ''); |
| 271 } | 272 } |
| 272 | 273 |
| 273 /** | 274 /** |
| 274 * @override | 275 * @override |
| 275 */ | 276 */ |
| 276 sourceDeleted(uiSourceCode) { | 277 sourceDeleted(uiSourceCode) { |
| 277 this._handleRemoveSnippet(uiSourceCode); | 278 this._handleRemoveSnippet(uiSourceCode); |
| 278 } | 279 } |
| 279 }; | 280 }; |
| OLD | NEW |