]> source.dussan.org Git - nextcloud-server.git/commitdiff
styled undo file deletion
authorJan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Fri, 5 Aug 2011 05:37:08 +0000 (07:37 +0200)
committerJan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Fri, 5 Aug 2011 05:37:08 +0000 (07:37 +0200)
files/css/files.css
files/js/filelist.js

index 6c93e4d7ce024619aaa11668f3a1c6bddaae3976..813fb4dd7dccc2ecb700e8026cd6dd81345bceaa 100644 (file)
@@ -52,16 +52,6 @@ table thead.fixed {height:2em}
 
 /* add breadcrumb divider to the File item in navigation panel */
 #navigation>ul>li:first-child { background:url('../../core/img/breadcrumb-divider-start.png') no-repeat 12.5em 0px; width:12.5em; padding-right:1em; }
-
-#notification{
-       z-index:150;
-       border-radius:10px;
-       background-color:#eee;
-       border:1px solid #ccc;
-       padding-left:1em;
-       padding-right:1em;
-       display:none;
-       position:fixed;
-       top:2.8em;
-       left:40%;
-}
+#notification{ z-index:150; background-color:#fc4; border:0; padding:0 .7em .3em; display:block; position:fixed; left:50%; top:0;
+-moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em;
+-moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
index b4d0adf982ce35d7190636860d35df84115a08d4..8fd3bceafb1899b2d1ec4165af0ac7aa94d593f3 100644 (file)
@@ -168,9 +168,8 @@ FileList={
                procesSelection();
                FileList.deleteCanceled=false;
                FileList.deleteFiles=files;
-               $('#notification').text(files.length+' file'+((files.length>1)?'s':'')+' deleted, click here to undo');
-               
-               $('#notification').show();
+               $('#notification').text('undo deletion');
+               $('#notification').fadeIn();
        },
        finishDelete:function(ready,sync){
                if(!FileList.deleteCanceled && FileList.deleteFiles){
@@ -181,7 +180,7 @@ FileList={
                                data: "dir="+$('#dir').val()+"&files="+encodeURIComponent(fileNames),
                                complete: function(data){
                                        boolOperationFinished(data, function(){
-                                               $('#notification').hide();
+                                               $('#notification').fadeOut();
                                                $.each(FileList.deleteFiles,function(index,file){
 //                                                     alert(file);
                                                        FileList.remove(file);
@@ -199,9 +198,10 @@ FileList={
 }
 
 $(document).ready(function(){
+       $('#notification').hide();
        $('#notification').click(function(){
                FileList.deleteCanceled=true;
-               $('#notification').hide();
+               $('#notification').fadeOut();
                $.each(FileList.deleteFiles,function(index,file){
                        $('tr[data-file="'+file+'"]').show();
 //                     alert(file);