From bce4ff41b9c18e845baa33b0e8f26e594e69dbd5 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Fri, 6 Sep 2013 17:13:03 +0300 Subject: [PATCH] Use the whole viewport. Ref #19 --- css/style.css | 31 +++++++++++++++++-------------- js/documents.js | 27 +++++++++++++-------------- templates/documents.php | 7 ++++--- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/css/style.css b/css/style.css index 74667788..e97f5535 100755 --- a/css/style.css +++ b/css/style.css @@ -5,7 +5,7 @@ .documentslist { padding:5px; } -.documentslist .add-document { +.documentslist .add-document{ display: inline-block; height: 200px; width: 200px; @@ -16,10 +16,10 @@ display: inline-block; position: relative; height: 200px; - width: 98px; + width: 200px; background-repeat: no-repeat; background-size: 64px; - background-position: 18px; + background-position: 50% 68px; } .add-document .add { background-image: url('%webroot%/core/img/actions/add.svg'); @@ -66,16 +66,18 @@ text-align: center; } -#odf_close{ - float:left; +#odf-toolbar{ + position: absolute; + width: 100%; + z-index: 500; } -#odf_invite{ - float:right; +#odf-close{ + float:left; } -#editor-content #mainContainer{ - background-color: transparent; +#odf-invite{ + float:right; } #mainContainer #collaboration{ @@ -99,6 +101,7 @@ #mainContainer{ position:absolute; + z-index:500; } #documents-overlay, #documents-overlay-below{ @@ -107,20 +110,20 @@ left: 0; width: 100%; height: 100%; - filter:alpha(opacity=50); - opacity: 0.5; + filter:alpha(opacity=30); + opacity: 0.3; z-index: 1000; background: #000 url('%webroot%/core/img/loading-dark.gif') 50% 50% no-repeat; } #documents-overlay-below{ - left:85px; - top:48px; + left:0; + top:0; filter:alpha(opacity=100); opacity: 1; background:#f0f0f0; z-index: 999; } -#documents-content #editor, #documents-content #members{ +#members{ padding-top: 3em !important; } \ No newline at end of file diff --git a/js/documents.js b/js/documents.js index 8c02ab00..38e102d8 100644 --- a/js/documents.js +++ b/js/documents.js @@ -8,7 +8,6 @@ var documentsMain = { onStartup: function() { "use strict"; $('
').hide().appendTo(document.body); - $('#documents-overlay-below').css({left: $('#navigation').width()+4}); OC.addScript('documents', 'dojo-amalgamation', function() { OC.addScript('documents', 'webodf-debug').done(function() { // preload stuff in the background @@ -33,19 +32,19 @@ var documentsMain = { require({ }, ["webodf/editor/server/owncloud/ServerFactory", "webodf/editor/Editor"], function (ServerFactory, Editor) { // fade out file list and show WebODF canvas - $('.documentslist, #emptyfolder').fadeOut('slow').promise().done(function() { + $('#content').fadeOut('slow').promise().done(function() { // odf action toolbar var odfToolbarHtml = - '
' + - ' ' + - ' ' + ' ' + '
'; - $('#controls').append(odfToolbarHtml); + $(document.body).prepend(odfToolbarHtml); var memberId, odfelement, odfcanvas, canvashtml = '
' + @@ -67,7 +66,7 @@ var documentsMain = { var serverFactory = new ServerFactory(); $(document.body).addClass("claro"); - $('.documentslist, #emptyfolder').after(canvashtml); + $(document.body).prepend(canvashtml); // in case we are on the public sharing page we shall display the odf into the preview tag $('#preview').html(canvashtml); @@ -159,7 +158,7 @@ var documentsMain = { $('#mainContainer').remove(); $('#odf-toolbar').remove(); $('.actions,#file_access_panel').fadeIn('slow'); - $('.documentslist, #emptyfolder').fadeIn('slow'); + $('#content').fadeIn('slow'); $(document.body).removeClass('claro'); }); documentsMain.isEditorMode = false; @@ -270,10 +269,10 @@ $(document).ready(function() { } }); - $('#content').on('click', '#odf_close', documentsMain.onClose); - $('#content').on('click', '#odf_invite', documentsMain.onInvite); - $('#content').on('click', '#invite-send', documentsMain.sendInvite); - $('#content').on('click', '#invitee-list li', function(){ + $(document.body).on('click', '#odf-close', documentsMain.onClose); + $(document.body).on('click', '#odf-invite', documentsMain.onInvite); + $(document.body).on('click', '#invite-send', documentsMain.sendInvite); + $(document.body).on('click', '#invitee-list li', function(){ $(this).remove(); }); diff --git a/templates/documents.php b/templates/documents.php index a622c1b6..b376477a 100755 --- a/templates/documents.php +++ b/templates/documents.php @@ -1,12 +1,14 @@ -
+ +
+
-