From 0eb3bffe97a2932e1fd1a6325db30cc9ad35cdd9 Mon Sep 17 00:00:00 2001 From: apfelmaennchen Date: Sat, 30 May 2009 14:32:29 +0000 Subject: [PATCH] - added 'drawer' (sidebar) for future navigational items to yacyui-portalsearch.js - http://forum.yacy-websuche.de/viewtopic.php?f=9&t=1904#p15311 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5999 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacy/ui/js/yacyui-portalsearch.js | 54 +++++++++++++++++++++--- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/htroot/yacy/ui/js/yacyui-portalsearch.js b/htroot/yacy/ui/js/yacyui-portalsearch.js index 506ef7ffb..127726ba2 100644 --- a/htroot/yacy/ui/js/yacyui-portalsearch.js +++ b/htroot/yacy/ui/js/yacyui-portalsearch.js @@ -23,8 +23,8 @@ $(document).ready(function() { hide : '' }, yconf); - $('
').appendTo("#yacylivesearch"); - + $('
').appendTo("#yacylivesearch"); + 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'; @@ -48,13 +48,15 @@ $(document).ready(function() { $(document.createElement('link')) .attr({type:'text/css', href: style5, rel:'stylesheet', media:'screen'}) .appendTo(head); - + + var script0 = yconf.url + '/yacy/ui/js/jquery.dimensions.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-faviconize-1.0.js'; var script5 = yconf.url + '/yacy/ui/js/jquery.ui.all.min.js'; + $.getScript(script0, function(){}); $.getScript(script1, function(){}); $.getScript(script2, function(){}); $.getScript(script3, function(){}); @@ -79,6 +81,9 @@ $(document).ready(function() { $("#yquery").setValue(''); }, buttons: { + '>': function() { + $("#yside").dialog('open'); + }, Next: function() { startRecord = startRecord + maximumRecords; $('#ysearch').trigger('submit'); @@ -88,9 +93,48 @@ $(document).ready(function() { if(startRecord < 0) startRecord = 0; $('#ysearch').trigger('submit'); } + }, + drag: function(event, ui) { + var position = $(".ui-dialog").position(); + $("#yside").dialog('option', 'position', [position.left+yconf.width+5,position.top+32]); + }, + dragStop: function(event, ui) { + var position = $(".ui-dialog").position(); + $("#yside").dialog('option', 'position', [position.left+yconf.width+5,position.top+32]); + }, + close: function(event, ui) { + $("#yside").dialog('destroy'); + $('#yside').remove(); + }, + open: function(event, ui) { + $('
').insertAfter(".ui-dialog-content"); + var position = $(".ui-dialog").position(); + $("#yside").dialog({ + title: 'Navigation', + autoOpen: false, + draggable: false, + resizable: false, + width: 220, + height: yconf.height-85, + minHeight: yconf.height-85, + show: 'slide', + hide: 'drop', + position : [position.left+yconf.width+5,position.top+32], + open: function(event, ui) { + $('div.ui-widget-shadow').remove(); + }, + buttons: { + '<': function() { + $("#yside").dialog('close'); + } + } + }); + $('.ui-widget-shadow').remove(); + $('div[aria-labelledby="ui-dialog-title-yside"] div.ui-dialog-titlebar').remove(); } }); - }); + }); + $('#ysearch').keyup(function(e) { if(e.which == 27) { // ESC $("#ypopup").dialog('close'); @@ -149,7 +193,7 @@ function yacysearch(global) { else var result = 'local'; var ylogo = "
"+yconf.logo+"
"; var yresult = "
Displaying result "+start+" to "+end+"
of "+total+" "+result+" results.
"; - $("div .ui-dialog-buttonpane").prepend(ylogo+yresult); + $('div[aria-labelledby="ui-dialog-title-ypopup"] div.ui-dialog-buttonpane').prepend(ylogo+yresult); $.each ( data.channels[0].items,