diff --git a/public/res/main.js b/public/res/main.js
index f0148d0e..8f05bcb5 100644
--- a/public/res/main.js
+++ b/public/res/main.js
@@ -178,7 +178,7 @@ catch(e) {
window.viewerMode = /(^| )viewer($| )/.test(document.body.className);
// Keep the theme in a global variable
-window.theme = localStorage.themeV3 || 'default';
+window.theme = localStorage.themeV4 || 'default';
var themeModule = "less!themes/" + window.theme;
if(window.baseDir.indexOf('-min') !== -1) {
themeModule = "css!themes/" + window.theme;
diff --git a/public/res/settings.js b/public/res/settings.js
index 79ecb47c..03f5feea 100644
--- a/public/res/settings.js
+++ b/public/res/settings.js
@@ -21,41 +21,41 @@ define([
dropboxFullAccess: true,
githubFullAccess: true,
template: [
- '\n',
- '\n',
- '
\n',
- '\n',
- '<%= documentTitle %>\n',
- '\n',
- '\n',
- '\n',
- '<%= documentHTML %>
\n',
+ '',
+ '',
+ '',
+ '',
+ '<%= documentTitle %>',
+ '',
+ '',
+ '',
+ '<%= documentHTML %>
',
''
- ].join(""),
+ ].join('\n'),
pdfTemplate: [
- '\n',
- '\n',
- '\n',
- '\n',
- '<%= documentTitle %>\n',
- '\n',
- '\n',
- '\n',
- '\n',
- '<%= documentHTML %>\n',
+ '',
+ '',
+ '',
+ '',
+ '<%= documentTitle %>',
+ '',
+ '',
+ '',
+ '',
+ '<%= documentHTML %>',
''
- ].join(""),
- pdfOptions: '{}',
+ ].join('\n'),
+ pdfOptions: [
+ '{',
+ ' "marginTop": 25,',
+ ' "marginRight": 25,',
+ ' "marginBottom": 25,',
+ ' "marginLeft": 25,',
+ ' "pageSize": "A4"',
+ '}'
+ ].join('\n'),
sshProxy: constants.SSH_PROXY_URL,
extensionSettings: {}
};
diff --git a/public/res/storage.js b/public/res/storage.js
index d05f61bb..f0f8fd3c 100644
--- a/public/res/storage.js
+++ b/public/res/storage.js
@@ -239,6 +239,21 @@ define([
version = "v19";
}
+ if(version == 'v19') {
+ // Force new theme by using themeV4 variable
+ localStorage.removeItem("themeV3");
+ // Force welcome tour
+ localStorage.removeItem("welcomeTour");
+ if(_.has(localStorage, 'settings')) {
+ settings = JSON.parse(localStorage.settings);
+ // Remove PDF settings as it's a new web service
+ delete settings.pdfTemplate;
+ delete settings.pdfPageSize;
+ localStorage.settings = JSON.stringify(settings);
+ }
+ version = "v20";
+ }
+
localStorage.version = version;
return localStorage;
});