1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-01-18 14:52:10 +01:00

Avoid reloading related tags when changing pages

This commit is contained in:
Brice Maron 2012-07-02 15:49:20 +02:00
parent c8ef4de201
commit 7ecfbe46a5

View File

@ -72,23 +72,26 @@ function getBookmarks() {
return;
}
bookmarks_loading = true;
//Update Rel Tags
$.ajax({
type: 'GET',
url: OC.filePath('bookmarks', 'ajax', 'updateList.php') + '&type=rel_tags',
data: {tag: $('#bookmarkFilterTag').val(), page:bookmarks_page, sort:bookmarks_sorting },
success: function(tags){
$('.tag_list').empty();
for(var i in tags.data) {
updateTagsList(tags.data[i]);
//Update Rel Tags if first page
if(bookmarks_page == 0) {
$.ajax({
type: 'GET',
url: OC.filePath('bookmarks', 'ajax', 'updateList.php') + '&type=rel_tags',
data: {tag: $('#bookmarkFilterTag').val(), page:bookmarks_page, sort:bookmarks_sorting },
success: function(tags){
$('.tag_list').empty();
for(var i in tags.data) {
updateTagsList(tags.data[i]);
}
$('.tag_list .tag_edit').click(renameTag);
$('.tag_list .tag_delete').click(deleteTag);
$('.tag_list a.tag').click(addFilterTag);
}
$('.tag_list .tag_edit').click(renameTag);
$('.tag_list .tag_delete').click(deleteTag);
$('.tag_list a.tag').click(addFilterTag);
}
});
});
}
$.ajax({
type: 'GET',
url: OC.filePath('bookmarks', 'ajax', 'updateList.php') + '&type=bookmark',