[UPD] use viewerjs 0.5.7

This commit is contained in:
Holger Brunn
2015-07-21 11:13:01 +02:00
parent fefccb3e14
commit 3b4e8899a2
20 changed files with 20256 additions and 23404 deletions

View File

@@ -21,20 +21,13 @@
// This file contains tweaks for viewerjs itself and is not meant to be run in
// OpenERP's context
var original_loadDocument = loadDocument;
loadDocument = function(documentUrl)
var original_Viewer = Viewer;
Viewer = function(plugin, parameters)
{
original_loadDocument.apply(this, arguments);
var original_onload = window.onload;
window.onload = function()
var matches = (/&title=([^&]+)&/).exec(window.location.hash);
if(matches && matches.length > 1)
{
original_onload();
var matches = (/&title=([^&]+)&/).exec(window.location.hash);
if(matches && matches.length > 1)
{
document.title = decodeURIComponent(matches[1]);
document.getElementById('documentName').innerHTML = document.title;
}
};
parameters.title = decodeURIComponent(matches[1]);
}
return original_Viewer(plugin, parameters);
}