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,
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 : 0,
+ 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())
+
});