From 8a9a65a80a2d2da0dd823824abab9af38d66ba29 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 15 Jun 2016 14:45:05 +0100 Subject: [PATCH 1/2] fix the download and compile endpoint used by zip --- .../web/app/coffee/Features/Compile/CompileController.coffee | 2 +- .../UnitTests/coffee/Compile/CompileControllerTests.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/app/coffee/Features/Compile/CompileController.coffee b/services/web/app/coffee/Features/Compile/CompileController.coffee index 7a84635bed..c927e6b666 100755 --- a/services/web/app/coffee/Features/Compile/CompileController.coffee +++ b/services/web/app/coffee/Features/Compile/CompileController.coffee @@ -101,7 +101,7 @@ module.exports = CompileController = logger.err err:err, project_id:project_id, "something went wrong compile and downloading pdf" res.sendStatus 500 url = "/project/#{project_id}/output/output.pdf" - CompileController.proxyToClsi project_id, user_id, url, req, res, next + CompileController.proxyToClsi project_id, url, req, res, next getFileFromClsi: (req, res, next = (error) ->) -> project_id = req.params.Project_id diff --git a/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee b/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee index 50f1ec6221..97b41fb33b 100644 --- a/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee @@ -352,9 +352,9 @@ describe "CompileController", -> it "should proxy the res to the clsi with correct url", (done)-> @CompileController.compileAndDownloadPdf @req, @res - sinon.assert.calledWith @CompileController.proxyToClsi, @project_id, @user_id, "/project/#{@project_id}/output/output.pdf", @req, @res + sinon.assert.calledWith @CompileController.proxyToClsi, @project_id, "/project/#{@project_id}/output/output.pdf", @req, @res - @CompileController.proxyToClsi.calledWith(@project_id, @user_id, "/project/#{@project_id}/output/output.pdf", @req, @res).should.equal true + @CompileController.proxyToClsi.calledWith(@project_id, "/project/#{@project_id}/output/output.pdf", @req, @res).should.equal true done() describe "wordCount", -> From e891a47a9e27af1dd2f81fb1690ba10f529bdbd1 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Wed, 15 Jun 2016 15:27:30 +0100 Subject: [PATCH 2/2] Better support for larger text in keyboard tooltips. --- services/web/app/views/project/editor/pdf.jade | 2 +- services/web/public/stylesheets/app/editor/pdf.less | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index 90497b2eb0..ce5bd16b53 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -2,7 +2,7 @@ div.full-size.pdf(ng-controller="PdfController") .toolbar.toolbar-tall .btn-group( dropdown, - tooltip="#{translate('recompile_pdf')} ({{modifierKey}} + Enter)" + tooltip-html="'#{translate('recompile_pdf')} ({{modifierKey}} + Enter)'" tooltip-class="keyboard-tooltip" tooltip-popup-delay="500" tooltip-append-to-body="true" diff --git a/services/web/public/stylesheets/app/editor/pdf.less b/services/web/public/stylesheets/app/editor/pdf.less index 0560fac2a0..6e813d5eaf 100644 --- a/services/web/public/stylesheets/app/editor/pdf.less +++ b/services/web/public/stylesheets/app/editor/pdf.less @@ -170,5 +170,11 @@ } .keyboard-tooltip { + .tooltip-inner { + max-width: none; + } +} + +.keyboard-shortcut { white-space: nowrap; } \ No newline at end of file