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
9285585d
Commit
9285585d
authored
11 years ago
by
LE GAC Renaud
Browse files
Options
Downloads
Patches
Plain Diff
Improve the logic to mask/unmask the widget.
parent
c4b3510a
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/src/panel/WithUrlSelector.js
+39
-7
39 additions, 7 deletions
static/plugin_dbui/src/panel/WithUrlSelector.js
with
39 additions
and
7 deletions
static/plugin_dbui/src/panel/WithUrlSelector.js
+
39
−
7
View file @
9285585d
...
...
@@ -71,7 +71,12 @@ Ext.define('App.panel.WithUrlSelector', {
this
.
goButton
.
on
(
'
click
'
,
this
.
onGo
,
this
);
this
.
resetButton
.
on
(
'
click
'
,
this
.
onReset
,
this
);
this
.
mainPanel
.
getLoader
().
on
(
'
load
'
,
this
.
onLoad
,
this
);
this
.
mainPanel
.
getLoader
().
on
({
beforeload
:
this
.
mask
,
load
:
this
.
unmask
,
scope
:
this
});
},
// Private method requires by the Ext JS component model
...
...
@@ -79,11 +84,33 @@ Ext.define('App.panel.WithUrlSelector', {
this
.
goButton
.
un
(
'
click
'
,
this
.
onGo
,
this
);
this
.
resetButton
.
un
(
'
click
'
,
this
.
onReset
,
this
);
this
.
mainPanel
.
getLoader
().
un
(
'
load
'
,
this
.
onLoad
,
this
);
this
.
mainPanel
.
getLoader
().
un
({
beforeload
:
this
.
mask
,
load
:
this
.
unmask
,
scope
:
this
});
this
.
callParent
(
arguments
);
},
/**
* Mask the panel and its selector.
*
* @param {Boolean/String/Object} config
* load True to show the default LoadMask,
* a config object that will be passed to the LoadMask constructor,
* or a message String to show. False to hide the current LoadMask.
* @param {Boolean} [targetEl=false] True to mask the targetEl
* of this Component instead of the `this.el`. For example,
* setting this to true on a Panel will cause only the body to be masked.
*/
mask
:
function
(
config
,
target
)
{
"
use strict
"
;
this
.
setLoading
(
this
.
textLoad
);
},
/**
* Handler to build the URL and to load it in the panel.
* The main panel is masked and the selector panel is disabled
...
...
@@ -109,9 +136,6 @@ Ext.define('App.panel.WithUrlSelector', {
params
[
subfield
.
getName
()]
=
subfield
.
getValue
();
}
// disable the selector during loading
this
.
selectorPanel
.
disable
();
// destroy embedded IFRAME in the mainPanel if any
iframe
=
this
.
mainPanel
.
getEl
().
getById
(
'
mainPanelIframe
'
);
if
(
iframe
)
{
...
...
@@ -168,7 +192,7 @@ Ext.define('App.panel.WithUrlSelector', {
// load HTML using the panel loader
this
.
mainPanel
.
getLoader
().
load
({
loadMask
:
tru
e
,
loadMask
:
fals
e
,
params
:
params
,
text
:
this
.
textLoad
,
url
:
url
,
...
...
@@ -211,7 +235,6 @@ Ext.define('App.panel.WithUrlSelector', {
iframe
=
this
.
mainPanel
.
getEl
().
getById
(
'
mainPanelIframe
'
);
iframe
.
on
(
'
load
'
,
function
()
{
Ext
.
MessageBox
.
hide
();
this
.
selectorPanel
.
enable
();
},
this
,
{
single
:
true
});
}
},
...
...
@@ -268,5 +291,14 @@ Ext.define('App.panel.WithUrlSelector', {
for
(
i
=
0
;
i
<
fields
.
length
;
i
+=
1
)
{
fields
[
i
].
reset
();
}
},
/**
* Remove the mask for the panel and its selector.
*
*/
unmask
:
function
()
{
"
use strict
"
;
this
.
setLoading
(
false
);
}
});
\ No newline at end of file
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