kolo 0.2.4 → 0.2.5

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.
Binary file
@@ -65,6 +65,7 @@ class Db
65
65
  load: (autoReload = false)=>
66
66
  if !@selected()
67
67
  viewModel.systemNotification @plural, 'loading'
68
+ viewModel.loading true
68
69
  @onBeforeLoad() if @onBeforeLoad?
69
70
  $.get @url, (data)=>
70
71
  for itemData in @itemDataFrom(data)
@@ -73,6 +74,7 @@ class Db
73
74
  if @sortFunction?
74
75
  @items.sort @sortFunction
75
76
  @onAfterLoad() if @onAfterLoad?
77
+ viewModel.loading false
76
78
  viewModel.systemNotification @plural, 'loaded'
77
79
  if autoReload
78
80
  setTimeout =>
@@ -94,6 +96,7 @@ class Db
94
96
 
95
97
  doCreate: (item)=>
96
98
  viewModel.systemNotification @name, 'saving'
99
+ viewModel.loading true
97
100
  $.ajax
98
101
  url: @url
99
102
  dataType: 'json'
@@ -102,11 +105,13 @@ class Db
102
105
  success: (data)=>
103
106
  @selected null
104
107
  viewModel.systemNotification @name, 'saved'
108
+ viewModel.loading false
105
109
  @load()
106
110
  return false
107
111
 
108
112
  doUpdate: (item)=>
109
113
  viewModel.systemNotification @name, 'saving'
114
+ viewModel.loading true
110
115
  $.ajax
111
116
  url: @urlFor(item)
112
117
  dataType: 'json'
@@ -115,11 +120,13 @@ class Db
115
120
  success: (data)=>
116
121
  @selected null
117
122
  viewModel.systemNotification @name, 'saved'
123
+ viewModel.loading false
118
124
  @load()
119
125
  return false
120
126
 
121
127
  doDestroy: (item)=>
122
128
  viewModel.systemNotification @name, 'deleting'
129
+ viewModel.loading true
123
130
  $.ajax
124
131
  url: @urlFor(item)
125
132
  dataType: 'json'
@@ -128,6 +135,7 @@ class Db
128
135
  viewModel.systemNotification @name, 'deleted'
129
136
  @selected null
130
137
  @items.remove(item)
138
+ viewModel.loading false
131
139
  @load()
132
140
  return false
133
141
 
data/lib/kolo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kolo
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -63,6 +63,7 @@ files:
63
63
  - lib/assets/images/fontawesome-webfont.woff
64
64
  - lib/assets/images/glyphicons-halflings-white.png
65
65
  - lib/assets/images/glyphicons-halflings.png
66
+ - lib/assets/images/loader.gif
66
67
  - lib/assets/javascripts/bindings.js.coffee
67
68
  - lib/assets/javascripts/bootstrap.min.js
68
69
  - lib/assets/javascripts/data-access.js.coffee
@@ -92,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
93
  version: '0'
93
94
  segments:
94
95
  - 0
95
- hash: -592120131
96
+ hash: 939949843
96
97
  required_rubygems_version: !ruby/object:Gem::Requirement
97
98
  none: false
98
99
  requirements:
@@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
102
  version: '0'
102
103
  segments:
103
104
  - 0
104
- hash: -592120131
105
+ hash: 939949843
105
106
  requirements: []
106
107
  rubyforge_project:
107
108
  rubygems_version: 1.8.24