diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-12-10 17:17:11 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-12-10 17:17:11 +0100 |
commit | 368ad332a0fcd1cd7404c24128b8cbc0454a0bcf (patch) | |
tree | d9937cb87d67e6b0d8aeecd547d4adeeefbfd949 /view | |
parent | bde32eb7dfba95b168d8e2d295835a7ce596c2ba (diff) | |
download | volse-hubzilla-368ad332a0fcd1cd7404c24128b8cbc0454a0bcf.tar.gz volse-hubzilla-368ad332a0fcd1cd7404c24128b8cbc0454a0bcf.tar.bz2 volse-hubzilla-368ad332a0fcd1cd7404c24128b8cbc0454a0bcf.zip |
even more wiki fullscreen optimisation
Diffstat (limited to 'view')
-rw-r--r-- | view/css/mod_wiki.css | 1 | ||||
-rw-r--r-- | view/tpl/wiki.tpl | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/view/css/mod_wiki.css b/view/css/mod_wiki.css index 770689916..83f17c820 100644 --- a/view/css/mod_wiki.css +++ b/view/css/mod_wiki.css @@ -1,6 +1,7 @@ #ace-editor { position: relative; width: 100%; + height: 500px; border: 1px solid #ccc; border-top: 0px; } diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 8ccb90d98..617355ccf 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -175,6 +175,9 @@ if($('main').hasClass('.fullscreen')) { adjustFullscreenEditorHeight(); } + else { + adjustInlineEditorHeight(); + } }, 500); // Return the focus to the editor allowing immediate text entry $('#page-tools').show(); @@ -336,21 +339,22 @@ $('#editor, #ace-editor').height($(window).height() - $('#id_commitMsg_wrapper').outerHeight(true) - $('.section-title-wrapper').outerHeight(true) - $('#wiki-nav-tabs').outerHeight(true) - 17); {{if !$mimeType || $mimeType == 'text/markdown'}} editor.setOptions({ - maxLines: '', - minLines: '' + maxLines: null, + minLines: null }); editor.resize(); {{/if}} } function adjustInlineEditorHeight() { - $('#editor').height(500); {{if !$mimeType || $mimeType == 'text/markdown'}} editor.setOptions({ maxLines: Infinity, minLines: 30 }); - + editor.resize(); + {{else}} + editor.height(editor[0].scrollHeight); {{/if}} } |