Initial upload. Ref #32
This commit is contained in:
parent
5bb15c5c3c
commit
c7842925f9
@ -154,12 +154,24 @@
|
|||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* override WebODF styling here */
|
/* override WebODF styling here */
|
||||||
|
|
||||||
#members{
|
#members{
|
||||||
padding-top: 3em !important;
|
padding-top: 3em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#editor {
|
#editor {
|
||||||
box-shadow: 0px 0px 14px #555 !important;
|
box-shadow: 0px 0px 14px #555 !important;
|
||||||
}
|
}
|
||||||
@ -172,4 +184,4 @@
|
|||||||
#container {
|
#container {
|
||||||
background-color: #ddd !important;
|
background-color: #ddd !important;
|
||||||
top: 38px !important;
|
top: 38px !important;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,14 @@ namespace OCA\Documents;
|
|||||||
\OCP\Util::addStyle( 'documents', 'editor' );
|
\OCP\Util::addStyle( 'documents', 'editor' );
|
||||||
\OCP\Util::addScript('documents', 'documents');
|
\OCP\Util::addScript('documents', 'documents');
|
||||||
|
|
||||||
|
\OCP\Util::addScript('files', 'file-upload');
|
||||||
|
\OCP\Util::addScript('files', 'jquery.iframe-transport');
|
||||||
|
\OCP\Util::addScript('files', 'jquery.fileupload');
|
||||||
|
\OCP\Util::addScript('files', 'upload');
|
||||||
|
|
||||||
$tmpl = new \OCP\Template('documents', 'documents', 'user');
|
$tmpl = new \OCP\Template('documents', 'documents', 'user');
|
||||||
|
$maxUploadFilesize = \OCP\Util::maxUploadFilesize("/");
|
||||||
|
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
|
||||||
|
$tmpl->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize));
|
||||||
|
|
||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
|
@ -14,9 +14,29 @@
|
|||||||
<a class="add svg" target="_blank" href="">
|
<a class="add svg" target="_blank" href="">
|
||||||
<label><?php p('Add') ?></label>
|
<label><?php p('Add') ?></label>
|
||||||
</a>
|
</a>
|
||||||
<a class="upload svg" target="_blank" href="">
|
<div id="upload" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>">
|
||||||
<label><?php p('Upload') ?></label>
|
<form data-upload-id="1"
|
||||||
</a>
|
id="data-upload-form"
|
||||||
|
class="file_upload_form"
|
||||||
|
action="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>"
|
||||||
|
method="post"
|
||||||
|
enctype="multipart/form-data"
|
||||||
|
target="file_upload_target_1">
|
||||||
|
<?php if($_['uploadMaxFilesize'] >= 0):?>
|
||||||
|
<input type="hidden" name="MAX_FILE_SIZE" id="max_upload"
|
||||||
|
value="<?php p($_['uploadMaxFilesize']) ?>">
|
||||||
|
<?php endif;?>
|
||||||
|
<!-- Send the requesttoken, this is needed for older IE versions
|
||||||
|
because they don't send the CSRF token via HTTP header in this case -->
|
||||||
|
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken">
|
||||||
|
<input type="hidden" class="max_human_file_size"
|
||||||
|
value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)">
|
||||||
|
<input type="hidden" name="dir" value="/" id="dir">
|
||||||
|
<input type="file" id="file_upload_start" name='files[]'/>
|
||||||
|
<a href="#" class="upload svg">
|
||||||
|
<label><?php p('Upload') ?></label></a>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="document template" data-id="" style="display:none;">
|
<li class="document template" data-id="" style="display:none;">
|
||||||
<a target="_blank" href=""><label></label></a>
|
<a target="_blank" href=""><label></label></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user