diff --git a/client/coffee/controllers/documentCtrl.coffee b/client/coffee/controllers/documentCtrl.coffee index e2bc423..986090c 100644 --- a/client/coffee/controllers/documentCtrl.coffee +++ b/client/coffee/controllers/documentCtrl.coffee @@ -97,13 +97,13 @@ root.controllers.controller('documentCtrl', ['$scope', '$routeParams', '$http', $scope.previousDocumentUrl = () -> url = "#/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }/idx/#{$scope.idx - 1}" if $routeParams.query - url = "/query/#{$routeParams.query}" + url = "#{url}/query/#{$routeParams.query}" return url $scope.nextDocumentUrl = () -> url = "#/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }/idx/#{$scope.idx + 1}" if $routeParams.query - url = "/query/#{$routeParams.query}" + url = "#{url}/query/#{$routeParams.query}" return url $scope.hasPreviousDocument = () -> diff --git a/client/coffee/filters.coffee b/client/coffee/filters.coffee index 7571d2c..137d60a 100644 --- a/client/coffee/filters.coffee +++ b/client/coffee/filters.coffee @@ -6,8 +6,12 @@ root.filters.filter 'escape', () -> root.filters.filter 'replaceAllCommasBySpaces', () -> return (text) -> - return text.replace(new RegExp(",","g"), " ") + return text.replace(new RegExp(",","g"), " ") root.filters.filter 'niceJSON', () -> return (obj) -> - return JSON.stringify(obj, null, 4); + return JSON.stringify(obj, null, 4); + +root.filters.filter 'replaceReturnByBreak', () -> + return (text) -> + return text.replace(new RegExp("\n","g"), "
") \ No newline at end of file diff --git a/client/partials/directives/value.html b/client/partials/directives/value.html index 802a83b..e8a9adf 100644 --- a/client/partials/directives/value.html +++ b/client/partials/directives/value.html @@ -1,6 +1,6 @@ - {{ value}} +
 {{value}} 
{{value | number | replaceAllCommasBySpaces}} diff --git a/client/partials/document.html b/client/partials/document.html index 9adbc55..dfa6356 100644 --- a/client/partials/document.html +++ b/client/partials/document.html @@ -1,20 +1,24 @@
- +
- - {{idx}} / {{ meta.count | number | replaceAllCommasBySpaces }} - + + {{idx}} / {{ meta.count || 0 | number | replaceAllCommasBySpaces }} +
@@ -23,8 +27,8 @@ - - + +
KeysValuesKeysValues