only load embed player if it was not removed already

This commit is contained in:
j 2013-08-10 10:53:59 +00:00
commit 7790d02af7
2 changed files with 19 additions and 3 deletions

View file

@ -45,8 +45,12 @@ pandora.ui.embedPanel = function() {
return that;
};
that.reloadPanel = function() {
that.setElement(pandora.$ui.embedPanel = pandora.ui.embedPanel());
//only add reloadPanel if not defined by embed element
that.reloadPanel = that.reloadPanel || function(data) {
if (Ox.isUndefined(data) || data.value != data.previousValue) {
pandora.$ui.embedPanel.replaceWith(pandora.$ui.embedPanel = pandora.ui.embedPanel());
return pandora.$ui.ui.embedPanel;
}
return that;
};