dont call api.setUI if in embed or print view, otherwise ui.hash.query stays around

This commit is contained in:
j 2013-05-17 11:48:18 +00:00
parent a07767d658
commit cd911df051
2 changed files with 8 additions and 1 deletions

View file

@ -182,7 +182,7 @@ pandora.UI = (function() {
}
});
});
Ox.len(set) && pandora.api.setUI(set);
!pandora.isEmbedURL() && !pandora.isPrintURL() && Ox.len(set) && pandora.api.setUI(set);
triggerEvents && Ox.forEach(trigger, function(val, key) {
Ox.Log('UI', 'TRIGGER ' + key + ' ' + val);
Ox.forEach(pandora.$ui, function(element) {

View file

@ -1193,6 +1193,13 @@ pandora.isEmbedURL = function(url) {
&& Ox.unserialize(hash.substr(2), true).embed === true
};
pandora.isPrintURL = function(url) {
url = url || document.location.href;
var hash = Ox.parseURL(url).hash;
return hash.substr(0, 2) == '#?'
&& Ox.unserialize(hash.substr(2), true).print === true
};
pandora.logEvent = function(data, event, element) {
var element = this,
handlers = self.eventHandlers ? self.eventHandlers[event] : [];