mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-02-20 17:54:25 +01:00
Bookmark: Remove empty message when there is new bookmark fix #138
This commit is contained in:
parent
8d51d64257
commit
20a779eea9
@ -154,11 +154,7 @@ function getBookmarks() {
|
||||
for(var i in bookmarks.data) {
|
||||
updateBookmarksList(bookmarks.data[i]);
|
||||
}
|
||||
if($('.bookmarks_list').is(':empty')) {
|
||||
$("#firstrun").show();
|
||||
} else {
|
||||
$("#firstrun").hide();
|
||||
}
|
||||
checkEmpty();
|
||||
|
||||
$('.bookmark_link').click(recordClick);
|
||||
$('.bookmark_delete').click(delBookmark);
|
||||
@ -208,6 +204,7 @@ function addBookmark(event) {
|
||||
bookmark.title = data.title
|
||||
bookmark.added_date = new Date();
|
||||
updateBookmarksList(bookmark, 'prepend');
|
||||
checkEmpty();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -222,14 +219,19 @@ function delBookmark(event) {
|
||||
success: function(data){
|
||||
if (data.status == 'success') {
|
||||
record.remove();
|
||||
if($('.bookmarks_list').is(':empty')) {
|
||||
$("#firstrun").show();
|
||||
}
|
||||
checkEmpty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function checkEmpty() {
|
||||
if($('.bookmarks_list').is(':empty')) {
|
||||
$("#firstrun").show();
|
||||
} else {
|
||||
$("#firstrun").hide();
|
||||
}
|
||||
}
|
||||
function editBookmark(event) {
|
||||
if($('.bookmark_single_form').length){
|
||||
$('.bookmark_single_form .reset').click();
|
||||
|
Loading…
x
Reference in New Issue
Block a user