Clean code
authorStefanie Stamer <s.stamer@metaways.de>
Mon, 12 Sep 2011 15:11:28 +0000 (17:11 +0200)
committerMichael Spahn <m.spahn@metaways.de>
Thu, 4 Oct 2012 13:54:56 +0000 (15:54 +0200)
tine20/Inventory/Model/InventoryItem.php
tine20/Inventory/js/InventoryItemEditDialog.js
tine20/Inventory/js/Model.js

index af3c193..2640893 100644 (file)
@@ -25,7 +25,7 @@ class Inventory_Model_InventoryItem extends Tinebase_Record_Abstract
      * @var string
      */    
     protected $_identifier = 'id';    
-    
+
     /**
      * application the record belongs to
      *
index cf9d9ee..345be9f 100644 (file)
@@ -69,9 +69,8 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
     },
     
     /**
-     * check validity of activ numer field
+     * check validity of activ number field
      */
-    
     isValid: function () {
         var form = this.getForm();
         var isValid = true;
@@ -115,7 +114,6 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
                         columnWidth: .333
                     },
                     items: [[{
-                        
                         columnWidth: 1,
                         xtype: 'tine.widget.field.AutoCompleteField',
                         recordClass: this.recordClass,
@@ -166,29 +164,22 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
                             
                         }],
                         [{
-                               
                                xtype:'numberfield',
                             columnWidth: 0.5,
                             fieldLabel: this.app.i18n._('Total number'),
                             name: 'total_number',
-                            //value: null,
                             value: 1,
-                            //minValue: 1
-                            
+                            minValue: 1
                         },
                         {
                                xtype:'numberfield',
                             columnWidth: 0.5,
                             fieldLabel: this.app.i18n._('Active number'),
                             name: 'active_number',
-                            //value: null,
                             value: 1,
-                            //minValue: 0
-                            
-                        }],
-                        
+                            minValue: 0
+                        }], 
                     ] 
-                   
                 },
                 {
                     // activities and tags
@@ -203,7 +194,6 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
                     margins: '0 5 0 5',
                     border: true,
                     
-                          
                     items: [
                     new Tine.widgets.activities.ActivitiesPanel({
                         app: 'Inventory',
index 559efbb..afeb37c 100644 (file)
@@ -73,8 +73,8 @@ Tine.Inventory.Model.InventoryItem.getFilterModel = function() {
     var app = Tine.Tinebase.appMgr.get('Inventory');
     
     return [
-        {label: app.i18n._('Quick search'),    field: 'query',       operators: ['contains']},
-        {label: app.i18n._('Name'),    field: 'name',       operators: ['contains']},
+        {label: app.i18n._('Quick search'), field: 'query', operators: ['contains']},
+        {label: app.i18n._('Name'),                    field: 'name',  operators: ['contains']},
         {
             label: app.i18n._('Type'),
             field: 'type',
@@ -82,9 +82,9 @@ Tine.Inventory.Model.InventoryItem.getFilterModel = function() {
             app: app, 
             keyfieldName: 'inventoryType'
         },
-        {label: app.i18n._('ID'),    field: 'inventory_id',       operators: ['contains']},
-        {label: app.i18n._('Location'),    field: 'location',       operators: ['contains']},
-        {label: app.i18n._('Added'),         field: 'add_time', valueType: 'date', pastOnly: true},
+        {label: app.i18n._('ID'),              field: 'inventory_id',      operators: ['contains']},
+        {label: app.i18n._('Location'),        field: 'location',              operators: ['contains']},
+        {label: app.i18n._('Added'),        field: 'add_time',                         valueType: 'date',              pastOnly: true},
         {filtertype: 'tinebase.tag', app: app},
         {filtertype: 'tine.widget.container.filtermodel', app: app, recordClass: Tine.Inventory.Model.InventoryItem},
         {label: app.i18n._('Last modified'),                                            field: 'last_modified_time', valueType: 'date'},