vue_crud 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vue_crud/version.rb +1 -1
- data/vendor/assets/javascripts/vue_crud.js +31 -6
- data/vue_crud-0.1.6.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f876c6d554cc8a8d7a13f77570930db1c099d71
|
4
|
+
data.tar.gz: a87dac499a723925956eeb3a384c4722f62bbef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c18e5f2ce378820e6cc94c11ed8b5d3905178b7615aba90a3e1e482cc8cf3a6fbc91838b84b2b41c8dcc2726c5d8b70f4a1894543d194ea27d89304cd11e71c5
|
7
|
+
data.tar.gz: 5a463b0a49d63bea07ec5b074b777eac1596991f2755112724184b73d786ca9ec7807614fe4b5eb1ea04ae7e07798e495424877d49702511b59f23dbbe64eae1
|
data/lib/vue_crud/version.rb
CHANGED
@@ -88,19 +88,30 @@ function vue_init(params = {}) {
|
|
88
88
|
event_hub.$on('update_progress', function(progress) {
|
89
89
|
this.progress = progress;
|
90
90
|
}.bind(this));
|
91
|
-
|
92
91
|
event_hub.$on('cancel_customMode', function() {
|
93
92
|
this.customMode = false;
|
94
93
|
}.bind(this));
|
94
|
+
event_hub.$on('toggle_modal_open', function() {
|
95
|
+
this.onModalOpen();
|
96
|
+
}.bind(this));
|
97
|
+
event_hub.$on('toggle_modal_close', function() {
|
98
|
+
this.onModalClose();
|
99
|
+
}.bind(this));
|
95
100
|
},
|
96
101
|
methods: {
|
102
|
+
onModalOpen: function() {
|
103
|
+
|
104
|
+
},
|
105
|
+
onModalClose: function() {
|
106
|
+
|
107
|
+
},
|
97
108
|
deleteModel: function () {
|
98
109
|
var that = this;
|
99
110
|
that.deleteMode = true;
|
100
111
|
if(confirm("Are you sure?") == true) {
|
101
112
|
$.ajax({
|
102
113
|
method: 'DELETE',
|
103
|
-
url: that.info.url_prefix + '/' + that.model.id + options.suffix,
|
114
|
+
url: that.info.url_prefix + '/' + that.model.id + options.suffix + location.search,
|
104
115
|
success: function(res) {
|
105
116
|
$(that.$el).remove();
|
106
117
|
},
|
@@ -121,7 +132,7 @@ function vue_init(params = {}) {
|
|
121
132
|
data: {
|
122
133
|
model: that.model,
|
123
134
|
},
|
124
|
-
url: that.info.url_prefix + '/' + that.model.id + options.suffix,
|
135
|
+
url: that.info.url_prefix + '/' + that.model.id + options.suffix + location.search,
|
125
136
|
beforeSend: function() {
|
126
137
|
modal.find('.dimmer').toggleClass('active');
|
127
138
|
$('.progress-bar').css('width', '0');
|
@@ -177,8 +188,9 @@ function vue_init(params = {}) {
|
|
177
188
|
success: function(res) {
|
178
189
|
that.info = res;
|
179
190
|
that.model = obj_to_json(that.info.structure);
|
191
|
+
|
180
192
|
$.ajax({
|
181
|
-
url: that.info.url_prefix + options.suffix,
|
193
|
+
url: that.info.url_prefix + options.suffix + location.search,
|
182
194
|
success: function(res) {
|
183
195
|
that.models = res;
|
184
196
|
}
|
@@ -188,6 +200,12 @@ function vue_init(params = {}) {
|
|
188
200
|
event_hub.$on('update_progress', function(progress) {
|
189
201
|
this.progress = progress;
|
190
202
|
}.bind(this));
|
203
|
+
event_hub.$on('toggle_modal_open', function() {
|
204
|
+
this.onModalOpen();
|
205
|
+
}.bind(this));
|
206
|
+
event_hub.$on('toggle_modal_close', function() {
|
207
|
+
this.onModalClose();
|
208
|
+
}.bind(this));
|
191
209
|
$('#form-progress').change(function(){
|
192
210
|
event_hub.$emit('update_progress', $(this).val());
|
193
211
|
});
|
@@ -250,6 +268,12 @@ function vue_init(params = {}) {
|
|
250
268
|
}
|
251
269
|
},
|
252
270
|
methods: {
|
271
|
+
onModalOpen: function() {
|
272
|
+
|
273
|
+
},
|
274
|
+
onModalClose: function() {
|
275
|
+
|
276
|
+
},
|
253
277
|
setPage: function(idx){
|
254
278
|
if( idx <= 0 || idx > this.totalPage ){
|
255
279
|
return;
|
@@ -264,7 +288,7 @@ function vue_init(params = {}) {
|
|
264
288
|
data: {
|
265
289
|
model: that.model,
|
266
290
|
},
|
267
|
-
url: that.info.url_prefix + options.suffix,
|
291
|
+
url: that.info.url_prefix + options.suffix + location.search,
|
268
292
|
before: function() {
|
269
293
|
$('.new_modal').find('.dimmer').toggleClass('active');
|
270
294
|
$('.progress-bar').css('width', '0');
|
@@ -295,10 +319,11 @@ $(document).ready(function() {
|
|
295
319
|
onShow: function() {
|
296
320
|
$(this).find('select.ui.dropdown').dropdown();
|
297
321
|
$(this).find('.ui.checkbox').checkbox();
|
298
|
-
|
322
|
+
event_hub.$emit('toggle_modal_open');
|
299
323
|
},
|
300
324
|
onHide: function() {
|
301
325
|
event_hub.$emit('cancel_customMode');
|
326
|
+
event_hub.$emit('toggle_modal_close');
|
302
327
|
}
|
303
328
|
}).modal('show');
|
304
329
|
});
|
data/vue_crud-0.1.6.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vue_crud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donald Chiang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- vendor/assets/javascripts/vue_crud.js
|
80
80
|
- vendor/assets/stylesheets/vue_crud.css
|
81
81
|
- vue_crud-0.1.5.gem
|
82
|
+
- vue_crud-0.1.6.gem
|
82
83
|
- vue_crud.gemspec
|
83
84
|
homepage: http://www.mynet.com.tw
|
84
85
|
licenses:
|