From 04b2ebc780412f84687a7b2aed8e5e0974ab1f64 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Wed, 30 Apr 2014 13:20:36 +0300 Subject: [PATCH] Move overlay into widget. Fix some quirks --- css/style.css | 11 +++++--- js/documents.js | 68 +++++++++++++++++++++++++++++-------------------- 2 files changed, 47 insertions(+), 32 deletions(-) diff --git a/css/style.css b/css/style.css index 04c72c0b..1b8cdfe7 100755 --- a/css/style.css +++ b/css/style.css @@ -121,7 +121,11 @@ } #odf-toolbar #dropdown{ - right:auto; + right: auto; +} + +#body-user #document-title #header{ + height: 32px; } #document-title{ @@ -138,6 +142,7 @@ float:left; height: 24px; width: 80px; + margin: 3px; background-size:80px 24px; } @@ -169,7 +174,7 @@ #documents-overlay, #documents-overlay-below{ position: fixed; - top: 36px; + top: 32px; left: 0; width: 100%; height: 100%; @@ -227,9 +232,7 @@ top: 87px; } - /* override WebODF styling here */ - #mainContainer #collaboration{ float:right;position: relative;z-index: 1; width: 70px;padding:5px; diff --git a/js/documents.js b/js/documents.js index 642f9895..9a240763 100644 --- a/js/documents.js +++ b/js/documents.js @@ -127,6 +127,21 @@ $.widget('oc.documentGrid', { } }); +$.widget('oc.documentOverlay', { + options : { + parent : 'document.body' + }, + _create : function (){ + $(this.element).hide().appendTo(document.body); + }, + show : function(){ + $(this.element).fadeIn('fast'); + }, + hide : function(){ + $(this.element).fadeOut('fast'); + } +}); + var documentsMain = { isEditormode : false, @@ -138,15 +153,12 @@ var documentsMain = { fileName: null, UI : { - /* Overlay HTML */ - overlay : '
', - /* Toolbar HTML */ toolbar : '
' + '
' + - '
' + + '' + + '
' + ' ' + '