{
- "id": "roo-file-12",
- "name": "Pman.Tab.MTrackMerger",
- "parent": "Pman.Tab.MTrack",
- "title": "Pman.Tab.MTrackMerger",
- "path": "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackMerger.bjs",
- "items": [
+ "name" : "Pman.Tab.MTrackMerger",
+ "parent" : "Pman.Tab.MTrack",
+ "title" : "Pman.Tab.MTrackMerger",
+ "path" : "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackMerger.bjs",
+ "permname" : "",
+ "modOrder" : "400",
+ "strings" : {
+ "cd23e6cc0233eef073cbed0cfebcd6a1" : "Create Commit Using Patch",
+ "f29ddbfb905eb2593fdcdfb243f9af85" : "Added",
+ "66717bf2b8235cc94a52d5b815d57a54" : "Review Changes",
+ "06f5aa315f44a2147bab17980d1f6570" : "Merge Commits",
+ "c671c787b49f50a3ace9fdc5bd597825" : "core_enum",
+ "93f07b720ebf7d1246512569761a5804" : "Removed",
+ "4d1c8263ba1036754f8db14a98f9f006" : "Reload",
+ "21bcad367951f7c2e761f744423161b6" : "Create Commit Using Merge",
+ "e63695c4dea40eefb2ef481c7b242192" : "All Changes",
+ "0b27918290ff5323bea1e3b78a9cf04e" : "File"
+ },
+ "items" : [
+ {
+ "listeners" : {
+ "activate" : "function (_self)\n{\n try {\n var t = _this.tree.tree;\n t.loader.load(t.root);\n } catch(e) {}\n}"
+ },
+ "background" : true,
+ "region" : "center",
+ "title" : "Merge Commits",
+ "xtype" : "NestedLayoutPanel",
+ "$ xns" : "Roo",
+ "items" : [
+ {
+ "xtype" : "BorderLayout",
+ "$ xns" : "Roo",
+ "* prop" : "layout",
+ "items" : [
+ {
+ "xtype" : "LayoutRegion",
+ "width" : 200,
+ "$ xns" : "Roo",
+ "split" : true,
+ "* prop" : "west"
+ },
+ {
+ "xtype" : "LayoutRegion",
+ "$ xns" : "Roo",
+ "* prop" : "center"
+ },
+ {
+ "xtype" : "LayoutRegion",
+ "$ xns" : "Roo",
+ "split" : true,
+ "* prop" : "south",
+ "height" : 200,
+ "titlebar" : true
+ },
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.tree = _self;\n}"
+ },
+ "autoScroll" : true,
+ "region" : "west",
+ "fitToFrame" : true,
+ "xtype" : "TreePanel",
+ "$ xns" : "Roo",
+ "items" : [
{
- "listeners": {
- "activate": "function (_self)\n{\n try {\n var t = _this.tree.tree;\n t.loader.load(t.root);\n } catch(e) {}\n}"
+ "xtype" : "Toolbar",
+ "$ xns" : "Roo",
+ "* prop" : "toolbar",
+ "items" : [
+ {
+ "listeners" : {
+ "click" : "function (_self, e)\n{\n var t = _this.tree.tree;\n t.loader.load(t.root);\n}"
+ },
+ "text" : "Reload",
+ "xtype" : "Button",
+ "$ xns" : "Roo.Toolbar"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "click" : "function (node, e)\n{\n\n _this.grid.ds.load.defer(100, _this.grid.ds, [ {} ]);\n}"
+ },
+ "xtype" : "TreePanel",
+ "$ xns" : "Roo.tree",
+ "* prop" : "tree",
+ "items" : [
+ {
+ "listeners" : {
+ "loadexception" : "function (This, node, response)\n{\n _this.tree.el.unmask();\n}",
+ "beforeload" : "function (This, node, callback)\n{\n _this.tree.el.mask(\"Loading\");\n}",
+ "load" : "function (This, node, response)\n{\n _this.tree.el.unmask();\n _this.tree.tree.root.expand(false,true);\n}"
+ },
+ "$ baseParams" : "{ _tree : 1 }",
+ "root" : "data",
+ "xtype" : "TreeLoader",
+ "requestMethod" : "GET",
+ "$ xns" : "Roo.tree",
+ "* prop" : "loader",
+ "$ dataUrl" : "baseURL + '/MTrack/Merger'"
+ },
+ {
+ "text" : "All Changes",
+ "xtype" : "TreeNode",
+ "$ xns" : "Roo.tree",
+ "* prop" : "root"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "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" : "core_enum",
+ "xtype" : "GridPanel",
+ "fitContainer" : true,
+ "$ xns" : "Roo",
+ "tableName" : "core_enum",
+ "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.FILL_IN\n if (_this.panel.active) {\n //this.footer.onClick('first');\n }\n}"
+ },
+ "autoExpandColumn" : "etype",
+ "xtype" : "Grid",
+ "loadMask" : true,
+ "$ xns" : "Roo.grid",
+ "* prop" : "grid",
+ "items" : [
+ {
+ "listeners" : {
+ "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}",
+ "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}"
+ },
+ "xtype" : "Store",
+ "remoteSort" : false,
+ "$ sortInfo" : "{ field: 'filename', dir : 'ASC' }",
+ "$ xns" : "Roo.data",
+ "* prop" : "dataSource",
+ "items" : [
+ {
+ "$ url" : "baseURL + '/MTrack/Merger.php'",
+ "xtype" : "HttpProxy",
+ "method" : "GET",
+ "$ xns" : "Roo.data",
+ "* prop" : "proxy"
+ },
+ {
+ "id" : "id",
+ "root" : "data",
+ "xtype" : "JsonReader",
+ "$ 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]",
+ "$ xns" : "Roo.data",
+ "* prop" : "reader",
+ "totalProperty" : "total"
+ }
+ ]
+ },
+ {
+ "listeners" : {
+ "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}"
+ },
+ "xtype" : "RowSelectionModel",
+ "singleSelect" : false,
+ "$ xns" : "Roo.grid",
+ "* prop" : "sm"
+ },
+ {
+ "xtype" : "Toolbar",
+ "$ xns" : "Roo",
+ "* prop" : "toolbar",
+ "items" : [
+ {
+ "listeners" : {
+ "|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"
+ },
+ "text" : "Create Commit Using Patch",
+ "xtype" : "Button",
+ "cls" : "x-btn-text-icon",
+ "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+ "$ xns" : "Roo.Toolbar"
},
- "background": true,
- "region": "center",
- "title": "Merge Commits",
- "xtype": "NestedLayoutPanel",
- "|xns": "Roo",
- "items": [
- {
- "|xns": "Roo",
- "xtype": "BorderLayout",
- "*prop": "layout",
- "items": [
- {
- "*prop": "west",
- "split": true,
- "width": 200,
- "xtype": "LayoutRegion",
- "|xns": "Roo"
- },
- {
- "*prop": "center",
- "xtype": "LayoutRegion",
- "|xns": "Roo"
- },
- {
- "*prop": "south",
- "height": 200,
- "split": true,
- "titlebar": true,
- "xtype": "LayoutRegion",
- "|xns": "Roo"
- },
- {
- "listeners": {
- "render": "function (_self)\n{\n _this.tree = _self;\n}"
- },
- "autoScroll": true,
- "fitToFrame": true,
- "region": "west",
- "xtype": "TreePanel",
- "|xns": "Roo",
- "items": [
- {
- "|xns": "Roo",
- "xtype": "Toolbar",
- "*prop": "toolbar",
- "items": [
- {
- "listeners": {
- "click": "function (_self, e)\n{\n var t = _this.tree.tree;\n t.loader.load(t.root);\n}"
- },
- "text": "Reload",
- "xtype": "Button",
- "|xns": "Roo.Toolbar"
- }
- ]
- },
- {
- "listeners": {
- "click": "function (node, e)\n{\n\n _this.grid.ds.load.defer(100, _this.grid.ds, [ {} ]);\n}"
- },
- "*prop": "tree",
- "xtype": "TreePanel",
- "|xns": "Roo.tree",
- "items": [
- {
- "listeners": {
- "beforeload": "function (This, node, callback)\n{\n _this.tree.el.mask(\"Loading\");\n}",
- "load": "function (This, node, response)\n{\n _this.tree.el.unmask();\n _this.tree.tree.root.expand(false,true);\n}",
- "loadexception": "function (This, node, response)\n{\n _this.tree.el.unmask();\n}"
- },
- "*prop": "loader",
- "requestMethod": "GET",
- "root": "data",
- "xtype": "TreeLoader",
- "|baseParams": "{ _tree : 1 }",
- "|dataUrl": "baseURL + '/MTrack/Merger'",
- "|xns": "Roo.tree"
- },
- {
- "*prop": "root",
- "text": "All Changes",
- "xtype": "TreeNode",
- "|xns": "Roo.tree"
- }
- ]
- }
- ]
- },
- {
- "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": "core_enum",
- "title": "core_enum",
- "xtype": "GridPanel",
- "|xns": "Roo",
- "items": [
- {
- "listeners": {
- "|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}",
- "|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": "etype",
- "loadMask": true,
- "xtype": "Grid",
- "|xns": "Roo.grid",
- "items": [
- {
- "listeners": {
- "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}",
- "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}"
- },
- "*prop": "dataSource",
- "remoteSort": false,
- "xtype": "Store",
- "|sortInfo": "{ field: 'filename', dir : 'ASC' }",
- "|xns": "Roo.data",
- "items": [
- {
- "*prop": "proxy",
- "method": "GET",
- "xtype": "HttpProxy",
- "|url": "baseURL + '/MTrack/Merger.php'",
- "|xns": "Roo.data"
- },
- {
- "*prop": "reader",
- "id": "id",
- "root": "data",
- "totalProperty": "total",
- "xtype": "JsonReader",
- "|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]",
- "|xns": "Roo.data"
- }
- ]
- },
- {
- "listeners": {
- "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}"
- },
- "*prop": "sm",
- "singleSelect": false,
- "xtype": "RowSelectionModel",
- "|xns": "Roo.grid"
- },
- {
- "*prop": "toolbar",
- "xtype": "Toolbar",
- "|xns": "Roo",
- "items": [
- {
- "listeners": {
- "|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"
- },
- "cls": "x-btn-text-icon",
- "text": "Create Commit Using Patch",
- "xtype": "Button",
- "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
- "|xns": "Roo.Toolbar"
- },
- {
- "listeners": {
- "|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"
- },
- "cls": "x-btn-text-icon",
- "text": "Create Commit Using Merge",
- "xtype": "Button",
- "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
- "|xns": "Roo.Toolbar"
- }
- ]
- },
- {
- "*prop": "colModel[]",
- "dataIndex": "filename",
- "header": "File",
- "width": 200,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { return String.format('{0}', v); }",
- "|xns": "Roo.grid"
- },
- {
- "*prop": "colModel[]",
- "dataIndex": "added",
- "header": "Added",
- "width": 50,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { return String.format('{0}', v); }",
- "|xns": "Roo.grid"
- },
- {
- "*prop": "colModel[]",
- "dataIndex": "removed",
- "header": "Removed",
- "width": 50,
- "xtype": "ColumnModel",
- "|renderer": "function(v) { return String.format('{0}', v); }",
- "|xns": "Roo.grid"
- }
- ]
- }
- ]
- },
- {
- "listeners": {
- "render": "function (_self)\n{\n _this.preview = _self;\n}"
- },
- "autoScroll": true,
- "fitToFrame": true,
- "region": "south",
- "title": "Review Changes",
- "xtype": "ContentPanel",
- "|xns": "Roo"
- }
- ]
- }
- ]
+ {
+ "listeners" : {
+ "|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"
+ },
+ "text" : "Create Commit Using Merge",
+ "xtype" : "Button",
+ "cls" : "x-btn-text-icon",
+ "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+ "$ xns" : "Roo.Toolbar"
+ }
+ ]
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "File",
+ "width" : 200,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "filename"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Added",
+ "width" : 50,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "added"
+ },
+ {
+ "xtype" : "ColumnModel",
+ "header" : "Removed",
+ "width" : 50,
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "removed"
+ }
+ ]
}
- ],
- "permname": "",
- "modOrder": "400"
+ ]
+ },
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.preview = _self;\n}"
+ },
+ "autoScroll" : true,
+ "region" : "south",
+ "fitToFrame" : true,
+ "title" : "Review Changes",
+ "xtype" : "ContentPanel",
+ "$ xns" : "Roo"
+ }
+ ]
+ }
+ ]
+ }
+ ]
}
\ No newline at end of file
// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+Roo.namespace('Pman.Tab');
+Pman.Tab.MTrackMerger = new Roo.XComponent({
-// register the module first
-Pman.on('beforeload', function()
-{
- Pman.register({
- modKey : '400-Pman.Tab.MTrackMerger',
- module : Pman.Tab.MTrackMerger,
- region : 'center',
- parent : Pman.Tab.MTrack,
- name : "Pman.Tab.MTrackMerger",
- disabled : false,
- permname: ''
- });
-});
-
-Pman.Tab.MTrackMerger = new Roo.util.Observable({
-
- panel : false,
- disabled : false,
- parentLayout: false,
-
- add : function(parentLayout, region)
- {
-
- var _this = this;
- this.parentLayout = parentLayout;
+ _strings : {
+ 'cd23e6cc0233eef073cbed0cfebcd6a1' :"Create Commit Using Patch",
+ 'f29ddbfb905eb2593fdcdfb243f9af85' :"Added",
+ '66717bf2b8235cc94a52d5b815d57a54' :"Review Changes",
+ '06f5aa315f44a2147bab17980d1f6570' :"Merge Commits",
+ 'c671c787b49f50a3ace9fdc5bd597825' :"core_enum",
+ '93f07b720ebf7d1246512569761a5804' :"Removed",
+ '4d1c8263ba1036754f8db14a98f9f006' :"Reload",
+ '21bcad367951f7c2e761f744423161b6' :"Create Commit Using Merge",
+ 'e63695c4dea40eefb2ef481c7b242192' :"All Changes",
+ '0b27918290ff5323bea1e3b78a9cf04e' :"File"
+ },
- this.panel = parentLayout.addxtype({
- xtype: 'NestedLayoutPanel',
- xns: Roo,
- listeners : {
- activate : function (_self)
- {
- try {
- var t = _this.tree.tree;
- t.loader.load(t.root);
- } catch(e) {}
- }
- },
- background : true,
- region : 'center',
- title : "Merge Commits",
- layout : {
- xtype: 'BorderLayout',
- xns: Roo,
- items : [
- {
- xtype: 'TreePanel',
- xns: Roo,
- listeners : {
- render : function (_self)
- {
- _this.tree = _self;
- }
- },
- autoScroll : true,
- fitToFrame : true,
- region : 'west',
- toolbar : {
- xtype: 'Toolbar',
- xns: Roo,
- items : [
- {
- xtype: 'Button',
- xns: Roo.Toolbar,
- listeners : {
- click : function (_self, e)
- {
- var t = _this.tree.tree;
- t.loader.load(t.root);
- }
- },
- text : "Reload"
- }
- ]
- },
- tree : {
- xtype: 'TreePanel',
- xns: Roo.tree,
- listeners : {
- click : function (node, e)
- {
-
- _this.grid.ds.load.defer(100, _this.grid.ds, [ {} ]);
- }
- },
- loader : {
- xtype: 'TreeLoader',
- xns: Roo.tree,
- listeners : {
- beforeload : function (This, node, callback)
- {
- _this.tree.el.mask("Loading");
- },
- load : function (This, node, response)
- {
- _this.tree.el.unmask();
- _this.tree.tree.root.expand(false,true);
- },
- loadexception : function (This, node, response)
- {
- _this.tree.el.unmask();
- }
- },
- requestMethod : 'GET',
- root : 'data',
- baseParams : { _tree : 1 },
- dataUrl : baseURL + '/MTrack/Merger'
+ part : ["MTrack", "Merger" ],
+ order : '400-Pman.Tab.MTrackMerger',
+ region : 'center',
+ parent : 'Pman.Tab.MTrack',
+ name : "Pman.Tab.MTrackMerger",
+ disabled : false,
+ permname : '',
+ _tree : function()
+ {
+ var _this = this;
+ var MODULE = this;
+ return {
+ background : true,
+ region : 'center',
+ title : _this._strings['06f5aa315f44a2147bab17980d1f6570'] /* Merge Commits */,
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'NestedLayoutPanel',
+ listeners : {
+ activate : function (_self)
+ {
+ try {
+ var t = _this.tree.tree;
+ t.loader.load(t.root);
+ } catch(e) {}
+ }
+ },
+ layout : {
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'BorderLayout',
+ center : {
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'LayoutRegion'
+ },
+ west : {
+ split : true,
+ width : 200,
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'LayoutRegion'
+ },
+ south : {
+ height : 200,
+ split : true,
+ titlebar : true,
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'LayoutRegion'
+ },
+ items : [
+ {
+ autoScroll : true,
+ fitToFrame : true,
+ region : 'west',
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'TreePanel',
+ listeners : {
+ render : function (_self)
+ {
+ _this.tree = _self;
+ }
+ },
+ toolbar : {
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'Toolbar',
+ items : [
+ {
+ text : _this._strings['4d1c8263ba1036754f8db14a98f9f006'] /* Reload */,
+ xns : Roo.Toolbar,
+ '|xns' : 'Roo.Toolbar',
+ xtype : 'Button',
+ listeners : {
+ click : function (_self, e)
+ {
+ var t = _this.tree.tree;
+ t.loader.load(t.root);
+ }
+ }
+ }
+ ]
+ },
+ tree : {
+ xns : Roo.tree,
+ '|xns' : 'Roo.tree',
+ xtype : 'TreePanel',
+ listeners : {
+ click : function (node, e)
+ {
+
+ _this.grid.ds.load.defer(100, _this.grid.ds, [ {} ]);
+ }
+ },
+ root : {
+ text : _this._strings['e63695c4dea40eefb2ef481c7b242192'] /* All Changes */,
+ xns : Roo.tree,
+ '|xns' : 'Roo.tree',
+ xtype : 'TreeNode'
+ },
+ loader : {
+ 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)
+ {
+ _this.tree.el.mask("Loading");
+ },
+ load : function (This, node, response)
+ {
+ _this.tree.el.unmask();
+ _this.tree.tree.root.expand(false,true);
+ },
+ loadexception : function (This, node, response)
+ {
+ _this.tree.el.unmask();
+ }
+ }
+ }
+ }
+ },
+ {
+ 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;
+ if (_this.grid) {
+ //_this.grid.footer.onClick('first');
+ }
+ }
+ },
+ grid : {
+ autoExpandColumn : 'etype',
+ loadMask : true,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'Grid',
+ listeners : {
+ render : function()
+ {
+ _this.grid = this;
+ //_this.dialog = Pman.Dialog.FILL_IN
+ 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');
+ });
+ }
+ },
+ toolbar : {
+ xns : Roo,
+ '|xns' : 'Roo',
+ xtype : 'Toolbar',
+ items : [
+ {
+ 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()
+ {
+ // if we are just copying a simple commit accross with a valid message
+ // then this could contain the original commit message..
+ if (! _this.tree.tree.selModel.getSelectedNode()) {
+ Roo.MessageBox.alert("Error", "select a revision");
+ return ;
+ }
+ var ar = _this.grid.sm.getSelections();
+ var files = []
+ Roo.each(ar, function(s) {
+ files.push(s.data.filename);
+
+ });
+
+ if (!files.length) {
+ Roo.MessageBox.alert("Error", "select some files");
+ return ;
+ }
+
+
+ Roo.MessageBox.show({
+ title: "Create a Commit",
+ msg: "Enter commit message",
+ width:300,
+ buttons: Roo.MessageBox.OKCANCEL,
+ multiline: true,
+ fn: function(btn, msg) {
+
+ if (btn != 'ok') {
+ return;
+ }
+ new Pman.Request({
+ method : 'POST',
+ url : baseURL + '/MTrack/Merger',
+ params : {
+ message : msg,
+ _merge : _this.tree.tree.selModel.getSelectedNode().attributes.rev,
+ files : Roo.encode(files),
},
- root : {
- xtype: 'TreeNode',
- xns: Roo.tree,
- text : "All Changes"
- }
- }
- },
- {
- xtype: 'GridPanel',
- xns: Roo,
- listeners : {
- activate : function() {
- _this.panel = this;
- if (_this.grid) {
- //_this.grid.footer.onClick('first');
- }
+ success : function () {
+ // reload the grid..
+ _this.grid.ds.load({});
}
- },
- background : true,
- fitContainer : true,
- fitToframe : true,
- region : 'center',
- tableName : 'core_enum',
- title : "core_enum",
- grid : {
- xtype: 'Grid',
- xns: Roo.grid,
- listeners : {
- render : function()
- {
- _this.grid = this;
- //_this.dialog = Pman.Dialog.FILL_IN
- 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 : 'etype',
- loadMask : true,
- dataSource : {
- xtype: 'Store',
- xns: Roo.data,
- listeners : {
- beforeload : function (_self, options)
- {
- if (!_this.tree.tree.selModel.getSelectedNode()) {
- return false;
- }
-
- options.params = {
- _changedFiles : _this.tree.tree.selModel.getSelectedNode().attributes.rev
- };
- },
- load : function (_self, records, options)
- {
- // clear selections??
- _this.preview.load({
- method : 'POST',
- url : baseURL + '/MTrack/Merger',
- params : {
- _preview : _this.tree.tree.selModel.getSelectedNode().attributes.rev
- }
- });
-
-
- }
- },
- remoteSort : false,
- sortInfo : { field: 'filename', dir : 'ASC' },
- proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
- method : 'GET',
- url : baseURL + '/MTrack/Merger.php'
- },
- reader : {
- xtype: 'JsonReader',
- xns: Roo.data,
- id : 'id',
- root : 'data',
- totalProperty : 'total',
- fields : [
- {
- 'name': 'id',
- 'type': 'int'
- },
- {
- 'name': 'filename',
- 'type': 'string'
- },
- {
- 'name': 'added',
- 'type': 'int'
- },
- {
- 'name': 'removed',
- 'type': 'int'
- }
-
- ]
- }
- },
- sm : {
- xtype: 'RowSelectionModel',
- xns: Roo.grid,
- listeners : {
- afterselectionchange : function (_self)
- {
- var ar = this.getSelections();
- if (!ar.length) {
- // show whole change.
- _this.preview.load({
- method : 'POST',
- url : baseURL + '/MTrack/Merger',
- params : {
- _preview : _this.tree.tree.selModel.getSelectedNode().attributes.rev
- }
- });
- return;
- }
- var files = []
- Roo.each(ar, function(s) {
- files.push(s.data.filename);
-
- });
- _this.preview.load({
- method : 'POST',
- url : baseURL + '/MTrack/Merger',
- params : {
- _preview : _this.tree.tree.selModel.getSelectedNode().attributes.rev,
- files: Roo.encode(files)
- }
- });
-
-
- }
- },
- singleSelect : false
- },
- toolbar : {
- xtype: 'Toolbar',
- xns: Roo,
- items : [
- {
- xtype: 'Button',
- xns: Roo.Toolbar,
- listeners : {
- click : function()
- {
- // if we are just copying a simple commit accross with a valid message
- // then this could contain the original commit message..
- if (! _this.tree.tree.selModel.getSelectedNode()) {
- Roo.MessageBox.alert("Error", "select a revision");
- return ;
- }
- var ar = _this.grid.sm.getSelections();
- var files = []
- Roo.each(ar, function(s) {
- files.push(s.data.filename);
-
- });
-
- if (!files.length) {
- Roo.MessageBox.alert("Error", "select some files");
- return ;
- }
-
-
- Roo.MessageBox.show({
- title: "Create a Commit",
- msg: "Enter commit message",
- width:300,
- buttons: Roo.MessageBox.OKCANCEL,
- multiline: true,
- fn: function(btn, msg) {
-
- if (btn != 'ok') {
- return;
- }
- new Pman.Request({
- method : 'POST',
- url : baseURL + '/MTrack/Merger',
- params : {
- message : msg,
- _merge : _this.tree.tree.selModel.getSelectedNode().attributes.rev,
- files : Roo.encode(files),
- },
- success : function () {
- // reload the grid..
- _this.grid.ds.load({});
- }
- });
- },
- animEl: this.el
- });
- }
- },
- cls : 'x-btn-text-icon',
- text : "Create Commit Using Patch",
- icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
- },
- {
- xtype: 'Button',
- xns: Roo.Toolbar,
- listeners : {
- click : function()
- {
- // if we are just copying a simple commit accross with a valid message
- // then this could contain the original commit message..
- if (! _this.tree.tree.selModel.getSelectedNode()) {
- Roo.MessageBox.alert("Error", "select a revision");
- return ;
- }
-
-
-
- Roo.MessageBox.show({
- title: "Create a Commit",
- msg: "Enter commit message",
- width:300,
- buttons: Roo.MessageBox.OKCANCEL,
- multiline: true,
- fn: function(btn, msg) {
-
- if (btn != 'ok') {
- return;
- }
- new Pman.Request({
- method : 'POST',
- url : baseURL + '/MTrack/Merger',
- params : {
- message : msg,
- _merge : _this.tree.tree.selModel.getSelectedNode().attributes.rev,
- files : '_all_' ,
- },
- success : function () {
- // reload the grid..
- var t = _this.tree.tree;
- t.loader.load(t.root);
- }
- });
- },
- animEl: this.el
- });
- }
- },
- cls : 'x-btn-text-icon',
- text : "Create Commit Using Merge",
- icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
- }
- ]
+ });
+ },
+ animEl: this.el
+ });
+ }
+ }
+ },
+ {
+ 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()
+ {
+ // if we are just copying a simple commit accross with a valid message
+ // then this could contain the original commit message..
+ if (! _this.tree.tree.selModel.getSelectedNode()) {
+ Roo.MessageBox.alert("Error", "select a revision");
+ return ;
+ }
+
+
+
+ Roo.MessageBox.show({
+ title: "Create a Commit",
+ msg: "Enter commit message",
+ width:300,
+ buttons: Roo.MessageBox.OKCANCEL,
+ multiline: true,
+ fn: function(btn, msg) {
+
+ if (btn != 'ok') {
+ return;
+ }
+ new Pman.Request({
+ method : 'POST',
+ url : baseURL + '/MTrack/Merger',
+ params : {
+ message : msg,
+ _merge : _this.tree.tree.selModel.getSelectedNode().attributes.rev,
+ files : '_all_'
},
- colModel : [
- {
- xtype: 'ColumnModel',
- xns: Roo.grid,
- dataIndex : 'filename',
- header : 'File',
- width : 200,
- renderer : function(v) { return String.format('{0}', v); }
- },
- {
- xtype: 'ColumnModel',
- xns: Roo.grid,
- dataIndex : 'added',
- header : 'Added',
- width : 50,
- renderer : function(v) { return String.format('{0}', v); }
- },
- {
- xtype: 'ColumnModel',
- xns: Roo.grid,
- dataIndex : 'removed',
- header : 'Removed',
- width : 50,
- renderer : function(v) { return String.format('{0}', v); }
- }
- ]
- }
- },
- {
- xtype: 'ContentPanel',
- xns: Roo,
- listeners : {
- render : function (_self)
- {
- _this.preview = _self;
+ success : function () {
+ // reload the grid..
+ var t = _this.tree.tree;
+ t.loader.load(t.root);
}
- },
- autoScroll : true,
- fitToFrame : true,
- region : 'south',
- title : "Review Changes"
- }
- ],
- west : {
- xtype: 'LayoutRegion',
- xns: Roo,
- split : true,
- width : 200
- },
- center : {
- xtype: 'LayoutRegion',
- xns: Roo
- },
- south : {
- xtype: 'LayoutRegion',
- xns: Roo,
- height : 200,
- split : true,
- titlebar : true
- }
+ });
+ },
+ animEl: this.el
+ });
}
- });
- this.layout = this.panel.layout;
-
- }
+ }
+ }
+ ]
+ },
+ dataSource : {
+ remoteSort : false,
+ sortInfo : { field: 'filename', dir : 'ASC' },
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'Store',
+ listeners : {
+ beforeload : function (_self, options)
+ {
+ if (!_this.tree.tree.selModel.getSelectedNode()) {
+ return false;
+ }
+
+ options.params = {
+ _changedFiles : _this.tree.tree.selModel.getSelectedNode().attributes.rev
+ };
+ },
+ load : function (_self, records, options)
+ {
+ // clear selections??
+ _this.preview.load({
+ method : 'POST',
+ url : baseURL + '/MTrack/Merger',
+ params : {
+ _preview : _this.tree.tree.selModel.getSelectedNode().attributes.rev
+ }
+ });
+
+
+ }
+ },
+ proxy : {
+ method : 'GET',
+ url : baseURL + '/MTrack/Merger.php',
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'HttpProxy'
+ },
+ reader : {
+ fields : [
+ {
+ 'name': 'id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'filename',
+ 'type': 'string'
+ },
+ {
+ 'name': 'added',
+ 'type': 'int'
+ },
+ {
+ 'name': 'removed',
+ 'type': 'int'
+ }
+
+ ],
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ xtype : 'JsonReader'
+ }
+ },
+ sm : {
+ singleSelect : false,
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ xtype : 'RowSelectionModel',
+ listeners : {
+ afterselectionchange : function (_self)
+ {
+ var ar = this.getSelections();
+ if (!ar.length) {
+ // show whole change.
+ _this.preview.load({
+ method : 'POST',
+ url : baseURL + '/MTrack/Merger',
+ params : {
+ _preview : _this.tree.tree.selModel.getSelectedNode().attributes.rev
+ }
+ });
+ return;
+ }
+ var files = []
+ Roo.each(ar, function(s) {
+ files.push(s.data.filename);
+
+ });
+ _this.preview.load({
+ method : 'POST',
+ url : baseURL + '/MTrack/Merger',
+ params : {
+ _preview : _this.tree.tree.selModel.getSelectedNode().attributes.rev,
+ files: Roo.encode(files)
+ }
+ });
+
+
+ }
+ }
+ },
+ colModel : [
+ {
+ 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'
+ },
+ {
+ 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'
+ },
+ {
+ 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'
+ }
+ ]
+ }
+ },
+ {
+ 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;
+ }
+ }
+ }
+ ]
+ }
+ }; }
});