diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-12 21:00:41 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-12 21:00:41 -0400 |
commit | 122018889a054e2cc7222ce123edd859fd3511f4 (patch) | |
tree | 0dff0f4745828df16156e3900222e2ae11e3a0cb /files | |
parent | ffe9da91af72e7f7953f41968f536d15390edffe (diff) | |
parent | 67156f87e3757fbd5e692e7d6b2209cfafc6c3cf (diff) | |
download | nextcloud-server-122018889a054e2cc7222ce123edd859fd3511f4.tar.gz nextcloud-server-122018889a054e2cc7222ce123edd859fd3511f4.zip |
Merge branch 'master' into sharing
Conflicts:
files/css/files.css
Diffstat (limited to 'files')
-rw-r--r-- | files/css/files.css | 25 | ||||
-rw-r--r-- | files/js/fileactions.js | 9 | ||||
-rw-r--r-- | files/js/filelist.js | 4 | ||||
-rw-r--r-- | files/js/files.js | 10 | ||||
-rw-r--r-- | files/templates/index.php | 11 |
5 files changed, 36 insertions, 23 deletions
diff --git a/files/css/files.css b/files/css/files.css index e878cc01d03..9fcc24a80af 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -11,7 +11,7 @@ #fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; } .file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .3em; padding-left:2em; } .file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin-right:1.5em;} -.file_upload_wrapper #file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; } +.file_upload_wrapper .file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; } #file_newfolder_name { background-image:url('../../core/img/places/folder.svg'); font-weight:bold; width:8em; } .file_upload_start, .file_upload_filename { font-size:1em; } @@ -26,9 +26,13 @@ /* FILE TABLE */ span#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; } table { position:relative; top:37px; width:100%; } -tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#eee; height:1em; } +table tr { -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; } +tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#f8f8f8; height:1em; } +tbody tr.selected { background-color:#eee; } tbody a { color:#000; } span.extention, td.date { color:#999; } +span.extention { opacity:0; -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; } +tr:hover span.extention { opacity:1; } div.crumb { float:left; display:block; background:no-repeat right 0; padding:.75em 1.5em 0 1em; height:2.9em; } div.crumb:first-child { padding-left:1.5em; } div.crumb:last-child { font-weight:bold; } @@ -38,22 +42,23 @@ table th .name { float:left; margin-left:.5em; } table th.multiselect { background:#ddd; color:#000; font-weight:bold; } table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; } table td { border-bottom:1px solid #eee; font-style:normal; background-position:1em .5em; background-repeat:no-repeat; } -table th#headerSize, table td.filesize { width:5em; padding:0 1em; text-align:right; } +table th#headerSize, table td.filesize { width:3em; padding:0 1em; text-align:right; } table th#headerDate, table td.date { width:11em; padding:0 .1em 0 1em; text-align:left; } table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; } table td.filename a.name { display:block; height:1.5em; vertical-align:middle; margin-left:3em; } table tr[data-type="dir"] td.filename a.name {font-weight:bold; } -table td.filename a.name input, table td.filename a.name form { width:100%; cursor:text } +table td.filename a.name input, table td.filename a.name form { width:100%; cursor:text; } table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 0; } table td.filename .nametext, .modified { float:left; padding:.3em 0; } table td.filename .nametext { width:60%; } table td.filename form { float:left; font-size:.85em; } -table thead.fixed tr{position:fixed; top:6.3em; z-index:49; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000;} -table thead.fixed {height:2em} -#fileList tr td.filename>input[type=checkbox]:first-child { display:none; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ } -#fileList tr td.filename>input[type=checkbox]:checked:first-child, #fileList tr:hover td.filename>input[type=checkbox]:first-child { display:inline; } -#fileList tr.selected td.filename , #fileList tr:hover td.filename { background-image:none !important } -#select_all { float:left; margin:0.2em; margin-left:0.6em; } +table thead.fixed tr{ position:fixed; top:6.3em; z-index:49; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; } +table thead.fixed { height:2em; } +#fileList tr td.filename>input[type=checkbox]:first-child { opacity:0; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; } +#fileList tr td.filename>input[type="checkbox"]:checked:first-child, #fileList tr:hover td.filename>input[type="checkbox"]:first-child { opacity:1; } +#fileList tr td.filename { -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms; } +#fileList tr.selected td.filename, #fileList tr:hover td.filename { background-image:url('') !important; } +#select_all { float:left; margin:.2em; margin-left:.6em; } #uploadsize-message,#delete-confirm { display:none; } .selectedActions a, a.file_action { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; } .selectedActions { display:none; } diff --git a/files/js/fileactions.js b/files/js/fileactions.js index 744ffd8cfed..2bc79abe723 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -53,6 +53,7 @@ FileActions={ }, display:function(parent){ FileActions.currentFile=parent; + $('.file_action').remove(); var actions=FileActions.get(FileActions.getCurrentMimeType(),FileActions.getCurrentType()); var file=FileActions.getCurrentFile(); if($('tr[data-file="'+file+'"]').data('renaming')){ @@ -100,10 +101,14 @@ FileActions={ }); parent.parent().children().last().append(element); } + $('.file_action').hide(); + $('.file_action').fadeIn(200); return false; }, hide:function(){ - $('.file_action').remove(); + $('.file_action').fadeOut(200,function(){ + $(this).remove(); + }); }, getCurrentFile:function(){ return FileActions.currentFile.parent().attr('data-file'); @@ -128,7 +133,7 @@ FileActions.register('all','Rename',OC.imagePath('core','actions/rename'),functi FileList.rename(filename); }); -FileActions.setDefault('all','Download'); +//FileActions.setDefault('all','Download'); FileActions.register('dir','Open','',function(filename){ window.location='index.php?dir='+$('#dir').val()+'/'+filename; diff --git a/files/js/filelist.js b/files/js/filelist.js index 50a995bf254..b89bc9b57b6 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -3,7 +3,7 @@ FileList={ $('#fileList').empty().html(fileListHtml); }, addFile:function(name,size,lastModified,loading){ - var img=(loading)?OC.imagePath('core', 'loading.gif'):OC.imagePath('core', 'filetypes/file.png'); + var img=(loading)?OC.imagePath('core', 'loading.gif'):OC.imagePath('core', 'filetypes/file'); var html='<tr data-file="'+name+'" data-type="file" data-size="'+size+'">'; if(name.indexOf('.')!=-1){ var basename=name.substr(0,name.indexOf('.')); @@ -38,7 +38,7 @@ FileList={ }, addDir:function(name,size,lastModified){ var html='<tr data-file="'+name+'" data-type="dir" data-size="'+size+'">'; - html+='<td class="filename" style="background-image:url(img/folder.png)"><input type="checkbox" /><a class="name" href="index.php?dir='+$('#dir').val()+'/'+name+'">'+name+'</a></td>'; + html+='<td class="filename" style="background-image:url('+OC.imagePath('core', 'places/folder')+')"><input type="checkbox" /><a class="name" href="index.php?dir='+$('#dir').val()+'/'+name+'">'+name+'</a></td>'; if(size!='Pending'){ simpleSize=simpleFileSize(size); }else{ diff --git a/files/js/files.js b/files/js/files.js index 950f06a31a1..8fdbd418462 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -13,10 +13,14 @@ $(document).ready(function() { $('#plugins>ul>li:first-child').droppable(crumbDropOptions); // Triggers invisible file input - $('#file_upload_button_wrapper').bind('click', function() { - $('#file_upload_start').trigger('click'); + $('.file_upload_button_wrapper').live('click', function() { + $(this).parent().children('.file_upload_start').trigger('click'); return false; }); + + $('#file_upload_button_wrapper').tipsy({gravity:'e'}); + $('td.filesize').tipsy({gravity:'se', live:true}); + $('td .modified').tipsy({gravity:'s', live:true}); // Sets the file-action buttons behaviour : $('tr').live('mouseenter',function(event) { @@ -419,5 +423,5 @@ function getMimeIcon(mime){ if(knownMimes.indexOf(mime)==-1){ mime='file'; } - return OC.imagePath('core','mimetypes/'+mime+'.png'); + return OC.imagePath('core','filetypes/'+mime); } diff --git a/files/templates/index.php b/files/templates/index.php index 008051492d0..f5a212add48 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -6,10 +6,9 @@ <input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)"> <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir"> <div class="file_upload_wrapper" class="svg"> - <input type="submit" class="file_upload_filename" value="<?php echo $l->t('Upload'); - if($_['uploadMaxFilesize']<(10000000000)){echo ' (max. '.$_['uploadMaxHumanFilesize'].')';}?>"/> - <input id="file_upload_start" class="file_upload_start" type="file" name='files[]'/> - <a href="#" id="file_upload_button_wrapper" onclick="return false;"></a> + <input type="submit" class="file_upload_filename" value="<?php echo $l->t('Upload'); ?>"/> + <input class="file_upload_start" class="file_upload_start" type="file" name='files[]'/> + <a href="#" class="file_upload_button_wrapper" onclick="return false;" title="<?php echo 'max. '.$_['uploadMaxHumanFilesize'] ?>"></a> </div> <iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe> </form> @@ -33,8 +32,8 @@ <a href="" title="Share" class="share"><img class='svg' alt="Share" src="../core/img/actions/share.svg" /></a> </span> </th> - <th id='headerSize'><?php echo $l->t( 'Size MB' ); ?></th> - <th id='headerDate'><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class='selectedActions'><a href="" title="Delete" class="delete"><img class='svg' alt="<?php echo $l->t('Delete')?>" src="../core/img/actions/delete.svg" /></a></span></th> + <th id="headerSize"><?php echo $l->t( 'Size' ); ?></th> + <th id="headerDate"><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class="selectedActions"><a href="" title="Delete" class="delete"><img class="svg" alt="<?php echo $l->t('Delete')?>" src="../core/img/actions/delete.svg" /></a></span></th> </tr> </thead> <tbody id="fileList"> |