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 function moduleDidLoad() { | 5 function moduleDidLoad() { |
6 common.hideModule(); | 6 common.hideModule(); |
7 } | 7 } |
8 | 8 |
9 // Called by the common.js module. | 9 // Called by the common.js module. |
10 function domContentLoaded(name, tc, config, width, height) { | 10 function domContentLoaded(name, tc, config, width, height) { |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 function onRadioClicked(e) { | 40 function onRadioClicked(e) { |
41 var divId = this.id.slice(6); // skip "radio_" | 41 var divId = this.id.slice(6); // skip "radio_" |
42 var functionEls = document.querySelectorAll('.function'); | 42 var functionEls = document.querySelectorAll('.function'); |
43 for (var i = 0; i < functionEls.length; ++i) { | 43 for (var i = 0; i < functionEls.length; ++i) { |
44 var visible = functionEls[i].id === divId; | 44 var visible = functionEls[i].id === divId; |
45 if (functionEls[i].id === divId) | 45 if (functionEls[i].id === divId) |
46 functionEls[i].removeAttribute('hidden'); | 46 functionEls[i].removeAttribute('hidden'); |
47 else | 47 else |
48 functionEls[i].setAttribute('hidden'); | 48 functionEls[i].setAttribute('hidden', ''); |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 function makeMessage(command, path) { | 52 function makeMessage(command, path) { |
53 // Package a message using a simple protocol containing: | 53 // Package a message using a simple protocol containing: |
54 // command <path length> <path> <space-separated extra args> | 54 // command <path length> <path> <space-separated extra args> |
55 var msg = command; | 55 var msg = command; |
56 msg += ' '; | 56 msg += ' '; |
57 msg += path.length; | 57 msg += path.length; |
58 msg += ' '; | 58 msg += ' '; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 itemEl.textContent = args[i]; | 143 itemEl.textContent = args[i]; |
144 listDirOutputEl.appendChild(itemEl); | 144 listDirOutputEl.appendChild(itemEl); |
145 } | 145 } |
146 } else { | 146 } else { |
147 var itemEl = document.createElement('li'); | 147 var itemEl = document.createElement('li'); |
148 itemEl.textContent = '<empty directory>'; | 148 itemEl.textContent = '<empty directory>'; |
149 listDirOutputEl.appendChild(itemEl); | 149 listDirOutputEl.appendChild(itemEl); |
150 } | 150 } |
151 } | 151 } |
152 } | 152 } |
OLD | NEW |