added deleted files from commit 254f12d60b
which are still needed and had been linked outside of yacy/ui
parent
910a496c9f
commit
d181b9e89b
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 552 B |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 7.1 KiB |
@ -0,0 +1,161 @@
|
||||
.colorpicker {
|
||||
width: 356px;
|
||||
height: 176px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
background: url(../colorpicker_images/colorpicker_background.png);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
display: none;
|
||||
}
|
||||
.colorpicker_color {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
left: 14px;
|
||||
top: 13px;
|
||||
position: absolute;
|
||||
background: #f00;
|
||||
overflow: hidden;
|
||||
cursor: crosshair;
|
||||
}
|
||||
.colorpicker_color div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background: url(../colorpicker_images/colorpicker_overlay.png);
|
||||
}
|
||||
.colorpicker_color div div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
overflow: hidden;
|
||||
background: url(../colorpicker_images/colorpicker_select.gif);
|
||||
margin: -5px 0 0 -5px;
|
||||
}
|
||||
.colorpicker_hue {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
left: 171px;
|
||||
width: 35px;
|
||||
height: 150px;
|
||||
cursor: n-resize;
|
||||
}
|
||||
.colorpicker_hue div {
|
||||
position: absolute;
|
||||
width: 35px;
|
||||
height: 9px;
|
||||
overflow: hidden;
|
||||
background: url(../colorpicker_images/colorpicker_indic.gif) left top;
|
||||
margin: -4px 0 0 0;
|
||||
left: 0px;
|
||||
}
|
||||
.colorpicker_new_color {
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
left: 213px;
|
||||
top: 13px;
|
||||
background: #f00;
|
||||
}
|
||||
.colorpicker_current_color {
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
left: 283px;
|
||||
top: 13px;
|
||||
background: #f00;
|
||||
}
|
||||
.colorpicker input {
|
||||
background-color: transparent;
|
||||
border: 1px solid transparent;
|
||||
position: absolute;
|
||||
font-size: 10px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #898989;
|
||||
top: 4px;
|
||||
right: 11px;
|
||||
text-align: right;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 11px;
|
||||
}
|
||||
.colorpicker_hex {
|
||||
position: absolute;
|
||||
width: 72px;
|
||||
height: 22px;
|
||||
background: url(../colorpicker_images/colorpicker_hex.png) top;
|
||||
left: 212px;
|
||||
top: 142px;
|
||||
}
|
||||
.colorpicker_hex input {
|
||||
right: 6px;
|
||||
}
|
||||
.colorpicker_field {
|
||||
height: 22px;
|
||||
width: 62px;
|
||||
background-position: top;
|
||||
position: absolute;
|
||||
}
|
||||
.colorpicker_field span {
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 22px;
|
||||
overflow: hidden;
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: n-resize;
|
||||
}
|
||||
.colorpicker_rgb_r {
|
||||
background-image: url(../colorpicker_images/colorpicker_rgb_r.png);
|
||||
top: 52px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_rgb_g {
|
||||
background-image: url(../colorpicker_images/colorpicker_rgb_g.png);
|
||||
top: 82px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_rgb_b {
|
||||
background-image: url(../colorpicker_images/colorpicker_rgb_b.png);
|
||||
top: 112px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_hsb_h {
|
||||
background-image: url(../colorpicker_images/colorpicker_hsb_h.png);
|
||||
top: 52px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_hsb_s {
|
||||
background-image: url(../colorpicker_images/colorpicker_hsb_s.png);
|
||||
top: 82px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_hsb_b {
|
||||
background-image: url(../colorpicker_images/colorpicker_hsb_b.png);
|
||||
top: 112px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_submit {
|
||||
position: absolute;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: url(../colorpicker_images/colorpicker_submit.png) top;
|
||||
left: 322px;
|
||||
top: 142px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.colorpicker_focus {
|
||||
background-position: center;
|
||||
}
|
||||
.colorpicker_hex.colorpicker_focus {
|
||||
background-position: bottom;
|
||||
}
|
||||
.colorpicker_submit.colorpicker_focus {
|
||||
background-position: bottom;
|
||||
}
|
||||
.colorpicker_slider {
|
||||
background-position: bottom;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,12 @@
|
||||
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*
|
||||
* $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $
|
||||
* $Rev: 4257 $
|
||||
*
|
||||
* Version: 1.2
|
||||
*
|
||||
* Requires: jQuery 1.2+
|
||||
*/
|
||||
(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);
|
@ -0,0 +1,92 @@
|
||||
/*!
|
||||
* jquery.tagcloud.js
|
||||
* A Simple Tag Cloud Plugin for JQuery
|
||||
*
|
||||
* https://github.com/addywaddy/jquery.tagcloud.js
|
||||
* created by Adam Groves
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
/*global jQuery*/
|
||||
"use strict";
|
||||
|
||||
var compareWeights = function(a, b)
|
||||
{
|
||||
return a - b;
|
||||
};
|
||||
|
||||
// Converts hex to an RGB array
|
||||
var toRGB = function(code) {
|
||||
if (code.length === 4) {
|
||||
code = code.replace(/(\w)(\w)(\w)/gi, "\$1\$1\$2\$2\$3\$3");
|
||||
}
|
||||
var hex = /(\w{2})(\w{2})(\w{2})/.exec(code);
|
||||
return [parseInt(hex[1], 16), parseInt(hex[2], 16), parseInt(hex[3], 16)];
|
||||
};
|
||||
|
||||
// Converts an RGB array to hex
|
||||
var toHex = function(ary) {
|
||||
return "#" + jQuery.map(ary, function(i) {
|
||||
var hex = i.toString(16);
|
||||
hex = (hex.length === 1) ? "0" + hex : hex;
|
||||
return hex;
|
||||
}).join("");
|
||||
};
|
||||
|
||||
var colorIncrement = function(color, range) {
|
||||
return jQuery.map(toRGB(color.end), function(n, i) {
|
||||
return (n - toRGB(color.start)[i])/range;
|
||||
});
|
||||
};
|
||||
|
||||
var tagColor = function(color, increment, weighting) {
|
||||
var rgb = jQuery.map(toRGB(color.start), function(n, i) {
|
||||
var ref = Math.round(n + (increment[i] * weighting));
|
||||
if (ref > 255) {
|
||||
ref = 255;
|
||||
} else {
|
||||
if (ref < 0) {
|
||||
ref = 0;
|
||||
}
|
||||
}
|
||||
return ref;
|
||||
});
|
||||
return toHex(rgb);
|
||||
};
|
||||
|
||||
$.fn.tagcloud = function(options) {
|
||||
|
||||
var opts = $.extend({}, $.fn.tagcloud.defaults, options);
|
||||
var tagWeights = this.map(function(){
|
||||
return $(this).attr("rel");
|
||||
});
|
||||
tagWeights = jQuery.makeArray(tagWeights).sort(compareWeights);
|
||||
var lowest = tagWeights[0];
|
||||
var highest = tagWeights.pop();
|
||||
var range = highest - lowest;
|
||||
if(range === 0) {range = 1;}
|
||||
// Sizes
|
||||
var fontIncr, colorIncr;
|
||||
if (opts.size) {
|
||||
fontIncr = (opts.size.end - opts.size.start)/range;
|
||||
}
|
||||
// Colors
|
||||
if (opts.color) {
|
||||
colorIncr = colorIncrement (opts.color, range);
|
||||
}
|
||||
return this.each(function() {
|
||||
var weighting = $(this).attr("rel") - lowest;
|
||||
if (opts.size) {
|
||||
$(this).css({"font-size": opts.size.start + (weighting * fontIncr) + opts.size.unit});
|
||||
}
|
||||
if (opts.color) {
|
||||
$(this).css({"color": tagColor(opts.color, colorIncr, weighting)});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.tagcloud.defaults = {
|
||||
size: {start: 14, end: 18, unit: "pt"}
|
||||
};
|
||||
|
||||
})(jQuery);
|
@ -0,0 +1,334 @@
|
||||
function statuscheck() {
|
||||
if(load_status < 4) {
|
||||
return;
|
||||
} else {
|
||||
window.clearInterval(loading);
|
||||
yrun();
|
||||
}
|
||||
}
|
||||
function openNavigator(modifier) {
|
||||
var query = $("#yquery").getValue() + " " +modifier;
|
||||
$("#yquery").setValue(query);
|
||||
$("#yquery").trigger('keyup');
|
||||
}
|
||||
$(document).ready(function() {
|
||||
$.ajaxSetup({
|
||||
timeout: 5000,
|
||||
cache: true
|
||||
})
|
||||
// apply default properties
|
||||
ycurr = '';
|
||||
startRecord = 0;
|
||||
maximumRecords = 10;
|
||||
submit = false;
|
||||
yconf = $.extend({
|
||||
url : 'is a mandatory property - no default',
|
||||
'global' : false,
|
||||
theme : 'start',
|
||||
title : 'YaCy P2P Web Search',
|
||||
logo : yconf.url + '/yacy/ui/img/yacy-logo.png',
|
||||
link : 'http://yacy.net',
|
||||
width : 640,
|
||||
height : 640,
|
||||
position : [150,50],
|
||||
modal : false,
|
||||
resizable: true,
|
||||
show : '',
|
||||
hide : '',
|
||||
load_js : true,
|
||||
load_css : true
|
||||
}, yconf);
|
||||
|
||||
$('<div id="ypopup" class="classic"></div>').appendTo("#yacylivesearch");
|
||||
|
||||
if(yconf.load_css) {
|
||||
var style1 = yconf.url + '/yacy/ui/css/yacyui-portalsearch.css';
|
||||
var style2 = yconf.url + '/yacy/ui/css/themes/'+yconf.theme+'/ui.core.css';
|
||||
var style3 = yconf.url + '/yacy/ui/css/themes/'+yconf.theme+'/ui.dialog.css';
|
||||
var style4 = yconf.url + '/yacy/ui/css/themes/'+yconf.theme+'/ui.theme.css';
|
||||
var style5 = yconf.url + '/yacy/ui/css/themes/'+yconf.theme+'/ui.resizable.css';
|
||||
var style6 = yconf.url + '/yacy/ui/css/themes/'+yconf.theme+'/ui.accordion.css';
|
||||
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
|
||||
$(document.createElement('link'))
|
||||
.attr({type:'text/css', href: style1, rel:'stylesheet', media:'screen'})
|
||||
.appendTo(head);
|
||||
$(document.createElement('link'))
|
||||
.attr({type:'text/css', href: style2, rel:'stylesheet', media:'screen'})
|
||||
.appendTo(head);
|
||||
$(document.createElement('link'))
|
||||
.attr({type:'text/css', href: style3, rel:'stylesheet', media:'screen'})
|
||||
.appendTo(head);
|
||||
$(document.createElement('link'))
|
||||
.attr({type:'text/css', href: style4, rel:'stylesheet', media:'screen'})
|
||||
.appendTo(head);
|
||||
$(document.createElement('link'))
|
||||
.attr({type:'text/css', href: style5, rel:'stylesheet', media:'screen'})
|
||||
.appendTo(head);
|
||||
$(document.createElement('link'))
|
||||
.attr({type:'text/css', href: style6, rel:'stylesheet', media:'screen'})
|
||||
.appendTo(head);
|
||||
}
|
||||
|
||||
load_status = 0;
|
||||
loading = window.setInterval("statuscheck()", 200);
|
||||
if(yconf.load_js) {
|
||||
var script1 = yconf.url + '/yacy/ui/js/jquery.query.js';
|
||||
var script2 = yconf.url + '/yacy/ui/js/jquery.form.js';
|
||||
var script3 = yconf.url + '/yacy/ui/js/jquery.field.min.js';
|
||||
var script4 = yconf.url + '/yacy/ui/js/jquery-ui-1.7.2.min.js';
|
||||
|
||||
$.getScript(script1, function(){ load_status++; });
|
||||
$.getScript(script2, function(){ load_status++; });
|
||||
$.getScript(script3, function(){ load_status++; });
|
||||
$.getScript(script4, function(){ load_status++; });
|
||||
} else {
|
||||
yrun();
|
||||
}
|
||||
});
|
||||
function yrun() {
|
||||
|
||||
$.extend($.ui.accordion.defaults, {
|
||||
autoHeight: false,
|
||||
clearStyle: true,
|
||||
collapsible: true,
|
||||
header: "h3"
|
||||
});
|
||||
|
||||
maximumRecords = parseInt($("#ysearch input[name='maximumRecords']").getValue());
|
||||
|
||||
$("#ypopup").dialog({
|
||||
autoOpen: false,
|
||||
height: yconf.height,
|
||||
width: yconf.width,
|
||||
minWidth: yconf.width,
|
||||
position: yconf.position,
|
||||
modal: yconf.modal,
|
||||
resizable: yconf.resizable,
|
||||
title: yconf.title,
|
||||
show: yconf.show,
|
||||
hide: yconf.hide,
|
||||
close: function(event, ui) {
|
||||
$("#yquery").setValue('');
|
||||
},
|
||||
drag: function(event, ui) {
|
||||
var position = $(".ui-dialog").position();
|
||||
var left = $(".ui-dialog").width()+5+position.left;
|
||||
$("#yside").dialog('option', 'position', [left,position.top+32]);
|
||||
},
|
||||
dragStop: function(event, ui) {
|
||||
var position = $(".ui-dialog").position();
|
||||
var left = $(".ui-dialog").width()+5+position.left;
|
||||
$("#yside").dialog('option', 'position', [left,position.top+32]);
|
||||
},
|
||||
resizeStop: function(event, ui) {
|
||||
var position = $(".ui-dialog").position();
|
||||
var height = $(".ui-dialog").height()-55;
|
||||
var left = $(".ui-dialog").width()+5+position.left;
|
||||
$("#yside").dialog('option', 'height', height);
|
||||
$("#yside").dialog('option', 'position', [left,position.top+32]);
|
||||
},
|
||||
close: function(event, ui) {
|
||||
$("#yside").dialog('destroy');
|
||||
$('#yside').remove();
|
||||
},
|
||||
open: function(event, ui) {
|
||||
$('<div id="yside" style="padding:0px;"></div>').insertAfter(".ui-dialog-content");
|
||||
var position = $(".ui-dialog").position();
|
||||
$("#yside").dialog({
|
||||
title: 'Navigation',
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
resizable: false,
|
||||
width: 220,
|
||||
height: $(".ui-dialog").height()-55,
|
||||
minHeight: $(".ui-dialog").height()-55,
|
||||
show: 'slide',
|
||||
hide: 'slide',
|
||||
position : [position.left+$(".ui-dialog").width()+5,position.top+32],
|
||||
open: function(event, ui) {
|
||||
$('div.ui-widget-shadow').remove();
|
||||
$('ypopup').dialog( 'moveToTop' );
|
||||
}
|
||||
});
|
||||
$('.ui-widget-shadow').remove();
|
||||
$('div[aria-labelledby="ui-dialog-title-yside"] div.ui-dialog-titlebar').remove();
|
||||
|
||||
$("#ypopup").bind("scroll", function(e){
|
||||
p1 = $("#ypopup h3 :last").position().top;
|
||||
if(p1-$("#ypopup").dialog( "option", "height" ) < 0) {
|
||||
startRecord = startRecord + maximumRecords;
|
||||
yacysearch(submit, false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$('#ysearch').keyup(function(e) {
|
||||
|
||||
if(e.which == 27) { // ESC
|
||||
$("#ypopup").dialog('close');
|
||||
$("#yquery").setValue("");
|
||||
} else if(e.which == 39) { // Right
|
||||
startRecord = startRecord + maximumRecords;
|
||||
yacysearch(submit, false);
|
||||
}
|
||||
if(ycurr == $("#yquery").getValue()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#yquery").getValue() == '') {
|
||||
if($("#ypopup").dialog('isOpen'))
|
||||
$("#ypopup").dialog('close');
|
||||
} else {
|
||||
ycurr = $("#yquery").getValue();
|
||||
if(!submit) yacysearch(false, true);
|
||||
else submit = false;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#ysearch').submit(function() {
|
||||
submit = true;
|
||||
ycurr = $("#yquery").getValue();
|
||||
|
||||
if (!$("#ypopup").dialog('isOpen'))
|
||||
$("#ypopup").dialog('open');
|
||||
else
|
||||
if ($("#yside").dialog('isOpen'))
|
||||
$("#yside").dialog('close');
|
||||
|
||||
$("#yquery").focus();
|
||||
|
||||
yacysearch(yconf.global, true);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function yacysearch(global, clear) {
|
||||
var url = yconf.url + '/yacysearch.json?callback=?'
|
||||
|
||||
if(clear) {
|
||||
$('#ypopup').empty();
|
||||
|
||||
var loading = "<div class='yloading'><h3 class='linktitle'><em>Loading: "+yconf.url+"</em><br/>";
|
||||
var loadimg = "<img src='"+yconf.url+"/yacy/ui/img/loading2.gif' align='absmiddle'/></h3></div>";
|
||||
$('#ypopup').append(loading+loadimg);
|
||||
|
||||
if (!$("#ypopup").dialog('isOpen'))
|
||||
$("#ypopup").dialog('open');
|
||||
else
|
||||
if ($("#yside").dialog('isOpen'))
|
||||
$("#yside").dialog('close');
|
||||
|
||||
$("#yquery").focus();
|
||||
}
|
||||
|
||||
|
||||
var param = [];
|
||||
$("#ysearch input").each(function(i){
|
||||
var item = { name : $(this).attr('name'), value : $(this).attr('value') };
|
||||
if(item.name == 'resource') {
|
||||
if(item.value == 'global') global = true;
|
||||
if(global) item.value = 'global';
|
||||
}
|
||||
if(item.name == 'query' || item.name == 'search') {
|
||||
if(item.value != ycurr)
|
||||
ycurr = item.value;
|
||||
}
|
||||
param[i] = item;
|
||||
});
|
||||
param[param.length] = { name : 'startRecord', value : startRecord };
|
||||
$.ajaxSetup({
|
||||
timeout: 10000,
|
||||
error: function() {if (clear) $('#ypopup').empty();}
|
||||
});
|
||||
$.getJSON(url, param,
|
||||
function(json, status) {
|
||||
if (json[0]) data = json[0];
|
||||
else data = json;
|
||||
var searchTerms = data.channels[0].searchTerms.replace(/\+/g," ");
|
||||
if(ycurr != searchTerms)
|
||||
return false;
|
||||
if(clear)
|
||||
$('#ypopup').empty();
|
||||
var total = data.channels[0].totalResults.replace(/[,.]/,"");
|
||||
if(global) var result = 'global';
|
||||
else var result = 'local';
|
||||
|
||||
var count = 0;
|
||||
$.each (
|
||||
data.channels[0].items,
|
||||
function(i,item) {
|
||||
if (item) {
|
||||
var favicon = "<img src='"+item.faviconUrl+"' class='favicon'/>";
|
||||
var title = "<h3 class='linktitle'>"+favicon+"<a href='"+item.link+"' target='_blank'>"+item.title+"</a></h3>";
|
||||
var url = "<p class='url'><a href='"+item.link+"' target='_blank'>"+item.link+"</a></p>"
|
||||
var desc = "<p class='desc'>"+item.description+"</p>";
|
||||
var date = "<p class='date'>"+item.pubDate.substring(0,16);
|
||||
var size = " | "+item.sizename+"</p>";
|
||||
$(title+desc+url+date+size).appendTo("#ypopup");
|
||||
}
|
||||
count++;
|
||||
}
|
||||
);
|
||||
if(clear) {
|
||||
$('#yside').empty();
|
||||
var yglobal = "local";
|
||||
if(global)
|
||||
yglobal = "global";
|
||||
$('<div id="ylogo" style="margin0px; padding:0px;"></div>').appendTo('#yside');
|
||||
$('<h3 style="padding-left:25px;">'+yconf.title+'</h3>').appendTo('#ylogo');
|
||||
var ylogo = "<a href='"+yconf.link+"' target='_blank'><img src='"+yconf.logo+"' alt='"+yconf.logo+"' title='"+yconf.logo+"' /></a>";
|
||||
var ymsg= "Total "+yglobal+" results: "+total;
|
||||
$("<div class='ymsg'><table><tr><td width='55px'>"+ylogo+"</td><td id='yresult'>"+ymsg+"</td></tr></div").appendTo('#ylogo');
|
||||
$('#ylogo').accordion({
|
||||
collapsible: false
|
||||
});
|
||||
$.each (
|
||||
data.channels[0].navigation,
|
||||
function(i,facet) {
|
||||
if (facet) {
|
||||
var acc = '#ynav'+i;
|
||||
$(acc).accordion('destroy');
|
||||
$('<div id="ynav'+i+'" style="margin0px; padding:0px;"></div>').appendTo('#yside');
|
||||
var id = "#y"+facet.facetname;
|
||||
$('<h3 style="padding-left:25px;">'+facet.displayname+'</h3>').appendTo(acc);
|
||||
$('<div id="y'+facet.facetname+'"></div>').appendTo(acc);
|
||||
$("<ul class='nav'></ul>").appendTo(id);
|
||||
$.each (
|
||||
facet.elements,
|
||||
function(j,element) {
|
||||
var mod = element.modifier.replace(/'/g,"%27");
|
||||
$("<li><a href='javascript:openNavigator(\""+mod+"\")'>"+element.name+" ("+element.count+")</a></li>").appendTo(id+" .nav");
|
||||
}
|
||||
)
|
||||
$(acc).accordion({});
|
||||
}
|
||||
}
|
||||
);
|
||||
if(count>0) {
|
||||
autoOpenSidebar();
|
||||
if ($("#ypopup").dialog('isOpen')) {
|
||||
if($("#ypopup h3 :last").position().top < $("#ypopup").dialog( "option", "height" )) {
|
||||
startRecord = startRecord + maximumRecords;
|
||||
yacysearch(submit, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
function autoOpenSidebar() {
|
||||
window.setTimeout(function() {
|
||||
if( $("#yquery").getValue() == ycurr) {
|
||||
$("#yside").dialog('open');
|
||||
$('#ynav1').accordion('activate', false);
|
||||
$("#yquery").focus();
|
||||
}
|
||||
} , 1500);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue