Fixed #5. Default zoom level's can now be defined for PDF and ODF documents.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user