diff options
author | Marvin Thomas Rabe <m.rabe@echtzeitraum.de> | 2012-02-22 23:22:17 +0100 |
---|---|---|
committer | Marvin Thomas Rabe <m.rabe@echtzeitraum.de> | 2012-02-22 23:22:17 +0100 |
commit | 3988ec2813c88fdd8a5caf5bb2a04a60868b18cc (patch) | |
tree | c96bd840ada5c5e7394acd22d7044e4ea9bdd5a5 /apps/bookmarks/js | |
parent | 5387820a3b81b35521063bb142dd1492a87ef470 (diff) | |
download | nextcloud-server-3988ec2813c88fdd8a5caf5bb2a04a60868b18cc.tar.gz nextcloud-server-3988ec2813c88fdd8a5caf5bb2a04a60868b18cc.zip |
Updated bookmark form
Diffstat (limited to 'apps/bookmarks/js')
-rw-r--r-- | apps/bookmarks/js/bookmarks.js | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/apps/bookmarks/js/bookmarks.js b/apps/bookmarks/js/bookmarks.js index 6db0969a2bb..166024eabde 100644 --- a/apps/bookmarks/js/bookmarks.js +++ b/apps/bookmarks/js/bookmarks.js @@ -3,11 +3,7 @@ var bookmarks_loading = false; var bookmarks_sorting = 'bookmarks_sorting_recent'; -$(document).ready(function() { - $('.bookmarks_addBtn').click(function(event){ - $('.bookmarks_add').slideToggle(); - }); - +$(document).ready(function() { $('#bookmark_add_submit').click(addOrEditBookmark); $(window).scroll(updateOnBottom); @@ -55,21 +51,14 @@ function addOrEditBookmark(event) { var title = encodeEntities($('#bookmark_add_title').val()); var tags = encodeEntities($('#bookmark_add_tags').val()); var taglist = tags.split(' '); - var tagshtml = ''; $("#firstrun").hide(); - - for ( var i=0, len=taglist.length; i<len; ++i ){ - tagshtml += '<a class="bookmark_tag" href="?tag=' + encodeURI(taglist[i]) + '">' + taglist[i] + '</a> '; - } if (id == 0) { $.ajax({ url: 'ajax/addBookmark.php', data: 'url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&tags=' + encodeURI(tags), success: function(response){ - var bookmark_id = response.data; - $('.bookmarks_add').slideToggle(); - $('.bookmarks_add').children('p').children('.bookmarks_input').val(''); + $('.bookmarks_input').val(''); $('.bookmarks_list').empty(); bookmarks_page = 0; getBookmarks(); @@ -81,8 +70,7 @@ function addOrEditBookmark(event) { url: 'ajax/editBookmark.php', data: 'id=' + id + '&url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&tags=' + encodeURI(tags), success: function(){ - $('.bookmarks_add').slideToggle(); - $('.bookmarks_add').children('p').children('.bookmarks_input').val(''); + $('.bookmarks_input').val(''); $('#bookmark_add_id').val('0'); $('.bookmarks_list').empty(); bookmarks_page = 0; |