only use current search if its inside a layer

This commit is contained in:
j 2019-11-01 15:22:53 +01:00
parent ae2e3e45c6
commit 85095eda44
2 changed files with 9 additions and 1 deletions

View file

@ -28,7 +28,7 @@ pandora.ui.editor = function(data) {
enableSetPosterFrame: !pandora.site.media.importFrames && data.editable,
enableSubtitles: ui.videoSubtitles,
find: ui.itemFind,
findLayer: ui._findState.key,
findLayer: pandora.getFindLayer(),
getFrameURL: function(position) {
return pandora.getMediaURL('/' + ui.item + '/' + ui.videoResolution + 'p' + position + '.jpg?' + data.modified);
},

View file

@ -1439,6 +1439,14 @@ pandora.getFoldersWidth = function(section) {
return width;
};
pandora.getFindLayer = function() {
var key = pandora.user.ui._findState.key
if (!!Ox.getObjectById(pandora.site.layers, key)) {
key = 'all'
}
return key
};
pandora.getHash = function(state, callback) {
// FIXME: remove this
var embedKeys = [