Fixed #5. Default zoom level's can now be defined for PDF and ODF documents.

This commit is contained in:
Christoph Haas
2015-06-17 15:49:42 +02:00
parent 94d4b9ed70
commit df647f6b74
3 changed files with 30 additions and 5 deletions

View File

@@ -172,7 +172,14 @@ Zarafa.plugins.fileviewer.ViewerPanel = Ext.extend(Ext.Panel, {
var options = '';
if(Ext.isDefined(extension)) {
options = '?type=' + extension;
if (extension === 'pdf'){
options += '?zoom=' + container.getSettingsModel().get('zarafa/v1/plugins/fileviewer/config_pdf_default_zoom');
} else if((/(od[tps])$/i).test(extension)) {
options += '?zoom=' + container.getSettingsModel().get('zarafa/v1/plugins/fileviewer/config_odf_default_zoom');
} else {
options += '?zoom=auto';
}
options += '&type=' + extension;
}
return pluginRoot + this.viewerjsPath + options + '#' + url;