Fixed viewer issues

This commit is contained in:
benweet 2014-08-30 14:26:07 +01:00
parent f8e5b1e2ff
commit ab49793420
3 changed files with 6 additions and 4 deletions

View File

@ -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);

View File

@ -14,7 +14,7 @@
</div>
</div>
</div>
<ul class="nav pull-right right-buttons">
<ul class="nav pull-right">
<li class="btn-group">
<button class="btn btn-success action-edit-document hide"
title="Edit this document">
@ -33,8 +33,6 @@
class="icon-download"></i> Export as HTML</a></li>
<li><a class="action-download-template" href="#"><i
class="icon-download"></i> Export using template</a></li>
<li><a class="action-download-pdf" href="#"><i
class="icon-download"></i> Export as PDF</a></li>
</ul>
</li>
</ul>

View File

@ -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;