Ox.LoadingIcon: support passing a number as size
This commit is contained in:
parent
ccc7c86713
commit
e23fbb2d35
1 changed files with 8 additions and 8 deletions
|
@ -4,7 +4,7 @@
|
|||
Ox.LoadingIcon <f> Loading Icon Element
|
||||
([options[, self]]) -> <o:Ox.Element> Loading Icon Element
|
||||
options <o> Options object
|
||||
size <s|medium> size of icon
|
||||
size <n|s|16> size of icon
|
||||
self <o> Shared private variable
|
||||
@*/
|
||||
|
||||
|
@ -13,15 +13,15 @@ Ox.LoadingIcon = function(options, self) {
|
|||
self = self || {};
|
||||
var that = Ox.Element('<img>', self)
|
||||
.defaults({
|
||||
size: 'medium'
|
||||
size: 16
|
||||
})
|
||||
.options(options || {})
|
||||
.attr({
|
||||
src: Ox.UI.getImageURL('symbolLoading')
|
||||
})
|
||||
.addClass(
|
||||
'OxLoadingIcon Ox' + Ox.toTitleCase(self.options.size)
|
||||
);
|
||||
.addClass('OxLoadingIcon')
|
||||
.attr({src: Ox.UI.getImageURL('symbolLoading')});
|
||||
|
||||
Ox.isNumber(self.options.size)
|
||||
? that.css({width: self.options.size, height: self.options.size})
|
||||
: that.addClass('Ox' + Ox.toTitleCase(self.options.size));
|
||||
|
||||
/*@
|
||||
start <f> Start loading animation
|
||||
|
|
Loading…
Reference in a new issue