mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 14:58:52 +01:00
Add loader animation to iframe src change
This commit is contained in:
parent
64fd8ec86b
commit
ad735932f1
@ -111,7 +111,24 @@ var et2_iframe = et2_valueWidget.extend(
|
||||
set_src: function(_value) {
|
||||
if(_value.trim() != "")
|
||||
{
|
||||
this.htmlNode.attr("src", _value);
|
||||
if(_value.trim() == 'about:blank')
|
||||
{
|
||||
this.htmlNode.attr("src", _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Load the new page, but display a loader
|
||||
var loader = $j('<div class="et2_iframe loading"/>');
|
||||
this.htmlNode
|
||||
.before(loader);
|
||||
window.setTimeout(jQuery.proxy(function() {
|
||||
this.htmlNode.attr("src", _value)
|
||||
.one('load',function() {
|
||||
loader.remove();
|
||||
});
|
||||
},this),0);
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -724,6 +724,16 @@ table.et2_grid {
|
||||
table.et2_grid tbody.ui-sortable > tr:not(.th) {
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
/**
|
||||
* irame & loader
|
||||
*/
|
||||
.et2_iframe.loading {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create some spacing for widgets inside labels
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user