fixing csv serialization and minor style tweaks

This commit is contained in:
maxogden
2011-03-09 23:16:57 -08:00
parent bf57648c96
commit b3dbaa0ec3
5 changed files with 21 additions and 16 deletions

View File

@@ -44,14 +44,14 @@
if( vhost ) dbInfo.db_name = 'db';
render( 'db', 'stats', dbInfo );
render( 'actions', 'actions', dbInfo );
render( 'bulk', 'bulk', dbInfo );
}
$.getJSON( baseURL + 'db', gotDb );
$( '.csv' ).click( function( e ) {
$( '.csv' ).live('click', ( function( e ) {
function gotHeaders( headers ) {
window.location.href = baseURL + 'csv?headers=' + headers;
@@ -61,7 +61,7 @@
e.preventDefault();
})
}))
})
</script>
@@ -78,11 +78,10 @@
<div id="stats"></div>
<article class="example">
<p>
<h3>Actions</h3>
</p>
<h3>Actions</h3>
<div id="actions"></div>
<p>
<a href="javascript:void(false)" class="button csv"><span class="downarrow icon"></span>Download DB as CSV</a>
</p>
</article>
@@ -113,15 +112,12 @@
<div class="group" id="current-head-database">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr class="database_oneline">
<tr class="database_oneline action">
<td class="date">
<nobr>DB:</nobr>
</td>
<td class="author">
<a href="#">{{db_name}}</a>
<nobr>db:</nobr>
</td>
<td class="message">
<code><a href="http://{{host}}/{{db_name}}">http://{{host}}/{{db_name}}</a> </code>
<code><a href="http://{{host}}/{{db_name}}">http://{{host}}/<strong>{{db_name}}</strong></a> </code>
</td>
<td class="database">
size&nbsp;<a href="#" hotkey="c">{{disk_size}}</a>
@@ -136,6 +132,10 @@
</div>
</script>
<script type='text/mustache' id="actionsTemplate">
<a href="javascript:void(false)" class="primary button csv"><span class="downarrow icon"></span>Download DB as CSV</a>
</script>
<script type='text/mustache' id="bulkTemplate"> http://{{host}}/{{db_name}}/_bulk_docs</script>
</body>