]> source.dussan.org Git - nextcloud-server.git/commitdiff
hints for file actions
authorBartek Przybylski <bart.p.pl@gmail.com>
Mon, 22 Aug 2011 17:33:21 +0000 (19:33 +0200)
committerBartek Przybylski <bart.p.pl@gmail.com>
Mon, 22 Aug 2011 17:33:21 +0000 (19:33 +0200)
files/css/files.css
files/js/fileactions.js
files/js/filelist.js
files/templates/part.list.php

index 787efa49e04cd90193ff70ce310e068c3e0ebf1d..9418ec23a63b40777220ce7a45329d62deb7aed9 100644 (file)
@@ -29,9 +29,10 @@ table { position:relative; top:37px; width:100%; }
 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; }
+span.extention,span.actionHint, td.date { color:#999; }
+span.extention,span.actionHint { opacity:0; -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; }
 tr:hover span.extention { opacity:1; }
+tr:hover span.actionHint { 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; }
index 04943abf74a71f5c5c996e76ea6e45aa1cde9195..0faecf593b821d908abcab4d6cddf6f07ed97d2f 100644 (file)
@@ -82,6 +82,11 @@ FileActions={
                                });
                                parent.children('a.name').append(element);
                        }
+                       element.hover(function(e){
+                               $('span.actionHint').text($(this).data('action'));
+                       }, function(e){
+                               $('span.actionHint').text('');
+                       });
                }
                if(actions['Delete']){
                        var img=FileActions.icons['Delete'];
@@ -136,6 +141,11 @@ FileActions.register('all','Rename',function(){return OC.imagePath('core','actio
        FileList.rename(filename);
 });
 
+// preparation for encryption embeeding in user interface
+//FileActions.register('all', 'Encrypt', function(){return OC.imagePath('core', 'actions/play-add')},function(filename){
+//     alert(filename);
+//});
+
 //FileActions.setDefault('all','Download');
 
 FileActions.register('dir','Open','',function(filename){
index b89bc9b57b61fb9e4d1f99d4a11ebf96352fa6d2..b166d946e16f87f288652c4167c3e6e0b9f98da5 100644 (file)
@@ -50,7 +50,7 @@ FileList={
                html+='<td class="filesize" title="'+humanFileSize(size)+'" style="color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')">'+simpleSize+'</td>';
                html+='<td class="date" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</td>';
                html+='</tr>';
-               
+
                FileList.insertElement(name,'dir',$(html));
                $('tr[data-file="'+name+'"] td.filename').draggable(dragOptions);
                $('tr[data-file="'+name+'"] td.filename').droppable(folderDropOptions);
index 5995976f73a8f541a6a63d9f75c33a1fe7b1b473..a08b7bebb3814570ce4c939720d0f19a60af1a59 100644 (file)
@@ -16,6 +16,7 @@
                                                        <?php echo htmlspecialchars($file['basename']);?><span class='extention'><?php echo $file['extention'];?></span>
                                                <?php endif;?>
                                        </span>
+                                       <span class="actionHint"></span>
                                        </a>
                                </td>
                                <td class="filesize" title="<?php echo human_file_size($file['size']); ?>" style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"><?php echo $simple_file_size; ?></td>