diff --git a/apps/bookmarks/css/bookmarks.css b/apps/bookmarks/css/bookmarks.css index ef0ec68fcc..48f0bede11 100644 --- a/apps/bookmarks/css/bookmarks.css +++ b/apps/bookmarks/css/bookmarks.css @@ -18,7 +18,7 @@ } .bookmarks_list { - margin-top: 2.8em; + margin-top: 36px; } .bookmarks_addBml { @@ -63,10 +63,22 @@ .bookmark_title { font-weight: bold; display: inline-block; margin-right: 0.8em; } .bookmark_url { display: none; color: #999; } .bookmark_single:hover .bookmark_url { display: inline; } - -.bookmark_tag { - color: #ff3333; +.bookmark_tags { + position: absolute; + top: 0.5em; + right: 6em; + text-align: right; } +.bookmark_tag { + display: inline-block; + color: white; + margin: 0 0.2em; + padding: 0 0.4em; + background-color: #1D2D44; + border-radius: 0.4em; + opacity: 0.2; +} +.bookmark_tag:hover { opacity: 0.5; } .loading_meta { display: none; diff --git a/apps/bookmarks/js/bookmarks.js b/apps/bookmarks/js/bookmarks.js index 86bb71ac72..b43c3deb59 100644 --- a/apps/bookmarks/js/bookmarks.js +++ b/apps/bookmarks/js/bookmarks.js @@ -87,8 +87,8 @@ function addOrEditBookmark(event) { '
' + '

 

' + '

' + title + '

' + - '

' + url + '

' + '

' + tagshtml + '

' + + '

' + url + '

' + '
' ); } @@ -146,7 +146,8 @@ function updateBookmarksList(bookmark) { var tags = encodeEntities(bookmark.tags).split(' '); var taglist = ''; for ( var i=0, len=tags.length; i' + tags[i] + ' '; + if(tags[i] != '') + taglist = taglist + '' + tags[i] + ' '; } if(!hasProtocol(bookmark.url)) { bookmark.url = 'http://' + bookmark.url; @@ -156,9 +157,11 @@ function updateBookmarksList(bookmark) { '

 

' + '

' + encodeEntities(bookmark.title) + '

' + '

' + encodeEntities(bookmark.url) + '

' + - '

' + taglist + '

' + '' ); + if(taglist != '') { + $('div[data-id="'+ bookmark.id +'"]').append('

' + taglist + '

'); + } } function updateOnBottom() { @@ -178,7 +181,6 @@ function recordClick(event) { function encodeEntities(s){ try { return $('
').text(s).html(); - } catch (ex) { return ""; }