Ox.LoadingScreen: use proper LoadingIcon, add start and stop methods
This commit is contained in:
parent
e1134f2f4c
commit
3429ac3319
1 changed files with 14 additions and 5 deletions
|
@ -35,11 +35,8 @@ Ox.LoadingScreen = function(options, self) {
|
||||||
|
|
||||||
setSizes();
|
setSizes();
|
||||||
|
|
||||||
$('<img>')
|
self.$loadingIcon = Ox.LoadingIcon({
|
||||||
.attr({src: Ox.UI.getImageURL('symbolLoadingAnimated')})
|
size: self.options.size
|
||||||
.css({
|
|
||||||
width: self.options.size + 'px',
|
|
||||||
height: self.options.size + 'px'
|
|
||||||
})
|
})
|
||||||
.appendTo(self.$box);
|
.appendTo(self.$box);
|
||||||
|
|
||||||
|
@ -68,6 +65,18 @@ Ox.LoadingScreen = function(options, self) {
|
||||||
self.$box.css(css);
|
self.$box.css(css);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
that.start = function(callback) {
|
||||||
|
self.$loadingIcon.start(callback);
|
||||||
|
self.$text && self.$text.stop().animate({opacity: 1}, 250);
|
||||||
|
return that;
|
||||||
|
};
|
||||||
|
|
||||||
|
that.stop = function(callback) {
|
||||||
|
self.$loadingIcon.stop(callback);
|
||||||
|
self.$text && self.$text.stop().animate({opacity: 0}, 250);
|
||||||
|
return that;
|
||||||
|
};
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
Loading…
Reference in a new issue