OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 var DetailsView = (function() { | 5 var DetailsView = (function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 // We inherit from DivView. | 8 // We inherit from DivView. |
9 var superClass = DivView; | 9 var superClass = DivView; |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 this.getNode().innerHTML = ''; | 52 this.getNode().innerHTML = ''; |
53 | 53 |
54 var node = this.getNode(); | 54 var node = this.getNode(); |
55 | 55 |
56 for (var i = 0; i < this.sourceEntries_.length; ++i) { | 56 for (var i = 0; i < this.sourceEntries_.length; ++i) { |
57 if (i != 0) | 57 if (i != 0) |
58 addNode(node, 'hr'); | 58 addNode(node, 'hr'); |
59 | 59 |
60 var sourceEntry = this.sourceEntries_[i]; | 60 var sourceEntry = this.sourceEntries_[i]; |
61 var div = addNode(node, 'div'); | 61 var div = addNode(node, 'div'); |
62 div.className = 'logSourceEntry'; | 62 div.className = 'log-source-entry'; |
63 | 63 |
64 var p = addNode(div, 'p'); | 64 var p = addNode(div, 'p'); |
65 addNodeWithText(p, 'h4', | 65 addNodeWithText(p, 'h4', |
66 sourceEntry.getSourceId() + ': ' + | 66 sourceEntry.getSourceId() + ': ' + |
67 sourceEntry.getSourceTypeString()); | 67 sourceEntry.getSourceTypeString()); |
68 | 68 |
69 if (sourceEntry.getDescription()) | 69 if (sourceEntry.getDescription()) |
70 addNodeWithText(p, 'h4', sourceEntry.getDescription()); | 70 addNodeWithText(p, 'h4', sourceEntry.getDescription()); |
71 | 71 |
72 var logEntries = sourceEntry.getLogEntries(); | 72 var logEntries = sourceEntry.getLogEntries(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 function createSortedCopy_(origArray) { | 112 function createSortedCopy_(origArray) { |
113 var sortedArray = origArray.slice(0); | 113 var sortedArray = origArray.slice(0); |
114 sortedArray.sort(function(a, b) { | 114 sortedArray.sort(function(a, b) { |
115 return a.getSourceId() - b.getSourceId(); | 115 return a.getSourceId() - b.getSourceId(); |
116 }); | 116 }); |
117 return sortedArray; | 117 return sortedArray; |
118 } | 118 } |
119 | 119 |
120 return DetailsView; | 120 return DetailsView; |
121 })(); | 121 })(); |
OLD | NEW |