Pman.Dialog.BAdminAddToGroup.bjs
authoredward <edward@roojs.com>
Tue, 10 Oct 2017 10:49:48 +0000 (18:49 +0800)
committeredward <edward@roojs.com>
Tue, 10 Oct 2017 10:49:48 +0000 (18:49 +0800)
Pman.Dialog.BAdminAddToGroup.js

Pman.Dialog.BAdminAddToGroup.bjs
Pman.Dialog.BAdminAddToGroup.js

index 4a599b2..984c101 100644 (file)
@@ -7,6 +7,7 @@
  "modOrder" : "001",
  "strings" : {
   "05b763f7d24f32575493b3c23f299b0e" : "Add To Group",
+  "9bb1eb7617eec79c8a2e5866ba6132d9" : "How would you describe your career plans",
   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
   "c9cc8cce247e49bae79f15173ce97354" : "Save"
  },
      "$ xns" : "Roo.bootstrap",
      "items" : [
       {
+       "listeners" : {
+        "render" : "function (_self)\n{\n   _this.employ_plan = this;\n\n}"
+       },
+       "Number pageSize" : 25,
+       "Boolean allowBlank" : false,
+       "Number minChars" : 2,
+       "String name" : "employ_plan_name",
+       "String valueField" : "name",
+       "String queryParam" : "query[search]",
+       "Boolean typeAhead" : true,
        "xtype" : "ComboBox",
-       "$ xns" : "Roo.bootstrap"
+       "String triggerAction" : "all",
+       "Boolean editable" : false,
+       "Boolean alwaysQuery" : true,
+       "$ xns" : "Roo.bootstrap",
+       "String/Roo.Template tpl" : "<div class=\"roo-select2-result\"><b>{display_name_t}</b></div>",
+       "String fieldLabel" : "How would you describe your career plans",
+       "String hiddenName" : "employ_plan",
+       "String displayField" : "display_name_t",
+       "items" : [
+        {
+         "listeners" : {
+          "beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    o.params.active = 1;\n    o.params.etype = 'Hydra.Plans';\n}"
+         },
+         "xtype" : "Store",
+         "boolean remoteSort" : true,
+         "$ xns" : "Roo.data",
+         "$ sortInfo" : "{field:\"id\",direction:\"ASC\"}",
+         "* prop" : "store",
+         "items" : [
+          {
+           "xtype" : "HttpProxy",
+           "$ xns" : "Roo.data",
+           "String method" : "GET",
+           "* prop" : "proxy",
+           "$ String url" : "baseURL+'/Roo/Core_enum'"
+          },
+          {
+           "xtype" : "JsonReader",
+           "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'display_name',\n        'type': 'string'    \n    },\n    {\n        'name': 'display_name_t',\n        'type': 'string'    \n    }\n]",
+           "$ xns" : "Roo.data",
+           "* prop" : "reader"
+          }
+         ]
+        }
+       ]
       },
       {
        "String name" : "id",
index 008f8b1..622037c 100644 (file)
@@ -9,6 +9,7 @@ Roo.apply(Pman.Dialog.BAdminAddToGroup.prototype, {
 
  _strings : {
   '05b763f7d24f32575493b3c23f299b0e' :"Add To Group",
+  '9bb1eb7617eec79c8a2e5866ba6132d9' :"How would you describe your career plans",
   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
   'c9cc8cce247e49bae79f15173ce97354' :"Save"
  },
@@ -159,8 +160,74 @@ Roo.apply(Pman.Dialog.BAdminAddToGroup.prototype, {
       items  : [
        {
         xtype : 'ComboBox',
+        allowBlank : false,
+        alwaysQuery : true,
+        displayField : 'display_name_t',
+        editable : false,
+        fieldLabel : _this._strings['9bb1eb7617eec79c8a2e5866ba6132d9'] /* How would you describe your career plans */,
+        hiddenName : 'employ_plan',
+        minChars : 2,
+        name : 'employ_plan_name',
+        pageSize : 25,
+        queryParam : 'query[search]',
+        tpl : '<div class=\"roo-select2-result\"><b>{display_name_t}</b></div>',
+        triggerAction : 'all',
+        typeAhead : true,
+        valueField : 'name',
+        listeners : {
+         render : function (_self)
+          {
+             _this.employ_plan = this;
+          
+          }
+        },
         xns : Roo.bootstrap,
-        '|xns' : 'Roo.bootstrap'
+        '|xns' : 'Roo.bootstrap',
+        store : {
+         xtype : 'Store',
+         remoteSort : true,
+         sortInfo : {field:"id",direction:"ASC"},
+         listeners : {
+          beforeload : function (_self, o)
+           {
+               o.params = o.params || {};
+               o.params.active = 1;
+               o.params.etype = 'Hydra.Plans';
+           }
+         },
+         xns : Roo.data,
+         '|xns' : 'Roo.data',
+         proxy : {
+          xtype : 'HttpProxy',
+          method : 'GET',
+          url : baseURL+'/Roo/Core_enum',
+          xns : Roo.data,
+          '|xns' : 'Roo.data'
+         },
+         reader : {
+          xtype : 'JsonReader',
+          fields : [
+              {
+                  'name': 'id',
+                  'type': 'int'
+              },
+              {
+                  'name': 'name',
+                  'type': 'string'
+              },
+              {
+                  'name': 'display_name',
+                  'type': 'string'    
+              },
+              {
+                  'name': 'display_name_t',
+                  'type': 'string'    
+              }
+          ],
+          xns : Roo.data,
+          '|xns' : 'Roo.data'
+         }
+        }
        },
        {
         xtype : 'Input',