YaCy-UI Widget:

- added parameters fontsize=[small,normal,big], height and width
- e.g. http://localhost:8080/yacy/ui/yacyui-widget.html?style=darkness&fontsize=small&height=400&width=300

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5631 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
apfelmaennchen 2009-02-21 22:25:07 +00:00
parent be29ece9d0
commit b6b39e9556
2 changed files with 36 additions and 10 deletions

View File

@ -1,7 +1,13 @@
/* Body */
body {
body.normal {
font-size: 75.0%;
}
body.small {
font-size: 55.0%;
}
body.big {
font-size: 85.0%;
}
p.url {
padding-top: 1px;
font-size: 0.9em;
@ -25,5 +31,6 @@ img.favicon{
width: 16px;
height: 16px;
vertical-align: middle;
margin-bottom: -40px;
margin-bottom: -40px;
padding: 5px 5px 5px 5px;
}

View File

@ -31,16 +31,35 @@
//<![CDATA[
$(document).ready(function() {
var style = $.query.get('style');
$.query.REMOVE('style');
if (style) {
switchStylestyle(style);
}
var style = $.query.get('style');
if (style) { switchStylestyle(style); }
var height = $.query.get('height');
if (!height) { height = 600; }
var width = $.query.get('width');
if (!width) { width = 400; }
var size = $.query.get('fontsize');
if (size) {
$('body').removeClass();
switch(size) {
case 'normal':
$('body').addClass('normal');
break;
case 'small':
$('body').addClass('small');
break;
case 'big':
$('body').addClass('big');
break;
}
}
$("#yresult").dialog({
autoOpen: false,
height: 600,
width: 500,
height: height,
width: width,
position: ['top',50],
modal: false,
resizable: true,
@ -113,7 +132,7 @@
</script>
<title>YaCy-UI Widget</title>
</head>
<body>
<body class="normal">
<div class="yform">
<form id="searchbox" class="small" method="get" accept-charset="UTF-8" action="jQuery">
<input id="search" name="search" type="text" size="15" maxlength="80" value=""/>