From 5692e8904d5131153109ec12eed1587630e2c49d Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Sun, 5 Aug 2012 21:34:01 +0000 Subject: [PATCH] Add Date to bookamrk list and fix some style pbms --- css/bookmarks.css | 12 +++++++++++- js/bookmarks.js | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/css/bookmarks.css b/css/bookmarks.css index 811e8a44..5ce39650 100644 --- a/css/bookmarks.css +++ b/css/bookmarks.css @@ -256,6 +256,7 @@ li:hover em { display : none; } } #view_type { + display:none; /* @TODO: Remove when image view is ready*/ position: absolute; right: 33.5em; top: 0; @@ -284,12 +285,21 @@ li:hover em { display : none; } } .bookmark_desc{ - height: 2em; + height: 1.5em; + padding-left:1em; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; display:block; } +.bookmark_date { + font-size:small; + position: absolute; + right: 6em; + color:gray; +/* margin-top:2.5em; */ + margin-right: 0.2em; +} /* .bm_view_img .bookmark_single:hover .bookmark_url{ display:block; diff --git a/js/bookmarks.js b/js/bookmarks.js index ddd5f166..cfa72af8 100644 --- a/js/bookmarks.js +++ b/js/bookmarks.js @@ -229,6 +229,8 @@ function updateBookmarksList(bookmark) { } if(bookmark.title == '') bookmark.title = bookmark.url; + bookmark.added_date = new Date(); + bookmark.added_date.setTime(parseInt(bookmark.added)*1000); if(bookmark_view == 'image') { //View in images service_url = formatString(shot_provider, {url: encodeEntities(bookmark.url), title: bookmark.title, width: 200}); $('.bookmarks_list').append( @@ -255,7 +257,7 @@ function updateBookmarksList(bookmark) { } $('div[data-id="'+ bookmark.id +'"] a.bookmark_tag').bind('click', addFilterTag); } - else { + else { // View in text $('.bookmarks_list').append( '
' + '

' + @@ -270,6 +272,7 @@ function updateBookmarksList(bookmark) { '' + encodeEntities(bookmark.title) + '' + '

' + '

' + encodeEntities(bookmark.url) + '

' + + '

' + formatDate(bookmark.added_date) + '

' + '

'+ encodeEntities(bookmark.description) + '

' + '
' );