Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

This commit is contained in:
ansuz
2017-07-03 16:43:57 +02:00
4 changed files with 38 additions and 31 deletions

View File

@@ -333,6 +333,11 @@ define([
if ($content.is(':visible')) { return void show(); }
hide();
});
$(window).on('resize', function () {
mobile = $('body').width() <= 600;
var h = $ck.is(':visible') ? -$ck.height() : 0;
$content.css('margin-top', h+'px');
});
$closeIcon.click(hide);
$button.click(function () {
var visible = $content.is(':visible');

View File

@@ -14,6 +14,7 @@
#cke_1_top {
overflow: visible;
padding: 0px;
display: flex;
}
#cke_1_toolbox {
display: inline-block;

View File

@@ -570,16 +570,10 @@ define([
// this should only ever get called once, when the chain syncs
realtimeOptions.onReady = function (info) {
if (!module.isMaximized) {
editor.execCommand('maximize');
module.isMaximized = true;
// We have to call it 3 times in Safari
// in order to have the editor fully maximized -_-
if ((''+window.navigator.vendor).indexOf('Apple') !== -1) {
editor.execCommand('maximize');
editor.execCommand('maximize');
}
$iframe.find('iframe.cke_wysiwyg_frame').css('width', '');
$iframe.find('iframe.cke_wysiwyg_frame').css('height', '');
}
// editor.execCommand('maximize') removes all the classes from the body tag
$iframe.find('body').addClass('app-pad');
if (module.realtime !== info.realtime) {
@@ -727,12 +721,11 @@ define([
if (Ckeditor) {
// mobile configuration
Ckeditor.config.toolbarCanCollapse = true;
Ckeditor.config.height = '72vh';
if (screen.height < 800) {
Ckeditor.config.toolbarStartupExpanded = false;
$('meta[name=viewport]').attr('content', 'width=device-width, initial-scale=1.0, user-scalable=no');
Ckeditor.config.toolbarStartupExpanded = false;
$('meta[name=viewport]').attr('content', 'width=device-width, initial-scale=1.0, user-scalable=no');
} else {
$('meta[name=viewport]').attr('content', 'width=device-width, initial-scale=1.0, user-scalable=yes');
$('meta[name=viewport]').attr('content', 'width=device-width, initial-scale=1.0, user-scalable=yes');
}
second(Ckeditor);
} else {