2008-09-16 17:15:00 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Generated CouchApp</title>
|
|
|
|
<link rel="stylesheet" href="screen.css" type="text/css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Generated CouchApp</h1>
|
|
|
|
<ul id="view"></ul>
|
|
|
|
</body>
|
|
|
|
<script src="/_utils/script/json2.js"></script>
|
|
|
|
<script src="/_utils/script/jquery.js?1.2.6"></script>
|
|
|
|
<script src="/_utils/script/jquery.couch.js?0.8.0"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
$(function() {
|
|
|
|
var dbname = document.location.href.split('/')[3];
|
2008-11-03 02:37:34 +01:00
|
|
|
var design = unescape(document.location.href).split('/')[5];
|
2008-09-16 17:15:00 +02:00
|
|
|
var DB = $.couch.db(dbname);
|
2008-09-16 18:10:45 +02:00
|
|
|
DB.view(design+"/example",{success: function(json) {
|
2008-09-16 17:15:00 +02:00
|
|
|
$("#view").html(json.rows.map(function(row) {
|
|
|
|
return '<li>'+row.key+'</li>';
|
|
|
|
}).join(''));
|
|
|
|
}});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</html>
|