- various changes to RichClient

- improved search stability

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5675 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
apfelmaennchen 16 years ago
parent 4f3bdc64b5
commit f7fd3d30c2

@ -65,31 +65,31 @@ table.contentdom {
div.ys { div.ys {
clear: inherit; clear: inherit;
float:left; float:left;
} }
#searchbutton { #searchbutton {
width: 95px; width: 95px;
height: 48px; height: 48px;
margin: 20px 0px 0px 8px; margin: 20px 0px 0px 8px;
/* border: 1px solid #CCCCCC; */ /* border: 1px solid #CCCCCC; */
font: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif; font: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif;
font-size: 12px; font-size: 12px;
/* color: #999999; */ /* color: #999999; */
} }
.filter { .filter {
width: 190px; width: 190px;
margin-bottom: .5em; margin-bottom: .5em;
padding: 2px 0px 2px 0px /* top right bottom left */ padding: 2px 0px 2px 0px /* top right bottom left */
border: 1px solid #CCCCCC; border: 1px solid #CCCCCC;
font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif; font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif;
font-size: 12px; font-size: 12px;
/* color: #999999; */ /* color: #999999; */
} }
.selector { .selector {
width: 120px; width: 120px;
margin-bottom: .5em; margin-bottom: .5em;
padding: 2px 0px 2px 0px; /* top right bottom left */ padding: 2px 0px 2px 0px; /* top right bottom left */
border: 1px solid #CCCCCC; border: 1px solid #CCCCCC;
font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif; font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif;
font-size: 12px; font-size: 12px;
/* color: #999999; */ /* color: #999999; */
} }
@ -175,42 +175,41 @@ img.help {
/* YaCy Bookmarks ---------------------------*/ /* YaCy Bookmarks ---------------------------*/
.url { .url {
padding-top: 1px; padding-top: 1px;
font-size: 0.9em; font-size: 0.9em;
line-height: 1.2em; line-height: 1.2em;
margin-bottom:0.6em; margin-bottom:0.6em;
} }
h3.linktitle { h3.linktitle {
margin-top:2px; margin-top:2px;
margin-bottom: -0.5em; margin-bottom: -0.5em;
font-size: 1.0em; font-size: 1.0em;
line-height: 1.2em; line-height: 1.2em;
color:#239AFF; color:#239AFF;
} }
.url a { .url a {
color:#20A020; color:#20A020;
text-decoration:none; text-decoration:none;
} }
.desc { .desc {
font-style:italic; font-style:italic;
font-size: 0.9em; font-size: 0.9em;
color: #808080; color: #808080;
line-height: 1.2em; line-height: 1.2em;
margin-bottom:-1em; margin-bottom:-1em;
} }
.bm_input { .bm_input, .bm_select {
width: 340px;
padding: 2px 0px 2px 0px /* top right bottom left */ padding: 2px 0px 2px 0px /* top right bottom left */
border: 1px solid #CCCCCC; border: 1px solid #CCCCCC;
margin-bottom: 2px; margin: 0px 0px 2px 10px;
font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif;
font-size: 1.0em;
} }
.bm_input { width: 240px; }
.bm_select { width: 100px; }
.bm_dialog label { margin: 6px 0px 2px 10px;}
.bm_dialog { .bm_dialog {
margin: 10px 10px 10px 10px; margin: 5px 5px 5px 5px;
font-size: .9em; font-size: 1.1em;
} }
#yfolder { #yfolder {
margin: 5px 5px 10px 20px; /* top right bottom left */
max-height: 250px; max-height: 250px;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
@ -270,5 +269,7 @@ h3.linktitle {
padding: 1px 0px 0px 18px; padding: 1px 0px 0px 18px;
display: block; display: block;
} }
.filetree ul, .filetree li {
background-color: transparent;
}

