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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 this._tabbedPane.appendTab(WebInspector.SettingsScreen.Tabs.Shortcuts, WebIn
spector.UIString("Shortcuts"), WebInspector.shortcutsScreen.createShortcutsTabVi
ew()); | 55 this._tabbedPane.appendTab(WebInspector.SettingsScreen.Tabs.Shortcuts, WebIn
spector.UIString("Shortcuts"), WebInspector.shortcutsScreen.createShortcutsTabVi
ew()); |
56 this._tabbedPane.shrinkableTabs = false; | 56 this._tabbedPane.shrinkableTabs = false; |
57 this._tabbedPane.verticalTabLayout = true; | 57 this._tabbedPane.verticalTabLayout = true; |
58 | 58 |
59 this._lastSelectedTabSetting = WebInspector.settings.createSetting("lastSele
ctedSettingsTab", WebInspector.SettingsScreen.Tabs.General); | 59 this._lastSelectedTabSetting = WebInspector.settings.createSetting("lastSele
ctedSettingsTab", WebInspector.SettingsScreen.Tabs.General); |
60 this.selectTab(this._lastSelectedTabSetting.get()); | 60 this.selectTab(this._lastSelectedTabSetting.get()); |
61 this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSele
cted, this._tabSelected, this); | 61 this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSele
cted, this._tabSelected, this); |
62 } | 62 } |
63 | 63 |
64 /** | 64 /** |
65 * @param {string} text | |
66 * @return {?string} | |
67 */ | |
68 WebInspector.SettingsScreen.regexValidator = function(text) | |
69 { | |
70 var regex; | |
71 try { | |
72 regex = new RegExp(text); | |
73 } catch (e) { | |
74 } | |
75 return regex ? null : WebInspector.UIString("Invalid pattern"); | |
76 } | |
77 | |
78 /** | |
79 * @param {number} min | 65 * @param {number} min |
80 * @param {number} max | 66 * @param {number} max |
81 * @param {string} text | 67 * @param {string} text |
82 * @return {?string} | 68 * @return {?string} |
83 */ | 69 */ |
84 WebInspector.SettingsScreen.integerValidator = function(min, max, text) | 70 WebInspector.SettingsScreen.integerValidator = function(min, max, text) |
85 { | 71 { |
86 var value = Number(text); | 72 var value = Number(text); |
87 if (isNaN(value)) | 73 if (isNaN(value)) |
88 return WebInspector.UIString("Invalid number format"); | 74 return WebInspector.UIString("Invalid number format"); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 function changeListener(e) | 184 function changeListener(e) |
199 { | 185 { |
200 // Don't use e.target.value to avoid conversion of the value to stri
ng. | 186 // Don't use e.target.value to avoid conversion of the value to stri
ng. |
201 setting.set(options[select.selectedIndex][1]); | 187 setting.set(options[select.selectedIndex][1]); |
202 } | 188 } |
203 | 189 |
204 select.addEventListener("change", changeListener, false); | 190 select.addEventListener("change", changeListener, false); |
205 return p; | 191 return p; |
206 }, | 192 }, |
207 | 193 |
208 /** | |
209 * @param {string} label | |
210 * @param {!WebInspector.Setting} setting | |
211 * @param {boolean} numeric | |
212 * @param {number=} maxLength | |
213 * @param {string=} width | |
214 * @param {function(string):?string=} validatorCallback | |
215 */ | |
216 _createInputSetting: function(label, setting, numeric, maxLength, width, val
idatorCallback) | |
217 { | |
218 var p = document.createElement("p"); | |
219 var labelElement = p.createChild("label"); | |
220 labelElement.textContent = label; | |
221 var inputElement = p.createChild("input"); | |
222 inputElement.value = setting.get(); | |
223 inputElement.type = "text"; | |
224 if (numeric) | |
225 inputElement.className = "numeric"; | |
226 if (maxLength) | |
227 inputElement.maxLength = maxLength; | |
228 if (width) | |
229 inputElement.style.width = width; | |
230 if (validatorCallback) { | |
231 var errorMessageLabel = p.createChild("div"); | |
232 errorMessageLabel.classList.add("field-error-message"); | |
233 errorMessageLabel.style.color = "DarkRed"; | |
234 inputElement.oninput = function() | |
235 { | |
236 var error = validatorCallback(inputElement.value); | |
237 if (!error) | |
238 error = ""; | |
239 errorMessageLabel.textContent = error; | |
240 }; | |
241 } | |
242 | |
243 function onBlur() | |
244 { | |
245 setting.set(numeric ? Number(inputElement.value) : inputElement.valu
e); | |
246 } | |
247 inputElement.addEventListener("blur", onBlur, false); | |
248 | |
249 return p; | |
250 }, | |
251 | |
252 _createCustomSetting: function(name, element) | |
253 { | |
254 var p = document.createElement("p"); | |
255 var fieldsetElement = document.createElement("fieldset"); | |
256 fieldsetElement.createChild("label").textContent = name; | |
257 fieldsetElement.appendChild(element); | |
258 p.appendChild(fieldsetElement); | |
259 return p; | |
260 }, | |
261 | |
262 __proto__: WebInspector.VBox.prototype | 194 __proto__: WebInspector.VBox.prototype |
263 } | 195 } |
264 | 196 |
265 /** | 197 /** |
266 * @constructor | 198 * @constructor |
267 * @extends {WebInspector.SettingsTab} | 199 * @extends {WebInspector.SettingsTab} |
268 */ | 200 */ |
269 WebInspector.GenericSettingsTab = function() | 201 WebInspector.GenericSettingsTab = function() |
270 { | 202 { |
271 WebInspector.SettingsTab.call(this, WebInspector.UIString("General"), "gener
al-tab-content"); | 203 WebInspector.SettingsTab.call(this, WebInspector.UIString("General"), "gener
al-tab-content"); |
272 | 204 |
273 var p = this._appendSection(); | 205 this._populateSectionsFromExtensions(); |
274 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Disable cache (while DevTools is open)"), WebInspector.settings.cacheDisa
bled)); | |
275 var disableJSElement = WebInspector.SettingsUI.createSettingCheckbox(WebInsp
ector.UIString("Disable JavaScript"), WebInspector.settings.javaScriptDisabled); | |
276 p.appendChild(disableJSElement); | |
277 WebInspector.settings.javaScriptDisabled.addChangeListener(this._javaScriptD
isabledChanged, this); | |
278 this._disableJSCheckbox = disableJSElement.getElementsByTagName("input")[0]; | |
279 var disableJSInfoParent = this._disableJSCheckbox.parentElement.createChild(
"span", "monospace"); | |
280 this._disableJSInfo = disableJSInfoParent.createChild("span", "object-info-s
tate-note hidden"); | |
281 this._disableJSInfo.title = WebInspector.UIString("JavaScript is blocked on
the inspected page (may be disabled in browser settings)."); | |
282 | 206 |
283 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod
el.EventTypes.MainFrameNavigated, this._updateScriptDisabledCheckbox, this); | 207 var restoreDefaults = this._appendSection().createChild("input", "settings-t
ab-text-button"); |
284 this._updateScriptDisabledCheckbox(); | |
285 | |
286 p = this._appendSection(WebInspector.UIString("Appearance")); | |
287 var splitVerticallyTitle = WebInspector.UIString("Split panels vertically wh
en docked to %s", WebInspector.experimentsSettings.dockToLeft.isEnabled() ? "lef
t or right" : "right"); | |
288 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(splitVerticallyT
itle, WebInspector.settings.splitVerticallyWhenDockedToRight)); | |
289 var panelShortcutTitle = WebInspector.UIString("Enable %s + 1-9 shortcut to
switch panels", WebInspector.isMac() ? "Cmd" : "Ctrl"); | |
290 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(panelShortcutTit
le, WebInspector.settings.shortcutPanelSwitch)); | |
291 | |
292 p = this._appendSection(WebInspector.UIString("Elements")); | |
293 var colorFormatElement = this._createSelectSetting(WebInspector.UIString("Co
lor format"), [ | |
294 [ WebInspector.UIString("As authored"), WebInspector.Color.Format.Or
iginal ], | |
295 [ "HEX: #DAC0DE", WebInspector.Color.Format.HEX ], | |
296 [ "RGB: rgb(128, 255, 255)", WebInspector.Color.Format.RGB ], | |
297 [ "HSL: hsl(300, 80%, 90%)", WebInspector.Color.Format.HSL ] | |
298 ], WebInspector.settings.colorFormat); | |
299 p.appendChild(colorFormatElement); | |
300 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Show user agent styles"), WebInspector.settings.showUserAgentStyles)); | |
301 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Show user agent shadow DOM"), WebInspector.settings.showUAShadowDOM)); | |
302 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Word wrap"), WebInspector.settings.domWordWrap)); | |
303 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Show rulers"), WebInspector.settings.showMetricsRulers)); | |
304 | |
305 p = this._appendSection(WebInspector.UIString("Sources")); | |
306 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Search in content scripts"), WebInspector.settings.searchInContentScripts
)); | |
307 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Enable JavaScript source maps"), WebInspector.settings.jsSourceMapsEnable
d)); | |
308 | |
309 var checkbox = WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UI
String("Enable CSS source maps"), WebInspector.settings.cssSourceMapsEnabled); | |
310 p.appendChild(checkbox); | |
311 var fieldset = WebInspector.SettingsUI.createSettingFieldset(WebInspector.se
ttings.cssSourceMapsEnabled); | |
312 var autoReloadCSSCheckbox = fieldset.createChild("input"); | |
313 fieldset.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspec
tor.UIString("Auto-reload generated CSS"), WebInspector.settings.cssReloadEnable
d, false, autoReloadCSSCheckbox)); | |
314 checkbox.appendChild(fieldset); | |
315 | |
316 var indentationElement = this._createSelectSetting(WebInspector.UIString("De
fault indentation"), [ | |
317 [ WebInspector.UIString("2 spaces"), WebInspector.TextUtils.Indent.T
woSpaces ], | |
318 [ WebInspector.UIString("4 spaces"), WebInspector.TextUtils.Indent.F
ourSpaces ], | |
319 [ WebInspector.UIString("8 spaces"), WebInspector.TextUtils.Indent.E
ightSpaces ], | |
320 [ WebInspector.UIString("Tab character"), WebInspector.TextUtils.Ind
ent.TabCharacter ] | |
321 ], WebInspector.settings.textEditorIndent); | |
322 p.appendChild(indentationElement); | |
323 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Detect indentation"), WebInspector.settings.textEditorAutoDetectIndent)); | |
324 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Autocompletion"), WebInspector.settings.textEditorAutocompletion)); | |
325 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Bracket matching"), WebInspector.settings.textEditorBracketMatching)); | |
326 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Show whitespace characters"), WebInspector.settings.showWhitespacesInEdit
or)); | |
327 if (WebInspector.experimentsSettings.frameworksDebuggingSupport.isEnabled())
{ | |
328 checkbox = WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UI
String("Skip stepping through sources with particular names"), WebInspector.sett
ings.skipStackFramesSwitch); | |
329 fieldset = WebInspector.SettingsUI.createSettingFieldset(WebInspector.se
ttings.skipStackFramesSwitch); | |
330 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Pat
tern"), WebInspector.settings.skipStackFramesPattern, false, 1000, "100px", WebI
nspector.SettingsScreen.regexValidator)); | |
331 checkbox.appendChild(fieldset); | |
332 p.appendChild(checkbox); | |
333 } | |
334 WebInspector.settings.skipStackFramesSwitch.addChangeListener(this._skipStac
kFramesSwitchOrPatternChanged, this); | |
335 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._skipSta
ckFramesSwitchOrPatternChanged, this); | |
336 | |
337 p = this._appendSection(WebInspector.UIString("Profiler")); | |
338 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Show advanced heap snapshot properties"), WebInspector.settings.showAdvan
cedHeapSnapshotProperties)); | |
339 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("High resolution CPU profiling"), WebInspector.settings.highResolutionCpuP
rofiling)); | |
340 | |
341 p = this._appendSection(WebInspector.UIString("Console")); | |
342 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Log XMLHttpRequests"), WebInspector.settings.monitoringXHREnabled)); | |
343 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Preserve log upon navigation"), WebInspector.settings.preserveConsoleLog)
); | |
344 p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIS
tring("Show timestamps"), WebInspector.settings.consoleTimestampsEnabled)); | |
345 | |
346 if (WebInspector.openAnchorLocationRegistry.handlerNames.length > 0) { | |
347 var handlerSelector = new WebInspector.HandlerSelector(WebInspector.open
AnchorLocationRegistry); | |
348 p = this._appendSection(WebInspector.UIString("Extensions")); | |
349 p.appendChild(this._createCustomSetting(WebInspector.UIString("Open link
s in"), handlerSelector.element)); | |
350 } | |
351 | |
352 p = this._appendSection(); | |
353 | |
354 var restoreDefaults = p.createChild("input", "settings-tab-text-button"); | |
355 restoreDefaults.type = "button"; | 208 restoreDefaults.type = "button"; |
356 restoreDefaults.value = WebInspector.UIString("Restore defaults and reload")
; | 209 restoreDefaults.value = WebInspector.UIString("Restore defaults and reload")
; |
357 restoreDefaults.addEventListener("click", restoreAndReload); | 210 restoreDefaults.addEventListener("click", restoreAndReload); |
358 | 211 |
359 function restoreAndReload() | 212 function restoreAndReload() |
360 { | 213 { |
361 if (window.localStorage) | 214 if (window.localStorage) |
362 window.localStorage.clear(); | 215 window.localStorage.clear(); |
363 WebInspector.reload(); | 216 WebInspector.reload(); |
364 } | 217 } |
365 } | 218 } |
366 | 219 |
367 WebInspector.GenericSettingsTab.prototype = { | 220 WebInspector.GenericSettingsTab.prototype = { |
368 _updateScriptDisabledCheckbox: function() | 221 _populateSectionsFromExtensions: function() |
369 { | 222 { |
370 /** | 223 /** @const */ |
371 * @param {?Protocol.Error} error | 224 var explicitSectionOrder = ["", "Appearance", "Elements", "Sources", "Pr
ofiler", "Console", "Extensions"]; |
372 * @param {string} status | 225 |
373 * @this {WebInspector.GenericSettingsTab} | 226 var allExtensions = WebInspector.moduleManager.extensions("ui-setting"); |
374 */ | 227 |
375 function executionStatusCallback(error, status) | 228 /** @type {!StringMultimap.<!WebInspector.ModuleManager.Extension>} */ |
376 { | 229 var extensionsBySectionId = new StringMultimap(); |
377 if (error || !status) | 230 /** @type {!StringMultimap.<!WebInspector.ModuleManager.Extension>} */ |
| 231 var childSettingExtensionsByParentName = new StringMultimap(); |
| 232 |
| 233 allExtensions.forEach(function(extension) { |
| 234 var descriptor = extension.descriptor(); |
| 235 var sectionName = descriptor["section"] || ""; |
| 236 if (!sectionName && descriptor["parentSettingName"]) { |
| 237 childSettingExtensionsByParentName.put(descriptor["parentSetting
Name"], extension); |
378 return; | 238 return; |
| 239 } |
| 240 extensionsBySectionId.put(sectionName, extension); |
| 241 }); |
379 | 242 |
380 var forbidden = (status === "forbidden"); | 243 var sectionIds = extensionsBySectionId.keys(); |
381 var disabled = forbidden || (status === "disabled"); | 244 var explicitlyOrderedSections = {}; |
382 | 245 for (var i = 0; i < explicitSectionOrder.length; ++i) { |
383 this._disableJSInfo.classList.toggle("hidden", !forbidden); | 246 explicitlyOrderedSections[explicitSectionOrder[i]] = true; |
384 this._disableJSCheckbox.checked = disabled; | 247 var extensions = /** @type {!Set.<!WebInspector.ModuleManager.Extens
ion>} */ (extensionsBySectionId.get(explicitSectionOrder[i])); |
385 this._disableJSCheckbox.disabled = forbidden; | 248 if (!extensions) |
| 249 continue; |
| 250 this._addSectionWithExtensionProvidedSettings(explicitSectionOrder[i
], extensions.items(), childSettingExtensionsByParentName); |
386 } | 251 } |
387 | 252 for (var i = 0; i < sectionIds.length; ++i) { |
388 PageAgent.getScriptExecutionStatus(executionStatusCallback.bind(this)); | 253 if (explicitlyOrderedSections[sectionIds[i]]) |
389 }, | 254 continue; |
390 | 255 this._addSectionWithExtensionProvidedSettings(sectionIds[i], /** @ty
pe {!Set.<!WebInspector.ModuleManager.Extension>} */ (extensionsBySectionId.get(
sectionIds[i])).items(), childSettingExtensionsByParentName); |
391 _javaScriptDisabledChanged: function() | 256 } |
392 { | |
393 // We need to manually update the checkbox state, since enabling JavaScr
ipt in the page can actually uncover the "forbidden" state. | |
394 PageAgent.setScriptExecutionDisabled(WebInspector.settings.javaScriptDis
abled.get(), this._updateScriptDisabledCheckbox.bind(this)); | |
395 }, | |
396 | |
397 _skipStackFramesSwitchOrPatternChanged: function() | |
398 { | |
399 WebInspector.debuggerModel.applySkipStackFrameSettings(); | |
400 }, | 257 }, |
401 | 258 |
402 /** | 259 /** |
| 260 * @param {string} sectionName |
| 261 * @param {!Array.<!WebInspector.ModuleManager.Extension>} extensions |
| 262 * @param {!StringMultimap.<!WebInspector.ModuleManager.Extension>} childSet
tingExtensionsByParentName |
| 263 */ |
| 264 _addSectionWithExtensionProvidedSettings: function(sectionName, extensions,
childSettingExtensionsByParentName) |
| 265 { |
| 266 var uiSectionName = sectionName && WebInspector.UIString(sectionName); |
| 267 var sectionElement = this._appendSection(uiSectionName); |
| 268 extensions.forEach(processSetting.bind(this, null)); |
| 269 |
| 270 /** |
| 271 * @param {?Element} parentFieldset |
| 272 * @param {!WebInspector.ModuleManager.Extension} extension |
| 273 * @this {WebInspector.GenericSettingsTab} |
| 274 */ |
| 275 function processSetting(parentFieldset, extension) |
| 276 { |
| 277 var descriptor = extension.descriptor(); |
| 278 var experimentName = descriptor["experiment"]; |
| 279 if (experimentName && (!WebInspector.experimentsSettings[experimentN
ame] || !WebInspector.experimentsSettings[experimentName].isEnabled())) |
| 280 return; |
| 281 |
| 282 var settingName = descriptor["settingName"]; |
| 283 var setting = WebInspector.settings[settingName]; |
| 284 var instance = extension.instance(); |
| 285 var settingControl; |
| 286 if (instance && descriptor["settingType"] === "custom") { |
| 287 settingControl = instance.settingElement(); |
| 288 if (!settingControl) |
| 289 return; |
| 290 } |
| 291 if (!settingControl) { |
| 292 var uiTitle = WebInspector.UIString(descriptor["title"]); |
| 293 settingControl = createSettingControl.call(this, uiTitle, settin
g, descriptor, instance); |
| 294 } |
| 295 if (settingName) { |
| 296 var childSettings = /** @type {!Set.<!WebInspector.ModuleManager
.Extension>|undefined} */ (childSettingExtensionsByParentName.get(settingName)); |
| 297 if (childSettings) { |
| 298 var fieldSet = WebInspector.SettingsUI.createSettingFieldset
(setting); |
| 299 settingControl.appendChild(fieldSet); |
| 300 childSettings.items().forEach(function(item) { processSettin
g.call(this, fieldSet, item); }, this); |
| 301 } |
| 302 } |
| 303 var containerElement = parentFieldset || sectionElement; |
| 304 containerElement.appendChild(settingControl); |
| 305 } |
| 306 |
| 307 /** |
| 308 * @param {string} uiTitle |
| 309 * @param {!WebInspector.Setting} setting |
| 310 * @param {!Object} descriptor |
| 311 * @param {?Object} instance |
| 312 * @return {!Element} |
| 313 * @this {WebInspector.GenericSettingsTab} |
| 314 */ |
| 315 function createSettingControl(uiTitle, setting, descriptor, instance) |
| 316 { |
| 317 switch (descriptor["settingType"]) { |
| 318 case "checkbox": |
| 319 return WebInspector.SettingsUI.createSettingCheckbox(uiTitle, se
tting); |
| 320 case "select": |
| 321 var descriptorOptions = descriptor["options"] |
| 322 var options = new Array(descriptorOptions.length); |
| 323 for (var i = 0; i < options.length; ++i) { |
| 324 // The third array item flags that the option name is "raw"
(non-i18n-izable). |
| 325 var optionName = descriptorOptions[i][2] ? descriptorOptions
[i][0] : WebInspector.UIString(descriptorOptions[i][0]); |
| 326 options[i] = [WebInspector.UIString(descriptorOptions[i][0])
, descriptorOptions[i][1]]; |
| 327 } |
| 328 return this._createSelectSetting(uiTitle, options, setting); |
| 329 default: |
| 330 throw "Invalid setting type: " + descriptor["settingType"]; |
| 331 } |
| 332 } |
| 333 }, |
| 334 |
| 335 /** |
403 * @param {?Element} p | 336 * @param {?Element} p |
404 */ | 337 */ |
405 _appendDrawerNote: function(p) | 338 _appendDrawerNote: function(p) |
406 { | 339 { |
407 var noteElement = p.createChild("div", "help-field-note"); | 340 var noteElement = p.createChild("div", "help-field-note"); |
408 noteElement.createTextChild("Hit "); | 341 noteElement.createTextChild("Hit "); |
409 noteElement.createChild("span", "help-key").textContent = "Esc"; | 342 noteElement.createChild("span", "help-key").textContent = "Esc"; |
410 noteElement.createTextChild(WebInspector.UIString(" or click the")); | 343 noteElement.createTextChild(WebInspector.UIString(" or click the")); |
411 noteElement.appendChild(new WebInspector.StatusBarButton(WebInspector.UI
String("Drawer"), "console-status-bar-item").element); | 344 noteElement.appendChild(new WebInspector.StatusBarButton(WebInspector.UI
String("Drawer"), "console-status-bar-item").element); |
412 noteElement.createTextChild(WebInspector.UIString("toolbar item")); | 345 noteElement.createTextChild(WebInspector.UIString("toolbar item")); |
413 }, | 346 }, |
414 | 347 |
415 __proto__: WebInspector.SettingsTab.prototype | 348 __proto__: WebInspector.SettingsTab.prototype |
416 } | 349 } |
417 | 350 |
418 /** | 351 /** |
419 * @constructor | 352 * @constructor |
420 * @extends {WebInspector.SettingsTab} | 353 * @extends {WebInspector.SettingsTab} |
421 */ | 354 */ |
422 WebInspector.WorkspaceSettingsTab = function() | 355 WebInspector.WorkspaceSettingsTab = function() |
423 { | 356 { |
424 WebInspector.SettingsTab.call(this, WebInspector.UIString("Workspace"), "wor
kspace-tab-content"); | 357 WebInspector.SettingsTab.call(this, WebInspector.UIString("Workspace"), "wor
kspace-tab-content"); |
425 WebInspector.isolatedFileSystemManager.addEventListener(WebInspector.Isolate
dFileSystemManager.Events.FileSystemAdded, this._fileSystemAdded, this); | 358 WebInspector.isolatedFileSystemManager.addEventListener(WebInspector.Isolate
dFileSystemManager.Events.FileSystemAdded, this._fileSystemAdded, this); |
426 WebInspector.isolatedFileSystemManager.addEventListener(WebInspector.Isolate
dFileSystemManager.Events.FileSystemRemoved, this._fileSystemRemoved, this); | 359 WebInspector.isolatedFileSystemManager.addEventListener(WebInspector.Isolate
dFileSystemManager.Events.FileSystemRemoved, this._fileSystemRemoved, this); |
427 | 360 |
428 this._commonSection = this._appendSection(WebInspector.UIString("Common")); | 361 this._commonSection = this._appendSection(WebInspector.UIString("Common")); |
429 var folderExcludePatternInput = this._createInputSetting(WebInspector.UIStri
ng("Folder exclude pattern"), WebInspector.settings.workspaceFolderExcludePatter
n, false, 0, "270px", WebInspector.SettingsScreen.regexValidator); | 362 var folderExcludePatternInput = WebInspector.SettingsUI.createSettingInputFi
eld(WebInspector.UIString("Folder exclude pattern"), WebInspector.settings.works
paceFolderExcludePattern, false, 0, "270px", WebInspector.SettingsUI.regexValida
tor); |
430 this._commonSection.appendChild(folderExcludePatternInput); | 363 this._commonSection.appendChild(folderExcludePatternInput); |
431 | 364 |
432 this._fileSystemsSection = this._appendSection(WebInspector.UIString("Folder
s")); | 365 this._fileSystemsSection = this._appendSection(WebInspector.UIString("Folder
s")); |
433 this._fileSystemsListContainer = this._fileSystemsSection.createChild("p", "
settings-list-container"); | 366 this._fileSystemsListContainer = this._fileSystemsSection.createChild("p", "
settings-list-container"); |
434 | 367 |
435 this._addFileSystemRowElement = this._fileSystemsSection.createChild("div"); | 368 this._addFileSystemRowElement = this._fileSystemsSection.createChild("div"); |
436 var addFileSystemButton = this._addFileSystemRowElement.createChild("input",
"settings-tab-text-button"); | 369 var addFileSystemButton = this._addFileSystemRowElement.createChild("input",
"settings-tab-text-button"); |
437 addFileSystemButton.type = "button"; | 370 addFileSystemButton.type = "button"; |
438 addFileSystemButton.value = WebInspector.UIString("Add folder\u2026"); | 371 addFileSystemButton.value = WebInspector.UIString("Add folder\u2026"); |
439 addFileSystemButton.addEventListener("click", this._addFileSystemClicked.bin
d(this)); | 372 addFileSystemButton.addEventListener("click", this._addFileSystemClicked.bin
d(this)); |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 var inputElement = this._addInputElements[columnId]; | 1053 var inputElement = this._addInputElements[columnId]; |
1121 inputElement.value = ""; | 1054 inputElement.value = ""; |
1122 } | 1055 } |
1123 }, | 1056 }, |
1124 | 1057 |
1125 __proto__: WebInspector.SettingsList.prototype | 1058 __proto__: WebInspector.SettingsList.prototype |
1126 } | 1059 } |
1127 | 1060 |
1128 /** @type {!WebInspector.SettingsController} */ | 1061 /** @type {!WebInspector.SettingsController} */ |
1129 WebInspector.settingsController; | 1062 WebInspector.settingsController; |
OLD | NEW |