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/ymarks.html

86 lines
2.9 KiB

<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#side1").accordion("activate", 1);
$("#side3").accordion("activate", 2);
$('#yoptions').resetForm();
$.ajax({
type: "GET",
url: "/xml/bookmarks/xbel/xbel.xml?login=true&tag="+qtag,
dataType: "xml",
success: function(xml) {
$(xml).find('bookmark').each(function(){
var link = $(this).attr('href');
var hash = $(this).attr('id');
var title = $(this).find('title').text();
var date = $(this).attr('added');;
var desc = $(this).find('desc').text();
var pub = $(this).find('metadata[@owner=YaCy][@public]').attr('public');
var tags = $(this).find('metadata[@owner=Mozilla][@ShortcutURL]').attr('ShortcutURL').replace(",",", ","g");
if (pub == "true") {
icon = '<img src="img-2/world2.png" alt="public bookmark" title="public bookmark"/>'
} else {
var icon = '<img src="img-2/lock.png" alt="private bookmark" title="private bookmark"/>'
}
$('<tr></tr')
.html('<td><input type="checkbox" value="true" /></td><td>' +icon+ '</td><td><h3 class="linktitle">' +title+ '</h3><p class="desc">' +desc+ '</p><p class="url"><a href="' +link+ '">' +link+ '</a></p><td>' +tags+ ' </td><td>' +date+ '</td><td><a href="'+hash+'" class="yeditTrigger"><img src="img-2/pencil.png" alt="edit bookmark" title="edit bookmark" /></a><img src="img-2/cancel.png" alt="delete bookmark" title="delete bookmark"/></td>')
.appendTo('#ymarks tbody');
}); //close each(
$('#ymarks')
.tablesorter({widgets: ['zebra']})
.tablesorterPager({container: $('#pager'), size: 5, positionFixed: false});
$('#yedit').jqm({
trigger: '.yeditTrigger',
overlay: 30,
overlayClass: 'whiteOverlay',
onShow: function(hash){$('<p></p>').html(hash.t).appendTo('.jqmdMSG'); hash.w.show();}
}).jqDrag('.jqDrag');
}
}); //close $.ajax(
});
//]]>
</script>
<!-- Display Bookmarks Table -->
<table class="ytable" id="ymarks" summary="YaCy Bookmarks">
<colgroup>
<col width="25"/>
<col width="25"/>
<col width="425"/>
<col width="150"/>
<col width="150"/>
<col width="25"/>
</colgroup>
<thead>
<tr>
<th class="{sorter: false}"></th>
<th></th>
<th>Title</th>
<th>Tags</th>
<th>Date</th>
<th class="{sorter: false}"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<!-- Edit Bookmarks -->
<div id="yedit" class="jqmDialog">
<div class="jqmdTC jqDrag">
Edit Bookmark
</div>
<div class="jqmdBC">
<div class="jqmdMSG">
Edit bookmark dialog is not functional yet!
<br /><br />
At least it seems possible to transport the edit bookmark link and hash into the dialog window...
</div>
</div>
<input type="image" src="img-2/cancel.png" class="jqmdX jqmClose" />
</div>