comparison app.js @ 716:b400629a2575

Added Logininformation to a Popup in Viewport
author Dustin Demuth <dustin@intevation.de>
date Wed, 08 Apr 2015 17:03:59 +0200
parents 605bc34b45a0
children 5e91a740aff8
comparison
equal deleted inserted replaced
715:605bc34b45a0 716:b400629a2575
16 Ext.application({ 16 Ext.application({
17 17
18 // Name of the application. Do not change as this name is used in 18 // Name of the application. Do not change as this name is used in
19 // references! 19 // references!
20 name: 'Lada', 20 name: 'Lada',
21
22 username: '',
23 userroles: '',
24 logintime: '',
25 21
26 // Setting up translations. This is done using a ext-plgin which can be 22 // Setting up translations. This is done using a ext-plgin which can be
27 // found on https://github.com/elmasse/Ext.i18n.Bundle 23 // found on https://github.com/elmasse/Ext.i18n.Bundle
28 requires: [ 24 requires: [
29 'Lada.override.Table', 25 'Lada.override.Table',
58 // file which sets ob the viewport. 54 // file which sets ob the viewport.
59 //autoCreateViewport: true, 55 //autoCreateViewport: true,
60 56
61 // Start the application. 57 // Start the application.
62 launch: function() { 58 launch: function() {
59 Lada.username = '';
60 Lada.userroles = '';
61 Lada.logintime = '';
62
63 var queryString = document.location.href.split('?')[1]; 63 var queryString = document.location.href.split('?')[1];
64 if (queryString) { 64 if (queryString) {
65 Lada.openIDParams = queryString; 65 Lada.openIDParams = queryString;
66 } 66 }
67 Ext.Ajax.request({ 67 Ext.Ajax.request({
108 108
109 Ext.create('Lada.view.Viewport'); 109 Ext.create('Lada.view.Viewport');
110 110
111 /* Parse Username and Timestamp */ 111 /* Parse Username and Timestamp */
112 var json = Ext.decode(response.responseText); 112 var json = Ext.decode(response.responseText);
113 this.username = json.data.username; 113 Lada.username = json.data.username;
114 this.userroles = json.data.roles; 114 Lada.userroles = json.data.roles;
115 this.logintime = json.data.servertime; 115 Lada.logintime = json.data.servertime;
116 116
117 Ext.create('Lada.store.Datenbasis', { 117 Ext.create('Lada.store.Datenbasis', {
118 storeId: 'datenbasis' 118 storeId: 'datenbasis'
119 }); 119 });
120 Ext.create('Lada.store.Messeinheiten', { 120 Ext.create('Lada.store.Messeinheiten', {

http://lada.wald.intevation.org