Commits

Sebastian Sdorra committed 232e360

improve user interface

Comments (0)

Files changed (6)

scm-webapp/src/main/webapp/resources/js/group/sonia.group.panel.js

         {xtype: 'tbbutton', text: this.reloadText, icon: this.reloadIcon, scope: this, handler: this.reload}
       ],
       items: [{
-          id: 'groupGrid',
-          xtype: 'groupGrid',
-          region: 'center',
-          parentPanel: this
-        }, {
-          id: 'groupEditPanel',
-          xtype: 'tabpanel',
-          activeTab: 0,
-          height: 250,
-          split: true,
-          border: true,
-          region: 'south',
-          items: [{
-            bodyCssClass: 'x-panel-mc',
-            title: this.titleText,
-            padding: 5,
-            html: this.emptyText
-          }]
-        }
-      ]
+        id: 'groupGrid',
+        xtype: 'groupGrid',
+        region: 'center',
+        parentPanel: this
+      }, {
+        id: 'groupEditPanel',
+        xtype: 'tabpanel',
+        activeTab: 0,
+        height: 250,
+        split: true,
+        border: true,
+        region: 'south',
+        items: [{
+          bodyCssClass: 'x-panel-mc',
+          title: this.titleText,
+          padding: 5,
+          html: this.emptyText
+        }]
+      }]
     };
 
     Ext.apply(this, Ext.apply(this.initialConfig, config));

scm-webapp/src/main/webapp/resources/js/rest/sonia.rest.formpanel.js

         {text: this.okText, formBind: true, scope: this, handler: this.submit},
         {text: this.cancelText, scope: this, handler: this.cancel}
       ]
-    }
+    };
 
     Ext.apply(this, Ext.apply(this.initialConfig, config));
     Sonia.rest.FormPanel.superclass.initComponent.apply(this, arguments);
 
-    if ( this.item != null ){
+    if ( this.item !== null ){
       this.loadData(this.item);
     }
   },
       console.debug( 'form submitted' );
     }
     var item = this.getForm().getFieldValues();
-    if ( this.item != null ){
+    if ( this.item !== null ){
       this.update(item);
     } else {
       this.create(item);

scm-webapp/src/main/webapp/resources/js/rest/sonia.rest.panel.js

   addIcon: 'resources/images/add.png',
   removeIcon: 'resources/images/delete.png',
   reloadIcon: 'resources/images/reload.png',
+  helpIcon: 'resources/images/help.png',
   
   initComponent: function(){
     
       enableTabScroll: true,
       region:'center',
       autoScroll: true
-    }
+    };
     
     Ext.apply(this, Ext.apply(this.initialConfig, config));
     Sonia.rest.Panel.superclass.initComponent.apply(this, arguments);

scm-webapp/src/main/webapp/resources/js/security/sonia.security.permissionspanel.js

 
 Sonia.security.PermissionsPanel = Ext.extend(Ext.Panel, {
 
+  addText: 'Add',
+  removeText: 'Remove',
+  reloadText: 'Reload',
+  
+  // icons
+  addIcon: 'resources/images/add.png',
+  removeIcon: 'resources/images/delete.png',
+  reloadIcon: 'resources/images/reload.png',
+  helpIcon: 'resources/images/help.png',
+
+
   //TODO i18n
   titleText: 'Permissions',
   
   permissionStore: null,
   baseUrl: null,
   
-  addIcon: 'resources/images/add.png',
-  removeIcon: 'resources/images/delete.png',
-  helpIcon: 'resources/images/help.png',
-
   initComponent: function(){
 
     this.permissionStore = new Sonia.rest.JsonStore({
     var config = {
       title: this.titleText,
       bodyCssClass: 'x-panel-mc',
+      padding: 5,
       items: [{
         id: 'permissionGrid',
         xtype: 'editorgrid',
         }]
       }]
     };
-
+    
     Ext.apply(this, Ext.apply(this.initialConfig, config));
     Sonia.security.PermissionsPanel.superclass.initComponent.apply(this, arguments);
   },
   },
           
   modifyOrAddPermission: function(store, record){
-    console.log('------ modify --------');
     var id = record.get('id');
     if ( id ){
       this.modifyPermission(id, record);
     });
   },
 
-  removePermission: function(store, record, index){
-    console.log('------ remove --------');
+  removePermission: function(store, record){
     Ext.Ajax.request({
       url: restUrl + this.baseUrl + '/' + record.get('id')  + '.json',
       method: 'DELETE',

scm-webapp/src/main/webapp/resources/js/user/sonia.user.formpanel.js

       helpText: this.activeHelpText,
       checked: true
     });
-
+    
     Ext.apply(this, Ext.apply(this.initialConfig, {items: items}));
     Sonia.user.FormPanel.superclass.initComponent.apply(this, arguments);
   },

scm-webapp/src/main/webapp/resources/js/user/sonia.user.panel.js

   userGrid: null,
 
   initComponent: function(){
-
     var config = {
-      bodyCssClass: 'x-panel-mc',
       tbar: [
         {xtype: 'tbbutton', text: this.addText, icon: this.addIcon, scope: this, handler: this.showAddPanel},
         {xtype: 'tbbutton', text: this.removeText, icon: this.removeIcon, scope: this, handler: this.removeUser},