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) {
|
for(var i in bookmarks.data) {
|
||||||
updateBookmarksList(bookmarks.data[i]);
|
updateBookmarksList(bookmarks.data[i]);
|
||||||
}
|
}
|
||||||
if($('.bookmarks_list').is(':empty')) {
|
checkEmpty();
|
||||||
$("#firstrun").show();
|
|
||||||
} else {
|
|
||||||
$("#firstrun").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.bookmark_link').click(recordClick);
|
$('.bookmark_link').click(recordClick);
|
||||||
$('.bookmark_delete').click(delBookmark);
|
$('.bookmark_delete').click(delBookmark);
|
||||||
@ -208,6 +204,7 @@ function addBookmark(event) {
|
|||||||
bookmark.title = data.title
|
bookmark.title = data.title
|
||||||
bookmark.added_date = new Date();
|
bookmark.added_date = new Date();
|
||||||
updateBookmarksList(bookmark, 'prepend');
|
updateBookmarksList(bookmark, 'prepend');
|
||||||
|
checkEmpty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -222,14 +219,19 @@ function delBookmark(event) {
|
|||||||
success: function(data){
|
success: function(data){
|
||||||
if (data.status == 'success') {
|
if (data.status == 'success') {
|
||||||
record.remove();
|
record.remove();
|
||||||
if($('.bookmarks_list').is(':empty')) {
|
checkEmpty();
|
||||||
$("#firstrun").show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkEmpty() {
|
||||||
|
if($('.bookmarks_list').is(':empty')) {
|
||||||
|
$("#firstrun").show();
|
||||||
|
} else {
|
||||||
|
$("#firstrun").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
function editBookmark(event) {
|
function editBookmark(event) {
|
||||||
if($('.bookmark_single_form').length){
|
if($('.bookmark_single_form').length){
|
||||||
$('.bookmark_single_form .reset').click();
|
$('.bookmark_single_form .reset').click();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user