- search results are retrieved from rss/xml, no other servlet needed - added double accordion sidebar menus git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4718 6c8d7289-2bf4-0310-a012-ef5d649a1542pull/1/head
parent
c270d02176
commit
2149728227
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Faviconize (http://www.babylon-design.com/share/faviconize/)
|
||||
* A jQuery plugin for displaying a favicon on an external link.
|
||||
*
|
||||
* Version 1.0
|
||||
* March 4th, 2008
|
||||
*
|
||||
* Author : Samuel Le Morvan (http://www.babylon-design.com/)
|
||||
*
|
||||
* Inspired by:
|
||||
* Ask the CSS Guy (http://www.askthecssguy.com/2006/12/hyperlink_cues_with_favicons.html)
|
||||
*
|
||||
*
|
||||
**/
|
||||
(function($){
|
||||
$.fn.faviconize = function(e) {
|
||||
|
||||
var e = $.extend({position:'before', linkable:false, exceptions: new Array()}, e);
|
||||
|
||||
function faviconizePlace(a, h) {
|
||||
switch(e.position) {
|
||||
case "before" : a.before(h+' '); break;
|
||||
case "after" : a.after(' '+h); break;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
|
||||
$(this).each(function() {
|
||||
var a = $(this);
|
||||
var r = a.attr("href").match(/http:\/\/[a-z0-9.-]*(\/)?/i);
|
||||
var r = r[0] + ((r[1] == null) ? "/" : "");
|
||||
if(r) {
|
||||
if($.grep(e.exceptions, function(x) {x = (x.match(/\/$/) == null) ? x+"/" : x; return (x == r);}).length == 0) {
|
||||
var f = r + 'favicon.ico';
|
||||
var i = new Image(); $(i).attr("src", f);
|
||||
var h = '<img src="'+f+'" alt="'+ ((e.linkable) ? a.text() : '') +'" '+ ((e.className) ? 'class="'+e.className+'"' : '') +' />';
|
||||
h = (e.linkable) ? '<a href="'+a.attr("href")+'">'+h+'</a>' : h;
|
||||
$(i).load(function() {faviconizePlace(a, h);});
|
||||
$(i).error(function() {if(e.defaultImage) {faviconizePlace(a, h.replace(/src="(.*?)"/i, 'src="'+e.defaultImage+'"')); }});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -0,0 +1,311 @@
|
||||
/*
|
||||
* jQuery UI Accordion 1.6
|
||||
*
|
||||
* Copyright (c) 2007 Jörn Zaefferer
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion
|
||||
*
|
||||
* 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: jquery.accordion.js 4876 2008-03-08 11:49:04Z joern.zaefferer $
|
||||
*
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
||||
// If the UI scope is not available, add it
|
||||
$.ui = $.ui || {};
|
||||
|
||||
$.fn.extend({
|
||||
accordion: function(options, data) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
return this.each(function() {
|
||||
if (typeof options == "string") {
|
||||
var accordion = $.data(this, "ui-accordion");
|
||||
accordion[options].apply(accordion, args);
|
||||
// INIT with optional options
|
||||
} else if (!$(this).is(".ui-accordion"))
|
||||
$.data(this, "ui-accordion", new $.ui.accordion(this, options));
|
||||
});
|
||||
},
|
||||
// deprecated, use accordion("activate", index) instead
|
||||
activate: function(index) {
|
||||
return this.accordion("activate", index);
|
||||
}
|
||||
});
|
||||
|
||||
$.ui.accordion = function(container, options) {
|
||||
|
||||
// setup configuration
|
||||
this.options = options = $.extend({}, $.ui.accordion.defaults, options);
|
||||
this.element = container;
|
||||
|
||||
$(container).addClass("ui-accordion");
|
||||
|
||||
if ( options.navigation ) {
|
||||
var current = $(container).find("a").filter(options.navigationFilter);
|
||||
if ( current.length ) {
|
||||
if ( current.filter(options.header).length ) {
|
||||
options.active = current;
|
||||
} else {
|
||||
options.active = current.parent().parent().prev();
|
||||
current.addClass("current");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// calculate active if not specified, using the first header
|
||||
options.headers = $(container).find(options.header);
|
||||
options.active = findActive(options.headers, options.active);
|
||||
|
||||
if ( options.fillSpace ) {
|
||||
var maxHeight = $(container).parent().height();
|
||||
options.headers.each(function() {
|
||||
maxHeight -= $(this).outerHeight();
|
||||
});
|
||||
var maxPadding = 0;
|
||||
options.headers.next().each(function() {
|
||||
maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
|
||||
}).height(maxHeight - maxPadding);
|
||||
} else if ( options.autoheight ) {
|
||||
var maxHeight = 0;
|
||||
options.headers.next().each(function() {
|
||||
maxHeight = Math.max(maxHeight, $(this).outerHeight());
|
||||
}).height(maxHeight);
|
||||
}
|
||||
|
||||
options.headers
|
||||
.not(options.active || "")
|
||||
.next()
|
||||
.hide();
|
||||
options.active.parent().andSelf().addClass(options.selectedClass);
|
||||
|
||||
if (options.event)
|
||||
$(container).bind((options.event) + ".ui-accordion", clickHandler);
|
||||
};
|
||||
|
||||
$.ui.accordion.prototype = {
|
||||
activate: function(index) {
|
||||
// call clickHandler with custom event
|
||||
clickHandler.call(this.element, {
|
||||
target: findActive( this.options.headers, index )[0]
|
||||
});
|
||||
},
|
||||
|
||||
enable: function() {
|
||||
this.options.disabled = false;
|
||||
},
|
||||
disable: function() {
|
||||
this.options.disabled = true;
|
||||
},
|
||||
destroy: function() {
|
||||
this.options.headers.next().css("display", "");
|
||||
if ( this.options.fillSpace || this.options.autoheight ) {
|
||||
this.options.headers.next().css("height", "");
|
||||
}
|
||||
$.removeData(this.element, "ui-accordion");
|
||||
$(this.element).removeClass("ui-accordion").unbind(".ui-accordion");
|
||||
}
|
||||
}
|
||||
|
||||
function scopeCallback(callback, scope) {
|
||||
return function() {
|
||||
return callback.apply(scope, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function completed(cancel) {
|
||||
// if removed while animated data can be empty
|
||||
if (!$.data(this, "ui-accordion"))
|
||||
return;
|
||||
var instance = $.data(this, "ui-accordion");
|
||||
var options = instance.options;
|
||||
options.running = cancel ? 0 : --options.running;
|
||||
if ( options.running )
|
||||
return;
|
||||
if ( options.clearStyle ) {
|
||||
options.toShow.add(options.toHide).css({
|
||||
height: "",
|
||||
overflow: ""
|
||||
});
|
||||
}
|
||||
$(this).triggerHandler("change.ui-accordion", [options.data], options.change);
|
||||
}
|
||||
|
||||
function toggle(toShow, toHide, data, clickedActive, down) {
|
||||
var options = $.data(this, "ui-accordion").options;
|
||||
options.toShow = toShow;
|
||||
options.toHide = toHide;
|
||||
options.data = data;
|
||||
var complete = scopeCallback(completed, this);
|
||||
|
||||
// count elements to animate
|
||||
options.running = toHide.size() == 0 ? toShow.size() : toHide.size();
|
||||
|
||||
if ( options.animated ) {
|
||||
if ( !options.alwaysOpen && clickedActive ) {
|
||||
$.ui.accordion.animations[options.animated]({
|
||||
toShow: jQuery([]),
|
||||
toHide: toHide,
|
||||
complete: complete,
|
||||
down: down,
|
||||
autoheight: options.autoheight
|
||||
});
|
||||
} else {
|
||||
$.ui.accordion.animations[options.animated]({
|
||||
toShow: toShow,
|
||||
toHide: toHide,
|
||||
complete: complete,
|
||||
down: down,
|
||||
autoheight: options.autoheight
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if ( !options.alwaysOpen && clickedActive ) {
|
||||
toShow.toggle();
|
||||
} else {
|
||||
toHide.hide();
|
||||
toShow.show();
|
||||
}
|
||||
complete(true);
|
||||
}
|
||||
}
|
||||
|
||||
function clickHandler(event) {
|
||||
var options = $.data(this, "ui-accordion").options;
|
||||
if (options.disabled)
|
||||
return false;
|
||||
|
||||
// called only when using activate(false) to close all parts programmatically
|
||||
if ( !event.target && !options.alwaysOpen ) {
|
||||
options.active.parent().andSelf().toggleClass(options.selectedClass);
|
||||
var toHide = options.active.next(),
|
||||
data = {
|
||||
instance: this,
|
||||
options: options,
|
||||
newHeader: jQuery([]),
|
||||
oldHeader: options.active,
|
||||
newContent: jQuery([]),
|
||||
oldContent: toHide
|
||||
},
|
||||
toShow = options.active = $([]);
|
||||
toggle.call(this, toShow, toHide, data );
|
||||
return false;
|
||||
}
|
||||
// get the click target
|
||||
var clicked = $(event.target);
|
||||
|
||||
// due to the event delegation model, we have to check if one
|
||||
// of the parent elements is our actual header, and find that
|
||||
if ( clicked.parents(options.header).length )
|
||||
while ( !clicked.is(options.header) )
|
||||
clicked = clicked.parent();
|
||||
|
||||
var clickedActive = clicked[0] == options.active[0];
|
||||
|
||||
// if animations are still active, or the active header is the target, ignore click
|
||||
if (options.running || (options.alwaysOpen && clickedActive))
|
||||
return false;
|
||||
if (!clicked.is(options.header))
|
||||
return;
|
||||
|
||||
// switch classes
|
||||
options.active.parent().andSelf().toggleClass(options.selectedClass);
|
||||
if ( !clickedActive ) {
|
||||
clicked.parent().andSelf().addClass(options.selectedClass);
|
||||
}
|
||||
|
||||
// find elements to show and hide
|
||||
var toShow = clicked.next(),
|
||||
toHide = options.active.next(),
|
||||
//data = [clicked, options.active, toShow, toHide],
|
||||
data = {
|
||||
instance: this,
|
||||
options: options,
|
||||
newHeader: clicked,
|
||||
oldHeader: options.active,
|
||||
newContent: toShow,
|
||||
oldContent: toHide
|
||||
},
|
||||
down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );
|
||||
|
||||
options.active = clickedActive ? $([]) : clicked;
|
||||
toggle.call(this, toShow, toHide, data, clickedActive, down );
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
function findActive(headers, selector) {
|
||||
return selector != undefined
|
||||
? typeof selector == "number"
|
||||
? headers.filter(":eq(" + selector + ")")
|
||||
: headers.not(headers.not(selector))
|
||||
: selector === false
|
||||
? $([])
|
||||
: headers.filter(":eq(0)");
|
||||
}
|
||||
|
||||
$.extend($.ui.accordion, {
|
||||
defaults: {
|
||||
selectedClass: "selected",
|
||||
alwaysOpen: true,
|
||||
animated: 'slide',
|
||||
event: "click",
|
||||
header: "a",
|
||||
autoheight: true,
|
||||
running: 0,
|
||||
navigationFilter: function() {
|
||||
return this.href.toLowerCase() == location.href.toLowerCase();
|
||||
}
|
||||
},
|
||||
animations: {
|
||||
slide: function(options, additions) {
|
||||
options = $.extend({
|
||||
easing: "swing",
|
||||
duration: 300
|
||||
}, options, additions);
|
||||
if ( !options.toHide.size() ) {
|
||||
options.toShow.animate({height: "show"}, options);
|
||||
return;
|
||||
}
|
||||
var hideHeight = options.toHide.height(),
|
||||
showHeight = options.toShow.height(),
|
||||
difference = showHeight / hideHeight;
|
||||
options.toShow.css({ height: 0, overflow: 'hidden' }).show();
|
||||
options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
|
||||
step: function(now) {
|
||||
var current = (hideHeight - now) * difference;
|
||||
if ($.browser.msie || $.browser.opera) {
|
||||
current = Math.ceil(current);
|
||||
}
|
||||
options.toShow.height( current );
|
||||
},
|
||||
duration: options.duration,
|
||||
easing: options.easing,
|
||||
complete: function() {
|
||||
if ( !options.autoheight ) {
|
||||
options.toShow.css("height", "auto");
|
||||
}
|
||||
options.complete();
|
||||
}
|
||||
});
|
||||
},
|
||||
bounceslide: function(options) {
|
||||
this.slide(options, {
|
||||
easing: options.down ? "bounceout" : "swing",
|
||||
duration: options.down ? 1000 : 200
|
||||
});
|
||||
},
|
||||
easeslide: function(options) {
|
||||
this.slide(options, {
|
||||
easing: "easeinout",
|
||||
duration: 700
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
@ -0,0 +1,200 @@
|
||||
/*
|
||||
* jQuery Keyboard Navigation Plugin - Current
|
||||
* http://www.amountaintop.com/projects/keynav/
|
||||
*
|
||||
* To use, download this file to your server, save as keynav.js,
|
||||
* and add this HTML into the <head>...</head> of your web page:
|
||||
* <script type="text/javascript" src="keynav.js"></script>
|
||||
*
|
||||
* Copyright (c) 2006 Mike Hostetler <http://www.amountaintop.com/>
|
||||
* Licensed under the MIT License:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
$.keynav = new Object();
|
||||
|
||||
$.fn.keynav = function (onClass,offClass) {
|
||||
//Initialization
|
||||
var kn = $.keynav;
|
||||
if(!kn.init) {
|
||||
kn.el = new Array();
|
||||
|
||||
$(document).keydown(function(e) {
|
||||
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
|
||||
switch(key) {
|
||||
case 37:
|
||||
$.keynav.goLeft();
|
||||
break;
|
||||
case 38:
|
||||
$.keynav.goUp();
|
||||
break;
|
||||
case 39:
|
||||
$.keynav.goRight();
|
||||
break;
|
||||
case 40:
|
||||
$.keynav.goDown();
|
||||
break;
|
||||
case 13:
|
||||
$.keynav.activate();
|
||||
break;
|
||||
}
|
||||
});
|
||||
kn.init = true;
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$.keynav.reg(this,onClass,offClass);
|
||||
});
|
||||
}
|
||||
$.fn.keynav_sethover = function(onClass,offClass) {
|
||||
return this.each(function() {
|
||||
this.onClass = onClass;
|
||||
this.offClass = offClass;
|
||||
});
|
||||
}
|
||||
|
||||
$.keynav.reset = function() {
|
||||
var kn = $.keynav;
|
||||
kn.el = new Array();
|
||||
}
|
||||
|
||||
$.keynav.reg = function(e,onClass,offClass) {
|
||||
var kn = $.keynav;
|
||||
e.pos = $.keynav.getPos(e);
|
||||
e.onClass = onClass;
|
||||
e.offClass = offClass;
|
||||
e.onmouseover = function (e) { $.keynav.setActive(this); };
|
||||
kn.el.push(e);
|
||||
}
|
||||
$.keynav.setActive = function(e) {
|
||||
var kn = $.keynav;
|
||||
var cur = $.keynav.getCurrent();
|
||||
$(cur).trigger('blur');
|
||||
for(var i=0;i<kn.el.length;i++) {
|
||||
var tmp = kn.el[i];
|
||||
$(tmp).removeClass().addClass(tmp.offClass);
|
||||
}
|
||||
$(e).removeClass().addClass(e.onClass);
|
||||
$(e).trigger('focus');
|
||||
kn.currentEl = e;
|
||||
}
|
||||
$.keynav.getCurrent = function () {
|
||||
var kn = $.keynav;
|
||||
if(kn.currentEl) {
|
||||
var cur = kn.currentEl;
|
||||
}
|
||||
else {
|
||||
var cur = kn.el[0];
|
||||
}
|
||||
return cur;
|
||||
}
|
||||
$.keynav.quad = function(cur,fQuad) {
|
||||
var kn = $.keynav;
|
||||
var quad = Array();
|
||||
for(i=0;i<kn.el.length;i++) {
|
||||
var el = kn.el[i];
|
||||
if(cur == el) continue;
|
||||
if(fQuad((cur.pos.cx - el.pos.cx),(cur.pos.cy - el.pos.cy)))
|
||||
quad.push(el);
|
||||
}
|
||||
return quad;
|
||||
}
|
||||
$.keynav.activateClosest = function(cur,quad) {
|
||||
var closest;
|
||||
var od = 1000000;
|
||||
var nd = 0;
|
||||
var found = false;
|
||||
for(i=0;i<quad.length;i++) {
|
||||
var e = quad[i];
|
||||
nd = Math.sqrt(Math.pow(cur.pos.cx-e.pos.cx,2)+Math.pow(cur.pos.cy-e.pos.cy,2));
|
||||
if(nd < od) {
|
||||
closest = e;
|
||||
od = nd;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
if(found)
|
||||
$.keynav.setActive(closest);
|
||||
}
|
||||
$.keynav.goLeft = function () {
|
||||
var cur = $.keynav.getCurrent();
|
||||
var quad = $.keynav.quad(cur,function (dx,dy) {
|
||||
if((dy >= 0) && (Math.abs(dx) - dy) <= 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
});
|
||||
$.keynav.activateClosest(cur,quad);
|
||||
}
|
||||
$.keynav.goRight = function () {
|
||||
var cur = $.keynav.getCurrent();
|
||||
var quad = $.keynav.quad(cur,function (dx,dy) {
|
||||
if((dy <= 0) && (Math.abs(dx) + dy) <= 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
});
|
||||
$.keynav.activateClosest(cur,quad);
|
||||
}
|
||||
|
||||
$.keynav.goUp = function () {
|
||||
var cur = $.keynav.getCurrent();
|
||||
var quad = $.keynav.quad(cur,function (dx,dy) {
|
||||
if((dx >= 0) && (Math.abs(dy) - dx) <= 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
});
|
||||
$.keynav.activateClosest(cur,quad);
|
||||
}
|
||||
|
||||
$.keynav.goDown = function () {
|
||||
var cur = $.keynav.getCurrent();
|
||||
var quad = $.keynav.quad(cur,function (dx,dy) {
|
||||
if((dx <= 0) && (Math.abs(dy) + dx) <= 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
});
|
||||
$.keynav.activateClosest(cur,quad);
|
||||
}
|
||||
|
||||
$.keynav.activate = function () {
|
||||
var kn = $.keynav;
|
||||
$(kn.currentEl).trigger('click');
|
||||
}
|
||||
|
||||
/**
|
||||
* This function was taken from Stefan's exellent interface plugin
|
||||
* http://www.eyecon.ro/interface/
|
||||
*
|
||||
* I included it in this library's namespace because the functions aren't
|
||||
* quite the same.
|
||||
*/
|
||||
$.keynav.getPos = function (e)
|
||||
{
|
||||
var l = 0;
|
||||
var t = 0;
|
||||
var w = $.intval($.css(e,'width'));
|
||||
var h = $.intval($.css(e,'height'));
|
||||
while (e.offsetParent){
|
||||
l += e.offsetLeft + (e.currentStyle?$.intval(e.currentStyle.borderLeftWidth):0);
|
||||
t += e.offsetTop + (e.currentStyle?$.intval(e.currentStyle.borderTopWidth):0);
|
||||
e = e.offsetParent;
|
||||
}
|
||||
l += e.offsetLeft + (e.currentStyle?$.intval(e.currentStyle.borderLeftWidth):0);
|
||||
t += e.offsetTop + (e.currentStyle?$.intval(e.currentStyle.borderTopWidth):0);
|
||||
var cx = Math.round(t+(h/2));
|
||||
var cy = Math.round(l+(w/2));
|
||||
return {x:l, y:t, w:w, h:h, cx:cx, cy:cy};
|
||||
};
|
||||
|
||||
/**
|
||||
* This function was taken from Stefan's exellent interface plugin
|
||||
* http://www.eyecon.ro/interface/
|
||||
*/
|
||||
$.intval = function (v)
|
||||
{
|
||||
v = parseInt(v);
|
||||
return isNaN(v) ? 0 : v;
|
||||
};
|
||||
|
@ -0,0 +1,16 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#side3").accordion("activate", 1);
|
||||
});
|
||||
</script>
|
||||
|
||||
<h3>Ranking</h3>
|
||||
<p>
|
||||
One of the most cited reasons for YaCy is the freely configurable ranking system. The ranking settings have a major impact on
|
||||
the displayed search results, so it is worthwhile looking at them. For example searching for current news you might
|
||||
want to give pages with a more recent date a higher rank, whereas searching for a rare documentation other ranking factors are
|
||||
more helpful. As YaCy knows over 30 ranking factors, YaCy-UI will offer for the ease of use ranking pre-sets (most relevant, most popular,
|
||||
most recent) to choose from. Currently you can set the <a href="http://localhost:8080/Ranking_p.html">default ranking</a>
|
||||
via the existing user interface.
|
||||
</p>
|
||||
|
@ -1,15 +1,85 @@
|
||||
<div class="title">Sidebar:</div>
|
||||
<div class="content">
|
||||
<ul id="test">
|
||||
<li>Sidebar Example</li>
|
||||
<li>Sidebar Example</li>
|
||||
<li>Sidebar Example</li>
|
||||
<li>Sidebar Example</li>
|
||||
<li>Sidebar Example</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).ready(function() {
|
||||
$("#side3").accordion({
|
||||
autoheight: false,
|
||||
header: "h3"
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<h3>Search Options</h3> <!-- 0 -->
|
||||
<div>
|
||||
<form id="yoptions" class="small" method="get" action="" accept-charset="UTF-8">
|
||||
<p>
|
||||
<label for="itemsPerPage">Items per page: </label>
|
||||
<br />
|
||||
<select class="selector" name="itemsPerPage">
|
||||
<option selected="selected" value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
<br />
|
||||
<label for="constraint">Constraint:</label>
|
||||
<br />
|
||||
<select class="selector" id="constraint" name="constraint">
|
||||
<option value=" " selected="selected">all pages</option>
|
||||
<option value="AQAAAA" >index pages</option>
|
||||
</select>
|
||||
<br />
|
||||
<label for="urlmaskfilter">URL mask:</label>
|
||||
<br />
|
||||
<input class="filter" name="urlmaskfilter" value=".*" type="text" size="12" maxlength="80" />
|
||||
<img src="img-2/question_blue.png" alt="help" title="help" />
|
||||
<br />
|
||||
<label for="prefermaskfilter">Prefer mask:</label>
|
||||
<br />
|
||||
<input class="filter" name="prefermaskfilter" value=" " type="text" size="12" maxlength="80" />
|
||||
<img src="img-2/question_blue.png" alt="help" title="help" />
|
||||
<br />
|
||||
<label for="resource">Language:</label>
|
||||
<br />
|
||||
<select class="filter" id="language" name="language">
|
||||
<option value="any" selected="selected">any language</option>
|
||||
<option value="ger" >German</option>
|
||||
<option value="eng" >English</option>
|
||||
</select>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h3>Ranking</h3> <!-- 1 -->
|
||||
<div>
|
||||
Some easy to use ranking controlls....
|
||||
</div>
|
||||
|
||||
<h3>Bookmark Navigation</h3> <!-- 2 -->
|
||||
<div id="pager" class="tablesorterPager">
|
||||
<form action="">
|
||||
<p>
|
||||
<img src="img/first.png" class="first" alt="first" />
|
||||
<img src="img/prev.png" class="prev" alt="prev" />
|
||||
<input type="text" class="pagedisplay" alt="pagedisplay" name="pagedisplay" />
|
||||
<img src="img/next.png" class="next" alt="next" />
|
||||
<img src="img/last.png" class="last" alt="last" />
|
||||
<select class="pagesize" name="pagesize">
|
||||
<option selected="selected" value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
</select>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,43 @@
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).ready(function() {
|
||||
$("#side1").accordion({
|
||||
autoheight: false,
|
||||
header: "h3"
|
||||
});
|
||||
$("#side1").accordion("activate", 2);
|
||||
|
||||
$('a').faviconize({
|
||||
position: "before"
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<h3>YaCy Project</h3><!-- 0 -->
|
||||
<div class="menu">
|
||||
<img alt="YaCy Project Home" title="YaCy Project Home" src="img-1/home.png" />
|
||||
<a href="http://www.yacy.net" >YaCy Home</a><br />
|
||||
<img alt="YaCy Statistics" title="YaCy Statistics" src="img-2/bar_graph.png" />
|
||||
<a href="http://www.yacystats.de" >YaCy Statistics</a><br />
|
||||
<img alt="YaCy Forum" title="YaCy Forum" src="img-1/Discussion.png" />
|
||||
<a href="http://forum.yacy-websuche.de/" >YaCy Forum</a><br />
|
||||
<img alt="Help" title="YaCy Wiki" src="img-1/Help%20Blue%20Button.png" />
|
||||
<a href="http://yacy-websuche.de/wiki/index.php/Hauptseite" />YaCy Wiki</a><br />
|
||||
</div>
|
||||
<h3>YaCy Bookmarks</h3> <!-- 1 -->
|
||||
<div class="menu">
|
||||
<img alt="Add " title="Add " src="img-1/New%20Document.png" />Add<br />
|
||||
<img alt="Edit " title="Edit " src="img-1/Write%20Document.png" />Edit<br />
|
||||
<img alt="Crawl " title="Crawl " src="img-1/Fullscreen.png" />Crawl <br />
|
||||
<img alt="Remove " title="Remove " src="img-1/Remove%20Document.png" />Remove <br />
|
||||
<img alt="Import " title="Import " src="img-1/Get%20Document.png" />Import <br />
|
||||
<img alt="Export " title="Export " src="img-1/Send%20Document.png" />Export
|
||||
</div>
|
||||
<h3>YaCy Peer Admin</h3><!-- 2 -->
|
||||
<div class="menu">
|
||||
<img alt="login" title="Login" src="img-1/User.png" />Login<br />
|
||||
<img alt="contact" title="Contact" src="img-1/New%20Mail.png" />Contact<br />
|
||||
<img alt="peer-admin" title="Peer administration" src="img-1/Run.png" />Administration
|
||||
</div>
|
||||
|
@ -1,20 +1,25 @@
|
||||
<div class="sidebar">
|
||||
<div id="menu" class="boxed">
|
||||
<div class="title">Peer-Menu</div>
|
||||
<div class="content">
|
||||
<img style="width: 32px; height: 32px;" alt="login" title="Login" src="img-1/User.png" align="absmiddle" hspace="3" vspace="3"/>Login<br>
|
||||
<img style="width: 32px; height: 32px;" alt="contact" title="Contact" src="img-1/New%20Mail.png" align="absmiddle" hspace="3" vspace="3"/>Contact<br>
|
||||
<img style="width: 32px; height: 32px;" alt="peer-admin" title="Peer administration" src="img-1/Run.png" align="absmiddle" hspace="3" vspace="3"/>Administration
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<div id="menu" class="boxed">
|
||||
<div class="title">YaCy Project</div>
|
||||
<div class="content"><img style="width: 32px; height: 32px;" alt="YaCy Project Home" title="YaCy Project Home" src="img-1/home.png" align="absmiddle" hspace="3" vspace="3"/>Home<br>
|
||||
<img style="width: 32px; height: 32px;" alt="YaCy Statistics" title="YaCy Statistics" src="img-2/bar_graph.png" align="absmiddle" hspace="3" vspace="3"/>Statistics<br>
|
||||
<img style="width: 32px; height: 32px;" alt="YaCy Forum" title="YaCy Forum" src="img-1/Discussion.png" align="absmiddle" hspace="3" vspace="3"/>Forum<br>
|
||||
<img style="width: 32px; height: 32px;" alt="Help" title="YaCy Wiki" src="img-1/Help%20Blue%20Button.png" align="absmiddle" hspace="3" vspace="3"/>Wiki<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Overview</h3>
|
||||
<p>
|
||||
YaCy-UI is going to be a rich client for YaCy attempting to provide a new, more functional and easier search interface.
|
||||
Unlike the current server based interface YaCy-UI makes heavy use of jQuery, JavaScript, Ajax, XML and XSLT. This
|
||||
approach offers some neat advantages, one example could be the integration of sciencenet via opensearch. The overall
|
||||
idea is to integrate functionallity on a modular basis (e.g. a webshot function could be integrated by linking to
|
||||
another, even local web service without the need to further extend YaCy's functionallity). Currently YaCy-UI is at most
|
||||
alpha status, so I would be very greatful for feedback and bug reports!
|
||||
</p>
|
||||
apfelmaennchen
|
||||
<h3>Change Log</h3>
|
||||
<ul>
|
||||
<li>19-04-2007: new double-accordion sidebar menu is up and running (I am open for suggestions on how to populate the menus).</li>
|
||||
<li>19-04-2007: search results are now retrieved from yacysearch.rss (XML) and does no longer need a seperate servlet</li>
|
||||
</ul>
|
||||
<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>19-04-2007: if you open more than one search tab, only the first result item is shown. I would be greatful for any hint...</li>
|
||||
<li>19-04-2007: resource types 'sciencenet' and 'bookmarks' doen't work yet. For 'sciencenet' we have to solve the Ajax cross domain restriction.</li>
|
||||
<li>19-04-2007: currently only contentdom="text" is working, all others will fail...</li>
|
||||
<li>19-04-2007: language selection is not yet supported</li>
|
||||
</ul>
|
||||
|
||||
|
@ -0,0 +1,73 @@
|
||||
<script type="application/javascript">
|
||||
//<![CDATA[
|
||||
$(function() {
|
||||
$("#side3").accordion("activate", 0);
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: query,
|
||||
dataType: "xml",
|
||||
success: function(xml) {
|
||||
var totalResults = parseInt($(xml).find('totalResults').text().replace(".",""));
|
||||
var startIndex = parseInt($(xml).find('startIndex').text());
|
||||
var itemsPerPage = parseInt($(xml).find('itemsPerPage').text());
|
||||
var query = $(xml).find('Query').attr('searchTerms');
|
||||
var endIndex = startIndex+itemsPerPage;
|
||||
if (endIndex > totalResults) {
|
||||
endIndex = totalResults;
|
||||
}
|
||||
|
||||
var totalPages = (totalResults/itemsPerPage)|0;
|
||||
if (startIndex != 0) {
|
||||
var currentPage = ((startIndex-1)/itemsPerPage);
|
||||
} else {
|
||||
var currentPage = 0;
|
||||
}
|
||||
$("#pagination").pagination(totalResults, {
|
||||
current_page:currentPage,
|
||||
items_per_page:itemsPerPage,
|
||||
num_edge_entries:1,
|
||||
num_display_entries:10,
|
||||
callback: loadContents
|
||||
});
|
||||
|
||||
$(xml).find('item').each(function(){
|
||||
var title = $(this).find('title').text();
|
||||
var link = $(this).find('link').text();
|
||||
var desc = $(this).find('description').text();
|
||||
var guid = $(this).find('guid').text();
|
||||
$('<div class="searchresults"></div>')
|
||||
.html('<h3 class="linktitle"><a href="' +link+ '">' +title+ '</a></h3><p class="snippet">' +desc+ '</p><p class="url"><a href="' +link+ '" id="' +guid+ '" >' +link+ '</a></p>')
|
||||
.prependTo(tabid);
|
||||
$(".linktitle a").faviconize({
|
||||
position: "before",
|
||||
defaultImage: "img-2/article.png",
|
||||
className: "favicon"
|
||||
});
|
||||
}); //close each(
|
||||
}
|
||||
}); //close $.ajax(
|
||||
function loadContents(page_id, jq) {
|
||||
var $tabs = $('#container ul');
|
||||
var count = $(tabid).attr('count');
|
||||
var offset = ((page_id*count)+1);
|
||||
$(tabid).attr('offset', offset);
|
||||
|
||||
query = $(tabid).attr('resource')
|
||||
+"&search="+$(tabid).attr('search')
|
||||
+"&contentdom="+$(tabid).attr('contentdom')
|
||||
+"&count="+$(tabid).attr('count')
|
||||
+"&offset="+$(tabid).attr('offset')
|
||||
+"&constraint="+$(tabid).attr('constraint')
|
||||
+"&prefermaskfilter="+$(tabid).attr('prefermaskfilter')
|
||||
+"&urlmaskfilter="+$(tabid).attr('urlmaskfilter');
|
||||
|
||||
var selected = $('#container ul').data('selected.ui-tabs');
|
||||
$tabs.tabs("load", selected);
|
||||
$('#pagination').trigger("update");
|
||||
return false;
|
||||
}
|
||||
}); //close $(
|
||||
//]]>
|
||||
</script>
|
||||
<div id="pagination" class="pagination">[loading...]</div>
|
||||
|
Loading…
Reference in new issue