From 331b4dddeacecbea8ab035bd59df931181a22da6 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 19 Jul 2017 17:50:08 +0200 Subject: [PATCH 1/4] Clean debugging code --- www/pad/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/pad/main.js b/www/pad/main.js index 4a4c87fa0..58c48b699 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -549,7 +549,7 @@ define([ var $templateButton = Cryptpad.createButton('template', true, templateObj); $rightside.append($templateButton); } -console.log('init'); + /* add an export button */ var $export = Cryptpad.createButton('export', true, {}, exportFile); $drawer.append($export); From 140964478e270435078b845019903242544474ac Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jul 2017 09:54:44 +0200 Subject: [PATCH 2/4] Enter + shift key to add a new line in chat --- www/common/common-messaging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js index 976ed706b..7fb1c9707 100644 --- a/www/common/common-messaging.js +++ b/www/common/common-messaging.js @@ -338,7 +338,7 @@ define([ });*/ var onKeyDown = function (e) { if (e.keyCode === 13) { - if (e.ctrlKey) { + if (e.ctrlKey || e.shiftKey) { var val = this.value; if (typeof this.selectionStart === "number" && typeof this.selectionEnd === "number") { var start = this.selectionStart; From 3bd5f01e53f3729a229ba354c5ce705ab2370e2d Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jul 2017 09:55:18 +0200 Subject: [PATCH 3/4] Fix slide ratio in preview mode --- www/slide/slide.less | 49 +++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/www/slide/slide.less b/www/slide/slide.less index 3fcf134b8..069bc15fd 100644 --- a/www/slide/slide.less +++ b/www/slide/slide.less @@ -98,30 +98,37 @@ body { } } } -.preview .cp { - flex: 1; - overflow: hidden; - div#modal:not(.shown) { - position: relative; - top: auto; - left: auto; - width: auto; - display: block; - height: 100%; - #content { - .slide-container { - width: 100%; +.preview { + .cp { + width: 50vw; + overflow: hidden; + div#modal:not(.shown) { + position: relative; + top: auto; + left: auto; + width: auto; + display: block; + height: 100%; + #content { + .slide-container { + width: 100%; + } + .slide-frame { + width: 50vw; + height: 28.125vw; // height:width ratio = 9/16 = .5625 + max-height: ~"calc(100vh - 96px)"; + max-width: ~"calc(16 / 9 * (100vh - 96px))"; + //max-height: 100vh; + //max-width: 177.78vh; // 16/9 = 1.778 + } } - .slide-frame { - width: 50vw; - height: 28.125vw; // height:width ratio = 9/16 = .5625 - max-height: 100vh; - max-width: 177.78vh; // 16/9 = 1.778 + #button_exit { + visibility: hidden; } } - #button_exit { - visibility: hidden; - } + } + .CodeMirror { + flex: 1; } } .cp { From a5a73ce326d17509c204406ed354eacdd2d65314 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jul 2017 14:41:51 +0200 Subject: [PATCH 4/4] Fix print button in slide --- www/common/common-interface.js | 1 - www/common/common-messaging.js | 1 - www/slide/main.js | 9 ++++----- www/slide/slide.js | 11 +++++++---- www/slide/slide.less | 17 ++++++++++++++++- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 391c334a8..43c07123b 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -299,7 +299,6 @@ define([ var MutationObserver = window.MutationObserver; var addTippy = function (el) { if (el.nodeName === 'IFRAME') { return; } - console.log(el); Tippy(el, { position: 'bottom', distance: 0, diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js index 7fb1c9707..5249a8884 100644 --- a/www/common/common-messaging.js +++ b/www/common/common-messaging.js @@ -227,7 +227,6 @@ define([ if (!isId) { return; } var decryptedMsg = channel.encryptor.decrypt(msg); - console.log(decryptedMsg); var parsed = JSON.parse(decryptedMsg); if (parsed[0] !== Types.mapId && parsed[0] !== Types.mapIdAck) { return; } if (parsed[2] !== sender || !parsed[1]) { return; } diff --git a/www/slide/main.js b/www/slide/main.js index b3347e501..480bd5921 100644 --- a/www/slide/main.js +++ b/www/slide/main.js @@ -95,7 +95,7 @@ define([ } }); - Slide.setModal(APP, $modal, $content, $pad, ifrw, slideOptions, initialState); + Slide.setModal($modal, $content, $pad, ifrw, slideOptions, initialState); var enterPresentationMode = function (shouldLog) { Slide.show(true, editor.getValue()); @@ -282,7 +282,6 @@ define([ // Slide number $('', {type: 'checkbox', id: 'checkNumber', checked: slideOptionsTmp.slide}).on('change', function () { var c = this.checked; - console.log(c); slideOptionsTmp.slide = c; }).appendTo($p).css('width', 'auto'); $('