diff --git a/static/js/editor.js b/static/js/editor.js index 562c3bc0f..6c3106b9f 100644 --- a/static/js/editor.js +++ b/static/js/editor.js @@ -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); }, diff --git a/static/js/utils.js b/static/js/utils.js index d2667546e..977c95e7c 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -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 = [