Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

YaCy-UI: - added scrollbar to folder widget - slightly improved Ajax handling for folder and tag widget

apfelmaennchen00c843f7d9f1
diff --git a/htroot/yacy/ui/css/base.css b/htroot/yacy/ui/css/base.css
index e4f13619f..cb902c255 100644
--- a/htroot/yacy/ui/css/base.css
+++ b/htroot/yacy/ui/css/base.css
@@ -58,6 +58,8 @@ div.ys {
/* Sidebar */
+
+
div.sidebar {
margin-right: 1em;
float:left;
@@ -120,8 +122,8 @@ img.help {
h3.linktitle {
margin-top:2px;
margin-bottom: -0.5em;
- font-size: 1.0em;
- line-height: 1.2em;
+ font-size: 1.0em;
+ line-height: 1.2em;
color:#239AFF;
}
.url a {
@@ -158,8 +160,8 @@ div.searchresults.hidden {
margin:2px;
padding-left: 20px;
margin-bottom: -0.5em;
- font-size: 1.0em;
- line-height: 1.2em
+ font-size: 1.0em;
+ line-height: 1.2em
}
.snippet {
font-style:italic;
@@ -215,10 +217,13 @@ dl.pairs dt {
margin-bottom : 10px;
border: none;
margin: 0px;
- padding: 5px 10px 5px 10px;
+ padding: 5px 10px 5px 10px; /* top right bottom left */
border: 1px solid black;
text-decoration: none;
- font-size: 14px;
+ font-size: 14px;
+ max-height: 220px;
+ overflow-x: hidden;
+ overflow-y: auto;
}
.basic p {
@@ -244,6 +249,18 @@ dl.pairs dt {
.basic h3.selected {
}
+.basic h3 span.loading {
+ padding: 0px 15px 0px 10px;
+ margin-left: 5px;
+ background: url(../img/loading.gif) no-repeat 0 50%;
+}
+
+#yfolder {
+ font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif;
+ font-size: 12px;
+ color: black;
+}
+
#tagcloud {
text-align: justify;
line-height: 120%;
diff --git a/htroot/yacy/ui/css/jquery.treeview.css b/htroot/yacy/ui/css/jquery.treeview.css
index 4ba19a2ad..735d92b3b 100644
--- a/htroot/yacy/ui/css/jquery.treeview.css
+++ b/htroot/yacy/ui/css/jquery.treeview.css
@@ -62,7 +62,7 @@
.filetree li { padding: 3px 0 2px 16px; }
-.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
+.filetree span.folder, .filetree span.file { padding: 1px 0px 0px 18px; display: block; }
.filetree span.folder { background: url(../img/treeview/folder.gif) 0 0 no-repeat; }
.filetree li.expandable span.folder { background: url(../img/treeview/folder-closed.gif) 0 0 no-repeat; }
.filetree span.file { background: url(../img/treeview/file.gif) 0 0 no-repeat; }
diff --git a/htroot/yacy/ui/index.html b/htroot/yacy/ui/index.html
index 346131964..414149cc6 100644
--- a/htroot/yacy/ui/index.html
+++ b/htroot/yacy/ui/index.html
@@ -15,8 +15,8 @@
<link media="screen" type="text/css" href="css/jquery.pagination.css" rel="stylesheet" />
<link media="screen" type="text/css" href="css/jquery.flexigrid.css" rel="stylesheet" />
<link media="screen" type="text/css" href="css/jquery.dialog.css" rel="stylesheet" />
- <link media="screen" type="text/css" href="css/jquery.treeview.css" rel="stylesheet" />
-
+ <link media="screen" type="text/css" href="css/jquery.treeview.css" rel="stylesheet" />
+
<script type="text/javascript" src="js/sarissa.js"></script>
<script type="text/javascript" src="js/sarissa_ieemu_xpath.js"></script>
@@ -34,7 +34,7 @@
<script src="js/jquery-flexigrid.js" type="text/javascript"></script>
<script src="js/jquery.treeview.min.js" type="text/javascript"></script>
- <script src="js/jquery.xslTransform.js" type="text/javascript"></script>
+ <script src="js/jquery.xslTransform.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
diff --git a/htroot/yacy/ui/sidebar/sidebar_1.html b/htroot/yacy/ui/sidebar/sidebar_1.html
index 740a820dc..fd037d22b 100644
--- a/htroot/yacy/ui/sidebar/sidebar_1.html
+++ b/htroot/yacy/ui/sidebar/sidebar_1.html
@@ -20,9 +20,16 @@
// alert("Login");
}
});
- });
+ });
+
+ $("#shutdown").click(function() {
+ confirm("Shutdown YaCy-Peer?");
+ $("body").load("../../Steering.html?shutdown=");
+ });
- $("#admin").click(function() { $tabs.tabs('select',1); });
+ $("#admin").click(function() {
+ $tabs.tabs('select',1);
+ });
$("#searchtext").click(function () {
$("#side2").accordion("activate", 0);
@@ -226,19 +233,7 @@
<td><label for="video">Video</label></td>
<td><label for="appl">Applications</label></td>
</tr>
- </table>
- <!--
- <br />
- <label for="contentdom">Content domain:</label>
- <br />
- <select name="contentdom" class="selector">
- <option selected="selected" value="text">text</option>
- <option value="image">image</option>
- <option value="audio">audio</option>
- <option value="video">video</option>
- <option value="app">application</option>
- </select>
- -->
+ </table>
</p>
</form>
</div>
@@ -262,7 +257,7 @@
<img alt="Re-Start" title="Re-Start" src="img-1/Backup%20Green%20Button.png" />
<a href="../../Steering.html?restart=">Re-Start</a><br />
<img alt="Shutdown" title="Shutdown" src="img-1/Stop%20Red%20Button.png" />
- <a href="../../Steering.html?shutdown=">Shutdown</a><br />
+ <a id="shutdown" href="#Shutdown">Shutdown</a><br />
</div>
diff --git a/htroot/yacy/ui/sidebar/sidebar_2.html b/htroot/yacy/ui/sidebar/sidebar_2.html
index 68bc9e3cd..9fdca00cb 100644
--- a/htroot/yacy/ui/sidebar/sidebar_2.html
+++ b/htroot/yacy/ui/sidebar/sidebar_2.html
@@ -1,21 +1,43 @@
<script type="text/javascript">
//<![CDATA[
- $(document).ready(function() {
-
+ $(document).ready(function() {
/* Init Sidebar_2 */
$("#side2").accordion({
autoHeight: false,
- fillSpace: true,
+ clearStyle: true,
header: "h3"
});
- $("#side2").accordion("activate", 1);
-
+ $("#side2").accordion("activate", 1);
+ /* Load Folders */
+ loadFolders();
+ /* experiemntal: only works with first folder level */
+ $("span.folder").click(function() {
+ qtag = "/"+$(this).text();
+ if (tabid == "#Bookmarks") {
+ $tabs.tabs("load", 3);
+ } else {
+ $tabs.tabs('select',3);
+ }
+ });
/* Load TagCloud */
+ loadTagCloud();
+ });
+ function loadFolders() {
+ $("#yfolder *").remove();
+ $("#yfolder").getTransform('xsl/xbel2folder-ul.xsl','/xml/bookmarks/xbel/xbel.xml');
+ $("#yfolder").treeview({
+ collapsed: true,
+ unique: true
+ });
+ }
+ function loadTagCloud() {
+ $("#tagcloud *").remove();
+ $("#sidebar-2-1").toggleClass("loading");
$.ajax({
- type: "GET",
+ type: "POST",
url: "/xml/bookmarks/tags/get.xml?top=25&sort=alpha",
dataType: "xml",
- cache: false,
+ cache: false,
success: function(xml) {
$(xml).find('tag').each(function(){
var count = $(this).attr('count');
@@ -36,19 +58,15 @@
}
});
}); //close each(
+ $("#sidebar-2-1").toggleClass("loading");
}
}); //close $.ajax(
- /* Load Folders */
- $("#yfolder").getTransform('xsl/xbel2folder-ul.xsl','/xml/bookmarks/xbel/xbel.xml');
- $("#yfolder").treeview({
- collapsed: true,
- unique: true
- });
- });
- //]]>
+ }
+ //]]>
</script>
-<h3>Search Options</h3> <!-- 0 -->
+<!-- 0 -->
+<h3>Search Options</h3>
<div class="yform">
<form id="yoptions" class="small" method="get" action="" accept-charset="UTF-8">
<p>
@@ -81,13 +99,20 @@
</form>
</div>
-<h3>Bookmark TagCloud</h3> <!-- 1 -->
+<!-- 1 -->
+<h3 id="tagcloud-h3">Bookmark TagCloud
+ <span id="sidebar-2-1"></span>
+</h3>
<div class="menu">
<p id="tagcloud"></p>
-</div>
-<h3>Bookmark Folders</h3> <!-- 2 -->
+</div>
+
+<!-- 2 -->
+<h3>Bookmark Folders
+ <span id="sidebar-2-2"></span>
+</h3>
<div class="menu">
- <ul class="filetree" id="yfolder"></ul>
+ <ul class="filetree" id="yfolder"></ul>
</div>
diff --git a/htroot/yacy/ui/yacyui-bookmarks.html b/htroot/yacy/ui/yacyui-bookmarks.html
index 692a073d0..fbddad0f8 100644
--- a/htroot/yacy/ui/yacyui-bookmarks.html
+++ b/htroot/yacy/ui/yacyui-bookmarks.html
@@ -2,7 +2,7 @@
//<![CDATA[
$(document).ready(function() {
$("#side1").accordion("activate", 0);
- $("#side2").accordion("activate", 1);
+ // $("#side2").accordion("activate", 1);
// $('#yoptions').resetForm();
$("#bmadd").dialog({
autoOpen: false,
@@ -24,34 +24,15 @@
dataType: "xml",
success: function(xml) {
$('#bmaddform').resetForm();
- $("#bmadd").dialog("close");
- $tabs.tabs("load", 3);
- $("#side2 *").remove();
- $("#side2").load("sidebar/sidebar_2.html");
+ $("#bmadd").dialog("close");
+ loadFolders();
+ loadTagCloud();
+ $tabs.tabs("select", 3);
}
});
}
}
});
- function bm_action(com,grid) {
- if (com=='Delete') {
- confirm('Delete ' + $('.trSelected',grid).length + ' bookmark(s)?')
- $('.trSelected',grid).each(function(){
- var url = "/xml/bookmarks/posts/delete_p.xml?login=&urlhash="+$(this).find('td :first').text();
- $.ajax({
- type: 'POST',
- url: url,
- dataType: 'xml',
- success: function(xml) {
- $tabs.tabs("load", 3);
- }
- }); // close $.ajax(
- }); //close each(
- }
- else if (com=='Add') {
- $("#bmadd").dialog('open');
- }
- }
$("#bm_url").blur(function() {
var url = $("input[@name='bm_url']").getValue();
$.ajax({
@@ -70,10 +51,29 @@
$("input[@name='bm_tags']").setValue(tags);
}
});
- });
- counter = 0;
+ });
+ function bm_action(com,grid) {
+ if (com=='Delete') {
+ confirm('Delete ' + $('.trSelected',grid).length + ' bookmark(s)?')
+ $('.trSelected',grid).each(function(){
+ var url = "/xml/bookmarks/posts/delete_p.xml?login=&urlhash="+$(this).find('td :first').text();
+ $.ajax({
+ type: 'POST',
+ url: url,
+ dataType: 'xml'
+ }); // close $.ajax(
+ }); //close each(
+ loadFolders();
+ loadTagCloud();
+ $tabs.tabs("load", 3);
+ }
+ else if (com=='Add') {
+ $("#bmadd").dialog('open');
+ }
+ }
$.ajax({
- type: "GET",
+ type: "POST",
+ async: true,
url: "/xml/bookmarks/xbel/xbel.xml?tag="+qtag,
dataType: "xml",
success: function(xml) {
@@ -97,8 +97,7 @@
}
$('<tr></tr')
.html('<td>' +hash+ '</td><td>' +icon+ '</td><td><h3 class="linktitle">' +HTMLenc(title)+ '</h3><p class="desc">' +HTMLenc(desc)+ '</p><p class="url"><a href="' +link+ '">' +link+ '</a></p><td>' +HTMLenc(tags)+ ' </td><td>' +date+ '</td>')
- .appendTo('#ymarks tbody');
- counter++;
+ .appendTo('#ymarks tbody');
}); //close each(
var height=document.documentElement.clientHeight - 205;
$('#ymarks').flexigrid({
diff --git a/htroot/yacy/ui/yacyui-welcome.html b/htroot/yacy/ui/yacyui-welcome.html
index 5df2fe7ff..0e09a7701 100644
--- a/htroot/yacy/ui/yacyui-welcome.html
+++ b/htroot/yacy/ui/yacyui-welcome.html
@@ -7,6 +7,8 @@
apfelmaennchen
<h3>Change Log</h3>
<ul>
+ <li>27-09-2008: Added scrollbar to folder widget</li>
+ <li>27-09-2008: Slightly improved Ajax handling for folder and tag widget</li>
<li>23-09-2008: Added bookmark folder widget to sidebar (it uses the xbel.xml with XSLT!</li>
<li>21-09-2008: Enabled the new language selection - special thanks to orbiter</li>
<li>21-09-2008: Added basic functionallity to add bookmark(s) from search results</li>