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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 labelElement.textContent = label; | 206 labelElement.textContent = label; |
221 var inputElement = p.createChild("input"); | 207 var inputElement = p.createChild("input"); |
222 inputElement.value = setting.get(); | 208 inputElement.value = setting.get(); |
223 inputElement.type = "text"; | 209 inputElement.type = "text"; |
224 if (numeric) | 210 if (numeric) |
225 inputElement.className = "numeric"; | 211 inputElement.className = "numeric"; |
226 if (maxLength) | 212 if (maxLength) |
227 inputElement.maxLength = maxLength; | 213 inputElement.maxLength = maxLength; |
228 if (width) | 214 if (width) |
229 inputElement.style.width = width; | 215 inputElement.style.width = width; |
| 216 |
| 217 var errorMessageLabel; |
230 if (validatorCallback) { | 218 if (validatorCallback) { |
231 var errorMessageLabel = p.createChild("div"); | 219 errorMessageLabel = p.createChild("div"); |
232 errorMessageLabel.classList.add("field-error-message"); | 220 errorMessageLabel.classList.add("field-error-message"); |
233 errorMessageLabel.style.color = "DarkRed"; | 221 inputElement.oninput = onInput; |
234 inputElement.oninput = function() | 222 onInput(); |
235 { | 223 } |
236 var error = validatorCallback(inputElement.value); | 224 |
237 if (!error) | 225 function onInput() |
238 error = ""; | 226 { |
239 errorMessageLabel.textContent = error; | 227 var error = validatorCallback(inputElement.value); |
240 }; | 228 if (!error) |
| 229 error = ""; |
| 230 errorMessageLabel.textContent = error; |
241 } | 231 } |
242 | 232 |
243 function onBlur() | 233 function onBlur() |
244 { | 234 { |
245 setting.set(numeric ? Number(inputElement.value) : inputElement.valu
e); | 235 setting.set(numeric ? Number(inputElement.value) : inputElement.valu
e); |
246 } | 236 } |
247 inputElement.addEventListener("blur", onBlur, false); | 237 inputElement.addEventListener("blur", onBlur, false); |
248 | 238 |
249 return p; | 239 return p; |
250 }, | 240 }, |
(...skipping 12 matching lines...) Expand all Loading... |
263 } | 253 } |
264 | 254 |
265 /** | 255 /** |
266 * @constructor | 256 * @constructor |
267 * @extends {WebInspector.SettingsTab} | 257 * @extends {WebInspector.SettingsTab} |
268 */ | 258 */ |
269 WebInspector.GenericSettingsTab = function() | 259 WebInspector.GenericSettingsTab = function() |
270 { | 260 { |
271 WebInspector.SettingsTab.call(this, WebInspector.UIString("General"), "gener
al-tab-content"); | 261 WebInspector.SettingsTab.call(this, WebInspector.UIString("General"), "gener
al-tab-content"); |
272 | 262 |
273 var p = this._appendSection(); | 263 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 | |
283 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod
el.EventTypes.MainFrameNavigated, this._updateScriptDisabledCheckbox, this); | |
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 | 264 |
346 if (WebInspector.openAnchorLocationRegistry.handlerNames.length > 0) { | 265 if (WebInspector.openAnchorLocationRegistry.handlerNames.length > 0) { |
347 var handlerSelector = new WebInspector.HandlerSelector(WebInspector.open
AnchorLocationRegistry); | 266 var handlerSelector = new WebInspector.HandlerSelector(WebInspector.open
AnchorLocationRegistry); |
348 p = this._appendSection(WebInspector.UIString("Extensions")); | 267 this._appendSection(WebInspector.UIString("Extensions")).appendChild(thi
s._createCustomSetting(WebInspector.UIString("Open links in"), handlerSelector.e
lement)); |
349 p.appendChild(this._createCustomSetting(WebInspector.UIString("Open link
s in"), handlerSelector.element)); | |
350 } | 268 } |
351 | 269 |
352 p = this._appendSection(); | 270 var restoreDefaults = this._appendSection().createChild("input", "settings-t
ab-text-button"); |
353 | |
354 var restoreDefaults = p.createChild("input", "settings-tab-text-button"); | |
355 restoreDefaults.type = "button"; | 271 restoreDefaults.type = "button"; |
356 restoreDefaults.value = WebInspector.UIString("Restore defaults and reload")
; | 272 restoreDefaults.value = WebInspector.UIString("Restore defaults and reload")
; |
357 restoreDefaults.addEventListener("click", restoreAndReload); | 273 restoreDefaults.addEventListener("click", restoreAndReload); |
358 | 274 |
359 function restoreAndReload() | 275 function restoreAndReload() |
360 { | 276 { |
361 if (window.localStorage) | 277 if (window.localStorage) |
362 window.localStorage.clear(); | 278 window.localStorage.clear(); |
363 WebInspector.reload(); | 279 WebInspector.reload(); |
364 } | 280 } |
365 } | 281 } |
366 | 282 |
367 WebInspector.GenericSettingsTab.prototype = { | 283 WebInspector.GenericSettingsTab.prototype = { |
368 _updateScriptDisabledCheckbox: function() | 284 _populateSectionsFromExtensions: function() |
369 { | 285 { |
| 286 var explicitSectionOrder = ["", "Appearance", "Elements", "Sources", "Pr
ofiler", "Console"]; |
| 287 |
| 288 var allExtensions = WebInspector.moduleManager.extensions(WebInspector.U
ISettingDelegate); |
| 289 /** @type {!StringMap.<!Array.<!WebInspector.ModuleManager.Extension>>}
*/ |
| 290 var extensionsBySectionId = new StringMap(); |
| 291 /** @type {!StringMap.<!Array.<!WebInspector.ModuleManager.Extension>>}
*/ |
| 292 var childSettingExtensionsByParentName = new StringMap(); |
| 293 |
370 /** | 294 /** |
371 * @param {?Protocol.Error} error | 295 * @param {!StringMap.<T>} map |
372 * @param {string} status | 296 * @param {string} key |
373 * @this {WebInspector.GenericSettingsTab} | 297 * @param {T} value |
| 298 * @template T |
374 */ | 299 */ |
375 function executionStatusCallback(error, status) | 300 function appendToListByKey(map, key, value) { |
376 { | 301 var list = map.get(key); |
377 if (error || !status) | 302 if (!list) { |
378 return; | 303 list = []; |
379 | 304 map.put(key, list); |
380 var forbidden = (status === "forbidden"); | 305 } |
381 var disabled = forbidden || (status === "disabled"); | 306 list.push(value); |
382 | |
383 this._disableJSInfo.classList.toggle("hidden", !forbidden); | |
384 this._disableJSCheckbox.checked = disabled; | |
385 this._disableJSCheckbox.disabled = forbidden; | |
386 } | 307 } |
387 | 308 |
388 PageAgent.getScriptExecutionStatus(executionStatusCallback.bind(this)); | 309 allExtensions.forEach(function(extension) { |
389 }, | 310 var descriptor = extension.descriptor(); |
| 311 var sectionName = descriptor["sectionName"] || ""; |
| 312 if (!sectionName && descriptor["parentSettingName"]) { |
| 313 appendToListByKey(childSettingExtensionsByParentName, descriptor
["parentSettingName"], extension); |
| 314 return; |
| 315 } |
| 316 appendToListByKey(extensionsBySectionId, sectionName, extension); |
| 317 }); |
390 | 318 |
391 _javaScriptDisabledChanged: function() | 319 var sectionIds = extensionsBySectionId.keys(); |
392 { | 320 var explicitlyOrderedSections = {}; |
393 // We need to manually update the checkbox state, since enabling JavaScr
ipt in the page can actually uncover the "forbidden" state. | 321 for (var i = 0; i < explicitSectionOrder.length; ++i) { |
394 PageAgent.setScriptExecutionDisabled(WebInspector.settings.javaScriptDis
abled.get(), this._updateScriptDisabledCheckbox.bind(this)); | 322 explicitlyOrderedSections[explicitSectionOrder[i]] = true; |
395 }, | 323 var extensions = /** @type {!Array.<!WebInspector.ModuleManager.Exte
nsion>} */ (extensionsBySectionId.get(explicitSectionOrder[i])); |
396 | 324 if (!extensions) |
397 _skipStackFramesSwitchOrPatternChanged: function() | 325 continue; |
398 { | 326 this._addSectionWithExtensionProvidedSettings(sectionIds[i], extensi
ons, childSettingExtensionsByParentName); |
399 WebInspector.debuggerModel.applySkipStackFrameSettings(); | 327 } |
| 328 for (var i = 0; i < sectionIds.length; ++i) { |
| 329 if (explicitlyOrderedSections[sectionIds[i]]) |
| 330 continue; |
| 331 this._addSectionWithExtensionProvidedSettings(sectionIds[i], /** @ty
pe {!Array.<!WebInspector.ModuleManager.Extension>} */ (extensionsBySectionId.ge
t(sectionIds[i])), childSettingExtensionsByParentName); |
| 332 } |
400 }, | 333 }, |
401 | 334 |
402 /** | 335 /** |
| 336 * @param {string} sectionName |
| 337 * @param {!Array.<!WebInspector.ModuleManager.Extension>} extensions |
| 338 * @param {!StringMap.<!Array.<!WebInspector.ModuleManager.Extension>>} chil
dSettingExtensionsByParentName |
| 339 */ |
| 340 _addSectionWithExtensionProvidedSettings: function(sectionName, extensions,
childSettingExtensionsByParentName) |
| 341 { |
| 342 var uiSectionName = sectionName && WebInspector.UIString(sectionName); |
| 343 var sectionElement = this._appendSection(uiSectionName); |
| 344 extensions.forEach(processSetting.bind(this, null)); |
| 345 |
| 346 /** |
| 347 * @param {?Element} parentFieldset |
| 348 * @param {!WebInspector.ModuleManager.Extension} extension |
| 349 * @this {WebInspector.GenericSettingsTab} |
| 350 */ |
| 351 function processSetting(parentFieldset, extension) |
| 352 { |
| 353 var descriptor = extension.descriptor(); |
| 354 var experimentName = descriptor["experiment"]; |
| 355 if (experimentName && (!WebInspector.experimentsSettings[experimentN
ame] || !WebInspector.experimentsSettings[experimentName].isEnabled())) |
| 356 return; |
| 357 |
| 358 var settingName = descriptor["settingName"]; |
| 359 var setting = WebInspector.settings[settingName]; |
| 360 var instance = extension.instance(); |
| 361 if (instance) |
| 362 setting.addChangeListener(instance.settingChanged, instance); |
| 363 var titleFormatArgs = [descriptor["title"]]; |
| 364 titleFormatArgs.push.apply(titleFormatArgs, instance ? (instance.tit
leTemplateArguments() || []) : []); |
| 365 var uiTitle = WebInspector.UIString.apply(WebInspector, titleFormatA
rgs); |
| 366 var settingControl; |
| 367 switch (descriptor["settingType"]) { |
| 368 case "checkbox": |
| 369 settingControl = WebInspector.SettingsUI.createSettingCheckbox(u
iTitle, setting); |
| 370 break; |
| 371 case "select": |
| 372 console.assert(instance instanceof WebInspector.SelectUISettingD
elegate); |
| 373 settingControl = this._createSelectSetting(uiTitle, /** @type {!
WebInspector.SelectUISettingDelegate} */ (instance).settingOptions(), setting); |
| 374 break; |
| 375 case "input": |
| 376 console.assert(instance instanceof WebInspector.InputUISettingDe
legate); |
| 377 settingControl = this._createInputSetting(uiTitle, setting, desc
riptor["isNumeric"] || false, descriptor["maxLength"], descriptor["width"], inst
ance.validateInput.bind(instance)); |
| 378 } |
| 379 var childSettings = childSettingExtensionsByParentName.get(settingNa
me); |
| 380 if (childSettings) { |
| 381 var fieldSet = WebInspector.SettingsUI.createSettingFieldset(set
ting); |
| 382 settingControl.appendChild(fieldSet); |
| 383 for (var i = 0; i < childSettings.length; ++i) |
| 384 processSetting.call(this, fieldSet, childSettings[i]); |
| 385 } |
| 386 var containerElement = parentFieldset || sectionElement; |
| 387 containerElement.appendChild(settingControl); |
| 388 if (descriptor["configurable"]) { |
| 389 console.assert(instance); |
| 390 /** @type {!WebInspector.ConfigurableUISettingDelegate} */ (inst
ance).configure(settingControl, containerElement); |
| 391 } |
| 392 } |
| 393 }, |
| 394 |
| 395 /** |
403 * @param {?Element} p | 396 * @param {?Element} p |
404 */ | 397 */ |
405 _appendDrawerNote: function(p) | 398 _appendDrawerNote: function(p) |
406 { | 399 { |
407 var noteElement = p.createChild("div", "help-field-note"); | 400 var noteElement = p.createChild("div", "help-field-note"); |
408 noteElement.createTextChild("Hit "); | 401 noteElement.createTextChild("Hit "); |
409 noteElement.createChild("span", "help-key").textContent = "Esc"; | 402 noteElement.createChild("span", "help-key").textContent = "Esc"; |
410 noteElement.createTextChild(WebInspector.UIString(" or click the")); | 403 noteElement.createTextChild(WebInspector.UIString(" or click the")); |
411 noteElement.appendChild(new WebInspector.StatusBarButton(WebInspector.UI
String("Drawer"), "console-status-bar-item").element); | 404 noteElement.appendChild(new WebInspector.StatusBarButton(WebInspector.UI
String("Drawer"), "console-status-bar-item").element); |
412 noteElement.createTextChild(WebInspector.UIString("toolbar item")); | 405 noteElement.createTextChild(WebInspector.UIString("toolbar item")); |
413 }, | 406 }, |
414 | 407 |
415 __proto__: WebInspector.SettingsTab.prototype | 408 __proto__: WebInspector.SettingsTab.prototype |
416 } | 409 } |
417 | 410 |
418 /** | 411 /** |
419 * @constructor | 412 * @constructor |
420 * @extends {WebInspector.SettingsTab} | 413 * @extends {WebInspector.SettingsTab} |
421 */ | 414 */ |
422 WebInspector.WorkspaceSettingsTab = function() | 415 WebInspector.WorkspaceSettingsTab = function() |
423 { | 416 { |
424 WebInspector.SettingsTab.call(this, WebInspector.UIString("Workspace"), "wor
kspace-tab-content"); | 417 WebInspector.SettingsTab.call(this, WebInspector.UIString("Workspace"), "wor
kspace-tab-content"); |
425 WebInspector.isolatedFileSystemManager.addEventListener(WebInspector.Isolate
dFileSystemManager.Events.FileSystemAdded, this._fileSystemAdded, this); | 418 WebInspector.isolatedFileSystemManager.addEventListener(WebInspector.Isolate
dFileSystemManager.Events.FileSystemAdded, this._fileSystemAdded, this); |
426 WebInspector.isolatedFileSystemManager.addEventListener(WebInspector.Isolate
dFileSystemManager.Events.FileSystemRemoved, this._fileSystemRemoved, this); | 419 WebInspector.isolatedFileSystemManager.addEventListener(WebInspector.Isolate
dFileSystemManager.Events.FileSystemRemoved, this._fileSystemRemoved, this); |
427 | 420 |
428 this._commonSection = this._appendSection(WebInspector.UIString("Common")); | 421 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); | 422 var folderExcludePatternInput = this._createInputSetting(WebInspector.UIStri
ng("Folder exclude pattern"), WebInspector.settings.workspaceFolderExcludePatter
n, false, 0, "270px", WebInspector.SettingsUI.regexValidator); |
430 this._commonSection.appendChild(folderExcludePatternInput); | 423 this._commonSection.appendChild(folderExcludePatternInput); |
431 | 424 |
432 this._fileSystemsSection = this._appendSection(WebInspector.UIString("Folder
s")); | 425 this._fileSystemsSection = this._appendSection(WebInspector.UIString("Folder
s")); |
433 this._fileSystemsListContainer = this._fileSystemsSection.createChild("p", "
settings-list-container"); | 426 this._fileSystemsListContainer = this._fileSystemsSection.createChild("p", "
settings-list-container"); |
434 | 427 |
435 this._addFileSystemRowElement = this._fileSystemsSection.createChild("div"); | 428 this._addFileSystemRowElement = this._fileSystemsSection.createChild("div"); |
436 var addFileSystemButton = this._addFileSystemRowElement.createChild("input",
"settings-tab-text-button"); | 429 var addFileSystemButton = this._addFileSystemRowElement.createChild("input",
"settings-tab-text-button"); |
437 addFileSystemButton.type = "button"; | 430 addFileSystemButton.type = "button"; |
438 addFileSystemButton.value = WebInspector.UIString("Add folder\u2026"); | 431 addFileSystemButton.value = WebInspector.UIString("Add folder\u2026"); |
439 addFileSystemButton.addEventListener("click", this._addFileSystemClicked.bin
d(this)); | 432 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]; | 1113 var inputElement = this._addInputElements[columnId]; |
1121 inputElement.value = ""; | 1114 inputElement.value = ""; |
1122 } | 1115 } |
1123 }, | 1116 }, |
1124 | 1117 |
1125 __proto__: WebInspector.SettingsList.prototype | 1118 __proto__: WebInspector.SettingsList.prototype |
1126 } | 1119 } |
1127 | 1120 |
1128 /** @type {!WebInspector.SettingsController} */ | 1121 /** @type {!WebInspector.SettingsController} */ |
1129 WebInspector.settingsController; | 1122 WebInspector.settingsController; |
OLD | NEW |