@ -60,6 +60,12 @@
flex = {}; flex = {};
bmk_tab = 2; bmk_tab = 2;
tabid = "#Welcome"; tabid = "#Welcome";
$.ajaxSetup({
timeout: 3000,
cache: false
})
/* Initialize Tabs and set up close function */ /* Initialize Tabs and set up close function */
$tabs = $('#tabs-container').tabs({ $tabs = $('#tabs-container').tabs({
// tabs options // tabs options
@ -134,8 +140,8 @@
/* Initialize Bookmark Dialog */ /* Initialize Bookmark Dialog */
$("#bmadd").dialog({ $("#bmadd").dialog({
autoOpen: false, autoOpen: false,
height: 365, height: 400,
width: 400, width: 300,
position: ['top',100], position: ['top',100],
modal: true, modal: true,
resizable: false, resizable: false,
@ -306,6 +312,10 @@
<div id="dialog-container"> <div id="dialog-container">
<!-- Bookmarks Edit Dialog --> <!-- Bookmarks Edit Dialog -->
<div id="bmadd" class="bm_dialog" title="YaCy Bookmarks"> <div id="bmadd" class="bm_dialog" title="YaCy Bookmarks">
<p style="margin-top: -8px;">
<img src="img-1/Star.png" style="padding-right: 6px; vertical-align: middle;"/>
Add or edit bookmark
</p>
<form id="bmaddform" method="post" accept-charset="UTF-8" action="jQuery"><div> <form id="bmaddform" method="post" accept-charset="UTF-8" action="jQuery"><div>
<label for="bm_url">URL:</label> <label for="bm_url">URL:</label>
<br /> <br />
@ -331,7 +341,7 @@
<br /> <br />
<label for="bm_public">Public:</label> <label for="bm_public">Public:</label>
<br /> <br />
<select name="bm_public" id="bm_public" class="selector"> <select name="bm_public" id="bm_public" class="bm_select">
<option value="public">yes</option> <option value="public">yes</option>
<option value="private">no</option> <option value="private">no</option>
</select> </select>
@ -383,4 +393,3 @@
</body> </body>
</html> </html>

@ -78,7 +78,8 @@
<option value="/yacysearch.json?resource=global&verify=true" selected="selected">freeworld</option> <option value="/yacysearch.json?resource=global&verify=true" selected="selected">freeworld</option>
<option value="/yacysearch.json?resource=local&verify=true" >local peer</option> <option value="/yacysearch.json?resource=local&verify=true" >local peer</option>
<option value="ymarks" >bookmarks</option> <option value="ymarks" >bookmarks</option>
<option value="/api/util/ynetSearch.json?login=&url=http://sciencenet.fzk.de:8080/yacysearch.json?resource=global&verify=true" >sciencenet</option> <option value="/api/util/ynetSearch.json?login=&url=http://sciencenet.fzk.de:8080/yacysearch.json?resource=global&verify=true" >sciencenet-ynetSearch</option>
<option value="http://sciencenet.fzk.de:8080/yacysearch.json?callback=?&resource=global&verify=true" >sciencenet-JsonP</option>
</select> </select>
<br /> <br />
<label for="resource">Language:</label> <label for="resource">Language:</label>

@ -49,6 +49,7 @@
var page = (data.channels[0].startIndex / data.channels[0].itemsPerPage) + 1; var page = (data.channels[0].startIndex / data.channels[0].itemsPerPage) + 1;
var search = data.channels[0].searchTerms; var search = data.channels[0].searchTerms;
var rows = {}; var rows = {};
var counter = 0;
$.each ( $.each (
data.channels[0].items, data.channels[0].items,
function(i,item) { function(i,item) {
@ -56,9 +57,11 @@
var html = "<h3 class='linktitle'>"+item.title+"</h3><p class='desc'>"+item.description+"</p><p class='url'><a href='"+item.link+"'>"+item.link+"</a>" var html = "<h3 class='linktitle'>"+item.title+"</h3><p class='desc'>"+item.description+"</p><p class='url'><a href='"+item.link+"'>"+item.link+"</a>"
var fav = "<a class='favicon' href='"+item.link+"'></a>"; var fav = "<a class='favicon' href='"+item.link+"'></a>";
rows[i] = {id: item.guid, cell: [item.guid, fav, html, "Tags", "Folders", item.pubDate]}; rows[i] = {id: item.guid, cell: [item.guid, fav, html, "Tags", "Folders", item.pubDate]};
counter++;
} }
} }
); );
if (total < counter) total = counter;
var bhtml = "<li id='"+search+"'><span class='folder'>"+search+"</span><ul>"; var bhtml = "<li id='"+search+"'><span class='folder'>"+search+"</span><ul>";
$.each ( $.each (
data.channels[0].topwords, data.channels[0].topwords,
@ -109,20 +112,15 @@
if (p.params) { if (p.params) {
for (var pi = 0; pi < p.params.length; pi++) param[param.length] = p.params[pi]; for (var pi = 0; pi < p.params.length; pi++) param[param.length] = p.params[pi];
} }
$.ajax({
type: p.method, $.getJSON(url, param,
url: p.url, function(json, status){
data: param, if (json[0]) data = json[0];
dataType: p.dataType, else data = json;
success: function(data){
/* yacy limits itemsPerPage for unauthenticated users */
p.rp = parseInt(data.channels[0].itemsPerPage); p.rp = parseInt(data.channels[0].itemsPerPage);
g.flexAddData(data); g.flexAddData(data);
}, }
error: function(data) { );
try { if (p.onError) p.onError(data); } catch (e) {}
}
});
} }
}); });
}); });

Loading…
Cancel
Save