diff --git a/customize.dist/main.css b/customize.dist/main.css index ffda4ba19..4b424e4d8 100644 --- a/customize.dist/main.css +++ b/customize.dist/main.css @@ -337,6 +337,12 @@ html.cp, font-family: Georgia,Cambria,serif; height: 100; } +.cp:not(.poll) #language-selector { + position: absolute; + top: 0px; + right: 0px; + display: inline-block; +} .cp { /* buttons */ /* Tables @@ -348,11 +354,6 @@ html.cp, font-weight: 400; line-height: 2rem; } -.cp #language-selector { - position: absolute; - top: 0px; - right: 0px; -} .cp a.github-corner > svg { fill: #00ADEE; color: #302B28; @@ -652,7 +653,7 @@ html.cp, } .cp form.realtime table input[type="text"], .cp div.realtime table input[type="text"] { - height: 100%; + height: auto; border: 1px solid #302B28; width: 80%; } @@ -902,3 +903,6 @@ html.cp, .cp div#modal #addtime { border-bottom-left-radius: 5px; } +#cors-store { + display: none; +} diff --git a/customize.dist/share/frame.js b/customize.dist/share/frame.js index 86147ca4b..d3d4fb00d 100644 --- a/customize.dist/share/frame.js +++ b/customize.dist/share/frame.js @@ -18,12 +18,13 @@ onload('[timeoutError] could not load iframe at ' + src); }, timeout); + iframe.setAttribute('id', 'cors-store'); + iframe.onload = function (e) { onload(void 0, iframe, e); window.clearTimeout(to); }; iframe.setAttribute('src', src); - iframe.style.display = 'none'; parent.appendChild(iframe); }; diff --git a/customize.dist/src/less/cryptpad.less b/customize.dist/src/less/cryptpad.less index 21c9e1e71..85923ce11 100644 --- a/customize.dist/src/less/cryptpad.less +++ b/customize.dist/src/less/cryptpad.less @@ -14,6 +14,15 @@ html.cp, .cp body { height: 100; } +.cp:not(.poll) { + #language-selector { + position: absolute; + top: 0px; + right: 0px; + display: inline-block; + } +} + .cp { body { @@ -22,12 +31,6 @@ body { line-height: 2rem; } -#language-selector { - position: absolute; - top: 0px; - right: 0px; -} - a.github-corner > svg { fill: @cp-blue; color: @base; @@ -359,7 +362,7 @@ form.realtime, div.realtime { input { &[type="text"] { - height: 100%; + height: auto; border: 1px solid @base; width: 80%; } @@ -625,3 +628,7 @@ div.modal, div#modal { } } +// hack for our cross-origin iframe +#cors-store { + display: none; +} diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index 21182b991..454eedbf7 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -242,6 +242,7 @@ right: 0; span:not(.cryptpad-lag) { vertical-align: top; + display: inline-block; } @media screen and (max-width: @media-narrow-screen) { top: 3em; diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index ed3f95e14..cd9545990 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -247,6 +247,7 @@ } .cryptpad-toolbar-top .cryptpad-user span:not(.cryptpad-lag) { vertical-align: top; + display: inline-block; } @media screen and (max-width: 400px) { .cryptpad-toolbar-top .cryptpad-user { diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 511ee3138..260e7d22d 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -506,12 +506,17 @@ define([ }; $(config.ifrw).on('click', removeDropdowns); $(config.ifrw).on('click', cancelEditTitle); + + try { if (config.ifrw.$('iframe').length) { var innerIfrw = config.ifrw.$('iframe').each(function (i, el) { $(el.contentWindow).on('click', removeDropdowns); $(el.contentWindow).on('click', cancelEditTitle); }); } + } catch (e) { + // empty try catch in case this iframe is problematic + } } // Update user list diff --git a/www/pad/main.js b/www/pad/main.js index bdd8d0a71..09c2be0f4 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -627,7 +627,10 @@ define([ // this should only ever get called once, when the chain syncs var onReady = realtimeOptions.onReady = function (info) { - editor.execCommand('maximize'); + if (!APP.isMaximized) { + editor.execCommand('maximize'); + APP.isMaximized = true; + } module.patchText = TextPatcher.create({ realtime: info.realtime, diff --git a/www/poll/index.html b/www/poll/index.html index 17f951997..da7a6ed80 100644 --- a/www/poll/index.html +++ b/www/poll/index.html @@ -80,6 +80,7 @@ width: 50px; } #tableScroll { + overflow-y: hidden; overflow-x: auto; margin-left: calc(30% - 50px + 29px); max-width: 70%; width: auto; display: inline-block; } #description { diff --git a/www/poll/old/main.js b/www/poll/old/main.js index a702028bd..2703530c7 100644 --- a/www/poll/old/main.js +++ b/www/poll/old/main.js @@ -1,8 +1,8 @@ define([ '/api/config?cb=' + Math.random().toString(16).substring(2), '/customize/messages.js?app=poll', - '/poll/table.js', - '/poll/wizard.js', + 'table.js', + 'wizard.js', '/bower_components/textpatcher/TextPatcher.js', '/bower_components/chainpad-listmap/chainpad-listmap.js', '/bower_components/chainpad-crypto/crypto.js', diff --git a/www/poll/old/wizard.js b/www/poll/old/wizard.js index 9bd23cd1a..b7a1cf04e 100644 --- a/www/poll/old/wizard.js +++ b/www/poll/old/wizard.js @@ -1,5 +1,5 @@ define([ - '/poll/table.js', + 'table.js', '/bower_components/jquery/dist/jquery.min.js', ], function (Table) { var $ = window.jQuery;