diff --git a/css/style.css b/css/style.css index 3632df52..6e9ff779 100755 --- a/css/style.css +++ b/css/style.css @@ -139,4 +139,14 @@ #members{ padding-top: 3em !important; +} + +#file_upload_start{ + position:relative; + left:0; top:0; width:200px; height:200px; + margin-bottom: -200px;padding:0; + cursor:pointer; overflow:hidden; + font-size:1em; + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; + z-index:20; } \ No newline at end of file diff --git a/index.php b/index.php index 6e5f9fb2..99d62701 100755 --- a/index.php +++ b/index.php @@ -33,6 +33,14 @@ namespace OCA\Documents; \OCP\Util::addStyle( 'documents', 'editor' ); \OCP\Util::addScript('documents', 'documents'); +\OCP\Util::addScript('files', 'file-upload'); +\OCP\Util::addScript('files', 'jquery.iframe-transport'); +\OCP\Util::addScript('files', 'jquery.fileupload'); + + $tmpl = new \OCP\Template('documents', 'documents', 'user'); +$maxUploadFilesize = \OCP\Util::maxUploadFilesize("/"); +$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); +$tmpl->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize)); $tmpl->printPage(); diff --git a/js/documents.js b/js/documents.js index 7ae33873..3c1b9024 100644 --- a/js/documents.js +++ b/js/documents.js @@ -314,6 +314,8 @@ $(document).ready(function() { }); documentsMain.show(); + var file_upload_start = $('#file_upload_start'); + file_upload_start.on('fileuploaddone', documentsMain.show); //TODO show "no docs, please upload" //TODO when ending a session as the last user close session? diff --git a/templates/documents.php b/templates/documents.php index fdbc0d7d..eb0263bf 100755 --- a/templates/documents.php +++ b/templates/documents.php @@ -14,9 +14,29 @@ - - - +
+
+ = 0):?> + + + + + + + + + +
+