dont have loading video twice
This commit is contained in:
parent
e1622b6a10
commit
08e9398ab3
|
@ -47,12 +47,12 @@
|
||||||
'callback': function() { $.noop(); } //function to call after done instantiating pandoraVideo object, called with the object.
|
'callback': function() { $.noop(); } //function to call after done instantiating pandoraVideo object, called with the object.
|
||||||
}, dataOptions),
|
}, dataOptions),
|
||||||
id = opts.id,
|
id = opts.id,
|
||||||
$loading = $('<div />').addClass("pandoraLoading").text("Loading video...").appendTo($this),
|
//$loading = $('<div />').addClass("pandoraLoading").text("Loading video...").appendTo($this),
|
||||||
sendData = JSON.stringify({'id': id, 'keys': opts.keys});
|
sendData = JSON.stringify({'id': id, 'keys': opts.keys});
|
||||||
|
|
||||||
//get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback
|
//get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback
|
||||||
var deferred = $.post(opts.api, {'action': opts.action, 'data': sendData}, function(response) {
|
var deferred = $.post(opts.api, {'action': opts.action, 'data': sendData}, function(response) {
|
||||||
$loading.hide().remove();
|
//$loading.hide().remove();
|
||||||
var pandora = new PandoraVideo(id, response.data, $this, opts);
|
var pandora = new PandoraVideo(id, response.data, $this, opts);
|
||||||
pandora.render();
|
pandora.render();
|
||||||
opts.callback(pandora);
|
opts.callback(pandora);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user