{
- "id": "roo-file-43",
+ "id": "roo-file-196",
"name": "Pman.Tab.BuilderPalette",
"parent": "Pman.Tab.BuilderTab",
"title": "Pman.Tab.BuilderPalette",
- "path": "/home/alan/gitlive/Pman.Builder/Pman.Tab.BuilderPalette.bjs",
+ "path": "/home/edward/gitlive/Pman.Builder/Pman.Tab.BuilderPalette.bjs",
"items": [
{
- "|xns": "Roo",
- "xtype": "GridPanel",
- "title": "ris_location",
- "fitToframe": true,
- "fitContainer": true,
- "tableName": "ris_location",
- "background": true,
- "region": "center",
"listeners": {
- "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
+ "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.ds.load({})\n }\n}"
},
+ "background": true,
+ "fitContainer": true,
+ "fitToframe": true,
+ "region": "east",
+ "tableName": "palette",
+ "title": "palette",
+ "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.ds.load({})\n }\n if (_this.ss) {\n return;\n }\n _this.ss = Roo.util.CSS.createStyleSheet(\n'.pman-builder-palete-hide { display: none; } ' + \"\\n\" \n, Roo.id())\n \n \n \n}",
+ "rowclass": "function (gridview, rowcfg)\n{\n var sn = Pman.Builder.Tree.currentNodeType();\n // Roo.log(rowcfg);\n if (!sn) {\n sn = '*top';\n }\n var cls = 'pman-builder-palete-hide';\n \n \n Roo.each(rowcfg.record.json.parents, function(n) {\n if (n == sn || n.split(':').shift() == sn) \n cls = '';\n return true;\n }\n );\n //Roo.log(cls);\n rowcfg.rowClass = cls;\n // what is the currently selected element..\n \n}"
+ },
"*prop": "grid",
- "xtype": "Grid",
"autoExpandColumn": "name",
+ "ddGroup": "component",
+ "enableDrag": true,
"loadMask": true,
- "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"
- },
+ "xtype": "Grid",
"|xns": "Roo.grid",
"items": [
{
]
},
{
- "*prop": "footer",
- "xtype": "PagingToolbar",
- "pageSize": 25,
- "displayInfo": true,
- "displayMsg": "Displaying ris_location{0} - {1} of {2}",
- "emptyMsg": "No ris_location found",
- "|xns": "Roo"
- },
- {
- "*prop": "toolbar",
- "xtype": "Toolbar",
- "|xns": "Roo",
- "items": [
- {
- "text": "Add",
- "xtype": "Button",
- "cls": "x-btn-text-icon",
- "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
- "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"
- },
- "|xns": "Roo.Toolbar"
- },
- {
- "text": "Edit",
- "xtype": "Button",
- "cls": "x-btn-text-icon",
- "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
- "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"
- },
- "|xns": "Roo.Toolbar"
- },
- {
- "text": "Delete",
- "cls": "x-btn-text-icon",
- "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
- "xtype": "Button",
- "listeners": {
- "|click": "function()\n{\n Pman.genericDelete(_this, 'ris_location'); \n}\n "
- },
- "|xns": "Roo.Toolbar"
- }
- ]
- },
- {
- "xtype": "ColumnModel",
+ "*prop": "colModel[]",
+ "dataIndex": "name",
"header": "Name",
"width": 200,
- "dataIndex": "name",
+ "xtype": "ColumnModel",
"|renderer": "function(v) { return String.format('{0}', v); }",
- "|xns": "Roo.grid",
- "*prop": "colModel[]"
+ "|xns": "Roo.grid"
},
{
- "xtype": "ColumnModel",
- "header": "Country",
- "width": 200,
- "dataIndex": "country",
- "|renderer": "function(v) { return String.format('{0}', v); }",
- "|xns": "Roo.grid",
- "*prop": "colModel[]"
+ "*prop": "sm",
+ "singleSelect": true,
+ "xtype": "RowSelectionModel",
+ "|xns": "Roo.grid"
}
]
}