fix sorting on group manager
authorAlan Knowles <alan@roojs.com>
Thu, 22 Jul 2021 05:23:09 +0000 (13:23 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 22 Jul 2021 05:23:09 +0000 (13:23 +0800)
Pman.Dialog.BAdminStaffGroups.bjs
Pman.Dialog.BAdminStaffGroups.js

index cbfef75..b5fa88a 100644 (file)
@@ -76,7 +76,7 @@
             "update" : "function (_self, record, operation)\n{\n    if (operation != 'commit') {\n        return;\n    }\n    \n    var params = {\n        user_ids : _this.data.id,\n        _action : (record.data.is_in_group * 1 == 0) ? 'sub' : 'add',\n        group_id : record.data.id\n    };\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/Core_group',\n        method : 'POST',\n        params : params,\n        success : function() { \n            //_this.option_grid.ds.load({});\n        }\n  });\n}",
             "beforeload" : "function (_self, options)\n{ \n    options.params = options.params || {};\n    \n    if(_this.data.id * 1 < 1){\n        _this.option_grid.el.mask('Please save the member first');\n        this.removeAll();\n        return false;\n    }\n    options.params.limit = 200;\n    options.params._is_in_group = _this.data.id;\n\n}"
            },
-           "$ Object sortInfo" : "{ direction : 'ASC', field: 'id' }",
+           "$ Object sortInfo" : "{ direction : 'ASC', field: 'display_name' }",
            "xtype" : "Store",
            "boolean remoteSort" : true,
            "$ xns" : "Roo.data",
index 4547199..126b0f0 100644 (file)
@@ -158,7 +158,7 @@ Roo.apply(Pman.Dialog.BAdminStaffGroups.prototype, {
          store : {
           xtype : 'Store',
           remoteSort : true,
-          sortInfo : { direction : 'ASC', field: 'id' },
+          sortInfo : { direction : 'ASC', field: 'display_name' },
           listeners : {
            beforeload : function (_self, options)
             {