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

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5214 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
apfelmaennchen 17 years ago
parent 9589dfe080
commit 00c843f7d9

@ -58,6 +58,8 @@ div.ys {
/* Sidebar */
div.sidebar {
margin-right: 1em;
float:left;
@ -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;
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%;

@ -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; }

@ -22,7 +22,14 @@
});
});
$("#admin").click(function() { $tabs.tabs('select',1); });
$("#shutdown").click(function() {
confirm("Shutdown YaCy-Peer?");
$("body").load("../../Steering.html?shutdown=");
});
$("#admin").click(function() {
$tabs.tabs('select',1);
});
$("#searchtext").click(function () {
$("#side2").accordion("activate", 0);
@ -227,18 +234,6 @@
<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>
-->
</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>

@ -1,18 +1,40 @@
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
/* Init Sidebar_2 */
$("#side2").accordion({
autoHeight: false,
fillSpace: true,
clearStyle: true,
header: "h3"
});
$("#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,
@ -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,11 +99,18 @@
</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 -->
<!-- 2 -->
<h3>Bookmark Folders
<span id="sidebar-2-2"></span>
</h3>
<div class="menu">
<ul class="filetree" id="yfolder"></ul>
</div>

@ -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,
@ -25,33 +25,14 @@
success: function(xml) {
$('#bmaddform').resetForm();
$("#bmadd").dialog("close");
$tabs.tabs("load", 3);
$("#side2 *").remove();
$("#side2").load("sidebar/sidebar_2.html");
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({
@ -71,9 +52,28 @@
}
});
});
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: "GET",
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: "POST",
async: true,
url: "/xml/bookmarks/xbel/xbel.xml?tag="+qtag,
dataType: "xml",
success: function(xml) {
@ -98,7 +98,6 @@
$('<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++;
}); //close each(
var height=document.documentElement.clientHeight - 205;
$('#ymarks').flexigrid({

@ -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>

Loading…
Cancel
Save