Fossil SCM
fixed whoami requests in demo apps to notice when the user has been logged out (and logs him in with the new auth token).
Commit
ccc90734e097925e49b4474c3e1a564b9621ff9d
Parent
19276984bde3400…
3 files changed
+1
-1
+1
-1
+1
-1
+1
-1
| --- ajax/index.html | ||
| +++ ajax/index.html | ||
| @@ -222,11 +222,11 @@ | ||
| 222 | 222 | <input type='button' value='HAI' onclick='TheApp.cgi.HAI()' /> |
| 223 | 223 | <input type='button' value='HAI JSONP' onclick='TheApp.cgi.sendCommand("/json/HAI",undefined,{jsonp:"myJsonPCallback"});' /> |
| 224 | 224 | |
| 225 | 225 | <input type='button' value='version' onclick='TheApp.cgi.sendCommand("/json/version")' /> |
| 226 | 226 | <input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat?full=0")' /> |
| 227 | -<input type='button' value='whoami' onclick='TheApp.cgi.sendCommand("/json/whoami")' /> | |
| 227 | +<input type='button' value='whoami' onclick='TheApp.cgi.whoami()' /> | |
| 228 | 228 | <input type='button' value='cap' onclick='TheApp.cgi.sendCommand("/json/cap")' /> |
| 229 | 229 | <input type='button' value='branch/list' onclick='TheApp.cgi.sendCommand("/json/branch/list")' /> |
| 230 | 230 | <input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci?files=true")' /> |
| 231 | 231 | <input type='button' value='timeline/wiki' onclick='TheApp.cgi.sendCommand("/json/timeline/wiki")' /> |
| 232 | 232 | <input type='button' value='timeline/ticket' onclick='TheApp.cgi.sendCommand("/json/timeline/ticket")' /> |
| 233 | 233 |
| --- ajax/index.html | |
| +++ ajax/index.html | |
| @@ -222,11 +222,11 @@ | |
| 222 | <input type='button' value='HAI' onclick='TheApp.cgi.HAI()' /> |
| 223 | <input type='button' value='HAI JSONP' onclick='TheApp.cgi.sendCommand("/json/HAI",undefined,{jsonp:"myJsonPCallback"});' /> |
| 224 | |
| 225 | <input type='button' value='version' onclick='TheApp.cgi.sendCommand("/json/version")' /> |
| 226 | <input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat?full=0")' /> |
| 227 | <input type='button' value='whoami' onclick='TheApp.cgi.sendCommand("/json/whoami")' /> |
| 228 | <input type='button' value='cap' onclick='TheApp.cgi.sendCommand("/json/cap")' /> |
| 229 | <input type='button' value='branch/list' onclick='TheApp.cgi.sendCommand("/json/branch/list")' /> |
| 230 | <input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci?files=true")' /> |
| 231 | <input type='button' value='timeline/wiki' onclick='TheApp.cgi.sendCommand("/json/timeline/wiki")' /> |
| 232 | <input type='button' value='timeline/ticket' onclick='TheApp.cgi.sendCommand("/json/timeline/ticket")' /> |
| 233 |
| --- ajax/index.html | |
| +++ ajax/index.html | |
| @@ -222,11 +222,11 @@ | |
| 222 | <input type='button' value='HAI' onclick='TheApp.cgi.HAI()' /> |
| 223 | <input type='button' value='HAI JSONP' onclick='TheApp.cgi.sendCommand("/json/HAI",undefined,{jsonp:"myJsonPCallback"});' /> |
| 224 | |
| 225 | <input type='button' value='version' onclick='TheApp.cgi.sendCommand("/json/version")' /> |
| 226 | <input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat?full=0")' /> |
| 227 | <input type='button' value='whoami' onclick='TheApp.cgi.whoami()' /> |
| 228 | <input type='button' value='cap' onclick='TheApp.cgi.sendCommand("/json/cap")' /> |
| 229 | <input type='button' value='branch/list' onclick='TheApp.cgi.sendCommand("/json/branch/list")' /> |
| 230 | <input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci?files=true")' /> |
| 231 | <input type='button' value='timeline/wiki' onclick='TheApp.cgi.sendCommand("/json/timeline/wiki")' /> |
| 232 | <input type='button' value='timeline/ticket' onclick='TheApp.cgi.sendCommand("/json/timeline/ticket")' /> |
| 233 |
+1
-1
| --- ajax/js/fossil-ajaj.js | ||
| +++ ajax/js/fossil-ajaj.js | ||
| @@ -186,11 +186,11 @@ | ||
| 186 | 186 | ajajOpt = this.ajaj.normalizeAjaxParameters( ajajOpt || {} ); |
| 187 | 187 | var oldOnResponse = ajajOpt.onResponse; |
| 188 | 188 | ajajOpt.onResponse = function(resp,req) { |
| 189 | 189 | var thisOpt = this; |
| 190 | 190 | if( resp && resp.payload ){ |
| 191 | - if(!self.auth || (self.auth.authToken!=resp.payload.authToken)){ | |
| 191 | + if(!self.auth || (self.auth.authToken!==resp.payload.authToken)){ | |
| 192 | 192 | self.auth = resp.payload; |
| 193 | 193 | if( WhAjaj.isFunction(self.onLogin) ){ |
| 194 | 194 | self.onLogin(); |
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 |
| --- ajax/js/fossil-ajaj.js | |
| +++ ajax/js/fossil-ajaj.js | |
| @@ -186,11 +186,11 @@ | |
| 186 | ajajOpt = this.ajaj.normalizeAjaxParameters( ajajOpt || {} ); |
| 187 | var oldOnResponse = ajajOpt.onResponse; |
| 188 | ajajOpt.onResponse = function(resp,req) { |
| 189 | var thisOpt = this; |
| 190 | if( resp && resp.payload ){ |
| 191 | if(!self.auth || (self.auth.authToken!=resp.payload.authToken)){ |
| 192 | self.auth = resp.payload; |
| 193 | if( WhAjaj.isFunction(self.onLogin) ){ |
| 194 | self.onLogin(); |
| 195 | } |
| 196 | } |
| 197 |
| --- ajax/js/fossil-ajaj.js | |
| +++ ajax/js/fossil-ajaj.js | |
| @@ -186,11 +186,11 @@ | |
| 186 | ajajOpt = this.ajaj.normalizeAjaxParameters( ajajOpt || {} ); |
| 187 | var oldOnResponse = ajajOpt.onResponse; |
| 188 | ajajOpt.onResponse = function(resp,req) { |
| 189 | var thisOpt = this; |
| 190 | if( resp && resp.payload ){ |
| 191 | if(!self.auth || (self.auth.authToken!==resp.payload.authToken)){ |
| 192 | self.auth = resp.payload; |
| 193 | if( WhAjaj.isFunction(self.onLogin) ){ |
| 194 | self.onLogin(); |
| 195 | } |
| 196 | } |
| 197 |
+1
-1
| --- ajax/wiki-editor.html | ||
| +++ ajax/wiki-editor.html | ||
| @@ -335,11 +335,11 @@ | ||
| 335 | 335 | |
| 336 | 336 | <hr/> |
| 337 | 337 | <strong>Quick-posts:</strong><br/> |
| 338 | 338 | <input type='button' value='HAI' onclick='TheApp.cgi.HAI()' /> |
| 339 | 339 | <input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat")' /> |
| 340 | -<input type='button' value='whoami' onclick='TheApp.cgi.sendCommand("/json/whoami")' /> | |
| 340 | +<input type='button' value='whoami' onclick='TheApp.cgi.whoami()' /> | |
| 341 | 341 | <input type='button' value='wiki/list' onclick='TheApp.loadPageList()' /> |
| 342 | 342 | <!-- |
| 343 | 343 | <input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci")' /> |
| 344 | 344 | --> |
| 345 | 345 | |
| 346 | 346 |
| --- ajax/wiki-editor.html | |
| +++ ajax/wiki-editor.html | |
| @@ -335,11 +335,11 @@ | |
| 335 | |
| 336 | <hr/> |
| 337 | <strong>Quick-posts:</strong><br/> |
| 338 | <input type='button' value='HAI' onclick='TheApp.cgi.HAI()' /> |
| 339 | <input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat")' /> |
| 340 | <input type='button' value='whoami' onclick='TheApp.cgi.sendCommand("/json/whoami")' /> |
| 341 | <input type='button' value='wiki/list' onclick='TheApp.loadPageList()' /> |
| 342 | <!-- |
| 343 | <input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci")' /> |
| 344 | --> |
| 345 | |
| 346 |
| --- ajax/wiki-editor.html | |
| +++ ajax/wiki-editor.html | |
| @@ -335,11 +335,11 @@ | |
| 335 | |
| 336 | <hr/> |
| 337 | <strong>Quick-posts:</strong><br/> |
| 338 | <input type='button' value='HAI' onclick='TheApp.cgi.HAI()' /> |
| 339 | <input type='button' value='stat' onclick='TheApp.cgi.sendCommand("/json/stat")' /> |
| 340 | <input type='button' value='whoami' onclick='TheApp.cgi.whoami()' /> |
| 341 | <input type='button' value='wiki/list' onclick='TheApp.loadPageList()' /> |
| 342 | <!-- |
| 343 | <input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci")' /> |
| 344 | --> |
| 345 | |
| 346 |