This is an automated email from the git hooks/post-receive script. New commit to branch feature/GIT in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git commit 0d663f924aff74c02284fdfe5854869870298b1f Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Mon May 11 10:26:53 2015 +0200 Change the UI to make it dependant of the screen width --- src/main/webapp/css/main.css | 28 ++++++++++++---------------- src/main/webapp/img/editor/post-it.png | Bin 6490 -> 6401 bytes src/main/webapp/js/preview.js | 14 ++++++++------ 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/main/webapp/css/main.css b/src/main/webapp/css/main.css index 7cbfdc7..48f45b3 100644 --- a/src/main/webapp/css/main.css +++ b/src/main/webapp/css/main.css @@ -23,7 +23,7 @@ body { font-family: Verdana,Arial,Helvetica,sans-serif; background-color: #b8b1b1; - width:1000px; + width: 80%; margin:auto; } @@ -163,7 +163,7 @@ li { #wrapper { background-image:url("../img/editor/head.png"); - background-repeat:no-repeat; + background-repeat:repeat-x; } @@ -176,14 +176,13 @@ li { } #headLogin { - position: relative; - bottom:40px; - left:556px; - margin:0; + position: absolute; background-image:url("../img/editor/post-it.png"); background-repeat:no-repeat; width:468px; height:190px; + right: 8%; + top: 0; } #authDiv { @@ -220,17 +219,14 @@ li { #commitArea { - position:relative; - bottom : 121px; - left : 255px; - width : 445px; + margin-left: 26%; + margin-top: 68px; + width: 40%; } #commitMessage { - width : 445px; - height : 50px; - max-height: 100px; - max-width: 445px; + width: 100%; + display: block; } /* Button */ @@ -352,14 +348,14 @@ li { } #largeEditorCode { - width: 490px; + width: 49%; display: inline-block; vertical-align: top; height: 600px; } #largeEditorPreview { - width: 490px; + width: 49%; display: inline-block; float: right; height: 600px; diff --git a/src/main/webapp/img/editor/post-it.png b/src/main/webapp/img/editor/post-it.png index ff72f77..f8a5093 100644 Binary files a/src/main/webapp/img/editor/post-it.png and b/src/main/webapp/img/editor/post-it.png differ diff --git a/src/main/webapp/js/preview.js b/src/main/webapp/js/preview.js index 90c9a7f..a942b5d 100644 --- a/src/main/webapp/js/preview.js +++ b/src/main/webapp/js/preview.js @@ -1,8 +1,9 @@ $(document).ready(function() { -var editors = document.getElementsByClassName('CodeMirror'); + // setting the editor's height relative to the button's bar height + var editors = document.getElementsByClassName('CodeMirror'); - if (editors.length == 1) { + if (editors.length == 1) { var edit = editors[0]; var findBar = document.getElementsByClassName("codemirror-ui-find-bar") @@ -11,9 +12,9 @@ var editors = document.getElementsByClassName('CodeMirror'); edit.style.height = (600 - findBarHeight) + "px"; } - } + } - // the preview is updated every 2 seconds if something was changed since last update + // preview var lastValue = ""; @@ -43,6 +44,7 @@ var editors = document.getElementsByClassName('CodeMirror'); } } + // the preview is updated every 2 seconds if something was changed since last update window.setInterval(updatePreview, 2000); updatePreview(); @@ -61,8 +63,8 @@ var editors = document.getElementsByClassName('CodeMirror'); $preview.show(); if (selectedPos == "side") { - $editor.css("width", "490px"); - $preview.css("width", "490px"); + $editor.css("width", "49%"); + $preview.css("width", "49%"); } else { $editor.css("width", "100%"); $preview.css("width", "100%"); -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.