- minor changes on YaCy-UI

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4792 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
apfelmaennchen 17 years ago
parent 5c6ff5ebea
commit 0f7449840e

@ -26,6 +26,7 @@
<script type="text/javascript">
//<![CDATA[
$(function() {
qtag = "";
/* Initialize Tabs and set up close function */
var $tabs = $('#container ul').tabs()
.bind('add.ui-tabs', function(e, ui) {
@ -90,7 +91,7 @@
/* Load Sidebar */
$("#side1").load("sidebar/sidebar_admin.html");
/* $("#side2").load("sidebar/sidebar_pager.html"); */
$("#side3").load("sidebar/sidebar.html");
$("#side3").load("sidebar/sidebar.html");
/* Load Search Result into new Tab */
$('#searchbox').submit(function() {
@ -101,6 +102,10 @@
return false;
});
$("#tagcloud").click(function () {
alert("tagcloud");
});
$("#searchtext").click(function () {
$("#side3").accordion("activate", 0);
});

@ -1,11 +1,31 @@
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$(document).ready(function() {
$("#side3").accordion({
autoheight: false,
header: "h3"
});
});
});
$.ajax({
type: "GET",
url: "/xml/bookmarks/tags/get.xml?login=&top=25&sort=size",
dataType: "xml",
success: function(xml) {
$(xml).find('tag').each(function(){
var count = $(this).attr('count');
var tag = $(this).attr('tag');
var size = ((count/20)+0.3);
if (size < 1) {size = 1;}
$('<a style="font-size:'+size+'em"></a>')
.html(tag+' ')
.appendTo('#tagcloud')
.bind('click', function() {
qtag = $(this).text();
$('#container ul').tabs("load", 2);
});
}); //close each(
}
}); //close $.ajax(
});
//]]>
</script>
@ -71,7 +91,8 @@
<option value="50">50</option>
</select>
</p>
</form>
</form>
<p id="tagcloud"></p>
</div>

@ -10,6 +10,8 @@
apfelmaennchen
<h3>Change Log</h3>
<ul>
<li>12-05-2008: added tagcloud for bookmarks</li>
<li>12-05-2008: bookmarks support date and public fields as they have been added to XBEL output.</li>
<li>10-05-2008: bookmarks are now retrieved from /xml/bookmarks/xbel/xbel.xml and do no longer require a seperate servlet</li>
<li>19-04-2008: new double-accordion sidebar menu is up and running (I am open for suggestions on how to populate the menus).</li>
<li>19-04-2008: search results are now retrieved from yacysearch.rss (XML) and do no longer need a seperate servlet</li>
@ -17,6 +19,7 @@ apfelmaennchen
<h3>Bug Tracker</h3>
<ul>
<li>Please report bugs in the official <a href="http://forum.yacy-websuche.de/">YaCy-Forum</a> - thanks!</li>
<li>12-05-2008: if you click a tag in the tagcloud, the bookmarks table doesn't update properly and JavaScript returns a 'tabs is undefined' error...</li>
<li>10-05-2008: there is an issue with Firefox 3.0b5 and the jQuery XML parsing of the search result (one symptom is the broken pagination)</li>
<li>19-04-2008: if you open more than one search tab in Firefox 2.x or Safari, only the first result item is shown. I would be greatful for any hint...</li>
<li>19-04-2008: resource types 'sciencenet' and 'bookmarks' doen't work yet. For 'sciencenet' we have to solve the Ajax cross domain restriction.</li>

@ -8,25 +8,31 @@
$.ajax({
type: "GET",
url: "/xml/bookmarks/xbel/xbel.xml?login=",
url: "/xml/bookmarks/xbel/xbel.xml?login=true&tag="+qtag,
dataType: "xml",
success: function(xml) {
$(xml).find('bookmark').each(function(){
var link = $(this).attr('href');
var hash = $(this).attr('id');
var title = $(this).find('title').text();
var date = "01-01-0101";
var date = $(this).attr('added');;
var desc = $(this).find('desc').text();
var tags = $(this).find('metadata').attr('ShortcutURL');
var pub = $(this).find('metadata[@owner=YaCy][@public]').attr('public');
var tags = $(this).find('metadata[@owner=Mozilla][@ShortcutURL]').attr('ShortcutURL').replace(",",", ","g");
if (pub == "true") {
icon = '<img src="img-2/world2.png" alt="public bookmark" title="public bookmark"/>'
} else {
var icon = '<img src="img-2/lock.png" alt="private bookmark" title="private bookmark"/>'
}
$('<tr></tr')
.html('<td><input type="checkbox" value="true" /></td><td><img src="img-2/world2.png" alt="public bookmark" title="public bookmark"/></td><td><h3 class="linktitle">' +title+ '</h3><p class="desc">' +desc+ '</p><p class="url"><a href="' +link+ '">' +link+ '</a></p><td>' +tags+ '</td><td>' +date+ '</td><td><a href="/Bookmarks.html?edit=' +hash+ '"><img src="img-2/pencil.png" alt="edit bookmark" title="edit bookmark" /></a><img src="img-2/cancel.png" alt="delete bookmark" title="delete bookmark"/></td>')
.appendTo('#ymarks tbody');
.html('<td><input type="checkbox" value="true" /></td><td>' +icon+ '</td><td><h3 class="linktitle">' +title+ '</h3><p class="desc">' +desc+ '</p><p class="url"><a href="' +link+ '">' +link+ '</a></p><td>' +tags+ ' </td><td>' +date+ '</td><td><a href="/Bookmarks.html?edit=' +hash+ '"><img src="img-2/pencil.png" alt="edit bookmark" title="edit bookmark" /></a><img src="img-2/cancel.png" alt="delete bookmark" title="delete bookmark"/></td>')
.appendTo('#ymarks tbody');
}); //close each(
$('#ymarks')
.tablesorter({widgets: ['zebra']})
.tablesorterPager({container: $('#pager'), size: 5, positionFixed: false});
.tablesorterPager({container: $('#pager'), size: 5, positionFixed: false});
}
}); //close $.ajax(
}); //close $.ajax(
});
//]]>
</script>

@ -9,7 +9,7 @@
url: query,
dataType: "xml",
success: function(xml) {
var totalResults = parseInt($(xml).find('totalResults').text().replace(".",""));
var totalResults = parseInt($(xml).find('totalResults').text().replace(".","","g"));
var startIndex = parseInt($(xml).find('startIndex').text());
var itemsPerPage = parseInt($(xml).find('itemsPerPage').text());
var query = $(xml).find('Query').attr('searchTerms');
@ -63,7 +63,7 @@
+"&prefermaskfilter="+$(tabid).attr('prefermaskfilter')
+"&urlmaskfilter="+$(tabid).attr('urlmaskfilter');
var selected = $('#container ul').data('selected.ui-tabs');
var selected = $tabs.data('selected.ui-tabs');
$tabs.tabs("load", selected);
$('#pagination').trigger("update");
return false;

Loading…
Cancel
Save