Merge branch 'newmaster'
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 10 Jul 2012 08:27:54 +0000 (10:27 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 10 Jul 2012 08:27:54 +0000 (10:27 +0200)
Conflicts:
tine20/Tasks/js/Tasks.js

15 files changed:
1  2 
scripts/packaging/debian/changelog
tests/tine20/Felamimail/JsonTest.php
tine20/Calendar/Model/Event.php
tine20/Calendar/js/EventDetailsPanel.js
tine20/Crm/js/Model.js
tine20/Felamimail/Controller/Sieve.php
tine20/Setup/Controller.php
tine20/Tasks/js/TaskGridPanel.js
tine20/Tasks/js/Tasks.js
tine20/Timetracker/js/Models.js
tine20/Tinebase/js/Models.js
tine20/Tinebase/js/ux/grid/QuickaddGridPanel.js
tine20/Tinebase/js/widgets/ActionUpdater.js
tine20/Tinebase/js/widgets/dialog/DuplicateResolveGridPanel.js
tine20/Tinebase/js/widgets/grid/GridPanel.js

Simple merge
Simple merge
Simple merge
@@@ -106,12 -106,12 +106,12 @@@ Tine.Crm.Model.Lead.getFilterModel = fu
              {label: app.i18n._('Probability'), field: 'probability', valueType: 'percentage'},
              {label: app.i18n._('Turnover'),    field: 'turnover', valueType: 'number', defaultOperator: 'greater'},
              {filtertype: 'tinebase.tag', app: app},
 -            {label: app.i18n._('Last modified'),   field: 'last_modified_time', valueType: 'date'},
 -            {label: app.i18n._('Last modifier'),   field: 'last_modified_by',   valueType: 'user'},
 -            {label: app.i18n._('Creation Time'),   field: 'creation_time',      valueType: 'date'},
 -            {label: app.i18n._('Creator'),         field: 'created_by',         valueType: 'user'},
 +            {label: _('Last Modified Time'),                                                field: 'last_modified_time', valueType: 'date'},
 +            {label: _('Last Modified By'),                                                  field: 'last_modified_by',   valueType: 'user'},
 +            {label: _('Creation Time'),                                                     field: 'creation_time',      valueType: 'date'},
 +            {label: _('Created By'),                                                        field: 'created_by',         valueType: 'user'},
              {filtertype: 'crm.contact'},
-             {filtertype: 'foreignrecord', app: app, foreignRecordClass: Tine.Tasks.Task, ownField: 'task'}
+             {filtertype: 'foreignrecord', app: app, foreignRecordClass: Tine.Tasks.Model.Task, ownField: 'task'}
          ];
          
      if (Tine.Sales && Tine.Tinebase.common.hasRight('run', 'Sales')) {
Simple merge
Simple merge
@@@ -44,171 -46,11 +46,10 @@@ Ext.extend(Tine.Tasks.TaskTreePanel, Ti
      }
  });
  
