Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
w2pext
plugin_dbui
Commits
51ac04af
Commit
51ac04af
authored
14 years ago
by
Renaud Le Gac
Browse files
Options
Downloads
Patches
Plain Diff
press return is not need anymore on texfield.
just type the value and wait.
parent
8ec1ab45
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
static/plugin_dbui/lib/appgridfilter.js
+13
-18
13 additions, 18 deletions
static/plugin_dbui/lib/appgridfilter.js
with
13 additions
and
18 deletions
static/plugin_dbui/lib/appgridfilter.js
+
13
−
18
View file @
51ac04af
...
@@ -38,8 +38,12 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
...
@@ -38,8 +38,12 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
/**
/**
* Predefined setting
* Predefined setting
*
* NOTE:
* the enableKeyEvents is mandatory for Ext.form.TextField
*/
*/
defaults
:
{
anchor
:
'
100%
'
},
defaults
:
{
anchor
:
'
100%
'
,
enableKeyEvents
:
true
},
/**
/**
* private method requests by the component model of Ext JS
* private method requests by the component model of Ext JS
...
@@ -54,13 +58,14 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
...
@@ -54,13 +58,14 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
for
(
var
i
=
0
;
i
<
fields
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
fields
.
length
;
i
++
){
field
=
fields
[
i
];
field
=
fields
[
i
];
// catch a change of value for combo
box
// catch a change of value for combobox
if
(
field
.
xtype
==
'
xcombobox
'
)
if
(
field
.
xtype
==
'
xcombobox
'
)
field
.
on
(
'
select
'
,
this
.
onC
omboSelect
,
this
);
field
.
on
(
'
select
'
,
this
.
onC
hange
,
this
);
// catch the key pressed enter for other fields
// catch the key pressed enter for other fields
// wait that user finish to type to run the handler
else
else
field
.
on
(
'
special
key
'
,
this
.
on
KeyPressedEnter
,
this
);
field
.
on
(
'
key
up
'
,
this
.
on
Change
,
this
,
{
buffer
:
500
}
);
}
}
},
},
...
@@ -85,22 +90,12 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
...
@@ -85,22 +90,12 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
},
},
/**
/**
* Handler to catch a
new selection in combobox
* Handler to catch a
change in field value
*/
*/
onC
omboSelect
:
function
(
combo
,
record
,
index
){
onC
hange
:
function
(
field
){
this
.
setupCondition
(
combo
);
this
.
setupCondition
(
field
);
},
},
/**
* Handler to catch the ENTER
* @param {Object} field
* @param {Object} e
*/
onKeyPressedEnter
:
function
(
field
,
e
){
if
(
e
.
getKey
()
==
e
.
ENTER
)
this
.
setupCondition
(
field
);
},
/**
/**
* Handler to reset the filter
* Handler to reset the filter
*/
*/
...
@@ -145,7 +140,7 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
...
@@ -145,7 +140,7 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, {
conditions
.
push
(
this
.
filterConditions
[
k
]);
conditions
.
push
(
this
.
filterConditions
[
k
]);
}
}
// push new condtion in the where clause of the store
// push new cond
i
tion in the where clause of the store
this
.
store
.
baseParams
.
where
=
conditions
;
this
.
store
.
baseParams
.
where
=
conditions
;
// update the store
// update the store
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment