| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 TaskLog = (function() { | 5 var TaskLog = (function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 var nextTaskLogSeq = 1; | 8 var nextTaskLogSeq = 1; |
| 9 var TaskLog = {}; | 9 var TaskLog = {}; |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 var tr = document.createElement('tr'); | 37 var tr = document.createElement('tr'); |
| 38 tr.appendChild(createElementFromText( | 38 tr.appendChild(createElementFromText( |
| 39 'td', taskLog.duration, {'class': 'task-log-duration'})); | 39 'td', taskLog.duration, {'class': 'task-log-duration'})); |
| 40 tr.appendChild(createElementFromText( | 40 tr.appendChild(createElementFromText( |
| 41 'td', taskLog.task_description, {'class': 'task-log-description'})); | 41 'td', taskLog.task_description, {'class': 'task-log-description'})); |
| 42 tr.appendChild(createElementFromText( | 42 tr.appendChild(createElementFromText( |
| 43 'td', taskLog.result_description, {'class': 'task-log-result'})); | 43 'td', taskLog.result_description, {'class': 'task-log-result'})); |
| 44 tr.appendChild(details); | 44 tr.appendChild(details); |
| 45 | 45 |
| 46 $('task-log-entries').appendChild(tr); | 46 $('task-log-entries').appendChild(tr); |
| 47 } | 47 }; |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * Get initial sync service values and set listeners to get updated values. | 50 * Get initial sync service values and set listeners to get updated values. |
| 51 */ | 51 */ |
| 52 function main() { | 52 function main() { |
| 53 observeTaskLog(); | 53 observeTaskLog(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 document.addEventListener('DOMContentLoaded', main); | 56 document.addEventListener('DOMContentLoaded', main); |
| 57 return TaskLog; | 57 return TaskLog; |
| 58 })(); | 58 })(); |
| OLD | NEW |