Loading mask when adding movies
This commit is contained in:
@@ -285,6 +285,8 @@ Block.Search.Item = new Class({
|
|||||||
var self = this;
|
var self = this;
|
||||||
(e).preventDefault();
|
(e).preventDefault();
|
||||||
|
|
||||||
|
self.loadingMask();
|
||||||
|
|
||||||
Api.request('movie.add', {
|
Api.request('movie.add', {
|
||||||
'data': {
|
'data': {
|
||||||
'identifier': self.info.imdb,
|
'identifier': self.info.imdb,
|
||||||
@@ -358,6 +360,25 @@ Block.Search.Item = new Class({
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
loadingMask: function(){
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
var s = self.options.getSize();
|
||||||
|
|
||||||
|
self.mask = new Element('span.mask', {
|
||||||
|
'styles': {
|
||||||
|
'width': s.x,
|
||||||
|
'height': s.y
|
||||||
|
}
|
||||||
|
}).inject(self.options).fade('hide').position({
|
||||||
|
'relativeTo': self.options
|
||||||
|
})
|
||||||
|
|
||||||
|
createSpinner(self.mask)
|
||||||
|
self.mask.fade('in')
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
toElement: function(){
|
toElement: function(){
|
||||||
return this.el
|
return this.el
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user