From 5a4a8af2f14627a776596f14abc24c36c3a25980 Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Wed, 22 Feb 2012 23:22:17 +0100 Subject: [PATCH] Updated bookmark form --- css/bookmarks.css | 7 +------ js/bookmarks.js | 18 +++--------------- templates/list.php | 13 ++++--------- 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/css/bookmarks.css b/css/bookmarks.css index fedd2af7..12ccf938 100644 --- a/css/bookmarks.css +++ b/css/bookmarks.css @@ -15,11 +15,6 @@ padding: 0.5ex; } -.bookmarks_add { - display: none; - margin-top: 45px; -} - .bookmarks_list { margin-top: 36px; } @@ -35,7 +30,7 @@ } .bookmarks_input { - width: 20em; + width: 8em; } .bookmark_actions { diff --git a/js/bookmarks.js b/js/bookmarks.js index 6db0969a..166024ea 100644 --- a/js/bookmarks.js +++ b/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' + taglist[i] + ' '; - } 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; diff --git a/templates/list.php b/templates/list.php index 46577d16..b3849069 100644 --- a/templates/list.php +++ b/templates/list.php @@ -9,16 +9,11 @@ ?>
- -
-
-

-

-

-

-

-

+ + + +