]> source.dussan.org Git - nextcloud-server.git/commitdiff
No bookmarks message will now show up if all bookmarks are delted
authorMarvin Thomas Rabe <m.rabe@echtzeitraum.de>
Wed, 22 Feb 2012 22:28:36 +0000 (23:28 +0100)
committerMarvin Thomas Rabe <m.rabe@echtzeitraum.de>
Wed, 22 Feb 2012 22:28:36 +0000 (23:28 +0100)
apps/bookmarks/js/bookmarks.js

index 166024eabde156a9f80501c2246b3d491b63b310..2b8dbc3d6d46e53701a1964a617a97153cdea2f6 100644 (file)
@@ -9,7 +9,6 @@ $(document).ready(function() {
        
        $('.bookmarks_list').empty();
        getBookmarks();
-       
 });
 
 function getBookmarks() {
@@ -50,7 +49,6 @@ function addOrEditBookmark(event) {
        var url = encodeEntities($('#bookmark_add_url').val());
        var title = encodeEntities($('#bookmark_add_title').val());
        var tags = encodeEntities($('#bookmark_add_tags').val());
-       var taglist = tags.split(' ');
        $("#firstrun").hide();
        
        if (id == 0) {
@@ -86,7 +84,12 @@ function delBookmark(event) {
        $.ajax({
                url: 'ajax/delBookmark.php',
                data: 'url=' + encodeURI($(this).parent().parent().children('.bookmark_url:first').text()),
-               success: function(data){ record.animate({ opacity: 'hide' }, 'fast'); }
+               success: function(data){
+                       record.remove();
+                       if($('.bookmarks_list').is(':empty')) {
+                               $("#firstrun").show();
+                       }
+               }
        });
 }