Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
38 lines
No EOL
686 B
JavaScript
Executable file
38 lines
No EOL
686 B
JavaScript
Executable file
define(function(require, exports, module) {
|
|
'use strict';
|
|
|
|
var debug = require('debug')('view:loading-screen');
|
|
var View = require('view');
|
|
|
|
module.exports = View.extend({
|
|
name: 'loading-screen',
|
|
fadeTime: 300,
|
|
|
|
initialize: function() {
|
|
this.render();
|
|
},
|
|
|
|
render: function() {
|
|
this.el.innerHTML = this.template;
|
|
|
|
// Clean up
|
|
delete this.template;
|
|
|
|
debug('rendered');
|
|
return this;
|
|
},
|
|
|
|
show: function(done) {
|
|
this.reflow = this.el.offsetTop;
|
|
View.prototype.show.call(this);
|
|
},
|
|
|
|
hide: function(done) {
|
|
View.prototype.hide.call(this);
|
|
if (done) { setTimeout(done, this.fadeTime); }
|
|
},
|
|
|
|
template: '<progress></progress>'
|
|
});
|
|
|
|
}); |