// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
-
-
-// register the module first
-Pman.on('beforeload', function()
-{
- Pman.register({
- part : ["Builder","Top"],
- modKey : '001-Pman.Tab.BuilderTop',
- module : Pman.Tab.BuilderTop,
- region : 'center',
- parent : Pman.Tab.BuilderTab,
- name : "Pman.Tab.BuilderTop",
- disabled : false,
- permname: ''
- });
-});
-
-Pman.Tab.BuilderTop = new Roo.util.Observable({
-
- panel : false,
- disabled : false,
- parentLayout: false,
-
- add : function(parentLayout, region)
+Pman.Tab.BuilderTop = new Roo.XComponent({
+ part : ["Builder","Top"],
+ order : '001-Pman.Tab.BuilderTop',
+ region : 'center',
+ parent : 'Pman.Tab.BuilderTab',
+ name : "Pman.Tab.BuilderTop",
+ disabled : false,
+ permname : '',
+ _tree : function()
{
-
var _this = this;
- this.parentLayout = parentLayout;
-
- this.panel = parentLayout.addxtype({
+ var MODULE = this;
+ return {
xtype: 'ContentPanel',
xns: Roo,
background : true,
xtype: 'Menu',
xns: Roo.menu,
items : [
+ {
+ xtype: 'Item',
+ xns: Roo.menu,
+ listeners : {
+ click : function (_self, e)
+ {
+ if (!_this.modsel.getValue()) {
+ Roo.MessageBox.alert("Error", "Select Module");
+ return false;
+ }
+ if (!_this.filesel.getValue()) {
+ Roo.MessageBox.alert("Error", "Select Part");
+ return false;
+ }
+ Pman.Dialog.BuilderPart.show( {
+ id : _this.filesel.getValue(),
+ module_id: _this.modsel.getValue()
+ } ,
+ function(data) {
+ //_this.filesel.reset();
+ if (!data.id) {
+ return;
+ }
+ _this.filesel.setFromData(data);
+ // set the part name on the json..
+
+
+ pt.loadBJS(_this.modsel.getValue(), _this.filesel.getValue())
+ });
+
+ }
+ },
+ text : "Rename",
+ icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
+ },
+ {
+ xtype: 'Separator',
+ xns: Roo.menu
+ },
{
xtype: 'Item',
xns: Roo.menu,
_delete : _this.filesel.getValue()
},
success : function() {
- _this.fileCombo.setValue('');
+ _this.filesel.setValue('');
// unload stuff..
+ _this.filesel.fireEvent('select', false);
+ // Pman.Tab.BuilderTab.layout.getRegion('west').el.mask("select part");
}
}
},
text : "Delete"
+ },
+ {
+ xtype: 'Separator',
+ xns: Roo.menu
+ },
+ {
+ xtype: 'Item',
+ xns: Roo.menu,
+ listeners : {
+ click : function (_self, e)
+ {
+ if (!_this.modsel.getValue()) {
+ Roo.MessageBox.alert("Error", "Select Module");
+ return false;
+ }
+ if (!_this.filesel.getValue()) {
+ Roo.MessageBox.alert("Error", "Select Part");
+ return false;
+ }
+ Pman.Dialog.BuilderImport.show( {
+ id : _this.filesel.getValue(),
+ module_id: _this.modsel.getValue()
+ } ,
+ function(data) {
+ var bt = Pman.Tab.BuilderTree.tree;
+ var pt = Pman.Builder.Tree;
+
+
+ //bv.panel.el.unmask();
+ Pman.Tab.BuilderTab.layout.getRegion('west').el.unmask();
+ pt.loadBJS(_this.modsel.getValue(), _this.filesel.getValue())
+
+
+ });
+
+ }
+ },
+ text : "Import (by pasting)",
+ icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
}
]
}
pt.clearAll();
pt.setCurrentNode(bt.root,true);
// var bv = Pman.Tab.BuilderView;
- Pman.Tab.BuilderView.panel.clearAll();
+ Pman.Tab.BuilderView.panel.clearAll();
+ Pman.Tab.BuilderTab.layout.getRegion('west').el.mask("select part");
// bv.panel.el.mask("select Module / Part");
return;
}
//bv.panel.el.unmask();
-
+ Pman.Tab.BuilderTab.layout.getRegion('west').el.unmask();
pt.loadBJS(_this.modsel.getValue(), rec.data.id)
{
Pman.Builder.save(
function(data) {
- Roo.log("JSON GOT");
- Roo.log(data);
- Pman.Dialog.BuilderViewCode.show(data );
-
+ Roo.log("JSON GOT");
+ Roo.log(data);
+ Pman.Dialog.BuilderViewCode.show(data );
+
- } );
+ } );
}
},
- text : "Show JSON"
+ text : "Show JSON / Javascript HTML"
}
]
}
}
]
}
+ },
+ {
+ xtype: 'Fill',
+ xns: Roo.Toolbar
+ },
+ {
+ xtype: 'ComboBox',
+ xns: Roo.form,
+ listeners : {
+ select : function (combo, record, index)
+ {
+ Pman.Builder.View.frameUpdateTheme(record.data.name);
+ }
+ },
+ allowBlank : false,
+ displayField : 'name',
+ editable : false,
+ emptyText : "Select Theme",
+ forceSelection : true,
+ hiddenName : 'name',
+ listWidth : 200,
+ loadingText : "Searching...",
+ minChars : 2,
+ name : 'name',
+ pageSize : 20,
+ qtip : "Select Theme",
+ queryParam : '',
+ selectOnFocus : true,
+ tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
+ triggerAction : 'all',
+ typeAhead : true,
+ valueField : 'name',
+ width : 200,
+ store : {
+ xtype: 'Store',
+ xns: Roo.data,
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+ // set more here
+ }
+ },
+ remoteSort : false,
+ sortInfo : { direction : 'ASC', field: 'name' },
+ proxy : {
+ xtype: 'HttpProxy',
+ xns: Roo.data,
+ method : 'GET',
+ url : baseURL + '/Builder/Themes'
+ },
+ reader : {
+ xtype: 'JsonReader',
+ xns: Roo.data,
+ id : 'name',
+ root : 'data',
+ totalProperty : 'total',
+ fields : ["name"]
+ }
+ }
}
]
}
- });
- this.layout = this.panel.layout;
-
+ };
}
});