You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yacy_search_server/htroot/yacy/ui/index.html

208 lines
8.0 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<title>YaCy - Peer-to-Peer Search Network</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Content-Language" content="English, Englisch" />
<link media="screen" type="text/css" href="css/base.css" rel="stylesheet" />
<link media="screen" type="text/css" href="css/jquery.tabs.css" rel="stylesheet" />
<link media="screen" type="text/css" href="css/jquery.accordion.css" rel="stylesheet" />
<link media="screen" type="text/css" href="css/jquery.pagination.css" rel="stylesheet" />
<link media="screen" type="text/css" href="css/jquery.flexigrid.css" rel="stylesheet" />
<link media="screen" type="text/css" href="css/jquery.dialog.css" rel="stylesheet" />
<link media="screen" type="text/css" href="css/jquery.treeview.css" rel="stylesheet" />
<script type="text/javascript" src="js/sarissa.js"></script>
<script type="text/javascript" src="js/sarissa_ieemu_xpath.js"></script>
<script src="js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="js/jquery.ui.all.min.js" type="text/javascript"></script>
<script src="js/jquery.dimensions.min.js" type="text/javascript"></script>
<script src="js/jquery.metadata.min.js" type="text/javascript"></script>
<script src="js/jquery.form.js" type="text/javascript"></script>
<script src="js/jquery.field.min.js" type="text/javascript"></script>
<script src="js/jquery.pagination.js" type="text/javascript"></script>
<script src="js/jquery-faviconize-1.0.js" type="text/javascript"></script>
<script src="js/jquery-flexigrid.js" type="text/javascript"></script>
<script src="js/jquery.treeview.min.js" type="text/javascript"></script>
<script src="js/jquery.treeview.async.js" type="text/javascript"></script>
<script src="js/jquery.xslTransform.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
HTMLenc = function(s) {
return $('<div/>').text(s).html();
}
$(function() {
qtag = "";
tabid = "Welcome";
/* Initialize Tabs and set up close function */
$tabs = $('#container ul').tabs({
add: function(e, ui) {
var li = $(ui.tab).parents('li:eq(0)')[0];
$('<img class="close" alt="close" src="/yacy/ui/img/cancel.png" border="0"/>')
.appendTo(li)
.bind('click', function() {
$tabs.tabs('remove', $('li', $tabs).index(li));
});
/* save search options from form to tab attributes*/
var search = $("input[@name='search']").getValue();
var contentdom = $("input[@name='contentdom']").getValue();
var count = $("select[@name='itemsPerPage']").getValue();
var offset = 0;
var resource = $("select[@name='resource']").getValue();
var constraint= $("select[@name='constraint']").getValue();
var prefermaskfilter = $("input[@name='prefermaskfilter']").getValue();
var urlmaskfilter = $("input[@name='urlmaskfilter']").getValue();
var language = $("select[@name='language']").getValue();
$('#' + ui.panel.id).attr('search', search);
$('#' + ui.panel.id).attr('contentdom', contentdom);
$('#' + ui.panel.id).attr('count', count);
$('#' + ui.panel.id).attr('offset', offset);
$('#' + ui.panel.id).attr('resource', resource);
$('#' + ui.panel.id).attr('constraint', constraint);
$('#' + ui.panel.id).attr('prefermaskfilter', prefermaskfilter);
$('#' + ui.panel.id).attr('urlmaskfilter', urlmaskfilter);
$('#' + ui.panel.id).attr('language', language);
},
select: function(e, ui) {
/* set global variable tabid */
tabid = '#' + ui.panel.id;
if (tabid == "#Bookmarks") {
$("select[@name='resource']").setValue('ymarks');
$("input[@name='contentdom']").setValue('text');
$("input[@name='search']").setValue(qtag);
} else {
var search = $(tabid).attr('search');
var contentdom = $(tabid).attr('contentdom');
var resource = $(tabid).attr('resource');
var constraint= $(tabid).attr('constraint');
var prefermaskfilter = $(tabid).attr('prefermaskfilter');
var urlmaskfilter = $(tabid).attr('urlmaskfilter');
var language = $(tabid).attr('language');
$("input[@name='search']").setValue(search);
$("input[@name='contentdom']").setValue(contentdom);
$("select[@name='constraint']").setValue(constraint);
$("input[@name='prefermaskfilter']").setValue(prefermaskfilter);
$("input[@name='urlmaskfilter']").setValue(urlmaskfilter);
$("select[@name='language']").setValue(language);
$('#yoptions').trigger('update');
}
}
});
/* Initialize Bookmark Dialog */
$("#bmadd").dialog({
autoOpen: false,
height: 400,
width: 250,
resizable: false,
buttons: {
OK: bookmark,
Cancel: function() { $("#bmadd").dialog("close"); }
}
});
/* Load Sidebar */
$("#side1").load("sidebar/sidebar_1.html");
$("#side2").load("sidebar/sidebar_2.html");
$tabs.tabs('select',1);
});
function bookmark() {
var url = $("input[@name='bm_url']").getValue();
var title = $("textarea[@name='bm_title']").getValue();
var desc = $("textarea[@name='bm_desc']").getValue();
var tags = $("input[@name='bm_tags']").getValue()
var path = $("input[@name='bm_path']").getValue();
var pub = $("select[@name='bm_public']").getValue();
$.ajax({
type: "POST",
url: "/api/bookmarks/posts/add_p.xml",
data: "login=&url="+url+"&title="+title+"&description="+desc+"&tags="+tags+"&path="+path+"&public="+pub+"&add=create",
dataType: "xml",
success: function(xml) {
$('#bmaddform').resetForm();
$("#bm_url").unbind('blur');
$("#bmadd").dialog("close");
loadTagCloud();
reloadBM();
}
});
}
function reloadBM() {
$('#ymarks').flexOptions({
query: qtag,
qtype: "tags"
});
$('div.ftitle').empty().html('YaCy Bookmarks: ' + HTMLenc(qtag));
$('#ymarks').flexReload();
}
//]]>
</script>
</head>
<body>
<div id="sidebar" class="sidebar">
<div class="basic" id="side0">
<img alt="YaCy Logo" title="YaCy Logo" class="logo" src="img/kaskelix.png" />
</div>
<div class="basic" id="side1"></div>
<div class="basic" id="side2"></div>
</div>
<div id="container" class="main">
<ul>
<!-- initial tabs only, dynamic tabs are loaded via jQuery -->
<li><a href="yacyui-welcome.html" title="About YaCy-UI"><span>About YaCy-UI</span></a></li>
<li><a href="yacyui-admin.html" title="Admin Console"><span>Admin Console</span></a></li>
<li><a href="yacyui-bookmarks.html" title="Bookmarks"><span>Bookmarks</span></a></li>
</ul>
</div>
<!-- Bookmarks Edit Dialog -->
<div id="bmadd" class="bmdialog" title="YaCy Bookmarks">
<form id="bmaddform" class="small" method="post" accept-charset="UTF-8" action="jQuery">
<label for="url">URL:</label>
<br />
<input type="text" name="bm_url" id="bm_url" class="filter" size="80" />
<br />
<label for="bm_title">Title:</label>
<br />
<textarea name="bm_title" id="bm_title" class="filter" rows="1" cols="20">
</textarea>
<br />
<label for="bm_desc">Description:</label>
<br />
<textarea name="bm_desc" id="bm_desc" class="filter" rows="3" cols="20">
</textarea>
<br />
<label for="bm_path">Folder (/folder/subfolder):</label>
<br />
<input type="text" name="bm_path" id="bm_path" class="filter" size="80" />
<br />
<label for="bm_tags">Tags (comma separated):</label>
<br />
<input type="text" name="bm_tags" id="bm_tags" class="filter" size="80" />
<br />
<label for="bm_public">Public:</label>
<br />
<select name="bm_public" id="bm_public" class="selector">
<option value="public">yes</option>
<option value="private">no</option>
</select>
</form>
</div>
</body>
</html>