Commit bc4970bfff94feb845190bf91c57bb489d780169
- Diff rendering mode:
- inline
- side by side
alipi/ui.js
(14 / 2)
  | |||
597 | 597 | { | |
598 | 598 | text: 'Login', | |
599 | 599 | click: function() { | |
600 | |||
600 | 601 | console.log('login'); | |
601 | 602 | var uname = $('#tar-uname').val(); | |
602 | 603 | var pass = $('#tar-pass').val(); | |
603 | 604 | if(uname && pass) { | |
604 | 605 | $('.login-button > .ui-button-text').text('Please wait..'); | |
605 | sweet.authenticate(config.sweet + '/authenticate', uname, pass, a11ypi.publish, function() { | ||
606 | $.ajax({ | ||
607 | crossDomain: true, | ||
608 | type: "POST", | ||
609 | url: config.sweet+"/authenticate", | ||
610 | data: {"user":uname, "hash":pass}, | ||
611 | error: function(e, a, b){ | ||
612 | console.log(e,a,b); | ||
613 | |||
614 | } | ||
615 | }).done(function(data){ | ||
606 | 616 | $('.login-button > .ui-button-text').text('Login'); | |
607 | }); | ||
617 | a11ypi.publish(); | ||
618 | }); | ||
619 | |||
608 | 620 | } | |
609 | 621 | else { | |
610 | 622 | //console.log('no username and password'); |