kolo 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a63c49886d79c89c6f672bd7de931e01bd02e792
4
- data.tar.gz: 52ac1d9f124c6515553c35f7184a7057298bbb72
3
+ metadata.gz: 1e1cf81141943bd840cd23275608cb892e195ae0
4
+ data.tar.gz: f9e427d851a536a4d9599542282303da7b61b64a
5
5
  SHA512:
6
- metadata.gz: 2ec1c6624de11d1dfea5fa47c5ef4705e75238f1da3ab3c1dffca03ca1131c7a4492fdd2cc4dacc58cdaa94e33015f43efc46e20b109d45de35021b2a2b9dc63
7
- data.tar.gz: 35fd19cddacd119a84a8393aa4b9f85fb510ea6c9f912b6679003aec3b580ff2d25cef173014999ae3189051bb9983460ecd772cd1a57a6ff5fa82f3106488b6
6
+ metadata.gz: edb5bb73db35cfedf40b57203563284d5e95928204a1e171fc980813a32c84476a948523295c1e7cfa228c0a0e56a895dc64a726523f9f8c330e41d1ecbcac33
7
+ data.tar.gz: 6b0328cc48d2ab7aacf99b0a7160eae83136477625aef4960bde9e6382b37e102630be28914e5e0b714ff2b5a8562d369d7984166d3a691349fa196b500e872b
@@ -207,12 +207,21 @@ ko.bindingHandlers.wysiwyg =
207
207
  editor = CKEDITOR.replace element, { allowedContent: true }
208
208
  document.recalc() if document.recalc?
209
209
 
210
+ editor.on 'key', (evt)->
211
+ keyCode = evt.data.keyCode
212
+ return true if (keyCode == 46 || keyCode == 8 || keyCode == 37 || keyCode == 38 || keyCode == 39 || keyCode == 40) # let BS DEL and arrow keys through no matter what
213
+ limit = 4096
214
+ str = evt.editor.getData()
215
+ return false if str.length >= limit
216
+ return true
217
+
210
218
  editor.on 'change', (evt)->
211
219
  $(element).attr 'data-edit-in-progress', 'true'
212
220
  observable = valueAccessor()
213
221
  observable(evt.editor.getData())
214
222
  $(element).attr 'data-edit-in-progress', 'false'
215
223
 
224
+
216
225
  update: (element, valueAccessor)->
217
226
  return if $(element).attr('data-edit-in-progress') == 'true'
218
227
  id = $(element).attr('id')
data/lib/kolo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kolo
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
@@ -327,6 +327,19 @@
327
327
  if (document.recalc != null) {
328
328
  document.recalc();
329
329
  }
330
+ editor.on('key', function(evt) {
331
+ var keyCode, limit, str;
332
+ keyCode = evt.data.keyCode;
333
+ if (keyCode === 46 || keyCode === 8 || keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) {
334
+ return true;
335
+ }
336
+ limit = 4096;
337
+ str = evt.editor.getData();
338
+ if (str.length >= limit) {
339
+ return false;
340
+ }
341
+ return true;
342
+ });
330
343
  return editor.on('change', function(evt) {
331
344
  var observable;
332
345
  $(element).attr('data-edit-in-progress', 'true');
@@ -113,6 +113,10 @@
113
113
  }
114
114
  }
115
115
 
116
+ Db.prototype.systemNotification = function(name, value) {
117
+ return this.viewModel.systemNotification(name, value);
118
+ };
119
+
116
120
  Db.prototype.find = function(id) {
117
121
  var item, _i, _len, _ref;
118
122
  _ref = this.items();
@@ -178,7 +182,7 @@
178
182
  return function() {
179
183
  return _this.load(true, afterLoad);
180
184
  };
181
- })(this), 30000);
185
+ })(this), 120000);
182
186
  }
183
187
  return false;
184
188
  };
@@ -448,6 +452,10 @@
448
452
  return this.db.doDestroy(this);
449
453
  };
450
454
 
455
+ Model.prototype.systemNotification = function(name, value) {
456
+ return this.db.systemNotification(name, value);
457
+ };
458
+
451
459
  return Model;
452
460
 
453
461
  })();
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rahoul Baruah
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-24 00:00:00.000000000 Z
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler