|
|
@ -25,6 +25,13 @@ $(document).ready(function() {
|
|
|
|
load_css : true
|
|
|
|
load_css : true
|
|
|
|
}, yconf);
|
|
|
|
}, yconf);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.extend($.ui.accordion.defaults, {
|
|
|
|
|
|
|
|
autoHeight: false,
|
|
|
|
|
|
|
|
clearStyle: true,
|
|
|
|
|
|
|
|
collapsible: true,
|
|
|
|
|
|
|
|
header: "h3"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('<div id="ypopup" class="classic"></div>').appendTo("#yacylivesearch");
|
|
|
|
$('<div id="ypopup" class="classic"></div>').appendTo("#yacylivesearch");
|
|
|
|
|
|
|
|
|
|
|
|
if(yconf.load_css) {
|
|
|
|
if(yconf.load_css) {
|
|
|
@ -136,7 +143,6 @@ function yrun() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
open: function(event, ui) {
|
|
|
|
open: function(event, ui) {
|
|
|
|
$('<div id="yside" style="padding:0px;"></div>').insertAfter(".ui-dialog-content");
|
|
|
|
$('<div id="yside" style="padding:0px;"></div>').insertAfter(".ui-dialog-content");
|
|
|
|
$('<div id="ynav" style="margin0px; padding:0px;"></div>').appendTo('#yside');
|
|
|
|
|
|
|
|
var position = $(".ui-dialog").position();
|
|
|
|
var position = $(".ui-dialog").position();
|
|
|
|
$("#yside").dialog({
|
|
|
|
$("#yside").dialog({
|
|
|
|
title: 'Navigation',
|
|
|
|
title: 'Navigation',
|
|
|
@ -240,30 +246,35 @@ function yacysearch(global) {
|
|
|
|
className: "favicon"
|
|
|
|
className: "favicon"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('#ynav').empty();
|
|
|
|
$('#yside').empty();
|
|
|
|
$.each (
|
|
|
|
$.each (
|
|
|
|
data.channels[0].navigation,
|
|
|
|
data.channels[0].navigation,
|
|
|
|
function(i,facet) {
|
|
|
|
function(i,facet) {
|
|
|
|
if (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;
|
|
|
|
var id = "#y"+facet.facetname;
|
|
|
|
$('<h3 style="padding-left:25px;">'+facet.displayname+'</h3>').appendTo('#ynav');
|
|
|
|
$('<h3 style="padding-left:25px;">'+facet.displayname+'</h3>').appendTo(acc);
|
|
|
|
$('<div id="y'+facet.facetname+'"></div>').appendTo('#ynav');
|
|
|
|
$('<div id="y'+facet.facetname+'"></div>').appendTo(acc);
|
|
|
|
$("<ul style='padding-left: 0px;'>").appendTo(id);
|
|
|
|
$("<ul class='nav' style='padding-left: 0px; margin-left: -5px; font-size:85%;'></ul>").appendTo(id);
|
|
|
|
$.each (
|
|
|
|
$.each (
|
|
|
|
facet.elements,
|
|
|
|
facet.elements,
|
|
|
|
function(j,element) {
|
|
|
|
function(j,element) {
|
|
|
|
$("<li><a href='"+element.url+"'>"+element.name+" ("+element.count+")</a></li>").appendTo(id);
|
|
|
|
$("<li><a href='#' modifier='"+element.modifier+"'>"+element.name+" ("+element.count+")</a></li>").appendTo(id+" .nav");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
$("</ul>").appendTo(id);
|
|
|
|
$(acc).accordion({});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$("#ynav").accordion({
|
|
|
|
$('#ynav1').accordion('activate', false);
|
|
|
|
autoHeight: false,
|
|
|
|
$('#yside a').click(function() {
|
|
|
|
clearStyle: true,
|
|
|
|
var modifier = $(this).attr('modifier');
|
|
|
|
collapsible: true,
|
|
|
|
modifier = modifier.replace(/^#/,' ');
|
|
|
|
header: "h3"
|
|
|
|
var query = $("#yquery").getValue() + modifier;
|
|
|
|
|
|
|
|
$("#yquery").setValue(query);
|
|
|
|
|
|
|
|
$("#yquery").trigger('keyup');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|