You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
// interface_login.js |
|
// 2013 Miguel Freitas |
|
|
|
|
|
|
|
function processCreateUser(username, secretKey) { |
|
defaultScreenName = username; |
|
if(defaultScreenName) { |
|
saveScreenName(); |
|
} |
|
|
|
var newUserClass = "new-user"; |
|
openModal( newUserClass ); |
|
|
|
//título do modal |
|
$( "." + newUserClass + " h3" ).text( "Propagating nickname '"+ username + "' to the network..." ); |
|
|
|
var modalContent = $("." + newUserClass + " .modal-content"); |
|
var templateContent = $( "#new-user-modal-template" ).children().clone(true); |
|
templateContent.appendTo(modalContent); |
|
|
|
$( "." + newUserClass + " .secret-key" ).text(secretKey); |
|
|
|
sendNewUserTransaction( username, processSendnewusertransaction ); |
|
} |
|
|
|
function processSendnewusertransaction() { |
|
$( ".login-created-user").show(); |
|
} |
|
|
|
function loginCreatedUser() { |
|
$.MAL.goProfileEdit(); |
|
} |
|
|
|
function initInterfaceLogin() { |
|
initUser(); |
|
initInterfaceCommon(); |
|
checkNetworkStatusAndAskRedirect(); |
|
|
|
interfaceCommonLoginHandlers(); |
|
$( ".create-user").bind( "click", function() { createUserClick( processCreateUser ); } ); |
|
$( ".login-created-user").bind( "click", loginCreatedUser ); |
|
} |
|
|
|
|
|
|