Inventory application
authorsstamer <s.stamer@metaways.de>
Thu, 28 Jun 2012 10:45:48 +0000 (12:45 +0200)
committerMichael Spahn <m.spahn@metaways.de>
Thu, 4 Oct 2012 13:54:56 +0000 (15:54 +0200)
- adapt to current version

Change-Id: I9e3614eff3fa46aea26ebbddb3f8b0e476dd8641
Reviewed-on: https://gerrit.tine20.org/tine20/769
Tested-by: jenkins user
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Reviewed-by: Cornelius Weiß <c.weiss@metaways.de>
12 files changed:
tine20/Inventory/Config.php
tine20/Inventory/Controller.php
tine20/Inventory/Controller/InventoryItem.php
tine20/Inventory/Frontend/Json.php
tine20/Inventory/Model/InventoryItem.php
tine20/Inventory/Model/InventoryItemFilter.php
tine20/Inventory/Model/Status.php
tine20/Inventory/Setup/Initialize.php
tine20/Inventory/js/Inventory.js
tine20/Inventory/js/InventoryItemEditDialog.js
tine20/Inventory/js/InventoryItemGridPanel.js
tine20/Inventory/js/Model.js

index 22390ad..704ca36 100644 (file)
@@ -3,7 +3,7 @@
  * @package     Inventory
  * @subpackage  Config
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Philipp Schüle <p.schuele@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2011 Metaways Infosystems GmbH (http://www.metaways.de)
  */
 
index 3e3e515..7add555 100644 (file)
@@ -5,7 +5,7 @@
  * @package     Inventory
  * @subpackage  Controller
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Cornelius Weiss <c.weiss@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
  *
  */
@@ -28,7 +28,6 @@ class Inventory_Controller extends Tinebase_Controller_Event implements Tinebase
      */
     private function __construct() {
         $this->_applicationName = 'Inventory';
-        $this->_currentAccount = Tinebase_Core::getUser();
     }
     
     /**
@@ -36,7 +35,7 @@ class Inventory_Controller extends Tinebase_Controller_Event implements Tinebase
      *
      */
     private function __clone() 
-    {        
+    {
     }
     
     /**
@@ -68,16 +67,17 @@ class Inventory_Controller extends Tinebase_Controller_Event implements Tinebase
     {
         $translation = Tinebase_Translation::getTranslation('Inventory');
         
-        $accountId = Tinebase_Model_User::convertUserIdToInt($_accountId);
-        $account = Tinebase_User::getInstance()->getUserById($accountId);
+        $account = Tinebase_User::getInstance()->getUserById($_accountId);
+        
         $newContainer = new Tinebase_Model_Container(array(
-            'name'              => sprintf($translation->_("%s's personal inventory"), $account->accountFullName),
+            'name'              => sprintf($translation->_("%s's personal inventorys"), $account->accountFullName),
             'type'              => Tinebase_Model_Container::TYPE_PERSONAL,
+            'owner_id'          => $_accountId,
             'backend'           => 'Sql',
             'application_id'    => Tinebase_Application::getInstance()->getApplicationByName('Inventory')->getId() 
         ));
         
-        $personalContainer = Tinebase_Container::getInstance()->addContainer($newContainer, NULL, FALSE, $accountId);
+        $personalContainer = Tinebase_Container::getInstance()->addContainer($newContainer);
         $container = new Tinebase_Record_RecordSet('Tinebase_Model_Container', array($personalContainer));
         
         return $container;
index c28c0ca..6e69ef5 100644 (file)
@@ -5,7 +5,7 @@
  * @package     Inventory
  * @subpackage  Controller
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Philipp Schüle <p.schuele@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
  *
  */
@@ -23,11 +23,10 @@ class Inventory_Controller_InventoryItem extends Tinebase_Controller_Record_Abst
      *
      * don't use the constructor. use the singleton 
      */
-    private function __construct() {        
+    private function __construct() {
         $this->_applicationName = 'Inventory';
         $this->_backend = new Inventory_Backend_InventoryItem();
         $this->_modelName = 'Inventory_Model_InventoryItem';
-        $this->_currentAccount = Tinebase_Core::getUser();   
         $this->_purgeRecords = FALSE;
         // activate this if you want to use containers
         $this->_doContainerACLChecks = FALSE;
index 9a06288..1e3763f 100644 (file)
@@ -75,7 +75,7 @@ class Inventory_Frontend_Json extends Tinebase_Frontend_Json_Abstract
      */
     public function saveInventoryItem($recordData)
     {
-        return $this->_save($recordData, $this->_controller, 'InventoryItem');        
+        return $this->_save($recordData, $this->_controller, 'InventoryItem');
     }
     
     /**
@@ -132,10 +132,10 @@ class Inventory_Frontend_Json extends Tinebase_Frontend_Json_Abstract
      * @return array
      */
     public function getRegistryData()
-    {   
-        $defaultContainerArray = Tinebase_Container::getInstance()->getDefaultContainer(Tinebase_Core::getUser()->getId(), $this->_applicationName)->toArray();
+    {
+        $defaultContainerArray = Tinebase_Container::getInstance()->getDefaultContainer($this->_applicationName)->toArray();\r
         $defaultContainerArray['account_grants'] = Tinebase_Container::getInstance()->getGrantsOfAccount(Tinebase_Core::getUser(), $defaultContainerArray['id'])->toArray();
-        
+
         return array(
             'defaultContainer' => $defaultContainerArray
         );
index 2640893..538b346 100644 (file)
@@ -5,7 +5,7 @@
  * @package     Inventory
  * @subpackage  Model
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Philipp Schüle <p.schuele@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
  * 
  */
@@ -24,8 +24,8 @@ class Inventory_Model_InventoryItem extends Tinebase_Record_Abstract
      * 
      * @var string
      */    
-    protected $_identifier = 'id';    
-
+    protected $_identifier = 'id';
+    
     /**
      * application the record belongs to
      *
@@ -43,7 +43,7 @@ class Inventory_Model_InventoryItem extends Tinebase_Record_Abstract
     protected $_validators = array(
         'id'                    => array(Zend_Filter_Input::ALLOW_EMPTY => true),
         'name'                  => array(Zend_Filter_Input::ALLOW_EMPTY => true),
-        'type'                 => array(Zend_Filter_Input::ALLOW_EMPTY => true),
+        'type'                  => array(Zend_Filter_Input::ALLOW_EMPTY => true),
         'container_id'          => array(Zend_Filter_Input::ALLOW_EMPTY => false, 'presence'=>'required'),
     // @todo add more fields
         'inventory_id'          => array(Zend_Filter_Input::ALLOW_EMPTY => true),
@@ -62,7 +62,7 @@ class Inventory_Model_InventoryItem extends Tinebase_Record_Abstract
         'deleted_by'            => array(Zend_Filter_Input::ALLOW_EMPTY => true),
     // relations (linked Inventory_Model_InventoryItem records) and other metadata
         'relations'             => array(Zend_Filter_Input::ALLOW_EMPTY => true, Zend_Filter_Input::DEFAULT_VALUE => NULL),
-        'tags'                  => array(Zend_Filter_Input::ALLOW_EMPTY => true),    
+        'tags'                  => array(Zend_Filter_Input::ALLOW_EMPTY => true),
         'notes'                 => array(Zend_Filter_Input::ALLOW_EMPTY => true),
     );
 
@@ -99,18 +99,17 @@ class Inventory_Model_InventoryItem extends Tinebase_Record_Abstract
      */
     public function isValid($_throwExceptionOnInvalidData = false)
     {
-       //$isValid = parent::isValid($_throwExceptionOnInvalidData);
-       
-       $isValid = (int) $this->active_number > (int) $this->total_number;
-       
-       if ($isValid && $_throwExceptionOnInvalidData) {
-               $e = new Tinebase_Exception_Record_Validation('active number must be equal or less than total number');
-               Tinebase_Core::getLogger()->err(__METHOD__ . '::' . __LINE__ . ":\n" .
+        //$isValid = parent::isValid($_throwExceptionOnInvalidData);
+        
+        $isValid = (int) $this->active_number > (int) $this->total_number;
+        
+        if ($isValid && $_throwExceptionOnInvalidData) {
+            $e = new Tinebase_Exception_Record_Validation('active number must be equal or less than total number');
+            Tinebase_Core::getLogger()->err(__METHOD__ . '::' . __LINE__ . ":\n" .
                print_r($this->_validationErrors,true). $e);
             throw $e;
-       }
-       
-       return $isValid;
+        }
+        return $isValid;
     }
     
     /**
@@ -120,13 +119,13 @@ class Inventory_Model_InventoryItem extends Tinebase_Record_Abstract
     /*
     public function setFromArray(array $_data)
     {
-       
+    
         if (isset($_data['total_number']) && ! is_int($_data['total_number'])) {
-               unset($_data['total_number']);
+            unset($_data['total_number']);
         }
         
         if (isset($_data['active_number']) && ! is_int($_data['active_number'])) {
-               unset($_data['active_number']);
+            unset($_data['active_number']);
         }
         
         return parent::setFromArray($_data);
@@ -140,13 +139,13 @@ class Inventory_Model_InventoryItem extends Tinebase_Record_Abstract
      */
     public function setFromJson($_data)
     {
-       
+    
         if (isset($_data['total_number']) && ! is_int($_data['total_number'])) {
-               unset($_data['total_number']);
+            unset($_data['total_number']);
         }
         
         if (isset($_data['active_number']) && ! is_int($_data['active_number'])) {
-               unset($_data['active_number']);
+            unset($_data['active_number']);
         }
         
        return parent::setFromJson($_data);
index 2bef544..1319ae4 100644 (file)
@@ -5,7 +5,7 @@
  * @package     Inventory
  * @subpackage  Model
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Philipp Schüle <p.schuele@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
  *
  */
  */
 class Inventory_Model_InventoryItemFilter extends Tinebase_Model_Filter_FilterGroup 
 {
+    /**\r
+     * @var string class name of this filter group\r
+     *      this is needed to overcome the static late binding\r
+     *      limitation in php < 5.3\r
+     */\r
+    protected $_className = 'Inventory_Model_InventoryItemFilter';\r
+    
     /**
      * @var string application of this filter group
      */
@@ -32,31 +39,28 @@ class Inventory_Model_InventoryItemFilter extends Tinebase_Model_Filter_FilterGr
      * @var array filter model fieldName => definition
      */
     protected $_filterModel = array(
-        'query'          => array('filter' => 'Tinebase_Model_Filter_Query', 'options' => array('fields' => array('name', 'type', 'location'/*'...'*/))),
+        'query'          => array('filter' => 'Tinebase_Model_Filter_Query', 'options' => array('fields' => array('name', /*'...'*/))),
         'container_id'   => array('filter' => 'Tinebase_Model_Filter_Container', 'options' => array('applicationName' => 'Inventory')),
         'id'             => array('filter' => 'Tinebase_Model_Filter_Id'),
         'type'           => array('filter' => 'Tinebase_Model_Filter_Text'),
-        'tag'            => array('filter' => 'Tinebase_Model_Filter_Tag', 'options' => array('idProperty' => 'inventory_item.id')),
-    
+        'tag'            => array('filter' => 'Tinebase_Model_Filter_Tag', 'options' => array(
+            'idProperty' => 'inventory_item.id',
+            'applicationName' => 'Inventory',
+        )),
         // modlog filters
         'last_modified_time'   => array('filter' => 'Tinebase_Model_Filter_Date'),
         'deleted_time'         => array('filter' => 'Tinebase_Model_Filter_DateTime'),
         'creation_time'        => array('filter' => 'Tinebase_Model_Filter_Date'),
         'last_modified_by'     => array('filter' => 'Tinebase_Model_Filter_User'),
         'created_by'           => array('filter' => 'Tinebase_Model_Filter_User'),
-    
+        
         // @todo add filters
         'name'           => array('filter' => 'Tinebase_Model_Filter_Text'),
         'inventory_id'   => array('filter' => 'Tinebase_Model_Filter_Text'),
         'description'    => array('filter' => 'Tinebase_Model_Filter_Text'),
-       'location'       => array('filter' => 'Tinebase_Model_Filter_Text'),
+        'location'       => array('filter' => 'Tinebase_Model_Filter_Text'),
         'add_time'       => array('filter' => 'Tinebase_Model_Filter_Date'),
         'total_number'   => array('filter' => 'Tinebase_Model_Filter_Text'),
         'active_number'  => array('filter' => 'Tinebase_Model_Filter_Text'),
-        /*
-        'title'          => array('filter' => 'Tinebase_Model_Filter_Text'),
-        'number'         => array('filter' => 'Tinebase_Model_Filter_Text'),
-        
-        */
     );
 }
index fe415ff..afdd67b 100644 (file)
@@ -5,7 +5,7 @@
  * @package     Inventory
  * @subpackage  Model
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Philipp Schüle <p.schuele@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2011 Metaways Infosystems GmbH (http://www.metaways.de)
  *
  */
index 82b0e37..0e17b96 100644 (file)
@@ -4,7 +4,7 @@
  * 
  * @package     Inventory
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Jonas Fischer <j.fischer@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2008-2011 Metaways Infosystems GmbH (http://www.metaways.de)
  *
  */
@@ -30,11 +30,11 @@ class Inventory_Setup_Initialize extends Setup_Initialize
         $typeConfig = array(
             'name'    => Inventory_Config::INVENTORY_TYPE,
             'records' => array(
-                array('id' => 'BOOK',    'value' => 'book',   'is_open' => 0, /*'icon' => 'images/oxygen/16x16/actions/ok.png',   */               'system' => true), //_('book')
-                array('id' => 'SERVER',    'value' => 'server',   'is_open' => 0, /*'icon' => 'images/oxygen/16x16/actions/dialog-cancel.png',  */      'system' => true), //_('server')
-                array('id' => 'MONITOR',    'value' => 'monitor',   'is_open' => 0, /*'icon' => 'images/oxygen/16x16/actions/dialog-cancel.png',  */      'system' => true), //_('monitor')
-                array('id' => 'KEYBOARD',    'value' => 'keyboard',   'is_open' => 0, /*'icon' => 'images/oxygen/16x16/actions/dialog-cancel.png',  */      'system' => true), //_('keyboard')
-                array('id' => 'UNKNOWN',   'value' => 'unknown',  'is_open' => 1, /*'icon' => 'images/oxygen/16x16/actions/view-refresh.png',   */      'system' => true), //_('unkown')
+                array('id' => 'BOOK',    'value' => 'book',   'is_open' => 0,                'system' => true), //_('book')
+                array('id' => 'SERVER',    'value' => 'server',   'is_open' => 0,            'system' => true), //_('server')
+                array('id' => 'MONITOR',    'value' => 'monitor',   'is_open' => 0,          'system' => true), //_('monitor')
+                array('id' => 'KEYBOARD',    'value' => 'keyboard',   'is_open' => 0,        'system' => true), //_('keyboard')
+                array('id' => 'UNKNOWN',   'value' => 'unknown',  'is_open' => 1,            'system' => true), //_('unkown')
             ),
         );
         
@@ -43,5 +43,5 @@ class Inventory_Setup_Initialize extends Setup_Initialize
             'name'              => Inventory_Config::INVENTORY_TYPE,
             'value'             => json_encode($typeConfig),
         )));
-    }    
+    }
 }
index bbd631b..7e3a4d6 100644 (file)
@@ -2,7 +2,7 @@
  * Tine 2.0
  * 
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Philipp Schüle <p.schuele@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
  */
 Ext.ns('Tine.Inventory');
@@ -43,7 +43,7 @@ Tine.Inventory.MainScreen = Ext.extend(Tine.widgets.MainScreen, {
  * 
  * @author      Cornelius Weiss <c.weiss@metaways.de>
  */
-Tine.Inventory.TreePanel = Ext.extend(Tine.widgets.container.TreePanel, {
+Tine.Inventory.InventoryItemTreePanel = Ext.extend(Tine.widgets.container.TreePanel, {
     id: 'Inventory_Tree',
     filterMode: 'filterToolbar',
     recordClass: Tine.Inventory.Model.InventoryItem
index 345be9f..97d4026 100644 (file)
@@ -2,7 +2,7 @@
  * Tine 2.0
  * 
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Cornelius Weiss <c.weiss@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
  */
 Ext.ns('Tine.Inventory');
@@ -16,7 +16,7 @@ Ext.ns('Tine.Inventory');
  * <p></p>
  * 
  *  @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Cornelius Weiss <c.weiss@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2008 Metaways Infosystems GmbH (http://www.metaways.de)
  * 
  * @param       {Object} config
@@ -51,9 +51,9 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
      * @private
      */
     onRecordLoad: function() {
-       // you can do something here
+    // you can do something here
 
-       Tine.Inventory.InventoryItemEditDialog.superclass.onRecordLoad.call(this);        
+        Tine.Inventory.InventoryItemEditDialog.superclass.onRecordLoad.call(this);
     },
     
     /**
@@ -97,14 +97,15 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
             plain:true,
             activeTab: 0,
             border: false,
-            items:[{               
+            items:[{
                 title: this.app.i18n._('Inventory Item'),
                 autoScroll: true,
                 border: false,
                 frame: true,
                 layout: 'border',
-                items: [{
-                       region: 'center',
+                items: [
+                    {
+                    region: 'center',
                     xtype: 'columnform',
                     labelAlign: 'top',
                     formDefaults: {
@@ -113,7 +114,9 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
                         labelSeparator: '',
                         columnWidth: .333
                     },
-                    items: [[{
+                    items: [
+                        //Start name type
+                        [{
                         columnWidth: 1,
                         xtype: 'tine.widget.field.AutoCompleteField',
                         recordClass: this.recordClass,
@@ -131,14 +134,18 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
                             allowBlank: false,
                             maxLength: 100
                         })],
+                        //End name type
+                        //Start ID
                         [{
                             columnWidth: 1,
                             fieldLabel: this.app.i18n._('ID'),
                             name: 'inventory_id',
                             maxLength: 100
                         }],
+                        //End ID
+                        //Start description
                         [{
-                               xtype: 'textarea',
+                            xtype: 'textarea',
                             name: 'description',
                             fieldLabel: this.app.i18n._('Description'),
                             grow: false,
@@ -147,6 +154,8 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
                             height: 150,
                             emptyText: this.app.i18n._('Enter description')
                         }],
+                        //End description
+                        //Start Place and time
                         [{
                             columnWidth: 0.5,
                             xtype: 'tine.widget.field.AutoCompleteField',
@@ -157,14 +166,16 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
                             
                         },
                         {
-                               xtype: 'extuxclearabledatefield',
+                            xtype: 'extuxclearabledatefield',
                             columnWidth: 0.5,
                             fieldLabel: this.app.i18n._('Added'),
                             name: 'add_time'
                             
                         }],
+                        //end Place and time
+                        //Start number
                         [{
-                               xtype:'numberfield',
+                            xtype:'numberfield',
                             columnWidth: 0.5,
                             fieldLabel: this.app.i18n._('Total number'),
                             name: 'total_number',
@@ -172,14 +183,16 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
                             minValue: 1
                         },
                         {
-                               xtype:'numberfield',
+                            xtype:'numberfield',
                             columnWidth: 0.5,
                             fieldLabel: this.app.i18n._('Active number'),
                             name: 'active_number',
                             value: 1,
                             minValue: 0
-                        }], 
-                    ] 
+                        }],
+                        //End number
+                    ]
+                    
                 },
                 {
                     // activities and tags
index 8d7a116..67dd71d 100644 (file)
@@ -2,7 +2,7 @@
  * Tine 2.0
  * 
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Philipp Schüle <p.schuele@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
  */
 Ext.ns('Tine.Inventory');
@@ -19,7 +19,7 @@ Ext.ns('Tine.Inventory');
  * </pre></p>
  * 
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @author      Philipp Schuele <p.schuele@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  * @copyright   Copyright (c) 2007-2008 Metaways Infosystems GmbH (http://www.metaways.de)
  * 
  * @param       {Object} config
@@ -32,7 +32,7 @@ Tine.Inventory.InventoryItemGridPanel = Ext.extend(Tine.widgets.grid.GridPanel,
      * @cfg {Tine.Inventory.Model.InventoryItem} recordClass
      */
     recordClass: Tine.Inventory.Model.InventoryItem,
-   
+    
     /**
      * eval grants
      * @cfg {Boolean} evalGrants
@@ -73,7 +73,7 @@ Tine.Inventory.InventoryItemGridPanel = Ext.extend(Tine.widgets.grid.GridPanel,
      * TODO    add more columns
      */
     getColumnModel: function(){
-        return new Ext.grid.ColumnModel({ 
+        return new Ext.grid.ColumnModel({
             defaults: {
                 sortable: true,
                 resizable: true
@@ -128,25 +128,7 @@ Tine.Inventory.InventoryItemGridPanel = Ext.extend(Tine.widgets.grid.GridPanel,
                 width: 50,
                 sortable: true,
                 dataIndex: 'description'
-            }
-            
-            
-            
-            
-            
-            /*,{
-                id: 'title',
-                header: this.app.i18n._("Title"),
-                width: 350,
-                sortable: true,
-                dataIndex: 'title'
-            },{
-                id: 'budget',
-                header: this.app.i18n._("Budget"),
-                width: 100,
-                sortable: true,
-                dataIndex: 'budget'
-            }*/].concat(this.getModlogColumns())
+            }].concat(this.getModlogColumns())
         });
     },
     
@@ -164,19 +146,9 @@ Tine.Inventory.InventoryItemGridPanel = Ext.extend(Tine.widgets.grid.GridPanel,
      * @private
      */
     getToolbarItems: function(){
-       /*
-        this.action_showClosedToggle = new Tine.widgets.grid.FilterButton({
-            text: this.app.i18n._('Show closed'),
-            iconCls: 'action_showArchived',
-            field: 'showClosed'
-        });
-        */
+
         
         return [
-            /*
-            new Ext.Toolbar.Separator(),
-            this.action_showClosedToggle
-            */
         ];
     }    
 });
index afeb37c..e9616a2 100644 (file)
@@ -13,7 +13,7 @@ Ext.ns('Tine.Inventory.Model');
  * @extends     Tine.Tinebase.data.Record
  * inventory record definition
  * 
- * @author      Cornelius Weiss <c.weiss@metaways.de>
+ * @author      Stefanie Stamer <s.stamer@metaways.de>
  */
 Tine.Inventory.Model.InventoryItem = Tine.Tinebase.data.Record.create(Tine.Tinebase.Model.genericFields.concat([
     { name: 'id' },
@@ -74,7 +74,7 @@ Tine.Inventory.Model.InventoryItem.getFilterModel = function() {
     
     return [
         {label: app.i18n._('Quick search'), field: 'query', operators: ['contains']},
-        {label: app.i18n._('Name'),                    field: 'name',  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'},