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
64a8e9ba
Commit
64a8e9ba
authored
Oct 31, 2019
by
LE GAC Renaud
Browse files
Update panel with selector in order to uniformize interface.
parent
5590a00a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
25 deletions
+26
-25
static/plugin_dbui/src/panel/BaseWithSelector.js
static/plugin_dbui/src/panel/BaseWithSelector.js
+21
-1
static/plugin_dbui/src/panel/GridWithFilter.js
static/plugin_dbui/src/panel/GridWithFilter.js
+4
-23
static/plugin_dbui/src/panel/WithUrlSelector.js
static/plugin_dbui/src/panel/WithUrlSelector.js
+1
-1
No files found.
static/plugin_dbui/src/panel/BaseWithSelector.js
View file @
64a8e9ba
...
...
@@ -162,6 +162,11 @@ Ext.define("Dbui.panel.BaseWithSelector", {
*/
selectorPanel
:
null
,
// private key map
keyMap
:
{
ENTER
:
"
onEnterKey
"
},
// Private attribute for internationalization
textGo
:
"
Go
"
,
textReset
:
"
Reset
"
,
...
...
@@ -227,7 +232,22 @@ Ext.define("Dbui.panel.BaseWithSelector", {
toolbar
=
me
.
selectorPanel
.
getDockedItems
()[
0
];
me
.
goButton
=
toolbar
.
getComponent
(
"
goButton
"
);
me
.
resetButton
=
toolbar
.
getComponent
(
"
resetButton
"
);
}
}
,
// jshint strict: true
/**
* Handler to click on the Go button when the ENTER key is pressed
*
*/
onEnterKey
:
function
()
{
"
use strict
"
;
var
me
=
this
;
// do it only when the panel is expanded but not collpased
if
(
!
me
.
selectorPanel
.
getCollapsed
())
{
me
.
goButton
.
click
();
}
}
});
\ No newline at end of file
static/plugin_dbui/src/panel/GridWithFilter.js
View file @
64a8e9ba
...
...
@@ -26,11 +26,6 @@ Ext.define("Dbui.panel.GridWithFilter", {
filter
:
null
,
grid
:
null
,
// private key map
keyMap
:
{
ENTER
:
"
onEnterKey
"
},
// Private properties for internationalization
textLoad
:
"
Loading...
"
,
...
...
@@ -49,7 +44,7 @@ Ext.define("Dbui.panel.GridWithFilter", {
me
.
grid
=
me
.
mainPanel
.
child
(
"
xgrid
"
);
me
.
filter
.
bind
(
me
.
grid
,
me
.
filterOnChange
);
//
connect button
s
//
handling event
s
if
(
me
.
filterOnChange
)
{
me
.
keyMapEnabled
=
false
;
me
.
goButton
.
hide
();
...
...
@@ -59,10 +54,10 @@ Ext.define("Dbui.panel.GridWithFilter", {
}
me
.
resetButton
.
on
(
"
click
"
,
me
.
filter
.
onReset
,
me
.
filter
);
me
.
selectorPanel
.
on
(
"
expand
"
,
me
.
onSelectorExpand
,
me
);
// 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
"
,
{
...
...
@@ -81,28 +76,14 @@ Ext.define("Dbui.panel.GridWithFilter", {
me
.
goButton
.
un
(
"
click
"
,
me
.
filter
.
onGo
,
me
.
filter
);
}
me
.
selectorPanel
.
un
(
"
expand
"
,
me
.
onSelectorExpand
,
me
);
me
.
resetButton
.
un
(
"
click
"
,
me
.
filter
.
onReset
,
me
.
filter
);
me
.
selectorPanel
.
un
(
"
expand
"
,
me
.
onSelectorExpand
,
me
);
me
.
callParent
(
arguments
);
},
// jshint strict: true
/**
* Handler to click on the Go button when the ENTER key is pressed
*
*/
onEnterKey
:
function
()
{
"
use strict
"
;
var
me
=
this
;
// 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
...
...
static/plugin_dbui/src/panel/WithUrlSelector.js
View file @
64a8e9ba
...
...
@@ -96,7 +96,7 @@ Ext.define("Dbui.panel.WithUrlSelector", {
me
.
mainPanel
.
loader
.
baseParams
=
me
.
baseParams
;
}
// handl
ers for button
// handl
ing events
me
.
goButton
.
on
(
"
click
"
,
me
.
onGo
,
me
);
me
.
resetButton
.
on
(
"
click
"
,
me
.
onReset
,
me
);
...
...
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