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,
emptyText : "Select Theme",
forceSelection : true,
hiddenName : 'name',
- listWidth : 400,
+ listWidth : 200,
loadingText : "Searching...",
minChars : 2,
- name : '',
+ name : 'name',
pageSize : 20,
- qtip : "Select CampaignAssign",
+ 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 : 'id',
- width : 300,
+ valueField : 'name',
+ width : 200,
store : {
xtype: 'Store',
xns: Roo.data,
- remoteSort : true,
- sortInfo : { direction : 'ASC', field: 'id' },
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 + '/Roo/CampaignAssign.php'
+ url : baseURL + '/Builder/Themes'
},
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"]
}
}
}