vue_crud 0.1.10.5 → 0.1.10.6

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: d5506ddc35db86a9d199d79187c50f987ad472ca
4
- data.tar.gz: bc44b08230c83aa52ca748c330e11cf8a269c141
3
+ metadata.gz: 40f970b6e94c46d91b188e9509b22dbe9e6fc41b
4
+ data.tar.gz: cac46b64f21b32caad7df449b00de0b78194ea24
5
5
  SHA512:
6
- metadata.gz: 6be112a5666dc4b01b5a907b1e65f7b66d7f3cc5e155591344671e6a03b7891015eb1612a851f6c5789be697d66794ea562d569d351bc4091ece6d24660008e2
7
- data.tar.gz: 3509c9f8f96e3b303b549ac1862fa8c9fe3264551f3d9ecab43e55d982b80aa35bb352beb5268584f2e95ccdc6488685dea1fb14c59c0a3d08a6229e492c2615
6
+ metadata.gz: 5d815ff0fb5633a5ce4ae58e4c105260d0380eec3525594bc9267c007b4e82231ca3f96fbceaebb476c415f6f890c01d815ba101f9b20e828625709180a390ac
7
+ data.tar.gz: fe2dbae18d2b9936e501ce26fad4dceb05c3b82925f8c137d02764dac0a604ac86f8fc90cf092d7c3461ed6e078bd4e13c2782524e383bcd34f720e6c0511bbb
@@ -1,3 +1,3 @@
1
1
  module VueCrud
2
- VERSION = "0.1.10.5"
2
+ VERSION = "0.1.10.6"
3
3
  end
@@ -274,10 +274,12 @@ function vueCRUD_init(params = {}) {
274
274
  deleteModel: function () {
275
275
  var that = this;
276
276
  that.deleteMode = true;
277
+ var id = that.model.ID || that.model.id;
278
+
277
279
  if(confirm("Are you sure?") == true) {
278
280
  $.ajax({
279
281
  method: 'DELETE',
280
- url: that.info.url_prefix + '/' + that.model.ID + options.suffix + location.search,
282
+ url: that.info.url_prefix + '/' + id + options.suffix + location.search,
281
283
  success: function(res) {
282
284
  that.is_deleted = true;
283
285
  event_hub.$on('toggleRestoreSuccess', function() {
@@ -305,10 +307,11 @@ function vueCRUD_init(params = {}) {
305
307
  },
306
308
  updateModel: function() {
307
309
  var that = this;
310
+ var id = that.model.ID || that.model.id;
308
311
  $.ajax({
309
312
  method: 'PATCH',
310
313
  data: obj_to_json(that.model),
311
- url: that.info.url_prefix + '/' + that.model.ID + options.suffix + location.search,
314
+ url: that.info.url_prefix + '/' + id + options.suffix + location.search,
312
315
  beforeSend: function() {
313
316
  event_hub.$emit('dimmerOn');
314
317
  $('.progress-bar').css('width', '0');
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vue_crud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10.5
4
+ version: 0.1.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Chiang