Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
19c141a9
Commit
19c141a9
authored
Dec 02, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added updateable status messages through JQM loader
parent
a8116908
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
16 deletions
+77
-16
css/css.css
css/css.css
+46
-0
js/erp5_loader.js
js/erp5_loader.js
+31
-16
No files found.
css/css.css
View file @
19c141a9
...
...
@@ -321,4 +321,50 @@ html body form input.secure_form {
.crumbs
a
.ui-btn
:after
{
margin-top
:
-6px
;
font-size
:
1.2em
;
}
/* ============================== status loader ============================== */
/* fadeout "heartbeat" transition with 1sec delay */
.loader_icon
{
display
:
inline-block
;
text-align
:
center
;
width
:
100%
;
}
.loader_icon
:after
{
font-size
:
2.5em
;
}
.loader_message
{
text-align
:
center
;
}
.ui-loaderx
{
-webkit-animation-timing-function
:
ease-in
;
-webkit-animation-duration
:
375ms
;
-moz-animation-timing-function
:
ease-in
;
-moz-animation-duration
:
375ms
;
animation-timing-function
:
ease-in
;
animation-duration
:
375ms
;
}
@-webkit-keyframes
fadeout
{
0
%
{
opacity
:
1
;
}
50
%
{
opacity
:
1
;
}
100
%
{
opacity
:
0
;
}
}
@-moz-keyframes
fadeout
{
0
%
{
opacity
:
1
;
}
50
%
{
opacity
:
1
;
}
100
%
{
opacity
:
0
;
}
}
@keyframes
fadeout
{
0
%
{
opacity
:
1
;
}
50
%
{
opacity
:
1
;
}
100
%
{
opacity
:
0
;
}
}
.ui-loaderx
{
opacity
:
0
;
-webkit-animation-duration
:
1000ms
;
-webkit-animation-name
:
fadeout
;
-moz-animation-duration
:
1000ms
;
-moz-animation-name
:
fadeout
;
animation-duration
:
1000ms
;
animation-name
:
fadeout
;
}
\ No newline at end of file
js/erp5_loader.js
View file @
19c141a9
...
...
@@ -3483,10 +3483,7 @@
);
// trigger sort after 500ms delay, so user can pick sorting criteria
if
(
app
.
timer
)
{
window
.
clearTimeout
(
app
.
timer
);
app
.
timer
=
0
;
}
util
.
clearTimer
();
for
(
i
=
0
;
i
<
config
.
state
.
query
.
sort_on
.
length
;
i
+=
1
)
{
if
(
config
.
state
.
query
.
sort_on
[
i
][
0
]
===
column
)
{
...
...
@@ -4793,10 +4790,7 @@
if
((
last
&&
last
===
val
)
&&
type
!==
"
Submit
"
)
{
return
;
}
if
(
app
.
timer
)
{
window
.
clearTimeout
(
app
.
timer
);
app
.
timer
=
0
;
}
util
.
clearTimer
();
// give user half second to pick his state
app
.
timer
=
window
.
setTimeout
(
function
()
{
...
...
@@ -4964,15 +4958,30 @@
};
/**
* Show and hide the jQuery Mobile loader passing a status message
* Clear timer on retriggering methods
* @clearTimer
*/
util
.
clearTimer
=
function
()
{
if
(
app
.
timer
)
{
window
.
clearTimeout
(
app
.
timer
);
app
.
timer
=
0
;
}
};
/**
* Show and hide the jQuery Mobile status message (loader/icon/message)
* @method loader
* @param {boolean} show Whether to show or hide the loader
* @param {message} message The message to display in the loader
* @param {icon} icon Which icon to display when overriding the loader
* @param {string} message The message to display in the loader
* @param {string} msg_i18n lookup for status message
* @param {string} icon Which icon to display when overriding the loader
*/
util
.
showStatus
=
function
(
show
,
message
,
icon
)
{
util
.
updateStatus
=
function
(
show
,
message
,
msg_i18n
,
icon
)
{
var
text_to_display
=
i18n
?
factory
.
map_actions
.
translateLookup
(
msg_i18n
)
:
message
;
// hm... jQuery...
// hm... jQuery...
if
(
app
.
default_dict
.
loader
)
{
$
.
mobile
.
loading
(
show
?
"
show
"
:
"
hide
"
,
...
...
@@ -4980,11 +4989,17 @@
"
theme
"
:
app
.
default_dict
.
loader_theme
,
"
text
"
:
icon
===
undefined
?
message
:
""
,
"
html
"
:
icon
===
undefined
?
""
:
'
<span class="ui-icon-
'
+
icon
+
'
loader_icon> </span><h1 class="loader_message">
'
+
message
+
'
</h1>
'
'
<span class="ui-icon-
'
+
icon
+
'
loader_icon> </span>
'
+
'
<h1 class="loader_message">
'
+
text_to_display
+
'
</h1>
'
}
);
// allow multiple updates and remove after 1000ms
util
.
clearTimer
();
app
.
timer
=
window
.
setTimeout
(
function
()
{
$
.
mobile
.
loading
(
"
hide
"
);
},
500
);
}
else
{
util
.
errorHandler
({
"
error
"
:
"
showStatus: Loader not enabled
"
});
}
...
...
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