mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
[FIX] support old firefoxes not implementing window.location.origin
This commit is contained in:
parent
3a467efbd9
commit
3d00191546
@ -25,7 +25,7 @@ openerp.attachment_preview = function(instance)
|
|||||||
openerp.attachment_preview.show_preview = function(
|
openerp.attachment_preview.show_preview = function(
|
||||||
attachment_id, attachment_url, attachment_extension, attachment_title)
|
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_preview/static/lib/ViewerJS/index.html#' +
|
||||||
attachment_url.replace(window.location.origin, '') +
|
attachment_url.replace(window.location.origin, '') +
|
||||||
'&title=' + encodeURIComponent(attachment_title || _t('Preview')) +
|
'&title=' + encodeURIComponent(attachment_title || _t('Preview')) +
|
||||||
|
Loading…
Reference in New Issue
Block a user