upload button HTML, CSS & JS cleanup

This commit is contained in:
Jörn Friedrich Dreyer 2012-12-04 23:45:12 +01:00
parent 6864b28e47
commit 810e02099e
5 changed files with 19 additions and 28 deletions

View File

@ -4,48 +4,47 @@
/* FILE MENU */
.actions { padding:.3em; float:left; height:2em; }
.actions input, .actions button, .actions .button { margin:0; }
.actions input, .actions button, .actions .button { margin:0; float:left; overflow:hidden; }
#file_menu { right:0; position:absolute; top:0; }
#file_menu a { display:block; float:left; background-image:none; text-decoration:none; }
.file_upload_form, #file_newfolder_form { display:inline; float: left; margin-left:0; }
.file_upload_form, #file_newfolder_form { display:inline; float: left; margin:0; padding:0; }
#fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; }
.file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .5em; padding-left:2em; }
.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:block; float:left; padding-left:0; overflow:hidden; position:relative; margin:0; margin-left:2px; }
.file_upload_wrapper .file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; }
#new { background-color:#5bb75b; float:left; margin:0 0 0 1em; border-right:none; z-index:1010; height:1.3em; }
#new:hover, #upload:hover, a.file_upload_button_wrapper:hover + button.file_upload_filename { background-color:#4b964b; }
.file_upload_button_wrapper { position:relative; display:block; width:100%; height:27px; cursor:pointer; z-index:1000; }
#new { background-color:#5bb75b; float:left; margin:0 0 0 1em; z-index:1010; height:17px; }
#new:hover, #upload:hover { background-color:#4b964b; }
#new.active { border-bottom-left-radius:0; border-bottom-right-radius:0; border-bottom:none; }
#new>a { padding:.5em 1.2em .3em; color:#fff; text-shadow:0 1px 0 #51a351; }
#new>ul { display:none; position:fixed; text-align:left; padding:.5em; background:#f8f8f8; margin-top:0.075em; border:1px solid #ddd; min-width:7em; margin-left:-.5em; z-index:-1; }
#new>ul>li { margin:.3em; padding-left:2em; background-repeat:no-repeat; cursor:pointer; padding-bottom:0.1em }
#new>ul>li>p { cursor:pointer; }
#new>ul>li>input { padding:0.3em; margin:-0.3em; }
#new, .file_upload_filename { border:1px solid; border-color:#51a351 #419341 #387038; -moz-box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; }
#new { border:1px solid; border-color:#51a351 #419341 #387038; -moz-box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; }
#new .popup { border-top-left-radius:0; z-index:10; }
#upload { background-image: url('%webroot%/core/img/actions/upload-white.svg');
background-repeat: no-repeat;
background-position: 1em 6px;
padding:.4em 1.2em .4em 2.5em;
background-position: 7px 6px;
padding:0;
color:#fff;
text-shadow:0 1px 0 #51a351;
border-color:#51a351 #419341 #387038;
box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset;
background-color:#5bb75b;
margin-left:0.2em;
height:1.3em; }
height:27px; }
#file_newfolder_name { background-image:url('%webroot%/core/img/places/folder.svg'); font-weight:normal; width:7em; }
.file_upload_start, .file_upload_filename { font-size:1em; }
.file_upload_start { font-size:1em; }
#file_newfolder_submit, #file_upload_submit { width:3em; }
.file_upload_target { display:none; }
.file_upload_start { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; z-index:1; position:absolute; left:0; top:0; width:100%; cursor:pointer;}
.file_upload_filename { background-color:#5bb75b; z-index:100; cursor:pointer; background-image: url('%webroot%/core/img/actions/upload-white.svg'); background-repeat: no-repeat; background-position: center; height: 2.29em; width: 2.5em; }
.file_upload_start { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; z-index:-1; position:relative; left:0; top:0; width:28px; height:27px; padding:0; cursor:pointer; overflow: hidden; }
#uploadprogresswrappwer { position:absolute; right:13.5em; top:0em; }
#uploadprogresswrappwer #uploadprogressbar { position:relative; display:inline-block; width:10em; height:1.5em; top:.4em; }
#uploadprogresswrapper { position:absolute; right:13.5em; top:0em; }
#uploadprogresswrapper #uploadprogressbar { position:relative; display:inline-block; width:10em; height:1.5em; top:.4em; }
.file_upload_form, .file_upload_wrapper, .file_upload_start, .file_upload_filename, #file_upload_submit { cursor:pointer; overflow: visible; }
.file_upload_form, .file_upload_wrapper, .file_upload_start, #file_upload_submit { cursor:pointer; overflow: visible; }
/* FILE TABLE */
#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; }

View File

@ -89,7 +89,6 @@ var FileList={
$('tr').filterAttr('data-file',name).remove();
if($('tr[data-file]').length==0){
$('#emptyfolder').show();
$('.file_upload_filename').addClass('highlight');
}
},
insertElement:function(name,type,element){
@ -118,7 +117,6 @@ var FileList={
$('#fileList').append(element);
}
$('#emptyfolder').hide();
$('.file_upload_filename').removeClass('highlight');
},
loadingDone:function(name, id){
var mime, tr=$('tr').filterAttr('data-file',name);

View File

@ -46,10 +46,6 @@ $(document).ready(function() {
$(this).attr('data-file',decodeURIComponent($(this).attr('data-file')));
});
if($('tr[data-file]').length==0){
$('.file_upload_filename').addClass('highlight');
}
$('#file_action_panel').attr('activeAction', false);
//drag/drop of files
@ -482,7 +478,6 @@ $(document).ready(function() {
$(window).click(function(){
$('#new>ul').hide();
$('#new').removeClass('active');
$('button.file_upload_filename').removeClass('active');
$('#new li').each(function(i,element){
if($(element).children('p').length==0){
$(element).children('input').remove();
@ -496,7 +491,6 @@ $(document).ready(function() {
$('#new>a').click(function(){
$('#new>ul').toggle();
$('#new').toggleClass('active');
$('button.file_upload_filename').toggleClass('active');
});
$('#new li').click(function(){
if($(this).children('p').length==0){

View File

@ -14,7 +14,8 @@
data-type='web'><p><?php echo $l->t('From link');?></p></li>
</ul>
</div>
<div class="file_upload_wrapper svg">
<div id="upload" class="button">
<!--div class="file_upload_wrapper"-->
<form data-upload-id='1'
id="data-upload-form"
class="file_upload_form"
@ -30,15 +31,15 @@
<input type="hidden" class="max_human_file_size"
value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
<input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
<a id="upload" class="button"></a>
<input class="file_upload_start" type="file" name='files[]'/>
<a href="#" class="file_upload_button_wrapper" onclick="return false;"
title="<?php echo $l->t('Upload'); echo ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
<iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe>
</form>
<!--/div-->
</div>
<div id="upload">
<div id="uploadprogresswrapper">
<div id="uploadprogressbar"></div>
<input type="button" class="stop" style="display:none"
value="<?php echo $l->t('Cancel upload');?>"

View File

@ -85,7 +85,6 @@ input[type="checkbox"]:hover+label, input[type="checkbox"]:focus+label { color:#
#remember_login { margin:.8em .2em 0 1em; }
.searchbox input[type="search"] { font-size:1.2em; padding:.2em .5em .2em 1.5em; background:#fff url('../img/actions/search.svg') no-repeat .5em center; border:0; -moz-border-radius:1em; -webkit-border-radius:1em; border-radius:1em; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70);opacity:.7; -webkit-transition:opacity 300ms; -moz-transition:opacity 300ms; -o-transition:opacity 300ms; transition:opacity 300ms; }
input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; }
input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-shadow:#ffeedd 0 1px 0; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; }
#select_all{ margin-top: .4em !important;}
/* CONTENT ------------------------------------------------------------------ */
#controls { padding: 0 0.5em; width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; }