Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- login: {
- app:false,
- init: function(){
- if(page.login.app) {
- $('#application').html(page.login.app.html());
- } else {
- page.login.app = new LoginApp({
- target:'#application',
- email:false,
- icon:true,
- event: function(){
- var data = $('#loginform').serializeObject();
- rpc.auth.simpleLogin({
- project:'project',
- username:data.username,
- password:data.password
- }, function(response){
- ui.loading('#application');
- user.prefs = new Preferences({
- accessToken:response.result.accessToken,
- refreshToken:response.result.refreshToken,
- userProjects:response.result.userProjects,
- selectedProject:response.result.selectedProject
- });
- user.setup(function(){
- application.setup(function(){
- page.data({
- view:'home'
- });
- });
- /*page.admin.getSettings(function(response){
- application.settings = response;
- rpc.record.getRecordTypes(function(response){
- application.globalSettings.recordTypes = response.result;
- var authorizedRecordTypes = {};
- $.each(application.settings, function(type, val){
- if (val.readPermissions.indexOf(user.groupName) !== -1 || user.groupName == 'admin'){
- authorizedRecordTypes[type] = response.result[type];
- }
- });
- application.recordTypes = authorizedRecordTypes;
- page.data({
- view:'home'
- });
- });
- QueueManager.init();
- });*/
- });
- });
- },
- forgot: function(){
- }
- });
- }
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement