diff --git a/htroot/Bookmarks_p.html b/htroot/Bookmarks_p.html index 87141f4b9..decc680c1 100644 --- a/htroot/Bookmarks_p.html +++ b/htroot/Bookmarks_p.html @@ -15,6 +15,7 @@
Url:
Title:
+Description:
Tags(comma separated):
Public: #{bookmarks}# #[title]#
-Tagged with #[tags]#.
+#[description]#
+Tagged with #[tags]#.
Edit / Delete

diff --git a/htroot/Bookmarks_p.java b/htroot/Bookmarks_p.java index c80a21cfc..d5484b1c5 100644 --- a/htroot/Bookmarks_p.java +++ b/htroot/Bookmarks_p.java @@ -65,6 +65,7 @@ public class Bookmarks_p { //defaultvalues prop.put("edit", 0); prop.put("title", ""); + prop.put("description", ""); prop.put("url", ""); prop.put("tags", ""); prop.put("public", 1); //1=is public @@ -72,6 +73,7 @@ public class Bookmarks_p { if(post.containsKey("add")){ //add an Entry String url=(String) post.get("url"); String title=(String) post.get("title"); + String description=(String) post.get("description"); String tagsString = (String)post.get("tags"); if(tagsString.equals("")){ tagsString="unsorted"; //defaulttag @@ -85,6 +87,7 @@ public class Bookmarks_p { bookmarksDB.Bookmark bookmark = switchboard.bookmarksDB.createBookmark(url); if(bookmark != null){ bookmark.setProperty(bookmarksDB.Bookmark.BOOKMARK_TITLE, title); + bookmark.setProperty(bookmarksDB.Bookmark.BOOKMARK_DESCRIPTION, description); bookmark.setProperty(bookmarksDB.Bookmark.BOOKMARK_PUBLIC, (String) post.get("public")); bookmark.setTags(tags); bookmark.setBookmarksTable(); @@ -97,6 +100,7 @@ public class Bookmarks_p { bookmarksDB.Bookmark bookmark = switchboard.bookmarksDB.getBookmark(urlHash); prop.put("edit", 1); //edit mode prop.put("title", bookmark.getTitle()); + prop.put("description", bookmark.getDescription()); prop.put("url", bookmark.getUrl()); prop.put("tags", bookmark.getTags()); if(bookmark.getPublic()){ @@ -142,6 +146,7 @@ public class Bookmarks_p { if(bookmark!=null){ prop.put("bookmarks_"+count+"_link", bookmark.getUrl()); prop.put("bookmarks_"+count+"_title", bookmark.getTitle()); + prop.put("bookmarks_"+count+"_description", bookmark.getDescription()); prop.put("bookmarks_"+count+"_tags", bookmark.getTags()); prop.put("bookmarks_"+count+"_hash", bookmark.getUrlHash()); count++; diff --git a/htroot/env/style.css b/htroot/env/style.css index e0a1761e0..0e8d0ef23 100644 --- a/htroot/env/style.css +++ b/htroot/env/style.css @@ -168,3 +168,6 @@ background-color: #eeeeee; .MessageBackground { background-color: #eeeeee; } +.bookmarkTags{ +color: blue; +} diff --git a/source/de/anomic/data/bookmarksDB.java b/source/de/anomic/data/bookmarksDB.java index fa2e51281..207b7121f 100644 --- a/source/de/anomic/data/bookmarksDB.java +++ b/source/de/anomic/data/bookmarksDB.java @@ -324,6 +324,7 @@ public class bookmarksDB { public class Bookmark{ public static final String BOOKMARK_URL="bookmarkUrl"; public static final String BOOKMARK_TITLE="bookmarkTitle"; + public static final String BOOKMARK_DESCRIPTION="bookmarkDesc"; public static final String BOOKMARK_TAGS="bookmarkTags"; public static final String BOOKMARK_PUBLIC="bookmarkPublic"; public static final String BOOKMARK_TIMESTAMP="bookmarkTimestamp"; @@ -375,6 +376,12 @@ public class bookmarksDB { } return ""; } + public String getDescription(){ + if(this.mem.containsKey(BOOKMARK_DESCRIPTION)){ + return (String) this.mem.get(BOOKMARK_DESCRIPTION); + } + return ""; + } public String getTitle(){ if(this.mem.containsKey(BOOKMARK_TITLE)){ return (String) this.mem.get(BOOKMARK_TITLE);