Created
September 26, 2014 18:00
-
-
Save JoaoVagner/a28f2b7a7f82050d2f0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.Ingresse.ClickLogin = function() { | |
var target = $('a#sync_ingresse'); | |
target.bind('click', function(event) { | |
event.preventDefault(); | |
$loadingBtn = $(this); | |
oldText = $loadingBtn.text(); | |
stringIcon = '<i class="fa fa-spinner fa-spin"></i> '; | |
$loadingBtn.html(stringIcon + oldText); | |
$.ajax({ | |
url: App.ApiGateway.url, | |
data: {'method': 'login'}, | |
type: 'POST', | |
dataType: 'json', | |
success: function(data) { | |
window.open(data.url, "", "toolbar=no, scrollbars=no, resizable=yes, top=500, left=500, width=400, height=800"); | |
}, | |
error: function() { | |
}, | |
}); | |
}); | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment