From 675f350d18bbce16fa565a1311f906e4524992ac Mon Sep 17 00:00:00 2001
From: apfelmaennchen
Date: Fri, 24 Apr 2009 17:21:31 +0000
Subject: [PATCH] YaCy Portal Search Widget - see
http://localhost:8080/yacy/ui/yacyui-portaltest.html - two new parameters
(logo and link) for yconf as requested at
http://forum.yacy-websuche.de/viewtopic.php?f=15&t=1762#p14101
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5869 6c8d7289-2bf4-0310-a012-ef5d649a1542
---
htroot/yacy/ui/css/yacyui-portalsearch.css | 3 ++-
htroot/yacy/ui/js/yacyui-portalsearch.js | 28 ++++++++++++----------
htroot/yacy/ui/yacyui-portaltest.html | 28 +++++++++++++---------
3 files changed, 34 insertions(+), 25 deletions(-)
diff --git a/htroot/yacy/ui/css/yacyui-portalsearch.css b/htroot/yacy/ui/css/yacyui-portalsearch.css
index 5ff8d9499..1c10a2ad3 100644
--- a/htroot/yacy/ui/css/yacyui-portalsearch.css
+++ b/htroot/yacy/ui/css/yacyui-portalsearch.css
@@ -18,6 +18,7 @@
#ypopup .url a {
color:#20A020;
text-decoration:none;
+ margin-top: 10px;
}
#ypopup h3.linktitle {
margin-top: 2px;
@@ -68,6 +69,6 @@ div .ybpane {
}
#ypopup .yloading {
margin-top: 150px;
- margin-left: -10px;
+ margin-left: -12px;
text-align: center;
}
\ No newline at end of file
diff --git a/htroot/yacy/ui/js/yacyui-portalsearch.js b/htroot/yacy/ui/js/yacyui-portalsearch.js
index 7c008d7b1..2c214b992 100644
--- a/htroot/yacy/ui/js/yacyui-portalsearch.js
+++ b/htroot/yacy/ui/js/yacyui-portalsearch.js
@@ -9,16 +9,18 @@ $(document).ready(function() {
startRecord = 0;
maximumRecords = 10;
yconf = $.extend({
- url : 'is a mandatory property - no default',
- theme : 'start',
- title : 'YaCy P2P Web Search',
- width : 420,
- height : 500,
- position: ['top',50],
- modal: false,
+ url : 'is a mandatory property - no default',
+ theme : 'start',
+ title : 'YaCy P2P Web Search',
+ logo : '/yacy/ui/img/yacy-logo.png',
+ link : 'http://www.yacy.net',
+ width : 420,
+ height : 500,
+ position : ['top',50],
+ modal : false,
resizable: true,
- show: '',
- hide: ''
+ show : '',
+ hide : ''
}, yconf);
$('').appendTo("#yacy");
@@ -101,19 +103,19 @@ $(document).ready(function() {
param[param.length] = { name : 'startRecord', value : startRecord };
$.getJSON(url, param,
- function(json, status){
+ function(json, status){
if (json[0]) data = json[0];
else data = json;
- $('#ypopup').empty();
-
+ $('#ypopup').empty();
+
var total = data.channels[0].totalResults.replace(/[,.]/,"");
var page = (data.channels[0].startIndex / data.channels[0].itemsPerPage) + 1;
var start = startRecord + 1;
var end = startRecord + maximumRecords;
$("div .ybpane").remove();
- var ylogo = "";
+ var ylogo = "";
var yresult = "Displaying result "+start+" to "+end+"
of "+total+" total results.
";
$("div .ui-dialog-buttonpane").prepend(ylogo+yresult);
diff --git a/htroot/yacy/ui/yacyui-portaltest.html b/htroot/yacy/ui/yacyui-portaltest.html
index 73c1aa248..f1ffbcc36 100644
--- a/htroot/yacy/ui/yacyui-portaltest.html
+++ b/htroot/yacy/ui/yacyui-portaltest.html
@@ -56,23 +56,29 @@
</form>
</div>
-Configuration options and defaults:
+Configuration options and defaults for 'yconf':
-url : 'is a mandatory property - no default',
-theme : 'start',
-title : 'YaCy P2P Web Search',
-width : 420,
-height : 500,
-position: ['top',50],
-modal: false,
+url : 'is a mandatory property - no default',
+theme : 'start',
+title : 'YaCy P2P Web Search',
+logo : '/yacy/ui/img/yacy-logo.png',
+link : 'http://www.yacy.net',
+width : 420,
+height : 500,
+position : ['top',50],
+modal : false,
resizable: true,
-show: '',
-hide: ''
+show : '',
+hide : ''
Themes:
You can
download ready made themes or create
-your own custom theme.
Themes are installed into: DATA/HTDOCS/yacy/ui/css/themes/
+your own custom theme.
Themes are installed into: DATA/HTDOCS/yacy/ui/css/themes/
+Bookmarklet:
+
+YaCy
+