improvement done while working with the software.
This commit is contained in:
1 parent
96ed18787a
commit
741ec3f40c
4 files changed
+19
-11
No files matched your search
@@ -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 = () ->
|
||||
|
||||
@@ -11,3 +11,7 @@ root.filters.filter 'replaceAllCommasBySpaces', () ->
|
||||
root.filters.filter 'niceJSON', () ->
|
||||
return (obj) ->
|
||||
return JSON.stringify(obj, null, 4);
|
||||
|
||||
root.filters.filter 'replaceReturnByBreak', () ->
|
||||
return (text) ->
|
||||
return text.replace(new RegExp("\n","g"), "<br>")
|
||||
@@ -1,6 +1,6 @@
|
||||
<span>
|
||||
<span ng-show="isString">
|
||||
{{ value}}
|
||||
<pre> {{value}} </pre>
|
||||
</span>
|
||||
<span ng-show="isNumber">
|
||||
{{value | number | replaceAllCommasBySpaces}}
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
<div class="row">
|
||||
<div class="large-9 columns">
|
||||
<input type="text" ng-model="newQuery">
|
||||
<input type="text" ng-model="newQuery" style="font-family: monospace;font-size: 1.3em;">
|
||||
</div>
|
||||
<div class="large-3 columns right">
|
||||
<ul class="button-group">
|
||||
<li><a class="button tiny" ng-href="{{ getQueryPath() }}">Query</a></li>
|
||||
<li><a class="button tiny">Clear</a></li>
|
||||
<li>
|
||||
<a class="button tiny" ng-href="{{ getQueryPath() }}" ng-class="{disabled: getQueryPath()=='' }">
|
||||
Query <i class="fa fa-thumbs-o-down" style="color:red;" ng-show="getQueryPath()=='' && newQuery != ''"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li><a class="button tiny" ng-click="newQuery=''" ng-class="{disabled: newQuery=='' }">Clear</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="large-12 columns" style="text-align: center;">
|
||||
<a class="fa fa-angle-left" ng-href="{{ previousDocumentUrl() }}" ng-show="{{ hasPreviousDocument() }}"></a>
|
||||
<kbd>{{idx}} / {{ meta.count | number | replaceAllCommasBySpaces }}</kbd>
|
||||
<a class="fa fa-angle-right" ng-href="{{ nextDocumentUrl() }}"></a>
|
||||
<a class="fa fa-chevron-left" ng-href="{{ previousDocumentUrl() }}" ng-show="{{ hasPreviousDocument() }}"></a>
|
||||
<kbd>{{idx}} / {{ meta.count || 0 | number | replaceAllCommasBySpaces }}</kbd>
|
||||
<a class="fa fa-chevron-right" ng-href="{{ nextDocumentUrl() }}"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,8 +27,8 @@
|
||||
<table style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="min-width:50px;">Keys</th>
|
||||
<th >Values</th>
|
||||
<th style="min-width:100px;">Keys</th>
|
||||
<th style="text-align: center;">Values</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
Reference in new issue
Block a user