Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ydaniv committed May 4, 2014
1 parent 87496e3 commit 792338a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
7 changes: 3 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ var config = require('./config');

//Set up swig
app.engine('html', cons.swig);
swig.init({
root: __dirname + '/views',
allowErrors: false,
filters: swigFilters

Object.keys(swigFilters).forEach(function (name) {
swig.setFilter(name, swigFilters[name]);
});

//App configuration
Expand Down
6 changes: 5 additions & 1 deletion filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exports.json = function(input) {
return JSON.stringify(input, null, ' ');
};

exports.convertBytes= function(input) {
exports.convertBytes = function(input) {
input = parseInt(input, 10);
if (input < 1024) {
return input.toString() + ' Bytes';
Expand All @@ -17,3 +17,7 @@ exports.convertBytes= function(input) {
return input.toString() + ' Bytes';
}
};

exports.to_string = function (input) {
return input.toString();
};
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@
"url": "git://github.com/andzdroid/mongo-express.git"
},
"dependencies": {
"express": "3.0.0",
"mongodb": "0.9.9-8",
"consolidate":">= 0.4.0",
"swig": "0.12.x",
"underscore": "1.3.x",
"async": "0.1.x"
"express": "~3.4.8",
"mongodb": "~1.3.23",
"consolidate": "~0.10.0",
"swig": "~1.3.2",
"underscore": "~1.6.0",
"async": "~0.8.0"
},
"devDependencies": {
"mocha": "1.0.x",
"chai": "0.5.x",
"coffee-script": "1.3.x"
"mocha": "~1.18.2",
"chai": "~1.9.1"
},
"engine": "node >= 0.6",
"engine": "node >= 0.10",
"license": "MIT",
"scripts": {
"start": "node app",
Expand Down
1 change: 0 additions & 1 deletion test/mocha.opts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
--reporter dot
--ignore-leaks
4 changes: 2 additions & 2 deletions views/collection.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ <h3>Add Document</h3>
theme: "{{ editorTheme }}",
lineNumbers: true
{%- if collectionName != 'system.indexes' && collectionName != 'system.users' %},
onFocus: function() { loadDocument('{{ docs[loop.index0]._id }}') }
onFocus: function() { loadDocument('{{ docs[loop.index0]._id|to_string }}') }
{%- endif %}
});
</script>
</div>
<div class="span1">
<br /><br />
<form method="POST" action="db/{{ dbName }}/{{ collectionName }}/{{ docs[loop.index0]._id }}">
<form method="POST" action="db/{{ dbName }}/{{ collectionName }}/{{ docs[loop.index0]._id|to_string }}">
<input type="hidden" name="_method" value="delete">
<button type="submit" class="btn btn-danger btn-mini">
<i class="icon-remove icon-white"></i>
Expand Down
6 changes: 3 additions & 3 deletions views/document.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends 'layout.html' %}

{% block title %}{{ document._id }}{% endblock %}
{% block title %}{{ document._id|to_string }}{% endblock %}


{% block head %}
Expand Down Expand Up @@ -36,14 +36,14 @@
<span class="divider">/</span>
</li>
<li class="active">
{{ document._id }}
{{ document._id|to_string }}
</li>
{% endblock %}


{% block content %}

<form method="POST" action="db/{{ dbName }}/{{ collectionName }}/{{ document._id }}">
<form method="POST" action="db/{{ dbName }}/{{ collectionName }}/{{ document._id|to_string }}">
<input type="hidden" name="_method" value="put">
<button type="submit" class="btn btn-success btn-large"{# onclick="return checkJSON()"#}>
<i class="icon-pencil icon-white"></i>
Expand Down

0 comments on commit 792338a

Please sign in to comment.