Commit 61bd666a5ac69785e1344ced5ceb9e487a915aad
- Diff rendering mode:
- inline
- side by side
swtr/static/js/swtmaker.js
(30 / 3)
  | |||
289 | 289 | success: function(data) { | |
290 | 290 | swtr.appView.$overlay.hide(); | |
291 | 291 | swtr.who = username; | |
292 | $('#signinview').html('You are signed in.'); | ||
292 | var text = 'You are signed in as <b>' + swtr.who+ '</b>'; | ||
293 | $('#signinview').html(text); | ||
293 | 294 | }, | |
294 | 295 | error: function(jqxhr, status, error) { | |
295 | 296 | swtr.appView.$overlay.hide(); | |
… | … | ||
298 | 298 | $('#signin-msg').html('Error signing in. Please check your username and password. '); | |
299 | 299 | } | |
300 | 300 | else { | |
301 | $('#signin-msg').html('Error signin in. Please try again.'); | ||
301 | $('#signin-msg').html('Error signin in. Please try again. '); | ||
302 | 302 | } | |
303 | 303 | } | |
304 | 304 | }); | |
… | … | ||
343 | 343 | // utilities and helper functions to go here | |
344 | 344 | swtr.utils = {}; | |
345 | 345 | ||
346 | swtr.AppView = AppView; | ||
346 | //swtr.AppView = AppView; | ||
347 | |||
348 | /*navigator.watch({ | ||
349 | onlogin: function(assertion) { | ||
350 | $.ajax({ | ||
351 | type: 'POST', | ||
352 | url: swtr.swtstoreURL() + swtr.endpoints.login, | ||
353 | data: {assertion: assertion}, | ||
354 | success: function() { | ||
355 | }, | ||
356 | error: function() { | ||
357 | navigator.id.logout(); | ||
358 | } | ||
359 | }); | ||
360 | }, | ||
361 | onlogout: function() { | ||
362 | $.ajax({ | ||
363 | type: 'POST', | ||
364 | url: swtr.swtstoreURL() + swtr.endpoints.logout, | ||
365 | success: function() { | ||
366 | }, | ||
367 | error: function() { | ||
368 | } | ||
369 | }); | ||
370 | } | ||
371 | });*/ | ||
372 | |||
347 | 373 | })(swtr); |
swtr/templates/index.html
(1 / 0)
  | |||
63 | 63 | <script src="{{ url_for('static', filename='js/lib/underscore-1.5.2.min.js') }}"></script> | |
64 | 64 | <script src="{{ url_for('static', filename='js/lib/backbone-1.0.0.min.js') }}"></script> | |
65 | 65 | <script src="{{ url_for('static', filename='js/lib/annotorious.debug.js') }}"></script> | |
66 | <!--script src="https://login.persona.org/include.js"></script--> | ||
66 | 67 | <script src="{{ url_for('static', filename='js/swtmaker.js') }}"></script> | |
67 | 68 | ||
68 | 69 | <script type="text/template" id="sweet-template"> |