Skip to content

Commit

Permalink
A few pre-submission tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Graham committed Nov 4, 2022
1 parent 08f8868 commit 02b86b9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions manager/assets/modext/widgets/core/modx.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,23 +767,27 @@ Ext.extend(MODx.grid.Grid,Ext.grid.EditorGridPanel,{
,applyGridFilter: function(cmp, param = 'query') {
const filterValue = cmp.getValue(),
store = this.getStore(),
urlParams = {
[param]: filterValue
}
urlParams = {}
;
let tabPanel = this.ownerCt.ownerCt,
hasParentTabPanel = false,
parentTabItems,
activeParentTabIdx
;
if (!Ext.isEmpty(filterValue)) {
urlParams[param] = filterValue;
}
if (param == 'ns') {
store.baseParams['namespace'] = filterValue;
} else {
store.baseParams[param] = filterValue;
}
/*
If a base class is extended twice, such as the settings class,
If there is an additional container in the structure,
we need to search further for the tabs object...
NOTE: This may be able to be removed once all grid panels have been
updated and their structures have been made consistent with one another
*/
if (!tabPanel.hasOwnProperty('xtype') || !tabPanel.xtype.includes('tabs')) {
if (tabPanel.ownerCt && tabPanel.ownerCt.xtype && tabPanel.ownerCt.xtype.includes('tabs')) {
Expand Down
2 changes: 1 addition & 1 deletion manager/assets/modext/widgets/core/modx.tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MODx.Tabs = function(config) {
Only proceed with the clearing process if the tab has changed.
This is needed to prevent clearing when a URL has been typed in.
Note that currentTab is the previous one being navigated away from
NOTE: The currentTab is the previous one being navigated away from
*/
if (newTab.id != currentTab.id) {
const resetVerticalTabPanelFilters = (currentTab.items.items[0] && currentTab.items.items[0].xtype == 'modx-vtabs') || currentTab.ownerCt.xtype == 'modx-vtabs',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ MODx.grid.UserGroupResourceGroup = function(config) {
xtype: 'modx-combo-resourcegroup'
,itemId: 'filter-resourceGroup'
,emptyText: _('filter_by_resource_group')
,width: 200
,width: 210
,allowBlank: true
,value: MODx.request.resourceGroup || null
,listeners: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Ext.extend(MODx.panel.GroupsRoles,MODx.FormPanel,{
userGrid.usergroup = usergroup;
userGrid.config.usergroup = usergroup;
userGrid.store.baseParams.usergroup = usergroup;
userGrid.clearFilter();
userGrid.clearGridFilters('filter-username');
}

}
Expand Down

0 comments on commit 02b86b9

Please sign in to comment.