OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 * @param {string} title | 77 * @param {string} title |
78 * @param {string=} subtitle | 78 * @param {string=} subtitle |
79 * @param {?Object=} representedObject | 79 * @param {?Object=} representedObject |
80 * @param {boolean=} hasChildren | 80 * @param {boolean=} hasChildren |
81 */ | 81 */ |
82 WebInspector.SidebarTreeElement = function(className, title, subtitle, represent
edObject, hasChildren) | 82 WebInspector.SidebarTreeElement = function(className, title, subtitle, represent
edObject, hasChildren) |
83 { | 83 { |
84 TreeElement.call(this, "", representedObject, hasChildren); | 84 TreeElement.call(this, "", representedObject, hasChildren); |
85 | 85 |
86 if (hasChildren) | 86 if (hasChildren) |
87 this.disclosureButton = document.createElementWithClass("button", "discl
osure-button"); | 87 this.disclosureButton = createElementWithClass("button", "disclosure-but
ton"); |
88 | 88 |
89 this.iconElement = document.createElementWithClass("div", "icon"); | 89 this.iconElement = createElementWithClass("div", "icon"); |
90 this.statusElement = document.createElementWithClass("div", "status"); | 90 this.statusElement = createElementWithClass("div", "status"); |
91 this.titlesElement = document.createElementWithClass("div", "titles"); | 91 this.titlesElement = createElementWithClass("div", "titles"); |
92 | 92 |
93 this.titleContainer = this.titlesElement.createChild("span", "title-containe
r"); | 93 this.titleContainer = this.titlesElement.createChild("span", "title-containe
r"); |
94 this.titleElement = this.titleContainer.createChild("span", "title"); | 94 this.titleElement = this.titleContainer.createChild("span", "title"); |
95 | 95 |
96 this.subtitleElement = this.titlesElement.createChild("span", "subtitle"); | 96 this.subtitleElement = this.titlesElement.createChild("span", "subtitle"); |
97 | 97 |
98 this.className = className; | 98 this.className = className; |
99 this.mainTitle = title; | 99 this.mainTitle = title; |
100 this.subtitle = subtitle; | 100 this.subtitle = subtitle; |
101 } | 101 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 }, | 182 }, |
183 | 183 |
184 onreveal: function() | 184 onreveal: function() |
185 { | 185 { |
186 if (this.listItemElement) | 186 if (this.listItemElement) |
187 this.listItemElement.scrollIntoViewIfNeeded(false); | 187 this.listItemElement.scrollIntoViewIfNeeded(false); |
188 }, | 188 }, |
189 | 189 |
190 __proto__: TreeElement.prototype | 190 __proto__: TreeElement.prototype |
191 } | 191 } |
OLD | NEW |