Skip to content

Commit

Permalink
[refactor][s]: (refs #1) remove updateDocCount and formatDiskSize fun…
Browse files Browse the repository at this point in the history
…ctions from recline.js as no longer required.
  • Loading branch information
rufuspollock committed Oct 24, 2011
1 parent f589556 commit 9e8198e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/recline.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
var recline = function() {

function formatDiskSize(bytes) {
return (parseFloat(bytes)/1024/1024).toString().substr(0,4) + "MB"
}

function showDialog(template, data) {
if (!data) data = {};
util.show('dialog');
Expand Down Expand Up @@ -141,15 +137,6 @@ var recline = function() {
});
}

function updateDocCount(totalDocs) {
return couch.request({url: app.baseURL + 'api/_all_docs?' + $.param({startkey: '"_design/"', endkey: '"_design0"'})}).then(
function ( data ) {
var ddocCount = data.rows.length;
$('#docCount').text(totalDocs - ddocCount + " documents");
}
)
}

function bootstrap(dataset) {
util.listenFor(['esc', 'return']);
initializeTable(dataset);
Expand All @@ -171,10 +158,8 @@ var recline = function() {
}

return {
formatDiskSize: formatDiskSize,
handleMenuClick: handleMenuClick,
showDialog: showDialog,
updateDocCount: updateDocCount,
bootstrap: bootstrap,
fetchRows: fetchRows,
activateControls: activateControls,
Expand Down

0 comments on commit 9e8198e

Please sign in to comment.