- Tine.Tasks.FilterPanel = function(config) {
+ Tine.Tasks.TaskFilterPanel = function(config) {
      Ext.apply(this, config);
-     Tine.Tasks.FilterPanel.superclass.constructor.call(this);
+     Tine.Tasks.TaskFilterPanel.superclass.constructor.call(this);
  };
- Ext.extend(Tine.Tasks.FilterPanel, Tine.widgets.persistentfilter.PickerPanel, {
+ Ext.extend(Tine.Tasks.TaskFilterPanel, Tine.widgets.persistentfilter.PickerPanel, {
      filter: [{field: 'model', operator: 'equals', value: 'Tasks_Model_TaskFilter'}]
  });
- // Task model
- Tine.Tasks.TaskArray = Tine.Tinebase.Model.genericFields.concat([
-     { name: 'id' },
-     { name: 'percent', header: 'Percent' },
-     { name: 'completed', type: 'date', dateFormat: Date.patterns.ISO8601Long },
-     { name: 'due', type: 'date', dateFormat: Date.patterns.ISO8601Long },
-     // ical common fields
-     { name: 'class' },
-     { name: 'description' },
-     { name: 'geo' },
-     { name: 'location' },
-     { name: 'organizer' },
-     { name: 'originator_tz' },
-     { name: 'priority' },
-     { name: 'status' },
-     { name: 'summary' },
-     { name: 'url' },
-     // ical common fields with multiple appearance
-     { name: 'attach' },
-     { name: 'attendee' },
-     { name: 'tags' },
-     { name: 'comment' },
-     { name: 'contact' },
-     { name: 'related' },
-     { name: 'resources' },
-     { name: 'rstatus' },
-     // scheduleable interface fields
-     { name: 'dtstart', type: 'date', dateFormat: Date.patterns.ISO8601Long },
-     { name: 'duration', type: 'date', dateFormat: Date.patterns.ISO8601Long },
-     { name: 'recurid' },
-     // scheduleable interface fields with multiple appearance
-     { name: 'exdate' },
-     { name: 'exrule' },
-     { name: 'rdate' },
-     { name: 'rrule' },
-     // tine 2.0 notes field
-     { name: 'notes'},
-     // tine 2.0 alarms field
-     { name: 'alarms'},
-     // relations with other objects
-     { name: 'relations'}
- ]);
- /**
-  * Task record definition
-  */
- Tine.Tasks.Task = Tine.Tinebase.data.Record.create(Tine.Tasks.TaskArray, {
-     appName: 'Tasks',
-     modelName: 'Task',
-     idProperty: 'id',
-     titleProperty: 'summary',
-     // ngettext('Task', 'Tasks', n); gettext('Tasks');
-     recordName: 'Task',
-     recordsName: 'Tasks',
-     containerProperty: 'container_id',
-     // ngettext('to do list', 'to do lists', n); gettext('to do lists');
-     containerName: 'to do list',
-     containersName: 'to do lists'
- });
- /**
-  * returns default account data
-  * 
-  * @namespace Tine.Tasks.Task
-  * @static
-  * @return {Object} default data
-  */
- Tine.Tasks.Task.getDefaultData = function() {
-     var app = Tine.Tinebase.appMgr.get('Tasks');
-     
-     return {
-         'class': 'PUBLIC',
-         percent: 0,
-         organizer: Tine.Tinebase.registry.get('currentAccount'),
-         container_id: app.getMainScreen().getWestPanel().getContainerTreePanel().getDefaultContainer()
-     };
- };
- /**
-  * @namespace Tine.Tasks.Task
-  * 
-  * get task filter
-  *  
-  * @return {Array} filter objects
-  * @static
-  */ 
- Tine.Tasks.Task.getFilterModel = function() {
-     var app = Tine.Tinebase.appMgr.get('Tasks');
-     
-     return [
-         {label: _('Quick search'),                  field: 'query',    operators: ['contains']},
-         {filtertype: 'tine.widget.container.filtermodel', app: app, recordClass: Tine.Tasks.Task},
-         {label: app.i18n._('Summary'),         field: 'summary' },
-         {label: app.i18n._('Due Date'),        field: 'due', valueType: 'date', operators: ['within', 'before', 'after']},
-         {
-             label: app.i18n._('Status'),
-             field: 'status',
-             filtertype: 'tine.widget.keyfield.filter', 
-             app: app, 
-             defaultValue: Tine.Tasks.Task.getClosedStatus(), 
-             keyfieldName: 'taskStatus', 
-             defaultOperator: 'notin'
-         },
-         {label: app.i18n._('Responsible'),     field: 'organizer', valueType: 'user'},
-         {filtertype: 'tinebase.tag', app: app},
-         {label: _('Last Modified Time'),                                                field: 'last_modified_time', valueType: 'date'},
-         {label: _('Last Modified By'),                                                  field: 'last_modified_by',   valueType: 'user'},
-         {label: _('Creation Time'),                                                     field: 'creation_time',      valueType: 'date'},
-         {label: _('Created By'),                                                        field: 'created_by',         valueType: 'user'}
-     ];
- };
- /**
-  * @namespace Tine.Tasks.Task
-  * 
-  * get closed status ids
-  *  
-  * @return {Array} status ids objects
-  * @static
-  */ 
- Tine.Tasks.Task.getClosedStatus = function() {
-     var reqStatus = [];
-         
-     Tine.Tinebase.widgets.keyfield.StoreMgr.get('Tasks', 'taskStatus').each(function(status) {
-         if (! status.get('is_open')) {
-             reqStatus.push(status.get('id'));
-         }
-     }, this);
-     
-     return reqStatus;
- };
- /**
-  * default tasks backend
-  */
- Tine.Tasks.JsonBackend = new Tine.Tinebase.data.RecordProxy({
-     appName: 'Tasks',
-     modelName: 'Task',
-     recordClass: Tine.Tasks.Task
- });
- Ext.ns('Tine.Tasks.Model');
--
- Tine.Tasks.Model.Status = Tine.Tinebase.data.Record.create([
-     { name: 'id' },
-     { name: 'value' },
-     { name: 'icon' },
-     { name: 'system' },
-     { name: 'is_open' },
-     { name: 'i18nValue' }
- ], {
-     appName: 'Tasks',
-     modelName: 'Status',
-     idProperty: 'id',
-     titleProperty: 'i18nValue',
-     // ngettext('Status', 'Status', n); gettext('Status');
-     recordName: 'Status',
-     recordsName: 'Status'
- });
Simple merge
Simple merge
@@@ -245,9 -237,9 +245,9 @@@ Ext.ux.grid.QuickaddGridPanel = Ext.ext
          var newRowEl = Ext.get(Ext.DomQuery.selectNode('tr[class=new-row]', this.getView().mainHd.dom));
          
          var columns = this.getCols();
-         for (var column, td, i=columns.length -1; i>=0; i--) {
+         for (var column, tdEl, i=columns.length -1; i>=0; i--) {
              column = columns[i];
 -            tdEl = this.getQuickAddWrap(column).parent();
 +            var tdEl = this.getQuickAddWrap(column).parent();
              
              // resort columns
              newRowEl.insertFirst(tdEl);