collection-json-browser 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,16 +21,19 @@ function ApiController($scope, $http, $location) {
21
21
  // helpers
22
22
 
23
23
  function get(path) {
24
- $http.get(path).success(responseHandler)
24
+ $scope.loading = true
25
+ $http.get(path).success(responseHandler).error(function(){ $scope.loading = false })
25
26
  }
26
27
 
27
28
  function post() {
29
+ $scope.loading = true
28
30
  $http.post($scope.collection.href, formData()).
29
31
  success(responseHandler).
30
32
  error(responseHandler)
31
33
  }
32
34
 
33
35
  function put() {
36
+ $scope.loading = true
34
37
  $http.put($scope.collection.href, formData()).
35
38
  success(responseHandler).
36
39
  error(responseHandler)
@@ -46,6 +49,7 @@ function ApiController($scope, $http, $location) {
46
49
  $scope.collection = data.collection;
47
50
  $scope.raw = JSON.stringify(data, undefined, 2)
48
51
  $scope.status = status
52
+ $scope.loading = false
49
53
 
50
54
  $location.path($scope.collection.href)
51
55
  }
@@ -10,3 +10,9 @@
10
10
  *
11
11
  *= require ./bootstrap
12
12
  */
13
+
14
+ .spinner.modal {
15
+ background: none;
16
+ border: none;
17
+ box-shadow: none;
18
+ }
@@ -1,4 +1,8 @@
1
1
  <body ng-controller="ApiController">
2
+ <div class="spinner modal-backdrop" ng-show="loading"></div>
3
+ <div class="spinner modal" ng-show="loading">
4
+ <img src="/assets/collection-json-browser/loading-spinner.gif" />
5
+ </div>
2
6
 
3
7
  <div class="container-fluid">
4
8
  <div class="row-fluid">
@@ -1,3 +1,3 @@
1
1
  module CollectionJsonBrowser
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collection-json-browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-22 00:00:00.000000000 Z
12
+ date: 2013-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -50,6 +50,7 @@ executables: []
50
50
  extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
+ - app/assets/images/collection-json-browser/loading-spinner.gif
53
54
  - app/assets/javascripts/collection_json_browser/angular/controllers/api_controller.js
54
55
  - app/assets/javascripts/collection_json_browser/angular.min.js
55
56
  - app/assets/javascripts/collection_json_browser/application.js