| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 var items = []; | 762 var items = []; |
| 763 var colorButton = new WebInspector.ToolbarButton(WebInspector.UIString("
Add color"), "foreground-color-toolbar-item"); | 763 var colorButton = new WebInspector.ToolbarButton(WebInspector.UIString("
Add color"), "foreground-color-toolbar-item"); |
| 764 colorButton.addEventListener("click", this._onInsertColorPropertyClick.b
ind(this)); | 764 colorButton.addEventListener("click", this._onInsertColorPropertyClick.b
ind(this)); |
| 765 items.push(colorButton); | 765 items.push(colorButton); |
| 766 | 766 |
| 767 var backgroundButton = new WebInspector.ToolbarButton(WebInspector.UIStr
ing("Add background-color"), "background-color-toolbar-item"); | 767 var backgroundButton = new WebInspector.ToolbarButton(WebInspector.UIStr
ing("Add background-color"), "background-color-toolbar-item"); |
| 768 backgroundButton.addEventListener("click", this._onInsertBackgroundColor
PropertyClick.bind(this)); | 768 backgroundButton.addEventListener("click", this._onInsertBackgroundColor
PropertyClick.bind(this)); |
| 769 items.push(backgroundButton); | 769 items.push(backgroundButton); |
| 770 | 770 |
| 771 if (rule) { | 771 if (rule) { |
| 772 var newRuleButton = new WebInspector.ToolbarButton(WebInspector.UISt
ring("Insert Style Rule"), "add-toolbar-item"); | 772 var newRuleButton = new WebInspector.ToolbarButton(WebInspector.UISt
ring("Insert Style Rule Below"), "add-toolbar-item"); |
| 773 newRuleButton.addEventListener("click", this._onNewRuleClick.bind(th
is)); | 773 newRuleButton.addEventListener("click", this._onNewRuleClick.bind(th
is)); |
| 774 items.push(newRuleButton); | 774 items.push(newRuleButton); |
| 775 } | 775 } |
| 776 | 776 |
| 777 var menuButton = new WebInspector.ToolbarButton(WebInspector.UIString("M
ore tools\u2026"), "menu-toolbar-item"); | 777 var menuButton = new WebInspector.ToolbarButton(WebInspector.UIString("M
ore tools\u2026"), "menu-toolbar-item"); |
| 778 items.push(menuButton); | 778 items.push(menuButton); |
| 779 | 779 |
| 780 if (items.length) { | 780 if (items.length) { |
| 781 var sectionToolbar = new WebInspector.Toolbar("sidebar-pane-section-
toolbar", closeBrace); | 781 var sectionToolbar = new WebInspector.Toolbar("sidebar-pane-section-
toolbar", closeBrace); |
| 782 | 782 |
| (...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3086 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha
nged); | 3086 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha
nged); |
| 3087 onNodeChanged(); | 3087 onNodeChanged(); |
| 3088 return button; | 3088 return button; |
| 3089 | 3089 |
| 3090 function onNodeChanged() | 3090 function onNodeChanged() |
| 3091 { | 3091 { |
| 3092 var node = WebInspector.context.flavor(WebInspector.DOMNode); | 3092 var node = WebInspector.context.flavor(WebInspector.DOMNode); |
| 3093 button.setEnabled(!!node); | 3093 button.setEnabled(!!node); |
| 3094 } | 3094 } |
| 3095 } | 3095 } |
| OLD | NEW |