From ab497934204cd0e5d85a2b5d689642b61605b668 Mon Sep 17 00:00:00 2001 From: benweet Date: Sat, 30 Aug 2014 14:26:07 +0100 Subject: [PATCH] Fixed viewer issues --- public/res/fileMgr.js | 2 +- public/res/html/bodyViewer.html | 4 +--- public/res/layout.js | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/res/fileMgr.js b/public/res/fileMgr.js index 293b75e5..35265fbe 100644 --- a/public/res/fileMgr.js +++ b/public/res/fileMgr.js @@ -196,7 +196,7 @@ define([ var title = fileMgr.currentFile.title; var fileDesc = fileMgr.createFile(title, content); fileMgr.selectFile(fileDesc); - window.location.href = "."; + window.location.href = "editor"; }); $(".action-welcome-file").click(function() { var fileDesc = fileMgr.createFile(constants.WELCOME_DOCUMENT_TITLE, welcomeContent); diff --git a/public/res/html/bodyViewer.html b/public/res/html/bodyViewer.html index db8c587b..7d17b64c 100644 --- a/public/res/html/bodyViewer.html +++ b/public/res/html/bodyViewer.html @@ -14,7 +14,7 @@ - diff --git a/public/res/layout.js b/public/res/layout.js index 2b9104fd..b41159e8 100644 --- a/public/res/layout.js +++ b/public/res/layout.js @@ -205,6 +205,7 @@ define([ }); var navbarMarginWidth = 18 * 2 + 25 + 25; var buttonsDropdownWidth = 40; + var viewerButtonGroupWidth = 100; var workingIndicatorWidth = 18 + 70; function onResize() { @@ -228,6 +229,9 @@ define([ previewContentElt.style.paddingBottom = paddingBottom + 'px'; var maxWidth = navbarMarginWidth + workingIndicatorWidth + titleMinWidth + buttonsDropdownWidth; + if(window.viewerMode) { + maxWidth = navbarMarginWidth + workingIndicatorWidth + titleMinWidth + viewerButtonGroupWidth; + } var titleWidth = windowSize.width - maxWidth + titleMinWidth; navbarBtnGroups.forEach(function(group, index) { maxWidth += group.width;