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,
}
},
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'
}
]
}
{
xtype: 'ComboBox',
xns: Roo.form,
+ listeners : {
+ select : function (combo, record, index)
+ {
+ Pman.Builder.View.frameUpdateTheme(record.data.name);
+ }
+ },
allowBlank : false,
displayField : 'name',
editable : false,
triggerAction : 'all',
typeAhead : true,
valueField : 'name',
- width : 300,
+ width : 200,
store : {
xtype: 'Store',
xns: Roo.data,
reader : {
xtype: 'JsonReader',
xns: Roo.data,
- id : 'id',
+ id : 'name',
root : 'data',
totalProperty : 'total',
- fields : [{"name":"id","type":"int"},{"name":"assigntype","type":"string"}]
+ fields : ["name"]
}
}
}