big update to tickets
authorAlan Knowles <alan@roojs.com>
Mon, 8 Mar 2021 02:29:09 +0000 (10:29 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 8 Mar 2021 02:29:09 +0000 (10:29 +0800)
22 files changed:
DataObjects/Mtrack_change.php
DataObjects/Mtrack_change_audit.php
DataObjects/Mtrack_milestone.php
DataObjects/Mtrack_repos.php
DataObjects/Mtrack_ticket.php
Pman.Dialog.MTrackBulkChange.js
Pman.Dialog.MTrackMilestone.js
Pman.Dialog.MTrackRepos.js
Pman.Dialog.MTrackTicket.bjs
Pman.Dialog.MTrackTicket.js
Pman.Dialog.MTrackTime.bjs
Pman.Dialog.MTrackTime.js
Pman.MTrack.js
Pman.Tab.MTrackMerger.bjs
Pman.Tab.MTrackMerger.js
Pman.Tab.MTrackMilestone.bjs
Pman.Tab.MTrackMilestone.js
Pman.Tab.MTrackRepos.bjs
Pman.Tab.MTrackRepos.js
Pman.Tab.MTrackTicket.bjs
Pman.Tab.MTrackTicket.js
sql/mtrack_change.sql

index 6fb8ac1..24a27c6 100644 (file)
@@ -79,12 +79,21 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
     function applyFilters($q, $au, $roo)
     {
         
+        
         if (!empty($q['timeline'])) {
             return $this->applyFilterTimeline($q,$au, $roo);
         }
+        
+        if (!empty($q['_is_update_request'])) {
+            return;
+        }
+        
         $this->setFrom($q);
+        
+        
         $obj = $this->objectCached();
         
+        
         // global searching on non-object...
         // needed for timelime, but not ready yet...
         
@@ -98,7 +107,7 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
             return;
         }
         
-        if (!$au && !$obj->checkPerm('S', $au)) {
+        if (!$au || (!$obj->checkPerm('S', $au) || !$obj->checkPerm('E', $au)) ) {
             $this->whereAdd('1=0');
             return;
         }    
@@ -276,6 +285,7 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
         $tc->ontable = 'mtrack_repos';
         $tc->onid = $checker->repo->id;
         $tc->rev= $rev;
+        $tc->cgtype = 'COMMIT';
         $tc->branch = $ce->branch;
         if ($tc->count()) { // if we have already tracked this..
             return false;
@@ -416,8 +426,8 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
     {
          // $db->beginTransaction();
          //$this->query('BEGIN');
-         $pg = HTML_FlexyFramework::get()->page;
-         $au  = $pg->authUser;
+        $pg = HTML_FlexyFramework::get()->page;
+        $au  = $pg->authUser;
 
         $this->person_id = $au->id;
         $this->ontable      = $object->tableName();                         // string(128)  
@@ -426,6 +436,7 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
         //$d = date_create("@" . (empty($when)  ? time() : $when), new DateTimeZone('UTC'));
         $this->changedate =  date('Y-m-d H:i:s'); // everythign at server time..
                                   //$d->format('Y-m-d\TH:i:s.u\Z');
+        $this->cgtype = $reason == 'Changed' ? 'CHANGE' : 'COMMENT';
         $this->insert();
         $this->onInsert(array(), $pg);
          
@@ -517,7 +528,7 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
         if ($old == $new) {
             return $ret;
         }
-        if (!$old === false) {
+        if ($old !== false) {
             return  $this->addentry($fieldname, 'set', $old, $new);
              
         }
@@ -647,22 +658,21 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
     
     function beforeInsert($req, $roo)
     {
-        
-        $roo->jerr("no direct access");
-        /*
+        // originally this was blocked - we are going to try and use it now???
         if (empty($roo->authUser)) {
             $roo->jerr("Invalid user inserting");
         }
         $this->person_id = $roo->authUser->id;
         
+        
         $obj = $this->objectCached();
+         
         if (!$obj || !$obj->checkPerm('E', $roo->authUser)) {
-            $this->jerr("Invalid object / permission denied");
+            $roo->jerr("Invalid object / permission denied");
         }
         
         $this->changedate = $this->sqlValue('NOW()');
         
-        */
     }
     function beforeUpdate($old,$req,$roo)
     {
@@ -692,6 +702,7 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
             staff_id as person_id,
             join_staff_id_id.name as person_id_name,
             entered_dt as changedate,
+            'TIMESHEET' as cgtype ,
             CONCAT(qtyvalue , ' Hours worked: ', cash_invoice_entry.description) as reason,
             '' as rev,
             '' as audit
@@ -700,13 +711,17 @@ class Pman_MTrack_DataObjects_Mtrack_change extends DB_DataObject
         
         $ret =  array_merge($data , $hours);
         
-        usort($ret, function($a,$b) {
+        usort($ret, function ($a,$b) use($q)  {
             $aa = $a['changedate'];
             $bb =  $b['changedate'];
             if ($aa == $bb) {
                 return 0;
             }
-            return strtotime($aa) < strtotime($bb) ? -1 : 1;
+            if ($q['dir'] == 'ASC') {
+                return strtotime($aa) < strtotime($bb) ? -1 : 1;
+            } else {
+                return strtotime($aa) > strtotime($bb) ? -1 : 1;
+            }
         });
         
         return $ret;
index f432813..9741dcd 100644 (file)
@@ -24,7 +24,8 @@ class Pman_MTrack_DataObjects_Mtrack_change_audit extends DB_DataObject
     ###END_AUTOCODE
     function field()
     {
-        return array_pop(explode(':', $this->fieldname));
+        $ar = explode(':', $this->fieldname);
+        return array_pop($ar);
         
     }
     function value($cg)
index 54e0bdb..c9302a4 100644 (file)
@@ -27,7 +27,7 @@ class Pman_MTrack_DataObjects_Mtrack_milestone extends DB_DataObject
     
     function project()
     {
-        $p = DB_DataObject::factory('Projects');
+        $p = DB_DataObject::factory('core_project');
         if (!$this->project_id) {
             return $p;
         }
index ea6b86b..cde5c42 100644 (file)
@@ -205,7 +205,12 @@ class Pman_MTrack_DataObjects_Mtrack_repos extends DB_DataObject
     }
     
     
-    function save($DO_CHANGES) {
+    function save($do=false)
+    {
+        throw new Exception("Error invalid call");
+    }
+    
+    function save_changes($DO_CHANGES) {
         if (!$this->impl()) {
           throw new Exception("unsupported repo type " . $this->scmtype);
         }
index a1a46c0..34f84bf 100644 (file)
@@ -219,12 +219,12 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
             switch ($q['query']['viewtype']) {
                 case 'active':
                     // hide "on hold" and closed..
-                    $this->whereAdd("join_status_id.name NOT IN('closed', 'on hold') OR  {$tn}.status  = 0");
+                    $this->whereAdd("join_status_id.name NOT IN(  'CLOSED') OR  {$tn}.status  = 0");
                     $this->whereAdd("{$tn}.milestone_id = 0 OR join_milestone_id_id.on_hold = 0");
                     break;
                 
                 case 'on-hold':
-                    $this->whereAdd("join_status_id.name = 'on hold' ");
+                    $this->whereAdd("join_status_id.name = 'ON_HOLD' ");
                     $this->whereAdd("{$tn}.milestone_id = 0 OR join_milestone_id_id.on_hold = 0");
                     break;
                 
@@ -234,7 +234,7 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
                     
                 case 'me':
                 case 'me-all':
-                    $this->whereAdd("join_status_id.name != 'closed' OR  {$tn}.status  = 0 ");
+                    $this->whereAdd("join_status_id.name NOT IN('closed', 'CLOSED') OR  {$tn}.status  = 0 ");
                     $this->whereAdd("mtrack_ticket.developer_id = {$au->id} ");
                     
                     break;
@@ -247,19 +247,19 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
                  
                 case 'active-or-recent':
                     $this->whereAdd("
-                            (join_status_id.name != 'closed' OR  {$tn}.status  = 0)
+                            (join_status_id.name  NOT IN('closed', 'CLOSED')  OR  {$tn}.status  = 0)
                             OR
-                            (join_status_id.name = 'closed' AND join_updated.changedate > NOW() - 1 MONTH  )
+                            (join_status_id.name    IN('closed', 'CLOSED')  AND join_updated.changedate > NOW() - 1 MONTH  )
                             ");
                     $this->whereAdd("{$tn}.milestone_id = 0 OR join_milestone_id_id.on_hold = 0");
                     break;
                 
                 case 'pending':
-                    $this->whereAdd("join_status_id.name IN ('resolved', 'needs review' )");
+                    $this->whereAdd("join_status_id.name IN ('REVIEW_BY_ADMIN', 'REVIEW_BY_CLIENT )");
                     break;
                 
                 case 'in-progress':
-                    $this->whereAdd("join_status_id.name IN ('in progress' )");
+                    $this->whereAdd("join_status_id.name IN ('IN_PROGRESS' )");
                     break;
                     
                 case 'all': 
@@ -357,7 +357,9 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
                 IF( etype='ticketstate'
                     AND name='assigned' , 10, 0) +
                 IF( etype='ticketstate' AND
-                        name !='closed'  AND  name != 'new' , 100, 0) +
+                        name !='closed'  AND  name != 'new'
+                        AND
+                        name !='CLOSED'  AND  name != 'NEW', 100, 0) +
                 IF( etype='ticketstate' , 0 , 1000) +
 
                 seqid
@@ -370,16 +372,19 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
             switch($t->status_name) {
                 
                 case 'new':
+                case 'NEW':
                     // do not show closed..
                     $et->whereAdd("
                         ( CONCAT(etype , '.', name) != 'ticketstate.closed')
                         AND
                          ( CONCAT(etype , '.', name) != 'ticketstate.reopened')
+                         AND 
+                         ( CONCAT(etype , '.', name) != 'ticketstate.CLOSED') 
                     ");
                     break;
                   
                 case 'closed':
-                    // 
+                case 'CANCELLED':
                     $et->whereAdd("
                                     ( CONCAT(etype , '.', name) = 'ticketstate.reopened')
                                     OR
@@ -388,16 +393,21 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
                     break;
                 
                 case 'reopened':
+                
                     $et->whereAdd("
                              ( CONCAT(etype , '.', name) != 'ticketstate.closed')
                              AND
                             ( CONCAT(etype , '.', name) != 'ticketstate.new')
+                            AND
+                             ( CONCAT(etype , '.', name) != 'ticketstate.NEW')
                              AND
                            ( CONCAT(etype , '.', name) != 'ticketstate.open')
                             ");
                     break;
 
                 case 'open':
+                case 'OPEN':
+                    
                 default:
                     $et->whereAdd("
                            ( CONCAT(etype , '.', name) != 'ticketstate.closed')
@@ -407,11 +417,23 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
                            ( CONCAT(etype , '.', name) != 'ticketstate.reopened')
                             ");
                     break;
-                
-                
-                   
+                 
             }
             
+            $et->selectAdd("
+                CASE WHEN etype= 'ticketstate' THEN
+                    LOWER(REPLACE(name, '_', ' '))
+                ELSE
+                    CONCAT('closed - ', LOWER(REPLACE(name, '_', ' ')))
+                END AS name_mixed,
+                CASE WHEN etype= 'ticketstate' THEN
+                    display_name
+                ELSE
+                    CONCAT('Closed - ', display_name)
+                END AS display_name_mixed
+                
+            ");
+            
             
             $et->orderBy("ts_order ASC");
             
@@ -441,8 +463,8 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
             case 'milestone_id':
                    $this->orderBy("
                         case
-                            when join_status_id.display_name = 'in progress' then 1
-                            when join_status_id.display_name = 'resolved' then -1
+                            when join_status_id.display_name = 'IN_PROGRESS' then 1
+                            when join_status_id.display_name = 'REVIEW_BY_ADMIN' then -1
                             else 0
                         end DESC,
                        (case when join_milestone_id_id.duedate is null then 1 else 0 end) ASC,
@@ -466,8 +488,8 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
             case 'priority_id':
                 $this->orderBy("
                         case
-                            when join_status_id.display_name = 'in progress' then 1
-                            when join_status_id.display_name = 'resolved' then -1
+                            when join_status_id.display_name = 'IN_PROGRESS' then 1
+                            when join_status_id.display_name = 'REVIEW_BY_ADMIN' then -1
                             else 0
                         end DESC,
                         join_priority_id_id.seqid $direction, {$tn}.seqid ASC
@@ -478,8 +500,8 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
                 
                 $this->orderBy("
                         case
-                            when join_status_id.display_name = 'in progress' then 1
-                            when join_status_id.display_name = 'resolved' then -1
+                            when join_status_id.display_name = 'IN_PROGRESS' then 1
+                            when join_status_id.display_name = 'REVIEW_BY_ADMIN' then -1
                             else 0
                         end DESC,
                         join_priority_id_id.seqid ASC,
@@ -515,10 +537,12 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
     function isOpen()
     {
         switch ($this->status) {
-          case 'closed':
-            return false;
+            case 'closed':
+            case 'CLOSED':
+                return false;
+            
           default:
-            return true;
+                return true;
         }
     }
     function descriptionToHtml() /* depreciated */
@@ -665,8 +689,7 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
             'headers' => $headers
         );
          
-        
-        
+         
     }
     
     function toEventString()
@@ -687,8 +710,12 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
         }
         // used by gitlive close ticket...
         if (!empty($req['status_name']) && empty($req['status'])) {
+            if ($req['status_name'] == 'resolved') {
+                $req['status_name']  = 'REVIEW_BY_ADMIN';
+                // if it's an admin doing it.. then set it to fixed?
+            }
             $n = DB_DataObject::Factory('core_enum');
-            $n->name = $req['status_name'];
+            $n->whereAddIn('name', array( $req['status_name'], strtoupper($req['status_name'])), 'string');
             $n->whereAddIn('etype', array('ticketstate','resolution'),'string');
             if (!$n->find(true)) {
                 $roo->jerr("invalid status name");
@@ -828,8 +855,64 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
         }
         // trigger emails..
         
+        if (isset($req['uploads'])) {
+            $this->updateUploads(json_decode($req['uploads']),$roo);
+        }
+        
+        
+    }
+    function onInsert($req,$roo, $even)
+    {
+        
+       
+        if (!$ch) {
+            $ch = DB_DataObject::factory('mtrack_change');
+            $ch->beginChange($this, "Changed");
+            $this->_mtrack_change = $ch;
+        }
+        $ch->add($this, false);
+        if (isset($req['uploads'])) {
+            $this->updateUploads(json_decode($req['uploads']). $roo);
+        }
     }
     
+    function updateUploads($uploads, $roo)
+    {
+        foreach($uploads as $up) {
+            
+            if (empty($up->id) || $up->id < 0) {
+                if ($up->is_deleted) {
+                    continue;
+                }
+                
+                
+                $i = DB_DAtaObject::factory('Images');
+                $i->object($this);
+                $i->setFrom(array(
+                    'mimetype' => $up->mimetype,
+                    'title' => $up->title,
+                    'filename' => $up->title,
+                    'created' => date('Y-m-d H:i:s')
+                ));
+                $i->createFromData($up->srcdata);
+                continue;
+            }
+            // edit..
+            $i = DB_DAtaObject::factory('Images');
+            $i->object($this);
+            if (!$i->get($up->id)) {
+                $roo->jerr("invalid update id for image {$up->id}");
+            }
+            if ($up->is_deleted) {
+            
+                $i->beforeDelete(array(), $roo);
+                $i->delete();
+            }
+               
+            // update???
+            
+        }
+    }
     
     
     function updated()
@@ -844,7 +927,13 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
     function toRooSingleArray($au, $req)
     {
         if ($this->id) {
-            return $this->toArray();
+            $ret = $this->toArray();;
+            $ret['images'] = array();
+            foreach($this->images() as $i) {
+                $ret['images'][] = $i->toRooArray(array());
+            }
+            
+            return $ret;
         }
         // empty!
         $p = $this->factory('core_enum');
@@ -867,7 +956,8 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
         $ret = array_merge($ret, $c->toArray('classification_id_%s'));
         $ret = array_merge($ret, $s->toArray('severity_id_%s'));
         
-         return $ret;
+       
+        return $ret;
         
     }
     
@@ -884,7 +974,7 @@ class Pman_MTrack_DataObjects_Mtrack_ticket extends DB_DataObject
         $t->autoJoin();
         $t->selectAdd();
         // we still apply to closed tickets????
-         $t->whereAdd("join_status_id.name != 'closed'");
+         $t->whereAddIn('join_status_id.name', array(  'CLOSED'), 'string');
         $t->applySort(false,  'old_style', false);
         
         $old_seqid = $this->seqid;
index 033e1e6..58ae870 100644 (file)
@@ -209,7 +209,7 @@ Pman.Dialog.MTrackBulkChange = {
            proxy : {
             xtype : 'HttpProxy',
             method : 'GET',
-            url : baseURL + '/Roo/Projects.php',
+            url : baseURL + '/Roo/core_project',
             xns : Roo.data,
             '|xns' : 'Roo.data'
            },
index 562ada4..b4cf973 100644 (file)
@@ -125,7 +125,7 @@ Pman.Dialog.MTrackMilestone = {
                                             xtype: 'HttpProxy',
                                             xns: Roo.data,
                                             method : 'GET',
-                                            url : baseURL + '/Roo/Projects.php'
+                                            url : baseURL + '/Roo/core_project'
                                         },
                                         reader : {
                                             xtype: 'JsonReader',
index 1e7c360..5b7ff04 100644 (file)
@@ -119,7 +119,7 @@ Pman.Dialog.MTrackRepos = {
                                             xtype: 'HttpProxy',
                                             xns: Roo.data,
                                             method : 'GET',
-                                            url : baseURL + '/Roo/Projects.php'
+                                            url : baseURL + '/Roo/core_project'
                                         },
                                         reader : {
                                             xtype: 'JsonReader',
index 9104539..3480e64 100644 (file)
         "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
        },
        "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
-       "xtype" : "Form",
        "method" : "POST",
+       "xtype" : "Form",
        "style" : "margin:10px;width:1000px;margin-top:0px;",
        "$ xns" : "Roo.form",
        "items" : [
         {
          "xtype" : "Column",
-         "$ xns" : "Roo.form",
          "width" : 210,
+         "$ xns" : "Roo.form",
          "items" : [
           {
            "labelAlign" : "top",
-           "style" : "width:190px;",
            "legend" : "Properties",
+           "style" : "width:190px;",
            "xtype" : "FieldSet",
            "$ xns" : "Roo.form",
            "items" : [
                "* prop" : "store",
                "items" : [
                 {
-                 "$ url" : "baseURL + '/Roo/Projects.php'",
-                 "method" : "GET",
+                 "$ url" : "baseURL + '/Roo/core_project'",
                  "xtype" : "HttpProxy",
+                 "method" : "GET",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/mtrack_milestone.php'",
-                 "method" : "GET",
                  "xtype" : "HttpProxy",
+                 "method" : "GET",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/core_enum.php'",
-                 "method" : "GET",
                  "xtype" : "HttpProxy",
+                 "method" : "GET",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/core_enum.php'",
-                 "method" : "GET",
                  "xtype" : "HttpProxy",
+                 "method" : "GET",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/core_enum.php'",
-                 "method" : "GET",
                  "xtype" : "HttpProxy",
+                 "method" : "GET",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
            ]
           },
           {
+           "style" : "width: 190px",
            "xtype" : "FieldSet",
            "legend" : "Resources",
-           "style" : "width: 190px",
            "$ xns" : "Roo.form",
            "items" : [
             {
                  "* prop" : "store",
                  "items" : [
                   {
-                   "$ url" : "baseURL + '/Roo/Person.php'",
-                   "method" : "GET",
+                   "$ url" : "baseURL + '/Roo/core_person'",
                    "xtype" : "HttpProxy",
+                   "method" : "GET",
                    "$ xns" : "Roo.data",
                    "* prop" : "proxy"
                   },
                  "* prop" : "store",
                  "items" : [
                   {
-                   "$ url" : "baseURL + '/Roo/Person.php'",
-                   "method" : "GET",
+                   "$ url" : "baseURL + '/Roo/core_person'",
                    "xtype" : "HttpProxy",
+                   "method" : "GET",
                    "$ xns" : "Roo.data",
                    "* prop" : "proxy"
                   },
              "items" : [
               {
                "fieldLabel" : "Estimated",
-               "style" : "align:right;",
                "xtype" : "NumberField",
+               "style" : "align:right;",
                "width" : 75,
                "$ xns" : "Roo.form",
                "name" : "estimated"
             "show" : "function (_self)\n{\n\n}",
             "render" : "function (_self)\n{\n  _this.summaryBox = _self;\n}"
            },
+           "style" : "width:410px",
            "xtype" : "FieldSet",
            "legend" : "Summary / Details",
-           "style" : "width:410px",
            "$ xns" : "Roo.form",
            "items" : [
             {
                 "check" : "function (_self, checked)\n{\n\n    if (!_this.form) {\n        return;\n    }\n    if (checked) {\n    \n         _this.form.findField('view_as').setValue('text');\n     }\n         \n    \n    \n     if (this.radio) {\n        return;\n    }\n     var md = _this.form.findField('view_as_markdown');\n\n    md.radio = true;\n    md.setValue(checked ? 0 : 1);\n    \n    md.radio = false;\n}"
                },
                "fieldLabel" : "View as",
-               "value" : 1,
                "xtype" : "Checkbox",
+               "value" : 1,
                "boxLabel" : "text",
                "width" : 100,
                "$ xns" : "Roo.form",
               },
               {
                "hideLabels" : true,
-               "style" : "float: left",
                "xtype" : "Row",
+               "style" : "float: left",
                "width" : 100,
                "$ xns" : "Roo.form",
                "items" : [
index 5402460..1ef88b3 100644 (file)
@@ -287,7 +287,7 @@ Pman.Dialog.MTrackTicket = {
                proxy : {
                 xtype : 'HttpProxy',
                 method : 'GET',
-                url : baseURL + '/Roo/Projects.php',
+                url : baseURL + '/Roo/core_project',
                 xns : Roo.data,
                 '|xns' : 'Roo.data'
                },
@@ -593,7 +593,7 @@ Pman.Dialog.MTrackTicket = {
                  proxy : {
                   xtype : 'HttpProxy',
                   method : 'GET',
-                  url : baseURL + '/Roo/Person.php',
+                  url : baseURL + '/Roo/core_person',
                   xns : Roo.data,
                   '|xns' : 'Roo.data'
                  },
@@ -653,7 +653,7 @@ Pman.Dialog.MTrackTicket = {
                  proxy : {
                   xtype : 'HttpProxy',
                   method : 'GET',
-                  url : baseURL + '/Roo/Person.php',
+                  url : baseURL + '/Roo/core_person',
                   xns : Roo.data,
                   '|xns' : 'Roo.data'
                  },
index 336445e..b5e9757 100644 (file)
   "b2439dea1dd89e6f694df484214e57cf" : "Working on this",
   "f49f927095bb01b44c96d29c8c09f3a3" : "Assigned to  / Prioritized (all projects)"
  },
+ "named_strings" : {
+  "description_fieldLabel" : "b5a7adde1af5c87d7fd797b6245c2a39",
+  "project_id_name_emptyText" : "6a58f977f2b623b695a340766f2a6843",
+  "project_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
+  "project_id_name_qtip" : "24f27bda5dd2c488aa9bc7700ba98c34",
+  "project_id_name_fieldLabel" : "9e727fdd3aec8274f46685441900280d"
+ },
  "items" : [
   {
    "title" : "Time Manager",
    "items" : [
     {
      "xtype" : "LayoutRegion",
-     "tabPosition" : "top",
      "$ xns" : "Roo",
+     "tabPosition" : "top",
      "* prop" : "center"
     },
     {
      "region" : "center",
-     "xtype" : "NestedLayoutPanel",
      "title" : "Log Time",
+     "xtype" : "NestedLayoutPanel",
      "$ xns" : "Roo",
      "items" : [
       {
@@ -59,8 +66,8 @@
        "items" : [
         {
          "xtype" : "LayoutRegion",
-         "width" : 600,
          "$ xns" : "Roo",
+         "width" : 600,
          "split" : true,
          "* prop" : "west"
         },
@@ -85,9 +92,9 @@
          "listeners" : {
           "|activate" : "function() {\n    _this.timepanel = this;\n    if (_this.timegrid) {\n       // _this.grid.footer.onClick('first');\n    }\n}"
          },
+         "region" : "west",
          "fitToframe" : true,
          "background" : true,
-         "region" : "west",
          "title" : "cash_invoice_entry",
          "xtype" : "GridPanel",
          "fitContainer" : true,
          "items" : [
           {
            "listeners" : {
-            "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
+            "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) { return; }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
             "|render" : "function() \n{\n    _this.timegrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.timepanel.active) {\n      // this.footer.onClick('first');\n    }\n}"
            },
            "autoExpandColumn" : "activity_ref",
                  "items" : [
                   {
                    "$ url" : "baseURL + '/Roo/Person.php'",
-                   "method" : "GET",
                    "xtype" : "HttpProxy",
+                   "method" : "GET",
                    "$ xns" : "Roo.data",
                    "* prop" : "proxy"
                   },
                 "beforeload" : "function (This, params)\n{\n   if (_this.personSelect.getValue()) {\n        params.person_id = _this.personSelect.getValue();\n    } else {\n        params.person_id = Pman.Login.authUser.id;\n    }\n    \n    \n}"
                },
                "$ url" : "baseURL + '/Roo/cash_invoice_entry.php'",
-               "xtype" : "HttpProxy",
                "method" : "GET",
+               "xtype" : "HttpProxy",
                "$ xns" : "Roo.data",
                "* prop" : "proxy"
               },
             },
             {
              "xtype" : "ColumnModel",
-             "header" : "Time",
              "width" : 100,
+             "header" : "Time",
              "$ renderer" : "function(v,x,r) { \n    var s = r.data.qtyvalue;\n    var end = v.add(Date.HOUR, s);\n    return String.format('{0} {1}-{2}',\n         v.format('D'), v.format('H:i'), end.format('H:i') );\n}",
              "$ xns" : "Roo.grid",
              "* prop" : "colModel[]",
             },
             {
              "xtype" : "ColumnModel",
-             "header" : "Ticket",
              "width" : 200,
+             "header" : "Ticket",
              "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
              "$ xns" : "Roo.grid",
              "* prop" : "colModel[]",
             },
             {
              "xtype" : "ColumnModel",
-             "header" : "Notes",
              "width" : 300,
+             "header" : "Notes",
              "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
              "$ xns" : "Roo.grid",
              "* prop" : "colModel[]",
              "listeners" : {
               "|activate" : "function() {\n    _this.queuepanel = this;\n    if (_this.queuegrid) {\n        //_this.queuegrid.footer.onClick('first');\n    }\n}"
              },
+             "region" : "center",
              "fitToframe" : true,
              "background" : true,
-             "region" : "center",
              "title" : "mtrack_ticket",
              "xtype" : "GridPanel",
              "fitContainer" : true,
              "items" : [
               {
                "listeners" : {
-                "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
+                "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) { return; }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
                 "|render" : "function() \n{\n    _this.queuegrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.queuepanel.active) {\n       //this.footer.onClick('first');\n    }\n}"
                },
                "autoExpandColumn" : "summary",
                      "items" : [
                       {
                        "$ url" : "baseURL + '/Roo/Projects.php'",
-                       "method" : "GET",
                        "xtype" : "HttpProxy",
+                       "method" : "GET",
                        "$ xns" : "Roo.data",
                        "* prop" : "proxy"
                       },
                  "items" : [
                   {
                    "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
-                   "method" : "GET",
                    "xtype" : "HttpProxy",
+                   "method" : "GET",
                    "$ xns" : "Roo.data",
                    "* prop" : "proxy"
                   },
                 },
                 {
                  "xtype" : "ColumnModel",
-                 "width" : 200,
                  "header" : "Summary",
+                 "width" : 200,
                  "$ renderer" : "function(v) { return String.format('{0}', v); }",
                  "$ xns" : "Roo.grid",
                  "* prop" : "colModel[]",
                    "items" : [
                     {
                      "$ url" : "baseURL + '/Roo/Projects.php'",
-                     "method" : "GET",
                      "xtype" : "HttpProxy",
+                     "method" : "GET",
                      "$ xns" : "Roo.data",
                      "* prop" : "proxy"
                     },
     },
     {
      "region" : "center",
-     "xtype" : "NestedLayoutPanel",
      "title" : "Plan Time",
+     "xtype" : "NestedLayoutPanel",
      "$ xns" : "Roo",
      "items" : [
       {
          "listeners" : {
           "|activate" : "function() {\n    _this.openpanel = this;\n    if (_this.opengrid) {\n   //    _this.opengrid.footer.onClick('first');\n    }\n}"
          },
+         "region" : "west",
          "fitToframe" : true,
          "background" : false,
-         "region" : "west",
          "title" : "mtrack_ticket",
          "xtype" : "GridPanel",
          "fitContainer" : true,
          "items" : [
           {
            "listeners" : {
-            "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
+            "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) { return; }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
             "|render" : "function() \n{\n    _this.opengrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.openpanel.active) {\n       //this.footer.onClick('first');\n    }\n}"
            },
            "autoExpandColumn" : "summary",
                  "items" : [
                   {
                    "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
-                   "method" : "GET",
                    "xtype" : "HttpProxy",
+                   "method" : "GET",
                    "$ xns" : "Roo.data",
                    "* prop" : "proxy"
                   },
              "items" : [
               {
                "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
-               "method" : "GET",
                "xtype" : "HttpProxy",
+               "method" : "GET",
                "$ xns" : "Roo.data",
                "* prop" : "proxy"
               },
             },
             {
              "xtype" : "ColumnModel",
-             "width" : 200,
              "header" : "Summary",
+             "width" : 200,
              "$ renderer" : "function(v) { return String.format('{0}', v); }",
              "$ xns" : "Roo.grid",
              "* prop" : "colModel[]",
          "listeners" : {
           "|activate" : "function() {\n    _this.openpanel = this;\n    if (_this.opengrid) {\n   //    _this.opengrid.footer.onClick('first');\n    }\n}"
          },
+         "region" : "center",
          "fitToframe" : true,
          "background" : false,
-         "region" : "center",
          "title" : "mtrack_ticket",
          "xtype" : "GridPanel",
          "fitContainer" : true,
          "items" : [
           {
            "listeners" : {
-            "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
+            "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) { return; }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
             "|render" : "function() \n{\n    _this.opengrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.openpanel.active) {\n       //this.footer.onClick('first');\n    }\n}"
            },
            "autoExpandColumn" : "summary",
                  "items" : [
                   {
                    "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
-                   "method" : "GET",
                    "xtype" : "HttpProxy",
+                   "method" : "GET",
                    "$ xns" : "Roo.data",
                    "* prop" : "proxy"
                   },
              "items" : [
               {
                "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
-               "method" : "GET",
                "xtype" : "HttpProxy",
+               "method" : "GET",
                "$ xns" : "Roo.data",
                "* prop" : "proxy"
               },
             },
             {
              "xtype" : "ColumnModel",
-             "width" : 200,
              "header" : "Summary",
+             "width" : 200,
              "$ renderer" : "function(v) { return String.format('{0}', v); }",
              "$ xns" : "Roo.grid",
              "* prop" : "colModel[]",
index af0efb2..230ea68 100644 (file)
@@ -33,6 +33,13 @@ Pman.Dialog.MTrackTime = {
   'b2439dea1dd89e6f694df484214e57cf' :"Working on this",
   'f49f927095bb01b44c96d29c8c09f3a3' :"Assigned to  / Prioritized (all projects)"
  },
+ _named_strings : {
+  'description_fieldLabel' : 'b5a7adde1af5c87d7fd797b6245c2a39' /* Description */ ,
+  'project_id_name_emptyText' : '6a58f977f2b623b695a340766f2a6843' /* Select Project */ ,
+  'project_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
+  'project_id_name_qtip' : '24f27bda5dd2c488aa9bc7700ba98c34' /* Select Projects */ ,
+  'project_id_name_fieldLabel' : '9e727fdd3aec8274f46685441900280d' /* Project */ 
+ },
 
  dialog : false,
  callback:  false,
@@ -58,36 +65,37 @@ Pman.Dialog.MTrackTime = {
  {
    var _this = this;
    this.dialog = Roo.factory({
+    xtype : 'LayoutDialog',
     height : 700,
     title : _this._strings['645fcdd1616f8c7dbb207f6802786431'] /* Time Manager */,
     width : 1000,
     xns : Roo,
     '|xns' : 'Roo',
-    xtype : 'LayoutDialog',
     center : {
+     xtype : 'LayoutRegion',
      tabPosition : 'top',
      xns : Roo,
-     '|xns' : 'Roo',
-     xtype : 'LayoutRegion'
+     '|xns' : 'Roo'
     },
     items  : [
      {
+      xtype : 'NestedLayoutPanel',
       region : 'center',
       title : _this._strings['9deec6a3dfda06500b808d70875f0a8f'] /* Log Time */,
       xns : Roo,
       '|xns' : 'Roo',
-      xtype : 'NestedLayoutPanel',
       layout : {
+       xtype : 'BorderLayout',
        xns : Roo,
        '|xns' : 'Roo',
-       xtype : 'BorderLayout',
        center : {
+        xtype : 'LayoutRegion',
         title : _this._strings['9e51cf61fbb08a10c12619611dc818ad'] /* Active / Logged Time */,
         xns : Roo,
-        '|xns' : 'Roo',
-        xtype : 'LayoutRegion'
+        '|xns' : 'Roo'
        },
        east : {
+        xtype : 'LayoutRegion',
         collapsed : true,
         collapsedTitle : 'Ticket Details',
         collapsible : true,
@@ -95,27 +103,24 @@ Pman.Dialog.MTrackTime = {
         title : _this._strings['ed7b9312345d291c1ccf68096e65ca54'] /* Ticket Details */,
         width : 350,
         xns : Roo,
-        '|xns' : 'Roo',
-        xtype : 'LayoutRegion'
+        '|xns' : 'Roo'
        },
        west : {
+        xtype : 'LayoutRegion',
         split : true,
         width : 600,
         xns : Roo,
-        '|xns' : 'Roo',
-        xtype : 'LayoutRegion'
+        '|xns' : 'Roo'
        },
        items  : [
         {
+         xtype : 'GridPanel',
          background : true,
          fitContainer : true,
          fitToframe : true,
          region : 'west',
          tableName : 'cash_invoice_entry',
          title : _this._strings['329a87b3fae81c1c17a185c78d2e0e63'] /* cash_invoice_entry */,
-         xns : Roo,
-         '|xns' : 'Roo',
-         xtype : 'GridPanel',
          listeners : {
           activate : function() {
                _this.timepanel = this;
@@ -124,12 +129,12 @@ Pman.Dialog.MTrackTime = {
                }
            }
          },
+         xns : Roo,
+         '|xns' : 'Roo',
          grid : {
+          xtype : 'Grid',
           autoExpandColumn : 'activity_ref',
           loadMask : true,
-          xns : Roo.grid,
-          '|xns' : 'Roo.grid',
-          xtype : 'Grid',
           listeners : {
            render : function() 
             {
@@ -141,18 +146,21 @@ Pman.Dialog.MTrackTime = {
             },
            rowdblclick : function (_self, rowIndex, e)
             {
-                if (!_this.dialog) return;
+                if (!_this.dialog) { return; }
                 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
                     _this.grid.footer.onClick('first');
                 }); 
             }
           },
+          xns : Roo.grid,
+          '|xns' : 'Roo.grid',
           toolbar : {
+           xtype : 'Toolbar',
            xns : Roo,
            '|xns' : 'Roo',
-           xtype : 'Toolbar',
            items  : [
             {
+             xtype : 'ComboBox',
              allowBlank : false,
              displayField : 'name',
              editable : false,
@@ -173,21 +181,18 @@ Pman.Dialog.MTrackTime = {
              typeAhead : true,
              valueField : 'id',
              width : 300,
-             xns : Roo.form,
-             '|xns' : 'Roo.form',
-             xtype : 'ComboBox',
              listeners : {
               render : function (_self)
                {
                        _this.personSelect = _self;
                }
              },
+             xns : Roo.form,
+             '|xns' : 'Roo.form',
              store : {
+              xtype : 'Store',
               remoteSort : true,
               sortInfo : { direction : 'ASC', field: 'id' },
-              xns : Roo.data,
-              '|xns' : 'Roo.data',
-              xtype : 'Store',
               listeners : {
                beforeload : function (_self, o){
                     o.params = o.params || {};
@@ -195,38 +200,38 @@ Pman.Dialog.MTrackTime = {
                     o.params.company_id_comptype = 'OWNER';
                 }
               },
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
               proxy : {
+               xtype : 'HttpProxy',
                method : 'GET',
                url : baseURL + '/Roo/Person.php',
                xns : Roo.data,
-               '|xns' : 'Roo.data',
-               xtype : 'HttpProxy'
+               '|xns' : 'Roo.data'
               },
               reader : {
+               xtype : 'JsonReader',
                fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
                id : 'id',
                root : 'data',
                totalProperty : 'total',
                xns : Roo.data,
-               '|xns' : 'Roo.data',
-               xtype : 'JsonReader'
+               '|xns' : 'Roo.data'
               }
              }
             }
            ]
           },
           dataSource : {
+           xtype : 'Store',
            remoteSort : true,
            sortInfo : { field : 'action_dt', direction: 'DESC' },
            xns : Roo.data,
            '|xns' : 'Roo.data',
-           xtype : 'Store',
            proxy : {
+            xtype : 'HttpProxy',
             method : 'GET',
             url : baseURL + '/Roo/cash_invoice_entry.php',
-            xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'HttpProxy',
             listeners : {
              beforeload : function (This, params)
               {
@@ -238,9 +243,12 @@ Pman.Dialog.MTrackTime = {
                   
                   
               }
-            }
+            },
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
            },
            reader : {
+            xtype : 'JsonReader',
             fields : [
                 {
                     'name': 'id',
@@ -446,12 +454,12 @@ Pman.Dialog.MTrackTime = {
             root : 'data',
             totalProperty : 'total',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'JsonReader'
+            '|xns' : 'Roo.data'
            }
           },
           colModel : [
            {
+            xtype : 'ColumnModel',
             dataIndex : 'action_dt',
             header : _this._strings['a76d4ef5f3f6a672bbfab2865563e530'] /* Time */,
             renderer : function(v,x,r) { 
@@ -462,62 +470,59 @@ Pman.Dialog.MTrackTime = {
             },
             width : 100,
             xns : Roo.grid,
-            '|xns' : 'Roo.grid',
-            xtype : 'ColumnModel'
+            '|xns' : 'Roo.grid'
            },
            {
+            xtype : 'ColumnModel',
             dataIndex : 'ticket_id_summary',
             header : _this._strings['c751439d0db3883ac1c8e816327adcab'] /* Ticket */,
             renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
             width : 200,
             xns : Roo.grid,
-            '|xns' : 'Roo.grid',
-            xtype : 'ColumnModel'
+            '|xns' : 'Roo.grid'
            },
            {
+            xtype : 'ColumnModel',
             dataIndex : 'notes',
             header : _this._strings['f4c6f851b00d5518bf888815de279aba'] /* Notes */,
             renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
             width : 300,
             xns : Roo.grid,
-            '|xns' : 'Roo.grid',
-            xtype : 'ColumnModel'
+            '|xns' : 'Roo.grid'
            }
           ]
          }
         },
         {
+         xtype : 'NestedLayoutPanel',
          region : 'center',
          xns : Roo,
          '|xns' : 'Roo',
-         xtype : 'NestedLayoutPanel',
          layout : {
+          xtype : 'BorderLayout',
           xns : Roo,
           '|xns' : 'Roo',
-          xtype : 'BorderLayout',
           center : {
+           xtype : 'LayoutRegion',
            title : _this._strings['6cca3734b44a6ae61b40c9a915d122f4'] /* Task Queue */,
            xns : Roo,
-           '|xns' : 'Roo',
-           xtype : 'LayoutRegion'
+           '|xns' : 'Roo'
           },
           north : {
+           xtype : 'LayoutRegion',
            height : 200,
            xns : Roo,
-           '|xns' : 'Roo',
-           xtype : 'LayoutRegion'
+           '|xns' : 'Roo'
           },
           items  : [
            {
+            xtype : 'GridPanel',
             background : true,
             fitContainer : true,
             fitToframe : true,
             region : 'center',
             tableName : 'mtrack_ticket',
             title : _this._strings['3efbc55730fd4af147b96183d8afbd3b'] /* mtrack_ticket */,
-            xns : Roo,
-            '|xns' : 'Roo',
-            xtype : 'GridPanel',
             listeners : {
              activate : function() {
                   _this.queuepanel = this;
@@ -526,12 +531,12 @@ Pman.Dialog.MTrackTime = {
                   }
               }
             },
+            xns : Roo,
+            '|xns' : 'Roo',
             grid : {
+             xtype : 'Grid',
              autoExpandColumn : 'summary',
              loadMask : true,
-             xns : Roo.grid,
-             '|xns' : 'Roo.grid',
-             xtype : 'Grid',
              listeners : {
               render : function() 
                {
@@ -543,18 +548,21 @@ Pman.Dialog.MTrackTime = {
                },
               rowdblclick : function (_self, rowIndex, e)
                {
-                   if (!_this.dialog) return;
+                   if (!_this.dialog) { return; }
                    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
                        _this.grid.footer.onClick('first');
                    }); 
                }
              },
+             xns : Roo.grid,
+             '|xns' : 'Roo.grid',
              toolbar : {
+              xtype : 'Toolbar',
               xns : Roo,
               '|xns' : 'Roo',
-              xtype : 'Toolbar',
               items  : [
                {
+                xtype : 'ComboBox',
                 allowBlank : false,
                 displayField : 'name',
                 editable : false,
@@ -575,9 +583,6 @@ Pman.Dialog.MTrackTime = {
                 typeAhead : true,
                 valueField : 'id',
                 width : 200,
-                xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'ComboBox',
                 listeners : {
                  beforeselect : function (combo, record, index)
                   {
@@ -593,12 +598,12 @@ Pman.Dialog.MTrackTime = {
                       _this.projectSel = _self;
                   }
                 },
+                xns : Roo.form,
+                '|xns' : 'Roo.form',
                 store : {
+                 xtype : 'Store',
                  remoteSort : true,
                  sortInfo : { field: 'code', direction: 'ASC' },
-                 xns : Roo.data,
-                 '|xns' : 'Roo.data',
-                 xtype : 'Store',
                  listeners : {
                   beforeload : function (_self, o){
                        o.params = o.params || {};
@@ -607,40 +612,43 @@ Pman.Dialog.MTrackTime = {
                        // set more here
                    }
                  },
+                 xns : Roo.data,
+                 '|xns' : 'Roo.data',
                  proxy : {
+                  xtype : 'HttpProxy',
                   method : 'GET',
                   url : baseURL + '/Roo/Projects.php',
                   xns : Roo.data,
-                  '|xns' : 'Roo.data',
-                  xtype : 'HttpProxy'
+                  '|xns' : 'Roo.data'
                  },
                  reader : {
+                  xtype : 'JsonReader',
                   fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
                   id : 'id',
                   root : 'data',
                   totalProperty : 'total',
                   xns : Roo.data,
-                  '|xns' : 'Roo.data',
-                  xtype : 'JsonReader'
+                  '|xns' : 'Roo.data'
                  }
                 }
                }
               ]
              },
              dataSource : {
+              xtype : 'Store',
               remoteSort : true,
               sortInfo : { field : 'summary', direction: 'ASC' },
               xns : Roo.data,
               '|xns' : 'Roo.data',
-              xtype : 'Store',
               proxy : {
+               xtype : 'HttpProxy',
                method : 'GET',
                url : baseURL + '/Roo/mtrack_ticket.php',
                xns : Roo.data,
-               '|xns' : 'Roo.data',
-               xtype : 'HttpProxy'
+               '|xns' : 'Roo.data'
               },
               reader : {
+               xtype : 'JsonReader',
                fields : [
                    {
                        'name': 'id',
@@ -1119,55 +1127,55 @@ Pman.Dialog.MTrackTime = {
                root : 'data',
                totalProperty : 'total',
                xns : Roo.data,
-               '|xns' : 'Roo.data',
-               xtype : 'JsonReader'
+               '|xns' : 'Roo.data'
               }
              },
              colModel : [
               {
+               xtype : 'ColumnModel',
                dataIndex : 'summary',
                header : _this._strings['290612199861c31d1036b185b4e69b75'] /* Summary */,
                renderer : function(v) { return String.format('{0}', v); },
                width : 200,
                xns : Roo.grid,
-               '|xns' : 'Roo.grid',
-               xtype : 'ColumnModel'
+               '|xns' : 'Roo.grid'
               }
              ]
             }
            },
            {
+            xtype : 'ContentPanel',
             region : 'north',
             xns : Roo,
             '|xns' : 'Roo',
-            xtype : 'ContentPanel',
             toolbar : {
+             xtype : 'Toolbar',
              xns : Roo,
              '|xns' : 'Roo',
-             xtype : 'Toolbar',
              items  : [
               {
+               xtype : 'Button',
                text : _this._strings['b2439dea1dd89e6f694df484214e57cf'] /* Working on this */,
                xns : Roo.Toolbar,
-               '|xns' : 'Roo.Toolbar',
-               xtype : 'Button'
+               '|xns' : 'Roo.Toolbar'
               },
               {
+               xtype : 'Button',
                text : _this._strings['07ca5050e697392c9ed47e6453f1453f'] /* Completed */,
                xns : Roo.Toolbar,
-               '|xns' : 'Roo.Toolbar',
-               xtype : 'Button'
+               '|xns' : 'Roo.Toolbar'
               },
               {
+               xtype : 'Button',
                text : _this._strings['1fa1f1ccb57b2486b4c05122d64868d4'] /* Not on Project work */,
                xns : Roo.Toolbar,
-               '|xns' : 'Roo.Toolbar',
-               xtype : 'Button'
+               '|xns' : 'Roo.Toolbar'
               }
              ]
             },
             items  : [
              {
+              xtype : 'Form',
               activeData : false,
               method : 'POST',
               saveActive : function(rec, effort) {
@@ -1237,9 +1245,6 @@ Pman.Dialog.MTrackTime = {
               },
               style : 'margin-left:10px;',
               url : baseURL + '/Roo/cash_invoice_entry.php',
-              xns : Roo.form,
-              '|xns' : 'Roo.form',
-              xtype : 'Form',
               listeners : {
                actioncomplete : function(_self,action)
                 {
@@ -1321,8 +1326,11 @@ Pman.Dialog.MTrackTime = {
                     _this.form= form;
                 }
               },
+              xns : Roo.form,
+              '|xns' : 'Roo.form',
               items  : [
                {
+                xtype : 'ComboBox',
                 allowBlank : false,
                 displayField : 'name',
                 editable : false,
@@ -1343,9 +1351,6 @@ Pman.Dialog.MTrackTime = {
                 typeAhead : true,
                 valueField : 'id',
                 width : 200,
-                xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'ComboBox',
                 listeners : {
                  beforeselect : function (combo, record, index)
                   {
@@ -1374,12 +1379,12 @@ Pman.Dialog.MTrackTime = {
                       _this.projectSel = _self;
                   }
                 },
+                xns : Roo.form,
+                '|xns' : 'Roo.form',
                 store : {
+                 xtype : 'Store',
                  remoteSort : true,
                  sortInfo : { field: 'code', direction: 'ASC' },
-                 xns : Roo.data,
-                 '|xns' : 'Roo.data',
-                 xtype : 'Store',
                  listeners : {
                   beforeload : function (_self, o){
                        o.params = o.params || {};
@@ -1388,39 +1393,39 @@ Pman.Dialog.MTrackTime = {
                        // set more here
                    }
                  },
+                 xns : Roo.data,
+                 '|xns' : 'Roo.data',
                  proxy : {
+                  xtype : 'HttpProxy',
                   method : 'GET',
                   url : baseURL + '/Roo/Projects.php',
                   xns : Roo.data,
-                  '|xns' : 'Roo.data',
-                  xtype : 'HttpProxy'
+                  '|xns' : 'Roo.data'
                  },
                  reader : {
+                  xtype : 'JsonReader',
                   fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
                   id : 'id',
                   root : 'data',
                   totalProperty : 'total',
                   xns : Roo.data,
-                  '|xns' : 'Roo.data',
-                  xtype : 'JsonReader'
+                  '|xns' : 'Roo.data'
                  }
                 }
                },
                {
+                xtype : 'Column',
                 labelAlign : 'top',
                 width : 300,
                 xns : Roo.form,
                 '|xns' : 'Roo.form',
-                xtype : 'Column',
                 items  : [
                  {
+                  xtype : 'TextArea',
                   fieldLabel : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
                   height : 120,
                   name : 'description',
                   width : 300,
-                  xns : Roo.form,
-                  '|xns' : 'Roo.form',
-                  xtype : 'TextArea',
                   listeners : {
                    keyup : function (_self, e)
                     {
@@ -1428,51 +1433,53 @@ Pman.Dialog.MTrackTime = {
                         _this.grid.dataSource.updateBar(_this.selectedRec);
                      
                     }
-                  }
+                  },
+                  xns : Roo.form,
+                  '|xns' : 'Roo.form'
                  }
                 ]
                },
                {
+                xtype : 'Hidden',
                 name : 'action',
                 xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'Hidden'
+                '|xns' : 'Roo.form'
                },
                {
+                xtype : 'Hidden',
                 name : 'staff_id',
                 xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'Hidden'
+                '|xns' : 'Roo.form'
                },
                {
+                xtype : 'Hidden',
                 name : 'qtyvalue',
                 xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'Hidden'
+                '|xns' : 'Roo.form'
                },
                {
+                xtype : 'Hidden',
                 name : 'qtyvalue2',
                 xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'Hidden'
+                '|xns' : 'Roo.form'
                },
                {
+                xtype : 'Hidden',
                 name : 'entry_dt',
                 xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'Hidden'
+                '|xns' : 'Roo.form'
                },
                {
+                xtype : 'Hidden',
                 name : 'action_dt',
                 xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'Hidden'
+                '|xns' : 'Roo.form'
                },
                {
+                xtype : 'Hidden',
                 name : 'id',
                 xns : Roo.form,
-                '|xns' : 'Roo.form',
-                xtype : 'Hidden'
+                '|xns' : 'Roo.form'
                }
               ]
              }
@@ -1485,39 +1492,37 @@ Pman.Dialog.MTrackTime = {
       }
      },
      {
+      xtype : 'NestedLayoutPanel',
       region : 'center',
       title : _this._strings['642f8356fcf65868f037f92e0e10c3cd'] /* Plan Time */,
       xns : Roo,
       '|xns' : 'Roo',
-      xtype : 'NestedLayoutPanel',
       layout : {
+       xtype : 'BorderLayout',
        xns : Roo,
        '|xns' : 'Roo',
-       xtype : 'BorderLayout',
        center : {
+        xtype : 'LayoutRegion',
         title : _this._strings['f49f927095bb01b44c96d29c8c09f3a3'] /* Assigned to  / Prioritized (all projects) */,
         xns : Roo,
-        '|xns' : 'Roo',
-        xtype : 'LayoutRegion'
+        '|xns' : 'Roo'
        },
        west : {
+        xtype : 'LayoutRegion',
         title : _this._strings['9a221c25cceeb0d108ff6cb635dc8b8b'] /* Open Tasks (Unassigned) / Select Project */,
         width : 450,
         xns : Roo,
-        '|xns' : 'Roo',
-        xtype : 'LayoutRegion'
+        '|xns' : 'Roo'
        },
        items  : [
         {
+         xtype : 'GridPanel',
          background : false,
          fitContainer : true,
          fitToframe : true,
          region : 'west',
          tableName : 'mtrack_ticket',
          title : _this._strings['3efbc55730fd4af147b96183d8afbd3b'] /* mtrack_ticket */,
-         xns : Roo,
-         '|xns' : 'Roo',
-         xtype : 'GridPanel',
          listeners : {
           activate : function() {
                _this.openpanel = this;
@@ -1526,12 +1531,12 @@ Pman.Dialog.MTrackTime = {
                }
            }
          },
+         xns : Roo,
+         '|xns' : 'Roo',
          grid : {
+          xtype : 'Grid',
           autoExpandColumn : 'summary',
           loadMask : true,
-          xns : Roo.grid,
-          '|xns' : 'Roo.grid',
-          xtype : 'Grid',
           listeners : {
            render : function() 
             {
@@ -1543,18 +1548,21 @@ Pman.Dialog.MTrackTime = {
             },
            rowdblclick : function (_self, rowIndex, e)
             {
-                if (!_this.dialog) return;
+                if (!_this.dialog) { return; }
                 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
                     _this.grid.footer.onClick('first');
                 }); 
             }
           },
+          xns : Roo.grid,
+          '|xns' : 'Roo.grid',
           toolbar : {
+           xtype : 'Toolbar',
            xns : Roo,
            '|xns' : 'Roo',
-           xtype : 'Toolbar',
            items  : [
             {
+             xtype : 'ComboBox',
              displayField : '',
              editable : false,
              emptyText : _this._strings['6a58f977f2b623b695a340766f2a6843'] /* Select Project */,
@@ -1576,53 +1584,53 @@ Pman.Dialog.MTrackTime = {
              width : 300,
              xns : Roo.form,
              '|xns' : 'Roo.form',
-             xtype : 'ComboBox',
              store : {
+              xtype : 'Store',
               remoteSort : true,
               sortInfo : { direction : 'ASC', field: 'id' },
-              xns : Roo.data,
-              '|xns' : 'Roo.data',
-              xtype : 'Store',
               listeners : {
                beforeload : function (_self, o){
                     o.params = o.params || {};
                     // set more here
                 }
               },
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
               proxy : {
+               xtype : 'HttpProxy',
                method : 'GET',
                url : baseURL + '/Roo/mtrack_ticket.php',
                xns : Roo.data,
-               '|xns' : 'Roo.data',
-               xtype : 'HttpProxy'
+               '|xns' : 'Roo.data'
               },
               reader : {
+               xtype : 'JsonReader',
                fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}],
                id : 'id',
                root : 'data',
                totalProperty : 'total',
                xns : Roo.data,
-               '|xns' : 'Roo.data',
-               xtype : 'JsonReader'
+               '|xns' : 'Roo.data'
               }
              }
             }
            ]
           },
           dataSource : {
+           xtype : 'Store',
            remoteSort : true,
            sortInfo : { field : 'summary', direction: 'ASC' },
            xns : Roo.data,
            '|xns' : 'Roo.data',
-           xtype : 'Store',
            proxy : {
+            xtype : 'HttpProxy',
             method : 'GET',
             url : baseURL + '/Roo/mtrack_ticket.php',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'HttpProxy'
+            '|xns' : 'Roo.data'
            },
            reader : {
+            xtype : 'JsonReader',
             fields : [
                 {
                     'name': 'id',
@@ -2101,33 +2109,30 @@ Pman.Dialog.MTrackTime = {
             root : 'data',
             totalProperty : 'total',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'JsonReader'
+            '|xns' : 'Roo.data'
            }
           },
           colModel : [
            {
+            xtype : 'ColumnModel',
             dataIndex : 'summary',
             header : _this._strings['290612199861c31d1036b185b4e69b75'] /* Summary */,
             renderer : function(v) { return String.format('{0}', v); },
             width : 200,
             xns : Roo.grid,
-            '|xns' : 'Roo.grid',
-            xtype : 'ColumnModel'
+            '|xns' : 'Roo.grid'
            }
           ]
          }
         },
         {
+         xtype : 'GridPanel',
          background : false,
          fitContainer : true,
          fitToframe : true,
          region : 'center',
          tableName : 'mtrack_ticket',
          title : _this._strings['3efbc55730fd4af147b96183d8afbd3b'] /* mtrack_ticket */,
-         xns : Roo,
-         '|xns' : 'Roo',
-         xtype : 'GridPanel',
          listeners : {
           activate : function() {
                _this.openpanel = this;
@@ -2136,12 +2141,12 @@ Pman.Dialog.MTrackTime = {
                }
            }
          },
+         xns : Roo,
+         '|xns' : 'Roo',
          grid : {
+          xtype : 'Grid',
           autoExpandColumn : 'summary',
           loadMask : true,
-          xns : Roo.grid,
-          '|xns' : 'Roo.grid',
-          xtype : 'Grid',
           listeners : {
            render : function() 
             {
@@ -2153,18 +2158,21 @@ Pman.Dialog.MTrackTime = {
             },
            rowdblclick : function (_self, rowIndex, e)
             {
-                if (!_this.dialog) return;
+                if (!_this.dialog) { return; }
                 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
                     _this.grid.footer.onClick('first');
                 }); 
             }
           },
+          xns : Roo.grid,
+          '|xns' : 'Roo.grid',
           toolbar : {
+           xtype : 'Toolbar',
            xns : Roo,
            '|xns' : 'Roo',
-           xtype : 'Toolbar',
            items  : [
             {
+             xtype : 'ComboBox',
              displayField : '',
              editable : false,
              emptyText : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
@@ -2186,53 +2194,53 @@ Pman.Dialog.MTrackTime = {
              width : 300,
              xns : Roo.form,
              '|xns' : 'Roo.form',
-             xtype : 'ComboBox',
              store : {
+              xtype : 'Store',
               remoteSort : true,
               sortInfo : { direction : 'ASC', field: 'id' },
-              xns : Roo.data,
-              '|xns' : 'Roo.data',
-              xtype : 'Store',
               listeners : {
                beforeload : function (_self, o){
                     o.params = o.params || {};
                     // set more here
                 }
               },
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
               proxy : {
+               xtype : 'HttpProxy',
                method : 'GET',
                url : baseURL + '/Roo/mtrack_ticket.php',
                xns : Roo.data,
-               '|xns' : 'Roo.data',
-               xtype : 'HttpProxy'
+               '|xns' : 'Roo.data'
               },
               reader : {
+               xtype : 'JsonReader',
                fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}],
                id : 'id',
                root : 'data',
                totalProperty : 'total',
                xns : Roo.data,
-               '|xns' : 'Roo.data',
-               xtype : 'JsonReader'
+               '|xns' : 'Roo.data'
               }
              }
             }
            ]
           },
           dataSource : {
+           xtype : 'Store',
            remoteSort : true,
            sortInfo : { field : 'summary', direction: 'ASC' },
            xns : Roo.data,
            '|xns' : 'Roo.data',
-           xtype : 'Store',
            proxy : {
+            xtype : 'HttpProxy',
             method : 'GET',
             url : baseURL + '/Roo/mtrack_ticket.php',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'HttpProxy'
+            '|xns' : 'Roo.data'
            },
            reader : {
+            xtype : 'JsonReader',
             fields : [
                 {
                     'name': 'id',
@@ -2711,19 +2719,18 @@ Pman.Dialog.MTrackTime = {
             root : 'data',
             totalProperty : 'total',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'JsonReader'
+            '|xns' : 'Roo.data'
            }
           },
           colModel : [
            {
+            xtype : 'ColumnModel',
             dataIndex : 'summary',
             header : _this._strings['290612199861c31d1036b185b4e69b75'] /* Summary */,
             renderer : function(v) { return String.format('{0}', v); },
             width : 200,
             xns : Roo.grid,
-            '|xns' : 'Roo.grid',
-            xtype : 'ColumnModel'
+            '|xns' : 'Roo.grid'
            }
           ]
          }
index c46891d..d80145f 100644 (file)
@@ -37,7 +37,7 @@ Pman.MTrack = {
                         return;
                     }
                     out+= Pman.MTrack.template.change_comment(cg);
-                })
+                });
                 
                 el.dom.innerHTML = '<ul>' + out + '</ul>';
                  
index 44cb1e6..3509cf2 100644 (file)
@@ -35,8 +35,8 @@
      "items" : [
       {
        "xtype" : "LayoutRegion",
-       "$ xns" : "Roo",
        "width" : 200,
+       "$ xns" : "Roo",
        "split" : true,
        "* prop" : "west"
       },
@@ -58,8 +58,8 @@
         "render" : "function (_self)\n{\n  _this.tree = _self;\n}"
        },
        "autoScroll" : true,
-       "fitToFrame" : true,
        "region" : "west",
+       "fitToFrame" : true,
        "xtype" : "TreePanel",
        "$ xns" : "Roo",
        "items" : [
        "listeners" : {
         "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        //_this.grid.footer.onClick('first');\n    }\n}"
        },
+       "background" : true,
        "region" : "center",
        "fitToframe" : true,
-       "background" : true,
        "title" : "core_enum",
        "xtype" : "GridPanel",
        "fitContainer" : true,
        "items" : [
         {
          "listeners" : {
-          "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
+          "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) { return; }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
           "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       //this.footer.onClick('first');\n    }\n}"
          },
          "autoExpandColumn" : "etype",
            "items" : [
             {
              "$ url" : "baseURL + '/MTrack/Merger.php'",
-             "method" : "GET",
              "xtype" : "HttpProxy",
+             "method" : "GET",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
           },
           {
            "xtype" : "ColumnModel",
-           "width" : 200,
            "header" : "File",
+           "width" : 200,
            "$ renderer" : "function(v) { return String.format('{0}', v); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
           },
           {
            "xtype" : "ColumnModel",
-           "width" : 50,
            "header" : "Added",
+           "width" : 50,
            "$ renderer" : "function(v) { return String.format('{0}', v); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
           },
           {
            "xtype" : "ColumnModel",
-           "width" : 50,
            "header" : "Removed",
+           "width" : 50,
            "$ renderer" : "function(v) { return String.format('{0}', v); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
         "render" : "function (_self)\n{\n  _this.preview = _self;\n}"
        },
        "autoScroll" : true,
-       "fitToFrame" : true,
        "region" : "south",
+       "fitToFrame" : true,
        "title" : "Review Changes",
        "xtype" : "ContentPanel",
        "$ xns" : "Roo"
index 0ffbf4d..6e81882 100644 (file)
@@ -26,17 +26,15 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
   name     : "Pman.Tab.MTrackMerger",
   disabled : false, 
   permname : '', 
-  _tree : function()
+  _tree : function(_data)
   {
    var _this = this;
    var MODULE = this;
    return {
+   xtype : 'NestedLayoutPanel',
    background : true,
    region : 'center',
    title : _this._strings['06f5aa315f44a2147bab17980d1f6570'] /* Merge Commits */,
-   xns : Roo,
-   '|xns' : 'Roo',
-   xtype : 'NestedLayoutPanel',
    listeners : {
     activate : function (_self)
      {
@@ -46,67 +44,67 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
          } catch(e) {}
      }
    },
+   xns : Roo,
+   '|xns' : 'Roo',
    layout : {
+    xtype : 'BorderLayout',
     xns : Roo,
     '|xns' : 'Roo',
-    xtype : 'BorderLayout',
     center : {
+     xtype : 'LayoutRegion',
      xns : Roo,
-     '|xns' : 'Roo',
-     xtype : 'LayoutRegion'
+     '|xns' : 'Roo'
     },
     west : {
+     xtype : 'LayoutRegion',
      split : true,
      width : 200,
      xns : Roo,
-     '|xns' : 'Roo',
-     xtype : 'LayoutRegion'
+     '|xns' : 'Roo'
     },
     south : {
+     xtype : 'LayoutRegion',
      height : 200,
      split : true,
      titlebar : true,
      xns : Roo,
-     '|xns' : 'Roo',
-     xtype : 'LayoutRegion'
+     '|xns' : 'Roo'
     },
     items  : [
      {
+      xtype : 'TreePanel',
       autoScroll : true,
       fitToFrame : true,
       region : 'west',
-      xns : Roo,
-      '|xns' : 'Roo',
-      xtype : 'TreePanel',
       listeners : {
        render : function (_self)
         {
           _this.tree = _self;
         }
       },
+      xns : Roo,
+      '|xns' : 'Roo',
       toolbar : {
+       xtype : 'Toolbar',
        xns : Roo,
        '|xns' : 'Roo',
-       xtype : 'Toolbar',
        items  : [
         {
-         text : _this._strings['4d1c8263ba1036754f8db14a98f9f006'] /* Reload */,
-         xns : Roo.Toolbar,
-         '|xns' : 'Roo.Toolbar',
          xtype : 'Button',
+         text : _this._strings['4d1c8263ba1036754f8db14a98f9f006'] /* Reload */,
          listeners : {
           click : function (_self, e)
            {
              var t = _this.tree.tree;
              t.loader.load(t.root);
            }
-         }
+         },
+         xns : Roo.Toolbar,
+         '|xns' : 'Roo.Toolbar'
         }
        ]
       },
       tree : {
-       xns : Roo.tree,
-       '|xns' : 'Roo.tree',
        xtype : 'TreePanel',
        listeners : {
         click : function (node, e)
@@ -115,20 +113,20 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
             _this.grid.ds.load.defer(100, _this.grid.ds, [ {} ]);
          }
        },
+       xns : Roo.tree,
+       '|xns' : 'Roo.tree',
        root : {
+        xtype : 'TreeNode',
         text : _this._strings['e63695c4dea40eefb2ef481c7b242192'] /* All Changes */,
         xns : Roo.tree,
-        '|xns' : 'Roo.tree',
-        xtype : 'TreeNode'
+        '|xns' : 'Roo.tree'
        },
        loader : {
+        xtype : 'TreeLoader',
         baseParams : { _tree : 1 },
         dataUrl : baseURL + '/MTrack/Merger',
         requestMethod : 'GET',
         root : 'data',
-        xns : Roo.tree,
-        '|xns' : 'Roo.tree',
-        xtype : 'TreeLoader',
         listeners : {
          beforeload : function (This, node, callback)
           {
@@ -143,20 +141,20 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
           {
            _this.tree.el.unmask();
           }
-        }
+        },
+        xns : Roo.tree,
+        '|xns' : 'Roo.tree'
        }
       }
      },
      {
+      xtype : 'GridPanel',
       background : true,
       fitContainer : true,
       fitToframe : true,
       region : 'center',
       tableName : 'core_enum',
       title : _this._strings['c671c787b49f50a3ace9fdc5bd597825'] /* core_enum */,
-      xns : Roo,
-      '|xns' : 'Roo',
-      xtype : 'GridPanel',
       listeners : {
        activate : function() {
             _this.panel = this;
@@ -165,12 +163,12 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
             }
         }
       },
+      xns : Roo,
+      '|xns' : 'Roo',
       grid : {
+       xtype : 'Grid',
        autoExpandColumn : 'etype',
        loadMask : true,
-       xns : Roo.grid,
-       '|xns' : 'Roo.grid',
-       xtype : 'Grid',
        listeners : {
         render : function() 
          {
@@ -182,24 +180,24 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
          },
         rowdblclick : function (_self, rowIndex, e)
          {
-             if (!_this.dialog) return;
+             if (!_this.dialog) { return; }
              _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
                  _this.grid.footer.onClick('first');
              }); 
          }
        },
+       xns : Roo.grid,
+       '|xns' : 'Roo.grid',
        toolbar : {
+        xtype : 'Toolbar',
         xns : Roo,
         '|xns' : 'Roo',
-        xtype : 'Toolbar',
         items  : [
          {
+          xtype : 'Button',
           cls : 'x-btn-text-icon',
           icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
           text : _this._strings['cd23e6cc0233eef073cbed0cfebcd6a1'] /* Create Commit Using Patch */,
-          xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'Button',
           listeners : {
            click : function()
             {
@@ -250,15 +248,15 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
                    animEl: this.el
                });
             }
-          }
+          },
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar'
          },
          {
+          xtype : 'Button',
           cls : 'x-btn-text-icon',
           icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
           text : _this._strings['21bcad367951f7c2e761f744423161b6'] /* Create Commit Using Merge */,
-          xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'Button',
           listeners : {
            click : function()
             {
@@ -300,16 +298,16 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
                    animEl: this.el
                });
             }
-          }
+          },
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar'
          }
         ]
        },
        dataSource : {
+        xtype : 'Store',
         remoteSort : false,
         sortInfo : { field: 'filename', dir : 'ASC' },
-        xns : Roo.data,
-        '|xns' : 'Roo.data',
-        xtype : 'Store',
         listeners : {
          beforeload : function (_self, options)
           {
@@ -335,14 +333,17 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
           
           }
         },
+        xns : Roo.data,
+        '|xns' : 'Roo.data',
         proxy : {
+         xtype : 'HttpProxy',
          method : 'GET',
          url : baseURL + '/MTrack/Merger.php',
          xns : Roo.data,
-         '|xns' : 'Roo.data',
-         xtype : 'HttpProxy'
+         '|xns' : 'Roo.data'
         },
         reader : {
+         xtype : 'JsonReader',
          fields : [
              {
                  'name': 'id',
@@ -366,15 +367,12 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
          root : 'data',
          totalProperty : 'total',
          xns : Roo.data,
-         '|xns' : 'Roo.data',
-         xtype : 'JsonReader'
+         '|xns' : 'Roo.data'
         }
        },
        sm : {
-        singleSelect : false,
-        xns : Roo.grid,
-        '|xns' : 'Roo.grid',
         xtype : 'RowSelectionModel',
+        singleSelect : false,
         listeners : {
          afterselectionchange : function (_self)
           {
@@ -406,53 +404,55 @@ Pman.Tab.MTrackMerger = new Roo.XComponent({
              
              
           }
-        }
+        },
+        xns : Roo.grid,
+        '|xns' : 'Roo.grid'
        },
        colModel : [
         {
+         xtype : 'ColumnModel',
          dataIndex : 'filename',
          header : _this._strings['0b27918290ff5323bea1e3b78a9cf04e'] /* File */,
          renderer : function(v) { return String.format('{0}', v); },
          width : 200,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'added',
          header : _this._strings['f29ddbfb905eb2593fdcdfb243f9af85'] /* Added */,
          renderer : function(v) { return String.format('{0}', v); },
          width : 50,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'removed',
          header : _this._strings['93f07b720ebf7d1246512569761a5804'] /* Removed */,
          renderer : function(v) { return String.format('{0}', v); },
          width : 50,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         }
        ]
       }
      },
      {
+      xtype : 'ContentPanel',
       autoScroll : true,
       fitToFrame : true,
       region : 'south',
       title : _this._strings['66717bf2b8235cc94a52d5b815d57a54'] /* Review Changes */,
-      xns : Roo,
-      '|xns' : 'Roo',
-      xtype : 'ContentPanel',
       listeners : {
        render : function (_self)
         {
           _this.preview = _self;
         }
-      }
+      },
+      xns : Roo,
+      '|xns' : 'Roo'
      }
     ]
    }
index 75e68a1..a91a876 100644 (file)
@@ -39,9 +39,9 @@
    "listeners" : {
     "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
    },
+   "background" : true,
    "region" : "center",
    "fitToframe" : true,
-   "background" : true,
    "title" : "Milestones",
    "xtype" : "GridPanel",
    "fitContainer" : true,
@@ -50,7 +50,7 @@
    "items" : [
     {
      "listeners" : {
-      "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
+      "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) { return; }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
       "|render" : "function() \n{\n    _this.grid = this; \n     _this.dialog = Pman.Dialog.MTrackMilestone;\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
      },
      "autoExpandColumn" : "description",
@@ -71,8 +71,8 @@
        "items" : [
         {
          "$ url" : "baseURL + '/Roo/mtrack_milestone.php'",
-         "xtype" : "HttpProxy",
          "method" : "GET",
+         "xtype" : "HttpProxy",
          "$ xns" : "Roo.data",
          "* prop" : "proxy"
         },
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/Projects.php'",
-             "xtype" : "HttpProxy",
              "method" : "GET",
+             "xtype" : "HttpProxy",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
         },
         {
          "listeners" : {
-          "|click" : "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
+          "|click" : "function()\n{\nif (!_this.dialog) { return; }\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
          },
          "text" : "Add",
          "xtype" : "Button",
         },
         {
          "listeners" : {
-          "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
+          "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) { return; }\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
          },
          "text" : "Edit",
          "xtype" : "Button",
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "#ref",
        "width" : 50,
+       "header" : "#ref",
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "width" : 50,
        "header" : "#Tickets",
+       "width" : 50,
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "Name",
        "width" : 200,
+       "header" : "Name",
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "Description",
        "width" : 200,
+       "header" : "Description",
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "Duedate",
        "width" : 75,
+       "header" : "Duedate",
        "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "width" : 75,
        "header" : "On-hold",
+       "width" : 75,
        "$ renderer" : "function(v) { return String.format('{0}', v ? 'HOLD' : '' ); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "Completed",
        "width" : 75,
+       "header" : "Completed",
        "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
index 2246002..973030a 100644 (file)
@@ -80,7 +80,7 @@ Pman.Tab.MTrackMilestone = new Roo.XComponent({
       },
      rowdblclick : function (_self, rowIndex, e)
       {
-          if (!_this.dialog) return;
+          if (!_this.dialog) { return; }
           _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
               _this.grid.footer.onClick('first');
           }); 
@@ -221,7 +221,7 @@ Pman.Tab.MTrackMilestone = new Roo.XComponent({
        listeners : {
         click : function()
          {
-             if (!_this.dialog) return;
+         if (!_this.dialog) { return; }
              _this.dialog.show( { id : 0 } , function() {
                  _this.grid.footer.onClick('first');
             }); 
@@ -243,7 +243,7 @@ Pman.Tab.MTrackMilestone = new Roo.XComponent({
                  Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
                  return;
              }
-             if (!_this.dialog) return;
+             if (!_this.dialog) { return; }
              _this.dialog.show(s[0].data, function() {
                  _this.grid.footer.onClick('first');
              }); 
index 48e35d2..5e01808 100644 (file)
 {
-    "id": "roo-file-134",
-    "name": "Pman.Tab.MTrackRepos",
-    "parent": "Pman.Tab.MTrack",
-    "title": "Pman.Tab.MTrackRepos",
-    "path": "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackRepos.bjs",
-    "items": [
+ "name" : "Pman.Tab.MTrackRepos",
+ "parent" : "Pman.Tab.MTrack",
+ "title" : "Pman.Tab.MTrackRepos",
+ "path" : "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackRepos.bjs",
+ "permname" : "",
+ "modOrder" : "001",
+ "strings" : {
+  "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
+  "9e727fdd3aec8274f46685441900280d" : "Project",
+  "7dce122004969d56ae2e0245cb754d35" : "Edit",
+  "73cdcee8881d309dd256134f98347769" : "Repopath",
+  "30269022e9d8f51beaabb52e5d0de2b7" : "Parent",
+  "de1f88f6f7789baf4d35f2919f100fc3" : "Repositories",
+  "97ec8018c492164da252cbaf95f0fa98" : "Shortname",
+  "a4cf31f8bea7da20524198fbe5c0db2a" : "No mtrack_repos found",
+  "f1c61eb7938469f5aa08964c8b2be862" : "Scmtype",
+  "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
+  "6c47888cc8867737f167632508b2f58b" : "Displaying mtrack_repos{0} - {1} of {2}"
+ },
+ "items" : [
+  {
+   "listeners" : {
+    "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
+   },
+   "fitToframe" : true,
+   "background" : true,
+   "region" : "center",
+   "title" : "Repositories",
+   "xtype" : "GridPanel",
+   "fitContainer" : true,
+   "$ xns" : "Roo",
+   "tableName" : "mtrack_repos",
+   "items" : [
+    {
+     "listeners" : {
+      "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog)  { return; }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
+      "|render" : "function() \n{\n    _this.grid = this; \n    _this.dialog = Pman.Dialog.MTrackRepos;\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
+     },
+     "autoExpandColumn" : "shortname",
+     "xtype" : "Grid",
+     "loadMask" : true,
+     "$ xns" : "Roo.grid",
+     "* prop" : "grid",
+     "items" : [
+      {
+       "remoteSort" : true,
+       "xtype" : "Store",
+       "$ sortInfo" : "{ field : 'shortname', direction: 'ASC' }",
+       "$ xns" : "Roo.data",
+       "* prop" : "dataSource",
+       "items" : [
         {
-            "listeners": {
-                "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
-            },
-            "background": true,
-            "fitContainer": true,
-            "fitToframe": true,
-            "region": "center",
-            "tableName": "mtrack_repos",
-            "title": "Repositories",
-            "xtype": "GridPanel",
-            "|xns": "Roo",
-            "items": [
-                {
-                    "listeners": {
-                        "|render": "function() \n{\n    _this.grid = this; \n    _this.dialog = Pman.Dialog.MTrackRepos;\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
-                        "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
-                    },
-                    "*prop": "grid",
-                    "autoExpandColumn": "shortname",
-                    "loadMask": true,
-                    "xtype": "Grid",
-                    "|xns": "Roo.grid",
-                    "items": [
-                        {
-                            "*prop": "dataSource",
-                            "xtype": "Store",
-                            "remoteSort": true,
-                            "|sortInfo": "{ field : 'shortname', direction: 'ASC' }",
-                            "|xns": "Roo.data",
-                            "items": [
-                                {
-                                    "*prop": "proxy",
-                                    "xtype": "HttpProxy",
-                                    "method": "GET",
-                                    "|url": "baseURL + '/Roo/mtrack_repos.php'",
-                                    "|xns": "Roo.data"
-                                },
-                                {
-                                    "|xns": "Roo.data",
-                                    "xtype": "JsonReader",
-                                    "totalProperty": "total",
-                                    "root": "data",
-                                    "*prop": "reader",
-                                    "id": "id",
-                                    "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'shortname',\n        'type': 'string'\n    },\n    {\n        'name': 'scmtype',\n        'type': 'string'\n    },\n    {\n        'name': 'repopath',\n        'type': 'string'\n    },\n    {\n        'name': 'browserurl',\n        'type': 'string'\n    },\n    {\n        'name': 'browsertype',\n        'type': 'string'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'serverurl',\n        'type': 'string'\n    },\n    {\n        'name': 'parent',\n        'type': 'string'\n    },\n    {\n        'name': 'clonedfrom',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    }\n]"
-                                }
-                            ]
-                        },
-                        {
-                            "*prop": "footer",
-                            "xtype": "PagingToolbar",
-                            "pageSize": 25,
-                            "displayInfo": true,
-                            "displayMsg": "Displaying mtrack_repos{0} - {1} of {2}",
-                            "emptyMsg": "No mtrack_repos found",
-                            "|xns": "Roo"
-                        },
-                        {
-                            "*prop": "toolbar",
-                            "xtype": "Toolbar",
-                            "|xns": "Roo",
-                            "items": [
-                                {
-                                    "listeners": {
-                                        "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
-                                    },
-                                    "cls": "x-btn-text-icon",
-                                    "text": "Add",
-                                    "xtype": "Button",
-                                    "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
-                                    "|xns": "Roo.Toolbar"
-                                },
-                                {
-                                    "listeners": {
-                                        "|click": "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('reload');\n    }); \n    \n}\n"
-                                    },
-                                    "cls": "x-btn-text-icon",
-                                    "text": "Edit",
-                                    "xtype": "Button",
-                                    "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
-                                    "|xns": "Roo.Toolbar"
-                                }
-                            ]
-                        },
-                        {
-                            "*prop": "colModel[]",
-                            "dataIndex": "project_id_name",
-                            "header": "Project",
-                            "width": 150,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
-                        },
-                        {
-                            "xtype": "ColumnModel",
-                            "header": "Shortname",
-                            "width": 200,
-                            "dataIndex": "shortname",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid",
-                            "*prop": "colModel[]"
-                        },
-                        {
-                            "*prop": "colModel[]",
-                            "dataIndex": "scmtype",
-                            "header": "Scmtype",
-                            "width": 70,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
-                        },
-                        {
-                            "*prop": "colModel[]",
-                            "dataIndex": "repopath",
-                            "header": "Repopath",
-                            "width": 100,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
-                        },
-                        {
-                            "xtype": "ColumnModel",
-                            "header": "Description",
-                            "width": 200,
-                            "dataIndex": "description",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid",
-                            "*prop": "colModel[]"
-                        },
-                        {
-                            "*prop": "colModel[]",
-                            "dataIndex": "parent",
-                            "header": "Parent",
-                            "width": 100,
-                            "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                            "|xns": "Roo.grid"
-                        }
-                    ]
-                }
-            ]
+         "$ url" : "baseURL + '/Roo/mtrack_repos.php'",
+         "method" : "GET",
+         "xtype" : "HttpProxy",
+         "$ xns" : "Roo.data",
+         "* prop" : "proxy"
+        },
+        {
+         "id" : "id",
+         "root" : "data",
+         "xtype" : "JsonReader",
+         "$ xns" : "Roo.data",
+         "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'shortname',\n        'type': 'string'\n    },\n    {\n        'name': 'scmtype',\n        'type': 'string'\n    },\n    {\n        'name': 'repopath',\n        'type': 'string'\n    },\n    {\n        'name': 'browserurl',\n        'type': 'string'\n    },\n    {\n        'name': 'browsertype',\n        'type': 'string'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'serverurl',\n        'type': 'string'\n    },\n    {\n        'name': 'parent',\n        'type': 'string'\n    },\n    {\n        'name': 'clonedfrom',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    }\n]",
+         "* prop" : "reader",
+         "totalProperty" : "total"
+        }
+       ]
+      },
+      {
+       "pageSize" : 25,
+       "xtype" : "PagingToolbar",
+       "emptyMsg" : "No mtrack_repos found",
+       "$ xns" : "Roo",
+       "displayInfo" : true,
+       "displayMsg" : "Displaying mtrack_repos{0} - {1} of {2}",
+       "* prop" : "footer"
+      },
+      {
+       "xtype" : "Toolbar",
+       "$ xns" : "Roo",
+       "* prop" : "toolbar",
+       "items" : [
+        {
+         "listeners" : {
+          "|click" : "function()\n{\n    if (!_this.dialog) { return; }\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
+         },
+         "text" : "Add",
+         "xtype" : "Button",
+         "cls" : "x-btn-text-icon",
+         "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+         "$ xns" : "Roo.Toolbar"
+        },
+        {
+         "listeners" : {
+          "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) { return; }\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('reload');\n    }); \n    \n}\n"
+         },
+         "text" : "Edit",
+         "xtype" : "Button",
+         "cls" : "x-btn-text-icon",
+         "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'",
+         "$ xns" : "Roo.Toolbar"
         }
-    ],
-    "permname": "",
-    "modOrder": "001"
+       ]
+      },
+      {
+       "xtype" : "ColumnModel",
+       "header" : "Project",
+       "width" : 150,
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "project_id_name"
+      },
+      {
+       "xtype" : "ColumnModel",
+       "width" : 200,
+       "header" : "Shortname",
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "shortname"
+      },
+      {
+       "xtype" : "ColumnModel",
+       "header" : "Scmtype",
+       "width" : 70,
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "scmtype"
+      },
+      {
+       "xtype" : "ColumnModel",
+       "header" : "Repopath",
+       "width" : 100,
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "repopath"
+      },
+      {
+       "xtype" : "ColumnModel",
+       "width" : 200,
+       "header" : "Description",
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "description"
+      },
+      {
+       "xtype" : "ColumnModel",
+       "header" : "Parent",
+       "width" : 100,
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "parent"
+      }
+     ]
+    }
+   ]
+  }
+ ]
 }
\ No newline at end of file
index 93d0968..60e46ec 100644 (file)
 
 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
 
+Roo.namespace('Pman.Tab');
 
+Pman.Tab.MTrackRepos = new Roo.XComponent({
 
-// register the module first
-Pman.on('beforeload', function()
-{
-    Pman.register({
-        modKey : '001-Pman.Tab.MTrackRepos',
-        module : Pman.Tab.MTrackRepos,
-        region : 'center',
-        parent : Pman.Tab.MTrack,
-        name : "Pman.Tab.MTrackRepos",
-        disabled : false, 
-        permname: '' 
-    });
-});
-
-Pman.Tab.MTrackRepos = new Roo.util.Observable({
-
-    panel : false,
-    disabled : false,
-    parentLayout:  false,
-
-    add : function(parentLayout, region)
-    {
-
-        var _this = this;
-        this.parentLayout = parentLayout;
-
-        this.panel = parentLayout.addxtype({
-            xtype: 'GridPanel',
-            xns: Roo,
-            listeners : {
-                activate : function() {
-                    _this.panel = this;
-                    if (_this.grid) {
-                        _this.grid.footer.onClick('first');
-                    }
-                }
-            },
-            background : true,
-            fitContainer : true,
-            fitToframe : true,
-            region : 'center',
-            tableName : 'mtrack_repos',
-            title : "Repositories",
-            grid : {
-                xtype: 'Grid',
-                xns: Roo.grid,
-                listeners : {
-                    render : function() 
-                    {
-                        _this.grid = this; 
-                        _this.dialog = Pman.Dialog.MTrackRepos;
-                        if (_this.panel.active) {
-                           this.footer.onClick('first');
-                        }
-                    },
-                    rowdblclick : function (_self, rowIndex, e)
-                    {
-                        if (!_this.dialog) return;
-                        _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
-                            _this.grid.footer.onClick('first');
-                        }); 
-                    }
-                },
-                autoExpandColumn : 'shortname',
-                loadMask : true,
-                dataSource : {
-                    xtype: 'Store',
-                    xns: Roo.data,
-                    remoteSort : true,
-                    sortInfo : { field : 'shortname', direction: 'ASC' },
-                    proxy : {
-                        xtype: 'HttpProxy',
-                        xns: Roo.data,
-                        method : 'GET',
-                        url : baseURL + '/Roo/mtrack_repos.php'
-                    },
-                    reader : {
-                        xtype: 'JsonReader',
-                        xns: Roo.data,
-                        totalProperty : 'total',
-                        root : 'data',
-                        id : 'id',
-                        fields : [
-                            {
-                                'name': 'id',
-                                'type': 'int'
-                            },
-                            {
-                                'name': 'shortname',
-                                'type': 'string'
-                            },
-                            {
-                                'name': 'scmtype',
-                                'type': 'string'
-                            },
-                            {
-                                'name': 'repopath',
-                                'type': 'string'
-                            },
-                            {
-                                'name': 'browserurl',
-                                'type': 'string'
-                            },
-                            {
-                                'name': 'browsertype',
-                                'type': 'string'
-                            },
-                            {
-                                'name': 'description',
-                                'type': 'string'
-                            },
-                            {
-                                'name': 'serverurl',
-                                'type': 'string'
-                            },
-                            {
-                                'name': 'parent',
-                                'type': 'string'
-                            },
-                            {
-                                'name': 'clonedfrom',
-                                'type': 'int'
-                            },
-                            {
-                                'name': 'project_id',
-                                'type': 'int'
-                            }
-                        ]
-                    }
-                },
-                footer : {
-                    xtype: 'PagingToolbar',
-                    xns: Roo,
-                    pageSize : 25,
-                    displayInfo : true,
-                    displayMsg : 'Displaying mtrack_repos{0} - {1} of {2}',
-                    emptyMsg : 'No mtrack_repos found'
-                },
-                toolbar : {
-                    xtype: 'Toolbar',
-                    xns: Roo,
-                    items : [
-                        {
-                            xtype: 'Button',
-                            xns: Roo.Toolbar,
-                            listeners : {
-                                click : function()
-                                {
-                                    if (!_this.dialog) return;
-                                    _this.dialog.show( { id : 0 } , function() {
-                                        _this.grid.footer.onClick('first');
-                                   }); 
-                                }
-                            },
-                            cls : 'x-btn-text-icon',
-                            text : "Add",
-                            icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
-                        },
-                        {
-                            xtype: 'Button',
-                            xns: Roo.Toolbar,
-                            listeners : {
-                                click : function()
-                                {
-                                    var s = _this.grid.getSelectionModel().getSelections();
-                                    if (!s.length || (s.length > 1))  {
-                                        Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
-                                        return;
-                                    }
-                                    if (!_this.dialog) return;
-                                    _this.dialog.show(s[0].data, function() {
-                                        _this.grid.footer.onClick('reload');
-                                    }); 
-                                    
-                                }
-                            },
-                            cls : 'x-btn-text-icon',
-                            text : "Edit",
-                            icon : Roo.rootURL + 'images/default/tree/leaf.gif'
-                        }
-                    ]
-                },
-                colModel : [
-                    {
-                        xtype: 'ColumnModel',
-                        xns: Roo.grid,
-                        dataIndex : 'project_id_name',
-                        header : 'Project',
-                        width : 150,
-                        renderer : function(v) { return String.format('{0}', v); }
-                    },
-                    {
-                        xtype: 'ColumnModel',
-                        xns: Roo.grid,
-                        header : 'Shortname',
-                        width : 200,
-                        dataIndex : 'shortname',
-                        renderer : function(v) { return String.format('{0}', v); }
-                    },
-                    {
-                        xtype: 'ColumnModel',
-                        xns: Roo.grid,
-                        dataIndex : 'scmtype',
-                        header : 'Scmtype',
-                        width : 70,
-                        renderer : function(v) { return String.format('{0}', v); }
-                    },
-                    {
-                        xtype: 'ColumnModel',
-                        xns: Roo.grid,
-                        dataIndex : 'repopath',
-                        header : 'Repopath',
-                        width : 100,
-                        renderer : function(v) { return String.format('{0}', v); }
-                    },
-                    {
-                        xtype: 'ColumnModel',
-                        xns: Roo.grid,
-                        header : 'Description',
-                        width : 200,
-                        dataIndex : 'description',
-                        renderer : function(v) { return String.format('{0}', v); }
-                    },
-                    {
-                        xtype: 'ColumnModel',
-                        xns: Roo.grid,
-                        dataIndex : 'parent',
-                        header : 'Parent',
-                        width : 100,
-                        renderer : function(v) { return String.format('{0}', v); }
-                    }
-                ]
-            }
-        });
-        this.layout = this.panel.layout;
+ _strings : {
+  'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
+  '9e727fdd3aec8274f46685441900280d' :"Project",
+  '7dce122004969d56ae2e0245cb754d35' :"Edit",
+  '73cdcee8881d309dd256134f98347769' :"Repopath",
+  '30269022e9d8f51beaabb52e5d0de2b7' :"Parent",
+  'de1f88f6f7789baf4d35f2919f100fc3' :"Repositories",
+  '97ec8018c492164da252cbaf95f0fa98' :"Shortname",
+  'a4cf31f8bea7da20524198fbe5c0db2a' :"No mtrack_repos found",
+  'f1c61eb7938469f5aa08964c8b2be862' :"Scmtype",
+  'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
+  '6c47888cc8867737f167632508b2f58b' :"Displaying mtrack_repos{0} - {1} of {2}"
+ },
 
-    }
+  part     :  ["MTrack", "Repos" ],
+  order    : '001-Pman.Tab.MTrackRepos',
+  region   : 'center',
+  parent   : 'Pman.Tab.MTrack',
+  name     : "Pman.Tab.MTrackRepos",
+  disabled : false, 
+  permname : '', 
+  _tree : function(_data)
+  {
+   var _this = this;
+   var MODULE = this;
+   return {
+   xtype : 'GridPanel',
+   background : true,
+   fitContainer : true,
+   fitToframe : true,
+   region : 'center',
+   tableName : 'mtrack_repos',
+   title : _this._strings['de1f88f6f7789baf4d35f2919f100fc3'] /* Repositories */,
+   listeners : {
+    activate : function() {
+         _this.panel = this;
+         if (_this.grid) {
+             _this.grid.footer.onClick('first');
+         }
+     }
+   },
+   xns : Roo,
+   '|xns' : 'Roo',
+   grid : {
+    xtype : 'Grid',
+    autoExpandColumn : 'shortname',
+    loadMask : true,
+    listeners : {
+     render : function() 
+      {
+          _this.grid = this; 
+          _this.dialog = Pman.Dialog.MTrackRepos;
+          if (_this.panel.active) {
+             this.footer.onClick('first');
+          }
+      },
+     rowdblclick : function (_self, rowIndex, e)
+      {
+          if (!_this.dialog)  { return; }
+          _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
+              _this.grid.footer.onClick('first');
+          }); 
+      }
+    },
+    xns : Roo.grid,
+    '|xns' : 'Roo.grid',
+    footer : {
+     xtype : 'PagingToolbar',
+     displayInfo : true,
+     displayMsg : _this._strings['6c47888cc8867737f167632508b2f58b'] /* Displaying mtrack_repos{0} - {1} of {2} */,
+     emptyMsg : _this._strings['a4cf31f8bea7da20524198fbe5c0db2a'] /* No mtrack_repos found */,
+     pageSize : 25,
+     xns : Roo,
+     '|xns' : 'Roo'
+    },
+    toolbar : {
+     xtype : 'Toolbar',
+     xns : Roo,
+     '|xns' : 'Roo',
+     items  : [
+      {
+       xtype : 'Button',
+       cls : 'x-btn-text-icon',
+       icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
+       text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
+       listeners : {
+        click : function()
+         {
+             if (!_this.dialog) { return; }
+             _this.dialog.show( { id : 0 } , function() {
+                 _this.grid.footer.onClick('first');
+            }); 
+         }
+       },
+       xns : Roo.Toolbar,
+       '|xns' : 'Roo.Toolbar'
+      },
+      {
+       xtype : 'Button',
+       cls : 'x-btn-text-icon',
+       icon : Roo.rootURL + 'images/default/tree/leaf.gif',
+       text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
+       listeners : {
+        click : function()
+         {
+             var s = _this.grid.getSelectionModel().getSelections();
+             if (!s.length || (s.length > 1))  {
+                 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
+                 return;
+             }
+             if (!_this.dialog) { return; }
+             _this.dialog.show(s[0].data, function() {
+                 _this.grid.footer.onClick('reload');
+             }); 
+             
+         }
+       },
+       xns : Roo.Toolbar,
+       '|xns' : 'Roo.Toolbar'
+      }
+     ]
+    },
+    dataSource : {
+     xtype : 'Store',
+     remoteSort : true,
+     sortInfo : { field : 'shortname', direction: 'ASC' },
+     xns : Roo.data,
+     '|xns' : 'Roo.data',
+     proxy : {
+      xtype : 'HttpProxy',
+      method : 'GET',
+      url : baseURL + '/Roo/mtrack_repos.php',
+      xns : Roo.data,
+      '|xns' : 'Roo.data'
+     },
+     reader : {
+      xtype : 'JsonReader',
+      fields : [
+          {
+              'name': 'id',
+              'type': 'int'
+          },
+          {
+              'name': 'shortname',
+              'type': 'string'
+          },
+          {
+              'name': 'scmtype',
+              'type': 'string'
+          },
+          {
+              'name': 'repopath',
+              'type': 'string'
+          },
+          {
+              'name': 'browserurl',
+              'type': 'string'
+          },
+          {
+              'name': 'browsertype',
+              'type': 'string'
+          },
+          {
+              'name': 'description',
+              'type': 'string'
+          },
+          {
+              'name': 'serverurl',
+              'type': 'string'
+          },
+          {
+              'name': 'parent',
+              'type': 'string'
+          },
+          {
+              'name': 'clonedfrom',
+              'type': 'int'
+          },
+          {
+              'name': 'project_id',
+              'type': 'int'
+          }
+      ],
+      id : 'id',
+      root : 'data',
+      totalProperty : 'total',
+      xns : Roo.data,
+      '|xns' : 'Roo.data'
+     }
+    },
+    colModel : [
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'project_id_name',
+      header : _this._strings['9e727fdd3aec8274f46685441900280d'] /* Project */,
+      renderer : function(v) { return String.format('{0}', v); },
+      width : 150,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     },
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'shortname',
+      header : _this._strings['97ec8018c492164da252cbaf95f0fa98'] /* Shortname */,
+      renderer : function(v) { return String.format('{0}', v); },
+      width : 200,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     },
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'scmtype',
+      header : _this._strings['f1c61eb7938469f5aa08964c8b2be862'] /* Scmtype */,
+      renderer : function(v) { return String.format('{0}', v); },
+      width : 70,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     },
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'repopath',
+      header : _this._strings['73cdcee8881d309dd256134f98347769'] /* Repopath */,
+      renderer : function(v) { return String.format('{0}', v); },
+      width : 100,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     },
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'description',
+      header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
+      renderer : function(v) { return String.format('{0}', v); },
+      width : 200,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     },
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'parent',
+      header : _this._strings['30269022e9d8f51beaabb52e5d0de2b7'] /* Parent */,
+      renderer : function(v) { return String.format('{0}', v); },
+      width : 100,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     }
+    ]
+   }
+  };  }
 });
index 7de959b..7fc3cae 100644 (file)
@@ -79,9 +79,9 @@
    "listeners" : {
     "activate" : "function (_self)\n{\n    _this.panel = _self;\n    (function () {\n        if (_this.tpanel) {\n            _this.panel.layout.getRegion('south').hide();\n            //_this.panel.layout.getRegion('north').hide();\n        }\n    }).defer(100);\n    try {\n        if (!_this.url || !_this.project || (_this.project != MTrack.projectCombo.getValue())) {\n            (function() { \n                if (_this.tpanel) { \n                 //   _this.tpanel.mload(\"/Report/1\"); \n                }\n            }).defer(300);\n        }\n        \n        \n    } catch(e) {Roo.log(\"activate fail\" + e.toString()); }\n}"
    },
-   "background" : true,
    "region" : "center",
    "fitToFrame" : true,
+   "background" : true,
    "title" : "Tickets",
    "xtype" : "NestedLayoutPanel",
    "fitContainer" : true,
        "listeners" : {
         "|activate" : "function() {\n    _this.gpanel = this;\n    if (_this.grid) {\n        _this.grid.ds.load({});\n    }\n}"
        },
-       "background" : true,
        "region" : "north",
        "fitToframe" : true,
+       "background" : true,
        "title" : "mtrack_ticket",
        "xtype" : "GridPanel",
        "fitContainer" : true,
           {
            "listeners" : {
             "update" : "function (_self, record, operation)\n{\n    Roo.log('update: ' + JSON.stringify(operation));\n    if (operation != 'commit') {\n        return;\n    }\n    // send things that might change..\n    new Pman.Request({\n        url : baseURL + '/Roo/mtrack_ticket',\n        method : 'POST',\n        params : {\n            id : record.data.id,\n            milestone_id : record.data.milestone_id,\n            priority_id : record.data.priority_id,\n            severity_id : record.data.severity_id,\n            classification_id : record.data.classification_id,\n            estimated : record.data.estimated,\n            developer_id : record.data.developer_id\n        },\n        success : function(res)\n        {\n            var r = res.data;\n            //Roo.log(r);\n            // do nothing?\n            record.modified = record.modified || {};\n            for (var k in r) {\n                // update the \n                 \n                if (k.match(/_id$/) || k.match(/_id_/) || k.match(/^status_/)) {\n     \n                    record.data[k] = r[k];\n                    record.modified[k] = r[k];\n                }\n            }\n            record.store.afterEdit(record);\n        }\n        // we should really have a failure - to reset to the old value.\n    });\n     \n    \n    \n}",
-            "beforeload" : "function (_self, options)\n{\n    \n   if (Pman.building) { return false; }\n    options.params =     options.params || {};\n    options.params['query[search]'] = _this.searchBox.getValue();\n    var sq =        options.params['query[viewtype]'] = _this.status.getValue(); \n    var pc = false;\n    var ps = false;\n    try {\n         pc = _this.grid.colModel.getIndexByDataIndex('project_id_name');\n        \n    } catch(e) {} \n    \n\n    if (!options.params['query[search]'].length || isNaN(options.params['query[search]'])) {\n            \n        \n        ps = _this.personSel.getValue();\n        ps = ps ? ps : 0;\n        if (ps ) {\n            options.params.developer_id = ps <0 ? 0 : ps;\n        }\n\n         \n        \n        \n        try { \n            options.params.project_id  = Pman.Tab.DocumentsTab.panel.getProjectId();\n        } catch(e) {\n            options.params.project_id  = MTrack.projectCombo.getValue();\n        }\n        options.params.project_id =      options.params.project_id || undefined;\n     }\n     \n\n         \n           \n    if (  ps < 1 && pc !== false) {\n        _this.grid.colModel.setHidden(pc, true);\n        \n    }\n    \n    // project column\n    if (pc!== false) {\n         _this.grid.colModel.setHidden(pc, true);\n     }\n     \n    if (pc !== false && !options.params.project_id) {\n\n         _this.grid.colModel.setHidden(pc, false);       \n\n    }\n\n    options.params.limit = 999;\n    // columns...\n\n    \n    \n}"
+            "beforeload" : "function (_self, options)\n{\n    \n   if (Pman.building) { return false; }\n    options.params =     options.params || {};\n    options.params['query[search]'] = _this.searchBox.getValue();\n    var sq =        options.params['query[viewtype]'] = _this.status.getValue(); \n    var pc = false;\n    var ps = false;\n    try {\n         pc = _this.grid.colModel.getIndexByDataIndex('project_id_name');\n        \n    } catch(e) {} \n    \n\n    if (!options.params['query[search]'].length || isNaN(options.params['query[search]'])) {\n            \n        \n        ps = _this.personSel.getValue();\n        ps = ps ? ps : 0;\n        if (ps ) {\n            options.params.developer_id = ps <0 ? 0 : ps;\n        }\n\n         \n        \n        \n        try { \n            options.params.project_id  = Pman.Tab.DocumentsTab.panel.getProjectId();\n        } catch(e) {\n            options.params.project_id  = typeof(MTrack) != 'undefined' ? MTrack.projectCombo.getValue(): 0;\n        }\n        options.params.project_id =      options.params.project_id || undefined;\n     }\n     \n\n         \n           \n    if (  ps < 1 && pc !== false) {\n        _this.grid.colModel.setHidden(pc, true);\n        \n    }\n    \n    // project column\n    if (pc!== false) {\n         _this.grid.colModel.setHidden(pc, true);\n     }\n     \n    if (pc !== false && !options.params.project_id) {\n\n         _this.grid.colModel.setHidden(pc, false);       \n\n    }\n\n    options.params.limit = 999;\n    // columns...\n\n    \n    \n}"
            },
            "xtype" : "Store",
            "remoteSort" : true,
            "xtype" : "ColumnModel",
            "header" : "Summary",
            "width" : 200,
-           "$ renderer" : "function(v,x,r) { \n    \n    var col = '#000'; // closed?\n    switch (r.data.status_name) {\n        case 'resolved':\n            col = '#0cc'; break; // blue\n        case 'open':\n        case 'reopened':        \n        case 'new':                \n            col = '#c00'; break; // redish\n        case 'closed':                \n            col = '#999'; break; // grey\n   }\n    \n    return String.format(\n        r.data.status_name == 'closed'  ?\n              '{2}</span><s style=\"color:{3}\">[{1}]</s> {0}':\n              '{2}<span style=\"color:{3}\">[{1}]</span> {0}',\n            v,\n            r.data.status_name == 'closed'  ?\n                r.data.resolution_id_name : \n                 r.data.status_name ,\n            r.json.jira_ref ?  (r.json.jira_ref+ ' ')  : '',\n            col\n            ); \n}\n",
+           "$ renderer" : "function(v,x,r) { \n    \n    var col = '#000'; // closed?\n    switch (r.data.status_name) {\n        case 'REVIEW_BY_ADMIN':\n            col = '#0cc'; break; // blue\n        case 'TODO':\n        case 'CLIENT_NEW_REQUEST':        \n        case 'CLIENT_SAY_NEED_MORE_WORK':                \n            col = '#c00'; break; // redish\n        case 'CLOSED':                \n            col = '#999'; break; // grey\n   }\n   \n   var sn = r.data.status_name.toLowerCase().split('_').join(' ');\n   \n    return String.format(\n        r.data.status_name == 'CLOSED'  ?\n              '</span><s style=\"color:{2}\">[{1}]</s> {0}':\n              '<span style=\"color:{2}\">[{1}]</span> {0}',\n            v,\n            r.data.status_name == 'CLOSED'  ?\n                 r.data.resolution_id_name : \n                 sn , col\n            ); \n}\n",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
            "dataIndex" : "summary"
           {
            "listeners" : {
             "over" : "function (source, e, data)\n{\n\n    Roo.log('over');\n// if drag point == drop point...\n    var grid = _this.grid;\n       var t = Roo.lib.Event.getTarget(e); \n       var ri = grid.view.findRowIndex(t);\n       var dp = this.getDropPoint(e,data);\n       Roo.log(dp);\n       //Roo.log(JSON.stringify({ dp: dp,  ri: ri, src_ri: data.rowIndex}));\n       if(ri == data.rowIndex ||\n            (dp == 'above' && ri-1 == data.rowIndex) ||\n            (dp == 'below' && ri+1 == data.rowIndex) \n         ) {\n           this.expandRow(false);\n      \n            this.valid = false;\n            return;\n       }\n       this.expandRow(ri, dp);\n       \n     \n      this.valid = 'ok-add'; \n}",
-            "drop" : "function (source, e, data)\n{\n        var grid = _this.grid;\n        var t = Roo.lib.Event.getTarget(e); \n        var t = Roo.lib.Event.getTarget(e); \n        var ri = grid.view.findRowIndex(t);\n       //Roo.log(e);\n       //Roo.log(data);\n        var dp = this.getDropPoint(e,data);\n      // at this point should have above or below..\n        var os = grid.selModel.getSelectedCell()\n        grid.ds.remove(data.selections[0]);\n        var new_row = ri + (dp == 'below' ? 1 : 0);\n        grid.ds.insert(new_row , data.selections);\n        grid.selModel.select(new_row , os[1])\n        this.expandRow(false);\n        \n        \n        var above_id = 0;\n        var above_row = new_row-1;\n        if (above_row > -1) {\n            above_id = grid.ds.getAt(above_row).data.id;\n        }\n        new Pman.Request({\n            method : 'POST',\n            url : baseURL + '/Roo/Mtrack_ticket',\n            params : { \n                id : grid.ds.getAt(new_row).data.id,\n                _reorder : above_id\n            }\n            \n        });\n        \n        \n        \n}"
+            "drop" : "function (source, e, data)\n{\n        var grid = _this.grid;\n        var t = Roo.lib.Event.getTarget(e); \n        var t = Roo.lib.Event.getTarget(e); \n        var ri = grid.view.findRowIndex(t);\n       //Roo.log(e);\n       //Roo.log(data);\n        var dp = this.getDropPoint(e,data);\n      // at this point should have above or below..\n        var os = grid.selModel.getSelectedCell();\n        grid.ds.remove(data.selections[0]);\n        var new_row = ri + (dp == 'below' ? 1 : 0);\n        grid.ds.insert(new_row , data.selections);\n        grid.selModel.select(new_row , os[1]);\n        this.expandRow(false);\n        \n        \n        var above_id = 0;\n        var above_row = new_row-1;\n        if (above_row > -1) {\n            above_id = grid.ds.getAt(above_row).data.id;\n        }\n        new Pman.Request({\n            method : 'POST',\n            url : baseURL + '/Roo/Mtrack_ticket',\n            params : { \n                id : grid.ds.getAt(new_row).data.id,\n                _reorder : above_id\n            }\n            \n        });\n        \n        \n        \n}"
            },
            "xtype" : "DropTarget",
            "ddGroup" : "mtrack_ticket",
         },
         {
          "listeners" : {
-          "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n       //_this.dialog.el.mask(\"Loading\");\n       //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n       return;\n    }\n    if (action.type == 'load') {\n \n        return;\n    }\n    if (action.type =='submit') {\n    \n         // refresh body..\n        \n         \n         var sm = _this.grid.getSelectionModel();\n\n        sm.fireEvent('afterselectionchange', sm)\n\n          \n         // hide stuff.\n\n         _this.panel.layout.getRegion('south').hide();\n         _this.panel.layout.getRegion('north').show();\n         _this.panel.layout.getRegion('north').expand();\n         \n         _this.form.reset();\n         return;\n    }\n}\n",
+          "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n       //_this.dialog.el.mask(\"Loading\");\n       //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n       return;\n    }\n    if (action.type == 'load') {\n \n        return;\n    }\n    if (action.type =='submit') {\n    \n         // refresh body..\n        \n         \n         var sm = _this.grid.getSelectionModel();\n\n        sm.fireEvent('afterselectionchange', sm);\n\n          \n         // hide stuff.\n\n         _this.panel.layout.getRegion('south').hide();\n         _this.panel.layout.getRegion('north').show();\n         _this.panel.layout.getRegion('north').expand();\n         \n         _this.form.reset();\n         return;\n    }\n}\n",
           "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
          },
          "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
              "items" : [
               {
                "alwaysQuery" : true,
-               "listWidth" : 200,
+               "listWidth" : 300,
                "triggerAction" : "all",
                "fieldLabel" : "Status",
                "forceSelection" : true,
                "name" : "status_name",
                "qtip" : "Change Status",
                "queryParam" : "query[name]",
-               "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
+               "tpl" : "<div class=\"x-combo-list-item \">{display_name_mixed} </div>",
                "loadingText" : "Searching...",
                "items" : [
                 {
                    "id" : "id",
                    "root" : "data",
                    "xtype" : "JsonReader",
-                   "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
+                   "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"display_name_mixed\",\"type\":\"string\"}, 'name']",
                    "$ xns" : "Roo.data",
                    "* prop" : "reader",
                    "totalProperty" : "total"
index 7502ee9..f2c647b 100644 (file)
@@ -650,7 +650,7 @@ Pman.Tab.MTrackTicket = new Roo.XComponent({
                   try { 
                       options.params.project_id  = Pman.Tab.DocumentsTab.panel.getProjectId();
                   } catch(e) {
-                      options.params.project_id  = MTrack.projectCombo.getValue();
+                      options.params.project_id  = typeof(MTrack) != 'undefined' ? MTrack.projectCombo.getValue(): 0;
                   }
                   options.params.project_id =      options.params.project_id || undefined;
                }
@@ -1286,11 +1286,11 @@ Pman.Tab.MTrackTicket = new Roo.XComponent({
                  //Roo.log(data);
                   var dp = this.getDropPoint(e,data);
                 // at this point should have above or below..
-                  var os = grid.selModel.getSelectedCell()
+                  var os = grid.selModel.getSelectedCell();
                   grid.ds.remove(data.selections[0]);
                   var new_row = ri + (dp == 'below' ? 1 : 0);
                   grid.ds.insert(new_row , data.selections);
-                  grid.selModel.select(new_row , os[1])
+                  grid.selModel.select(new_row , os[1]);
                   this.expandRow(false);
                   
                   
@@ -1614,26 +1614,26 @@ Pman.Tab.MTrackTicket = new Roo.XComponent({
              
              var col = '#000'; // closed?
              switch (r.data.status_name) {
-                 case 'resolved':
+                 case 'REVIEW_BY_ADMIN':
                      col = '#0cc'; break; // blue
-                 case 'open':
-                 case 'reopened':        
-                 case 'new':                
+                 case 'TODO':
+                 case 'CLIENT_NEW_REQUEST':        
+                 case 'CLIENT_SAY_NEED_MORE_WORK':                
                      col = '#c00'; break; // redish
-                 case 'closed':                
+                 case 'CLOSED':                
                      col = '#999'; break; // grey
             }
-             
+            
+            var sn = r.data.status_name.toLowerCase().split('_').join(' ');
+            
              return String.format(
-                 r.data.status_name == 'closed'  ?
-                       '{2}</span><s style="color:{3}">[{1}]</s> {0}':
-                       '{2}<span style="color:{3}">[{1}]</span> {0}',
+                 r.data.status_name == 'CLOSED'  ?
+                       '</span><s style="color:{2}">[{1}]</s> {0}':
+                       '<span style="color:{2}">[{1}]</span> {0}',
                      v,
-                     r.data.status_name == 'closed'  ?
-                         r.data.resolution_id_name : 
-                          r.data.status_name ,
-                     r.json.jira_ref ?  (r.json.jira_ref+ ' ')  : '',
-                     col
+                     r.data.status_name == 'CLOSED'  ?
+                          r.data.resolution_id_name : 
+                          sn , col
                      ); 
          },
          width : 200,
@@ -2322,7 +2322,7 @@ Pman.Tab.MTrackTicket = new Roo.XComponent({
                    
                    var sm = _this.grid.getSelectionModel();
           
-                  sm.fireEvent('afterselectionchange', sm)
+                  sm.fireEvent('afterselectionchange', sm);
           
                     
                    // hide stuff.
@@ -2385,14 +2385,14 @@ Pman.Tab.MTrackTicket = new Roo.XComponent({
               fieldLabel : _this._strings['ec53a8c4f07baed5d8825072c89799be'] /* Status */,
               forceSelection : true,
               hiddenName : 'status',
-              listWidth : 200,
+              listWidth : 300,
               loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
               minChars : 2,
               name : 'status_name',
               qtip : _this._strings['7e5ddb4ca31c30e778f4d9c57b9577b1'] /* Change Status */,
               queryParam : 'query[name]',
               selectOnFocus : true,
-              tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
+              tpl : '<div class=\"x-combo-list-item \">{display_name_mixed} </div>',
               triggerAction : 'all',
               typeAhead : true,
               valueField : 'id',
@@ -2443,7 +2443,7 @@ Pman.Tab.MTrackTicket = new Roo.XComponent({
                },
                reader : {
                 xtype : 'JsonReader',
-                fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
+                fields : [{"name":"id","type":"int"},{"name":"display_name_mixed","type":"string"}, 'name'],
                 id : 'id',
                 root : 'data',
                 totalProperty : 'total',
index e131bc8..74c8ff6 100644 (file)
@@ -12,4 +12,7 @@ CREATE TABLE mtrack_change (
 
 ALTER TABLE mtrack_change ADD COLUMN rev varchar(64) NOT NULL DEFAULT '';
 ALTER TABLE mtrack_change ADD COLUMN branch varchar(128) NOT NULL DEFAULT '';
+alter table mtrack_change ADD COLUMN cgtype ENUM ( '', 'COMMIT', 'COMMENT', 'CHANGE' ) DEFAULT '';
+    
 ALTER TABLE mtrack_change CHANGE COLUMN branch branch varchar(128) NOT NULL DEFAULT '';
+alter table mtrack_change add index lookupcd(onid, ontable);