// vim: et:ts=4:sw=4:sts=4:ft=js /*@ Ox.LoadingIcon Loading Icon Element () -> Loading Icon Element (options) -> Loading Icon Element (options, self) -> Loading Icon Element options Options object size size of icon self Shared private variable @*/ Ox.LoadingIcon = function(options, self) { self = self || {}; var that = Ox.Element('', self) .defaults({ size: 'medium' }) .options(options || {}) .attr({ src: Ox.UI.getImagePath('symbolLoadingAnimated.svg') }) .addClass( 'OxLoadingIcon Ox' + Ox.toTitleCase(self.options.size) ); /*@ start Start loading animation () -> Loading Icon Element @*/ that.start = function() { that.animate({ opacity: 1 }, 250); return that; }; /*@ stop Stop loading animation () -> Loading Icon Element @*/ that.stop = function() { that.animate({ opacity: 0 }, 250); return that; }; return that; };