From 92d77c3befa539bc17e8842180b3f9628d56568f Mon Sep 17 00:00:00 2001 From: apfelmaennchen Date: Mon, 26 Jan 2009 18:38:58 +0000 Subject: [PATCH] Major update to YaCy-UI...still not perfect...but I thought I share my progress :-) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5519 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/api/bookmarks/get_bookmarks.java | 2 +- htroot/api/bookmarks/get_folders.json | 9 + htroot/yacy/ui/css/base.css | 52 +++- htroot/yacy/ui/index.html | 40 ++- htroot/yacy/ui/js/jquery.treeview.async.js | 72 ++++++ htroot/yacy/ui/sidebar/sidebar_1.html | 47 ++-- htroot/yacy/ui/sidebar/sidebar_2.html | 125 ---------- htroot/yacy/ui/yacyui-admin.html | 151 ++++++++++-- htroot/yacy/ui/yacyui-bookmarks.html | 10 +- htroot/yacy/ui/yacyui-search.html | 267 +++++++++++---------- htroot/yacy/ui/yacyui-welcome.html | 3 + 11 files changed, 441 insertions(+), 337 deletions(-) create mode 100644 htroot/api/bookmarks/get_folders.json create mode 100644 htroot/yacy/ui/js/jquery.treeview.async.js delete mode 100644 htroot/yacy/ui/sidebar/sidebar_2.html diff --git a/htroot/api/bookmarks/get_bookmarks.java b/htroot/api/bookmarks/get_bookmarks.java index 8774a75eb..2e4c49697 100644 --- a/htroot/api/bookmarks/get_bookmarks.java +++ b/htroot/api/bookmarks/get_bookmarks.java @@ -114,7 +114,7 @@ public class get_bookmarks { // default covers all non XBEL formats // set bookmark iterator according to query - if (qtype.equals("tags") && !query.equals("")) { + if (qtype.equals("tags") && !query.equals("") && !query.equals("/")) { it = sb.bookmarksDB.getBookmarksIterator(query, isAdmin); } else { it = sb.bookmarksDB.getBookmarksIterator(isAdmin); diff --git a/htroot/api/bookmarks/get_folders.json b/htroot/api/bookmarks/get_folders.json new file mode 100644 index 000000000..239901dcf --- /dev/null +++ b/htroot/api/bookmarks/get_folders.json @@ -0,0 +1,9 @@ +[ +#{folders}#{ +"text": "#[foldername]#", +"expanded": #[expanded]#, +"classes": "#[classes]#", +"id": "#[hash]#", +"hasChildren": #[hasChildren]# +}#[comma]##{/folders}# +] diff --git a/htroot/yacy/ui/css/base.css b/htroot/yacy/ui/css/base.css index fed146db6..beacd0d77 100644 --- a/htroot/yacy/ui/css/base.css +++ b/htroot/yacy/ui/css/base.css @@ -7,6 +7,47 @@ div.main { height:100%; } +.yresult .favicon { + width: 16px; + height: 16px; + padding: 5px 1px 1px 15px; /* top right bottom left */ +} + +/* Admin Console */ +.banner { + margin-top: 20px; + margin-bottom: 0px; +} +table.adminconsole { + width:100%; + margin:8px 0px 6px 0px; + display:inline-block; + +} +table.adminconsole td { + width: 63px; + text-align:center; +} +table.adminconsole td.head { + text-align:left; +} +table.adminconsole h3 { + margin-top: 15px; + margin-bottom: 5px; + font-size: 14px; + color: #27537a; +} +table.adminconsole img { + width: 32px; + height: 32px; + padding: 1px 1px 7px 1px; /* top right bottom left */ + vertical-align: middle; +} +table.adminconsole a { + text-decoration:none; + color: black; +} + /* Searchbox */ table.contentdom { @@ -57,20 +98,11 @@ div.ys { } /* Sidebar */ - - - div.sidebar { margin-right: 1em; float:left; width:250px; } -.menu img { - width: 32px; - height: 32px; - padding: 2px 15px 2px 2px; - vertical-align: middle; -} .menu img.logo { width: 256px; height: 128px; @@ -236,7 +268,7 @@ dl.pairs dt { border: 1px solid black; text-decoration: none; font-size: 14px; - max-height: 220px; + max-height: 320px; overflow-x: hidden; overflow-y: auto; } diff --git a/htroot/yacy/ui/index.html b/htroot/yacy/ui/index.html index 8679d1c04..dd62c897a 100644 --- a/htroot/yacy/ui/index.html +++ b/htroot/yacy/ui/index.html @@ -30,10 +30,13 @@ + - + + + @@ -169,8 +164,7 @@ diff --git a/htroot/yacy/ui/js/jquery.treeview.async.js b/htroot/yacy/ui/js/jquery.treeview.async.js new file mode 100644 index 000000000..2597dde17 --- /dev/null +++ b/htroot/yacy/ui/js/jquery.treeview.async.js @@ -0,0 +1,72 @@ +/* + * Async Treeview 0.1 - Lazy-loading extension for Treeview + * + * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ + * + * Copyright (c) 2007 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id$ + * + */ + +;(function($) { + +function load(settings, root, child, container) { + $.getJSON(settings.url, {root: root}, function(response) { + function createNode(parent) { + var current = $("
  • ").attr("id", this.id || "").html("" + this.text + "").appendTo(parent); + if (this.classes) { + current.children("span").addClass(this.classes); + } + if (this.expanded) { + current.addClass("open"); + } + if (this.hasChildren || this.children && this.children.length) { + var branch = $("