kolo 0.8.1 → 0.8.2
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.
- checksums.yaml +4 -4
- data/lib/assets/javascripts/bindings.js.coffee +9 -0
- data/lib/kolo/version.rb +1 -1
- data/public/js/bindings.js +13 -0
- data/public/js/data-access.js +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e1cf81141943bd840cd23275608cb892e195ae0
|
4
|
+
data.tar.gz: f9e427d851a536a4d9599542282303da7b61b64a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/public/js/bindings.js
CHANGED
@@ -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');
|
data/public/js/data-access.js
CHANGED
@@ -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),
|
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.
|
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:
|
11
|
+
date: 2016-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|