| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 //////////////////////////////////////////////////////////////////////////////// | 7 //////////////////////////////////////////////////////////////////////////////// |
| 8 // DirectoryTreeBase | 8 // DirectoryTreeBase |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 * @param {DirectoryEntry} dirEntry DirectoryEntry of this item. | 166 * @param {DirectoryEntry} dirEntry DirectoryEntry of this item. |
| 167 * @param {DirectoryItem|DirectoryTree} parentDirItem Parent of this item. | 167 * @param {DirectoryItem|DirectoryTree} parentDirItem Parent of this item. |
| 168 * @param {DirectoryTree} tree Current tree, which contains this item. | 168 * @param {DirectoryTree} tree Current tree, which contains this item. |
| 169 */ | 169 */ |
| 170 DirectoryItem.prototype.decorate = function( | 170 DirectoryItem.prototype.decorate = function( |
| 171 label, dirEntry, parentDirItem, tree) { | 171 label, dirEntry, parentDirItem, tree) { |
| 172 this.innerHTML = | 172 this.innerHTML = |
| 173 '<div class="tree-row">' + | 173 '<div class="tree-row">' + |
| 174 ' <span class="expand-icon"></span>' + | 174 ' <span class="expand-icon"></span>' + |
| 175 ' <span class="icon"></span>' + | 175 ' <span class="icon"></span>' + |
| 176 ' <span class="label"></span>' + | 176 ' <span class="label entry-name"></span>' + |
| 177 '</div>' + | 177 '</div>' + |
| 178 '<div class="tree-children"></div>'; | 178 '<div class="tree-children"></div>'; |
| 179 | 179 |
| 180 this.parentTree_ = tree; | 180 this.parentTree_ = tree; |
| 181 this.directoryModel_ = tree.directoryModel; | 181 this.directoryModel_ = tree.directoryModel; |
| 182 this.parent_ = parentDirItem; | 182 this.parent_ = parentDirItem; |
| 183 this.label = label; | 183 this.label = label; |
| 184 this.dirEntry_ = dirEntry; | 184 this.dirEntry_ = dirEntry; |
| 185 this.fileFilter_ = this.directoryModel_.getFileFilter(); | 185 this.fileFilter_ = this.directoryModel_.getFileFilter(); |
| 186 | 186 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 this.style.paddingBottom = margin + 'px'; | 625 this.style.paddingBottom = margin + 'px'; |
| 626 this.scrollBar_.setBottomMarginForPanel(margin); | 626 this.scrollBar_.setBottomMarginForPanel(margin); |
| 627 }; | 627 }; |
| 628 | 628 |
| 629 /** | 629 /** |
| 630 * Updates the UI after the layout has changed. | 630 * Updates the UI after the layout has changed. |
| 631 */ | 631 */ |
| 632 DirectoryTree.prototype.relayout = function() { | 632 DirectoryTree.prototype.relayout = function() { |
| 633 cr.dispatchSimpleEvent(this, 'relayout'); | 633 cr.dispatchSimpleEvent(this, 'relayout'); |
| 634 }; | 634 }; |
| OLD | NEW |