- einem Komma folgende Leerzeichen bei der Eingabe von Tags werden gelöscht

- Anpassungen für die Auswahlbox-Option "selected"
- Einschränkung der Tagwolke aus Tag-Selektion
- Rundung von font-size auf zwei Nachkommastellen

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4315 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
apfelmaennchen 17 years ago
parent ce7257483d
commit b9dd597e97

@ -129,7 +129,7 @@ public class Bookmarks {
if(tagsString.equals("")){ if(tagsString.equals("")){
tagsString="unsorted"; //default tag tagsString="unsorted"; //default tag
} }
Set tags=listManager.string2set(tagsString); Set tags=listManager.string2set(tagsString.replaceAll(",\\s+", ",")); // space characters following a comma are removed
bookmarksDB.Bookmark bookmark = switchboard.bookmarksDB.createBookmark(url, username); bookmarksDB.Bookmark bookmark = switchboard.bookmarksDB.createBookmark(url, username);
if(bookmark != null){ if(bookmark != null){
@ -240,7 +240,15 @@ public class Bookmarks {
max_count=Integer.parseInt((String) post.get("num")); max_count=Integer.parseInt((String) post.get("num"));
} }
} }
Iterator it=switchboard.bookmarksDB.getTagIterator(isAdmin); // only list tags according to current tag-selection
Iterator it = null;
if (tagName.equals("")) {
it = switchboard.bookmarksDB.getTagIterator(isAdmin);
} else {
it = switchboard.bookmarksDB.getTagIterator(tagName, isAdmin);
}
// Iterator it=switchboard.bookmarksDB.getTagIterator(isAdmin);
int count=0; int count=0;
bookmarksDB.Tag tag; bookmarksDB.Tag tag;
prop.put("num-bookmarks", switchboard.bookmarksDB.bookmarksSize()); prop.put("num-bookmarks", switchboard.bookmarksDB.bookmarksSize());
@ -249,14 +257,22 @@ public class Bookmarks {
prop.putHTML("taglist_"+count+"_name", tag.getFriendlyName()); prop.putHTML("taglist_"+count+"_name", tag.getFriendlyName());
prop.putHTML("taglist_"+count+"_tag", tag.getTagName()); prop.putHTML("taglist_"+count+"_tag", tag.getTagName());
prop.put("taglist_"+count+"_num", tag.size()); prop.put("taglist_"+count+"_num", tag.size());
prop.put("taglist_"+count+"_size", 1.1+(Math.log(tag.size())/4)); prop.put("taglist_"+count+"_size", Math.round((1.1+Math.log(tag.size())/4)*100)/100.); // font-size is pseudo-rounded to 2 decimals
if(tagName.equals(tag.getFriendlyName())){
prop.put("taglist_"+count+"_selected", " selected=\"selected\"");
} else {
prop.put("taglist_"+count+"_selected", "");
};
count++; count++;
} }
prop.put("taglist", count); prop.put("taglist", count);
count=0; count=0;
if(!tagName.equals("")){ if(!tagName.equals("")){
prop.put("selected", "");
it=switchboard.bookmarksDB.getBookmarksIterator(tagName, isAdmin); it=switchboard.bookmarksDB.getBookmarksIterator(tagName, isAdmin);
}else{ }else{
prop.put("selected", " selected=\"selected\"");
it=switchboard.bookmarksDB.getBookmarksIterator(isAdmin); it=switchboard.bookmarksDB.getBookmarksIterator(isAdmin);
} }
bookmarksDB.Bookmark bookmark; bookmarksDB.Bookmark bookmark;

Loading…
Cancel
Save