From 3d00191546da8e27eff7d11b817b24e81b7d7dc3 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 18 Sep 2014 12:50:06 +0200 Subject: [PATCH] [FIX] support old firefoxes not implementing window.location.origin --- attachment_preview/static/src/js/attachment_preview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachment_preview/static/src/js/attachment_preview.js b/attachment_preview/static/src/js/attachment_preview.js index b3f42766..32246141 100644 --- a/attachment_preview/static/src/js/attachment_preview.js +++ b/attachment_preview/static/src/js/attachment_preview.js @@ -25,7 +25,7 @@ openerp.attachment_preview = function(instance) openerp.attachment_preview.show_preview = function( attachment_id, attachment_url, attachment_extension, attachment_title) { - var url = window.location.origin + + var url = (window.location.origin || '') + '/attachment_preview/static/lib/ViewerJS/index.html#' + attachment_url.replace(window.location.origin, '') + '&title=' + encodeURIComponent(attachment_title || _t('Preview')) +