Readers.php
[Pman.Builder] / Pman.Dialog.BuilderPart.js
index f7ebbf1..4dcbbe9 100644 (file)
@@ -32,9 +32,10 @@ Pman.Dialog.BuilderPart = {
             xns: Roo,
             closable : false,
             collapsible : false,
-            height : 140,
+            height : 120,
+            modal : true,
             resizable : false,
-            title : "Edit / Create builder_part",
+            title : "Edit / Create Part",
             width : 450,
             items : [
                 {
@@ -49,7 +50,7 @@ Pman.Dialog.BuilderPart = {
                                 actioncomplete : function(_self,action)
                                 {
                                     if (action.type == 'setdata') {
-                                        if (!_this.data.id) {   
+                                        if (_this.data.id * 1) {   
                                             this.load({ method: 'GET', params: { '_id' : _this.data.id }});
                                             return;
                                         }
@@ -79,56 +80,6 @@ Pman.Dialog.BuilderPart = {
                             style : 'margin:10px;',
                             url : baseURL + '/Roo/builder_part.php',
                             items : [
-                                {
-                                    xtype: 'ComboBox',
-                                    xns: Roo.form,
-                                    allowBlank : 'false',
-                                    editable : 'false',
-                                    emptyText : "Select builder_modules",
-                                    forceSelection : true,
-                                    listWidth : 400,
-                                    loadingText : "Searching...",
-                                    minChars : 2,
-                                    pageSize : 20,
-                                    qtip : "Select builder_modules",
-                                    selectOnFocus : true,
-                                    triggerAction : 'all',
-                                    typeAhead : true,
-                                    width : 300,
-                                    tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
-                                    queryParam : 'query[name]',
-                                    fieldLabel : 'Module',
-                                    valueField : 'id',
-                                    displayField : 'name',
-                                    hiddenName : 'module_id',
-                                    name : 'module_id_name',
-                                    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
-                                            }
-                                        },
-                                        proxy : {
-                                            xtype: 'HttpProxy',
-                                            xns: Roo.data,
-                                            method : 'GET',
-                                            url : baseURL + '/Roo/builder_modules.php'
-                                        },
-                                        reader : {
-                                            xtype: 'JsonReader',
-                                            xns: Roo.data,
-                                            id : 'id',
-                                            root : 'data',
-                                            totalProperty : 'total',
-                                            fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
-                                        }
-                                    }
-                                },
                                 {
                                     xtype: 'TextField',
                                     xns: Roo.form,
@@ -136,6 +87,11 @@ Pman.Dialog.BuilderPart = {
                                     name : 'name',
                                     width : 300
                                 },
+                                {
+                                    xtype: 'Hidden',
+                                    xns: Roo.form,
+                                    name : 'module_id'
+                                },
                                 {
                                     xtype: 'Hidden',
                                     xns: Roo.form,