| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 var titles = this.createTHead().insertRow(); | 80 var titles = this.createTHead().insertRow(); |
| 81 titles.insertCell().textContent = 'type'; | 81 titles.insertCell().textContent = 'type'; |
| 82 titles.insertCell().textContent = 'release'; | 82 titles.insertCell().textContent = 'release'; |
| 83 titles.insertCell().textContent = 'debug'; | 83 titles.insertCell().textContent = 'debug'; |
| 84 this._body = this.appendChild(document.createElement('tbody')); | 84 this._body = this.appendChild(document.createElement('tbody')); |
| 85 this._reset(); | 85 this._reset(); |
| 86 }, | 86 }, |
| 87 _rowByResult: function(result) | 87 _rowByResult: function(result) |
| 88 { | 88 { |
| 89 var row = this._resultRows[result]; | 89 var row = this._resultRows[result]; |
| 90 $(row).show(); | 90 if (row) { |
| 91 if (row) | 91 row.style.display = ''; |
| 92 return row; | 92 return row; |
| 93 } |
| 93 | 94 |
| 94 row = this._resultRows[result] = this._body.insertRow(0); | 95 row = this._resultRows[result] = this._body.insertRow(0); |
| 95 row.className = result; | 96 row.className = result; |
| 96 var titleCell = row.insertCell(); | 97 var titleCell = row.insertCell(); |
| 97 titleCell.appendChild(document.createElement('span')).textContent = resu
lt; | 98 titleCell.appendChild(document.createElement('span')).textContent = resu
lt; |
| 98 row.insertCell(); | 99 row.insertCell(); |
| 99 row.insertCell(); | 100 row.insertCell(); |
| 100 return row; | 101 return row; |
| 101 }, | 102 }, |
| 102 update: function(resultsByBuilder) | 103 update: function(resultsByBuilder) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 119 }, this); | 120 }, this); |
| 120 }, | 121 }, |
| 121 purge: function() | 122 purge: function() |
| 122 { | 123 { |
| 123 this._pendingReset = true; | 124 this._pendingReset = true; |
| 124 }, | 125 }, |
| 125 _reset: function() | 126 _reset: function() |
| 126 { | 127 { |
| 127 this._pendingReset = false; | 128 this._pendingReset = false; |
| 128 this._resultRows = {}; | 129 this._resultRows = {}; |
| 129 $(this._body).empty(); | 130 this._body.innerHTML = ''; |
| 130 // Add the BUILDING row eagerly so that it appears last. | 131 // Add the BUILDING row eagerly so that it appears last. |
| 131 this._rowByResult(kBuildingResult); | 132 this._rowByResult(kBuildingResult).style.display = 'none'; |
| 132 $(this._resultRows[kBuildingResult]).hide(); | |
| 133 } | 133 } |
| 134 }); | 134 }); |
| 135 | 135 |
| 136 })(); | 136 })(); |
| OLD | NEW |