Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
w2pext
plugin_dbui
Commits
8ce6f7ff
Commit
8ce6f7ff
authored
Oct 30, 2019
by
LE GAC Renaud
Browse files
Update grid/Filter and GridWithFilter to focus on the first field of the selector.
parent
33578cd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
static/plugin_dbui/src/grid/Filter.js
static/plugin_dbui/src/grid/Filter.js
+3
-0
static/plugin_dbui/src/panel/GridWithFilter.js
static/plugin_dbui/src/panel/GridWithFilter.js
+23
-1
No files found.
static/plugin_dbui/src/grid/Filter.js
View file @
8ce6f7ff
...
...
@@ -313,6 +313,9 @@ Ext.define("Dbui.grid.Filter", {
// reset the grid
me
.
grid
.
reset
();
// focus on the first field
me
.
child
(
"
field
"
).
focus
();
},
/**
...
...
static/plugin_dbui/src/panel/GridWithFilter.js
View file @
8ce6f7ff
...
...
@@ -62,6 +62,7 @@ Ext.define("Dbui.panel.GridWithFilter", {
// collapse the selectorPanel
me
.
selectorPanel
.
collapsed
=
true
;
me
.
selectorPanel
.
on
(
"
expand
"
,
me
.
onSelectorExpand
,
me
);
// Mask the GridFilter during loading
me
.
grid
.
getView
().
loadMask
=
Ext
.
create
(
"
Ext.LoadMask
"
,
{
...
...
@@ -95,6 +96,27 @@ Ext.define("Dbui.panel.GridWithFilter", {
"
use strict
"
;
var
me
=
this
;
me
.
goButton
.
click
();
// do it only when the panel is expanded but not collpased
if
(
!
me
.
selectorPanel
.
getCollapsed
())
{
me
.
goButton
.
click
();
}
},
/**
* Handler to focus on the first field of the filter
* when the selector is expand
*
*/
onSelectorExpand
:
function
()
{
"
use strict
"
;
var
me
=
this
,
firstField
=
me
.
filter
.
child
(
"
field
"
);
if
(
Ext
.
isEmpty
(
firstField
))
{
return
;
}
firstField
.
focus
();
}
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment