now it looks fantastic. Nothing under!

This commit is contained in:
didier.amyot committed 2014-05-09 16:45:23 -04:00
1 parent a72347d1e3
commit 59813e906e
15 files changed
+130 -16

No files matched your search

@@ -0,0 +1,28 @@
root = this;
root.controllers.controller('fieldCtrl', ['$scope', '$routeParams', '$http', ($scope, $routeParams, $http) ->
$scope.idx = $routeParams.idx
$scope.field = $routeParams.field
$scope.fields = []
$scope._ = _
$scope.value = ""
$scope.doc = {}
$scope.meta = {}
$scope.fieldUrl = (fieldName) ->
rt = $routeParams
return "#/#{ rt.server }/#{ rt.database }/#{ rt.collection }/_id/#{rt.id}/field/#{fieldName}"
url = "/api/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }"
url = "#{ url }/_id/#{$routeParams.id}"
$http.get(url).then((res) ->
$scope.doc = res.data.document
$scope.value = $scope.doc[$scope.field]
$scope.fields = _.keys($scope.doc)
$scope.meta = res.data.meta
)
])