| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 The common.js file must be included before this file. | 2 The common.js file must be included before this file. |
| 3 | 3 |
| 4 This in an HTML Import-able file that contains the definition | 4 This in an HTML Import-able file that contains the definition |
| 5 of the following elements: | 5 of the following elements: |
| 6 | 6 |
| 7 <arb-status-sk> | 7 <arb-status-sk> |
| 8 | 8 |
| 9 To use this file import it: | 9 To use this file import it: |
| 10 | 10 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 <div class="td">Recent:</div> | 107 <div class="td">Recent:</div> |
| 108 <div class="td"> | 108 <div class="td"> |
| 109 <div class="table"> | 109 <div class="table"> |
| 110 <div class="tr"> | 110 <div class="tr"> |
| 111 <div class="th">Roll</div> | 111 <div class="th">Roll</div> |
| 112 <div class="th">Last Modified</div> | 112 <div class="th">Last Modified</div> |
| 113 <div class="th">Result</div> | 113 <div class="th">Result</div> |
| 114 </div> | 114 </div> |
| 115 <template is="dom-repeat" items="{{recent}}"> | 115 <template is="dom-repeat" items="{{recent}}"> |
| 116 <div class="tr"> | 116 <div class="tr"> |
| 117 <div class="td"><a href="">{{item.subject}}</a></div> | 117 <div class="td"><a href="{{_issueURL(item)}}" target="_blank">
{{item.subject}}</a></div> |
| 118 <div class="td"><human-date-sk date="{{item.modified}}" diff><
/human-date-sk> ago</div> | 118 <div class="td"><human-date-sk date="{{item.modified}}" diff><
/human-date-sk> ago</div> |
| 119 <div class="td"><span class$="{{_rollClass(item)}}">{{_rollRes
ult(item)}}</span></div> | 119 <div class="td"><span class$="{{_rollClass(item)}}">{{_rollRes
ult(item)}}</span></div> |
| 120 </div> | 120 </div> |
| 121 </template> | 121 </template> |
| 122 </div> | 122 </div> |
| 123 </div> | 123 </div> |
| 124 </div> | 124 </div> |
| 125 <div class="tr"> | 125 <div class="tr"> |
| 126 <div class="td">Full History:</div> | 126 <div class="td">Full History:</div> |
| 127 <div class="td"> | 127 <div class="td"> |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 _buttonPressed: function(e) { | 209 _buttonPressed: function(e) { |
| 210 if (!this._editRights) { | 210 if (!this._editRights) { |
| 211 sk.errorMessage("You must be logged in with an @google.com account to
set the ARB mode."); | 211 sk.errorMessage("You must be logged in with an @google.com account to
set the ARB mode."); |
| 212 return | 212 return |
| 213 } | 213 } |
| 214 var mode = e.srcElement.innerHTML; | 214 var mode = e.srcElement.innerHTML; |
| 215 if (mode == this.mode) { | 215 if (mode == this.mode) { |
| 216 return; | 216 return; |
| 217 } | 217 } |
| 218 var modeIdx = this.validModes.indexOf(mode); | 218 var url = "/json/mode"; |
| 219 sk.post("/setMode", JSON.stringify({"mode": modeIdx})).then(JSON.parse).
then(function (json) { | 219 var body = JSON.stringify({"mode": mode}); |
| 220 sk.post(url, body).then(JSON.parse).then(function (json) { |
| 220 this._update(json); | 221 this._update(json); |
| 221 }.bind(this), function(err) { | 222 }.bind(this), function(err) { |
| 222 sk.errorMessage("Action failed: " + err); | 223 sk.errorMessage("Action failed: " + err); |
| 223 }); | 224 }); |
| 224 }, | 225 }, |
| 225 | 226 |
| 226 _issueURL: function(issue) { | 227 _issueURL: function(issue) { |
| 227 if (issue) { | 228 if (issue) { |
| 228 return "https://codereview.chromium.org/" + issue.issue; | 229 return "https://codereview.chromium.org/" + issue.issue; |
| 229 } | 230 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 283 } |
| 283 this._setModeButtons(modeButtons); | 284 this._setModeButtons(modeButtons); |
| 284 | 285 |
| 285 this._lastLoaded = new Date().toLocaleTimeString(); | 286 this._lastLoaded = new Date().toLocaleTimeString(); |
| 286 this._resetTimeout(); | 287 this._resetTimeout(); |
| 287 console.log("Reloaded status."); | 288 console.log("Reloaded status."); |
| 288 }, | 289 }, |
| 289 }); | 290 }); |
| 290 </script> | 291 </script> |
| 291 </dom-module> | 292 </dom-module> |
| OLD | NEW |