OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 var div = mappingsPlaceholder.createChild('div'); | 61 var div = mappingsPlaceholder.createChild('div'); |
62 div.createTextChild( | 62 div.createTextChild( |
63 Common.UIString('Mappings are inferred automatically via the \'Persist
ence 2.0\' experiment. Please ')); | 63 Common.UIString('Mappings are inferred automatically via the \'Persist
ence 2.0\' experiment. Please ')); |
64 div.appendChild(UI.createExternalLink( | 64 div.appendChild(UI.createExternalLink( |
65 'https://bugs.chromium.org/p/chromium/issues/entry?template=Defect%20r
eport%20from%20user&components=Platform%3EDevTools%3EAuthoring&comment=DevTools%
20failed%20to%20link%20network%20resource%20to%20filesystem.%0A%0APlatform%3A%20
%3CLinux%2FWin%2FMac%3E%0AChrome%20version%3A%20%3Cyour%20chrome%20version%3E%0A
%0AWhat%20are%20the%20details%20of%20your%20project%3F%0A-%20Source%20code%20(if
%20any)%3A%20http%3A%2F%2Fgithub.com%2Fexample%2Fexample%0A-%20Build%20System%3A
%20gulp%2Fgrunt%2Fwebpack%2Frollup%2F...%0A-%20HTTP%20server%3A%20node%20HTTP%2F
nginx%2Fapache...%0A%0AAssets%20failed%20to%20link%20(or%20incorrectly%20linked)
%3A%0A1.%0A2.%0A3.%0A%0AIf%20possible%2C%20please%20attach%20a%20screenshot%20of
%20network%20sources%20navigator%20which%20should%0Ashow%20which%20resources%20f
ailed%20to%20map', | 65 'https://bugs.chromium.org/p/chromium/issues/entry?template=Defect%20r
eport%20from%20user&components=Platform%3EDevTools%3EAuthoring&comment=DevTools%
20failed%20to%20link%20network%20resource%20to%20filesystem.%0A%0APlatform%3A%20
%3CLinux%2FWin%2FMac%3E%0AChrome%20version%3A%20%3Cyour%20chrome%20version%3E%0A
%0AWhat%20are%20the%20details%20of%20your%20project%3F%0A-%20Source%20code%20(if
%20any)%3A%20http%3A%2F%2Fgithub.com%2Fexample%2Fexample%0A-%20Build%20System%3A
%20gulp%2Fgrunt%2Fwebpack%2Frollup%2F...%0A-%20HTTP%20server%3A%20node%20HTTP%2F
nginx%2Fapache...%0A%0AAssets%20failed%20to%20link%20(or%20incorrectly%20linked)
%3A%0A1.%0A2.%0A3.%0A%0AIf%20possible%2C%20please%20attach%20a%20screenshot%20of
%20network%20sources%20navigator%20which%20should%0Ashow%20which%20resources%20f
ailed%20to%20map', |
66 Common.UIString('report'))); | 66 Common.UIString('report'))); |
67 div.createTextChild(Common.UIString(' any bugs.')); | 67 div.createTextChild(Common.UIString(' any bugs.')); |
68 } else { | 68 } else { |
69 mappingsPlaceholder.textContent = Common.UIString('No mappings'); | 69 mappingsPlaceholder.textContent = Common.UIString('No mappings'); |
70 mappingsHeader.appendChild( | 70 mappingsHeader.appendChild( |
71 createTextButton(Common.UIString('Add'), this._addMappingButtonClicked
.bind(this), 'add-button')); | 71 UI.createTextButton(Common.UIString('Add'), this._addMappingButtonClic
ked.bind(this), 'add-button')); |
72 } | 72 } |
73 this._mappingsList.setEmptyPlaceholder(mappingsPlaceholder); | 73 this._mappingsList.setEmptyPlaceholder(mappingsPlaceholder); |
74 this._mappingsList.show(this.contentElement); | 74 this._mappingsList.show(this.contentElement); |
75 | 75 |
76 var excludedFoldersHeader = this.contentElement.createChild('div', 'file-sys
tem-header'); | 76 var excludedFoldersHeader = this.contentElement.createChild('div', 'file-sys
tem-header'); |
77 excludedFoldersHeader.createChild('div', 'file-system-header-text').textCont
ent = | 77 excludedFoldersHeader.createChild('div', 'file-system-header-text').textCont
ent = |
78 Common.UIString('Excluded folders'); | 78 Common.UIString('Excluded folders'); |
79 excludedFoldersHeader.appendChild( | 79 excludedFoldersHeader.appendChild( |
80 createTextButton(Common.UIString('Add'), this._addExcludedFolderButtonCl
icked.bind(this), 'add-button')); | 80 UI.createTextButton(Common.UIString('Add'), this._addExcludedFolderButto
nClicked.bind(this), 'add-button')); |
81 this._excludedFoldersList = new UI.ListWidget(this); | 81 this._excludedFoldersList = new UI.ListWidget(this); |
82 this._excludedFoldersList.element.classList.add('file-system-list'); | 82 this._excludedFoldersList.element.classList.add('file-system-list'); |
83 this._excludedFoldersList.registerRequiredCSS('settings/editFileSystemView.c
ss'); | 83 this._excludedFoldersList.registerRequiredCSS('settings/editFileSystemView.c
ss'); |
84 var excludedFoldersPlaceholder = createElementWithClass('div', 'file-system-
list-empty'); | 84 var excludedFoldersPlaceholder = createElementWithClass('div', 'file-system-
list-empty'); |
85 excludedFoldersPlaceholder.textContent = Common.UIString('No excluded folder
s'); | 85 excludedFoldersPlaceholder.textContent = Common.UIString('No excluded folder
s'); |
86 this._excludedFoldersList.setEmptyPlaceholder(excludedFoldersPlaceholder); | 86 this._excludedFoldersList.setEmptyPlaceholder(excludedFoldersPlaceholder); |
87 this._excludedFoldersList.show(this.contentElement); | 87 this._excludedFoldersList.show(this.contentElement); |
88 | 88 |
89 this.contentElement.tabIndex = 0; | 89 this.contentElement.tabIndex = 0; |
90 this._update(); | 90 this._update(); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 /** | 333 /** |
334 * @param {string} prefix | 334 * @param {string} prefix |
335 * @return {string} | 335 * @return {string} |
336 */ | 336 */ |
337 _normalizePrefix(prefix) { | 337 _normalizePrefix(prefix) { |
338 if (!prefix) | 338 if (!prefix) |
339 return ''; | 339 return ''; |
340 return prefix + (prefix[prefix.length - 1] === '/' ? '' : '/'); | 340 return prefix + (prefix[prefix.length - 1] === '/' ? '' : '/'); |
341 } | 341 } |
342 }; | 342 }; |
OLD | NEW |