php warnings
[Pman.MTrack] / Pman.Tab.MTrackMerger.bjs
1 {
2  "name" : "Pman.Tab.MTrackMerger",
3  "parent" : "Pman.Tab.MTrack",
4  "title" : "Pman.Tab.MTrackMerger",
5  "path" : "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackMerger.bjs",
6  "permname" : "",
7  "modOrder" : "400",
8  "strings" : {
9   "cd23e6cc0233eef073cbed0cfebcd6a1" : "Create Commit Using Patch",
10   "f29ddbfb905eb2593fdcdfb243f9af85" : "Added",
11   "66717bf2b8235cc94a52d5b815d57a54" : "Review Changes",
12   "06f5aa315f44a2147bab17980d1f6570" : "Merge Commits",
13   "c671c787b49f50a3ace9fdc5bd597825" : "core_enum",
14   "93f07b720ebf7d1246512569761a5804" : "Removed",
15   "4d1c8263ba1036754f8db14a98f9f006" : "Reload",
16   "21bcad367951f7c2e761f744423161b6" : "Create Commit Using Merge",
17   "e63695c4dea40eefb2ef481c7b242192" : "All Changes",
18   "0b27918290ff5323bea1e3b78a9cf04e" : "File"
19  },
20  "items" : [
21   {
22    "listeners" : {
23     "activate" : "function (_self)\n{\n   try {\n        var t = _this.tree.tree;\n        t.loader.load(t.root);\n    } catch(e) {}\n}"
24    },
25    "background" : true,
26    "region" : "center",
27    "title" : "Merge Commits",
28    "xtype" : "NestedLayoutPanel",
29    "$ xns" : "Roo",
30    "items" : [
31     {
32      "xtype" : "BorderLayout",
33      "$ xns" : "Roo",
34      "* prop" : "layout",
35      "items" : [
36       {
37        "xtype" : "LayoutRegion",
38        "width" : 200,
39        "$ xns" : "Roo",
40        "split" : true,
41        "* prop" : "west"
42       },
43       {
44        "xtype" : "LayoutRegion",
45        "$ xns" : "Roo",
46        "* prop" : "center"
47       },
48       {
49        "xtype" : "LayoutRegion",
50        "$ xns" : "Roo",
51        "split" : true,
52        "* prop" : "south",
53        "height" : 200,
54        "titlebar" : true
55       },
56       {
57        "listeners" : {
58         "render" : "function (_self)\n{\n  _this.tree = _self;\n}"
59        },
60        "autoScroll" : true,
61        "region" : "west",
62        "fitToFrame" : true,
63        "xtype" : "TreePanel",
64        "$ xns" : "Roo",
65        "items" : [
66         {
67          "xtype" : "Toolbar",
68          "$ xns" : "Roo",
69          "* prop" : "toolbar",
70          "items" : [
71           {
72            "listeners" : {
73             "click" : "function (_self, e)\n{\n  var t = _this.tree.tree;\n  t.loader.load(t.root);\n}"
74            },
75            "text" : "Reload",
76            "xtype" : "Button",
77            "$ xns" : "Roo.Toolbar"
78           }
79          ]
80         },
81         {
82          "listeners" : {
83           "click" : "function (node, e)\n{\n\n   _this.grid.ds.load.defer(100, _this.grid.ds, [ {} ]);\n}"
84          },
85          "xtype" : "TreePanel",
86          "$ xns" : "Roo.tree",
87          "* prop" : "tree",
88          "items" : [
89           {
90            "listeners" : {
91             "loadexception" : "function (This, node, response)\n{\n _this.tree.el.unmask();\n}",
92             "beforeload" : "function (This, node, callback)\n{\n   _this.tree.el.mask(\"Loading\");\n}",
93             "load" : "function (This, node, response)\n{\n     _this.tree.el.unmask();\n     _this.tree.tree.root.expand(false,true);\n}"
94            },
95            "$ baseParams" : "{ _tree : 1 }",
96            "root" : "data",
97            "xtype" : "TreeLoader",
98            "requestMethod" : "GET",
99            "$ xns" : "Roo.tree",
100            "* prop" : "loader",
101            "$ dataUrl" : "baseURL + '/MTrack/Merger'"
102           },
103           {
104            "text" : "All Changes",
105            "xtype" : "TreeNode",
106            "$ xns" : "Roo.tree",
107            "* prop" : "root"
108           }
109          ]
110         }
111        ]
112       },
113       {
114        "listeners" : {
115         "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        //_this.grid.footer.onClick('first');\n    }\n}"
116        },
117        "background" : true,
118        "region" : "center",
119        "fitToframe" : true,
120        "title" : "core_enum",
121        "xtype" : "GridPanel",
122        "fitContainer" : true,
123        "$ xns" : "Roo",
124        "tableName" : "core_enum",
125        "items" : [
126         {
127          "listeners" : {
128           "|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",
129           "|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}"
130          },
131          "autoExpandColumn" : "etype",
132          "xtype" : "Grid",
133          "loadMask" : true,
134          "$ xns" : "Roo.grid",
135          "* prop" : "grid",
136          "items" : [
137           {
138            "listeners" : {
139             "beforeload" : "function (_self, options)\n{\n   if (!_this.tree.tree.selModel.getSelectedNode()) {\n       return false;\n   }\n   \n   options.params = {   \n      _changedFiles : _this.tree.tree.selModel.getSelectedNode().attributes.rev\n      };\n}",
140             "load" : "function (_self, records, options)\n{\n   // clear selections??\n   _this.preview.load({\n      method : 'POST',\n      url : baseURL + '/MTrack/Merger',\n      params : {\n          _preview :  _this.tree.tree.selModel.getSelectedNode().attributes.rev\n      }\n  });\n      \n\n}"
141            },
142            "xtype" : "Store",
143            "remoteSort" : false,
144            "$ sortInfo" : "{ field: 'filename', dir : 'ASC' }",
145            "$ xns" : "Roo.data",
146            "* prop" : "dataSource",
147            "items" : [
148             {
149              "$ url" : "baseURL + '/MTrack/Merger.php'",
150              "xtype" : "HttpProxy",
151              "method" : "GET",
152              "$ xns" : "Roo.data",
153              "* prop" : "proxy"
154             },
155             {
156              "id" : "id",
157              "root" : "data",
158              "xtype" : "JsonReader",
159              "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'filename',\n        'type': 'string'\n    },\n    {\n        'name': 'added',\n        'type': 'int'\n    },\n    {\n        'name': 'removed',\n        'type': 'int'\n    }\n\n]",
160              "$ xns" : "Roo.data",
161              "* prop" : "reader",
162              "totalProperty" : "total"
163             }
164            ]
165           },
166           {
167            "listeners" : {
168             "afterselectionchange" : "function (_self)\n{\n   var ar = this.getSelections();\n   if (!ar.length) {\n     // show whole change.\n     _this.preview.load({\n          method : 'POST',\n          url : baseURL + '/MTrack/Merger',\n          params : {\n              _preview :  _this.tree.tree.selModel.getSelectedNode().attributes.rev\n          }\n      });\n      return;\n   }\n   var files = [];\n   Roo.each(ar, function(s) {\n        files.push(s.data.filename);\n   \n   });\n     _this.preview.load({\n          method : 'POST',\n          url : baseURL + '/MTrack/Merger',\n          params : {\n              _preview :  _this.tree.tree.selModel.getSelectedNode().attributes.rev,\n              files:  Roo.encode(files)\n          }\n      });   \n   \n   \n}"
169            },
170            "xtype" : "RowSelectionModel",
171            "singleSelect" : false,
172            "$ xns" : "Roo.grid",
173            "* prop" : "sm"
174           },
175           {
176            "xtype" : "Toolbar",
177            "$ xns" : "Roo",
178            "* prop" : "toolbar",
179            "items" : [
180             {
181              "listeners" : {
182               "|click" : "function()\n{\n    // if we are just copying a simple commit accross with a valid message\n    // then this could contain the original commit message..\n   if (! _this.tree.tree.selModel.getSelectedNode()) {\n      Roo.MessageBox.alert(\"Error\", \"select a revision\");\n      return ;\n   }\n   var ar = _this.grid.sm.getSelections();\n   var files = [];\n   Roo.each(ar, function(s) {\n        files.push(s.data.filename);\n   \n   });\n   \n   if (!files.length) {\n      Roo.MessageBox.alert(\"Error\", \"select some files\");\n      return ;\n   }\n    \n\n    Roo.MessageBox.show({\n       title: \"Create a Commit\",\n       msg: \"Enter commit message\",\n       width:300,\n       buttons: Roo.MessageBox.OKCANCEL,\n       multiline: true,\n       fn: function(btn, msg) {\n\n         if (btn != 'ok') {\n             return;\n          }\n          new Pman.Request({\n                method : 'POST',\n                url : baseURL + '/MTrack/Merger',\n                params : { \n                    message : msg,\n                    _merge : _this.tree.tree.selModel.getSelectedNode().attributes.rev,\n                    files :  Roo.encode(files)\n                },\n                success : function () {\n                   // reload the grid..\n                   _this.grid.ds.load({});\n                }\n           });\n       },\n       animEl: this.el\n   });\n}\n"
183              },
184              "text" : "Create Commit Using Patch",
185              "xtype" : "Button",
186              "cls" : "x-btn-text-icon",
187              "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
188              "$ xns" : "Roo.Toolbar"
189             },
190             {
191              "listeners" : {
192               "|click" : "function()\n{\n    // if we are just copying a simple commit accross with a valid message\n    // then this could contain the original commit message..\n   if (! _this.tree.tree.selModel.getSelectedNode()) {\n      Roo.MessageBox.alert(\"Error\", \"select a revision\");\n      return ;\n   }\n    \n    \n\n    Roo.MessageBox.show({\n       title: \"Create a Commit\",\n       msg: \"Enter commit message\",\n       width:300,\n       buttons: Roo.MessageBox.OKCANCEL,\n       multiline: true,\n       fn: function(btn, msg) {\n\n         if (btn != 'ok') {\n             return;\n          }\n          new Pman.Request({\n                method : 'POST',\n                url : baseURL + '/MTrack/Merger',\n                params : { \n                    message : msg,\n                    _merge : _this.tree.tree.selModel.getSelectedNode().attributes.rev,\n                    files :   '_all_'   \n                },\n                success : function () {\n                   // reload the grid..\n                    var t = _this.tree.tree;\n                    t.loader.load(t.root);\n                }\n           });\n       },\n       animEl: this.el\n   });\n}\n"
193              },
194              "text" : "Create Commit Using Merge",
195              "xtype" : "Button",
196              "cls" : "x-btn-text-icon",
197              "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
198              "$ xns" : "Roo.Toolbar"
199             }
200            ]
201           },
202           {
203            "xtype" : "ColumnModel",
204            "header" : "File",
205            "width" : 200,
206            "$ renderer" : "function(v) { return String.format('{0}', v); }",
207            "$ xns" : "Roo.grid",
208            "* prop" : "colModel[]",
209            "dataIndex" : "filename"
210           },
211           {
212            "xtype" : "ColumnModel",
213            "header" : "Added",
214            "width" : 50,
215            "$ renderer" : "function(v) { return String.format('{0}', v); }",
216            "$ xns" : "Roo.grid",
217            "* prop" : "colModel[]",
218            "dataIndex" : "added"
219           },
220           {
221            "xtype" : "ColumnModel",
222            "header" : "Removed",
223            "width" : 50,
224            "$ renderer" : "function(v) { return String.format('{0}', v); }",
225            "$ xns" : "Roo.grid",
226            "* prop" : "colModel[]",
227            "dataIndex" : "removed"
228           }
229          ]
230         }
231        ]
232       },
233       {
234        "listeners" : {
235         "render" : "function (_self)\n{\n  _this.preview = _self;\n}"
236        },
237        "autoScroll" : true,
238        "region" : "south",
239        "fitToFrame" : true,
240        "title" : "Review Changes",
241        "xtype" : "ContentPanel",
242        "$ xns" : "Roo"
243       }
244      ]
245     }
246    ]
247   }
248  ]
249 }