vue_crud 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93506cd1ee27df759ef69a8808ed6cc72bcedf12
4
- data.tar.gz: 4f983bde86e89ca3503d86b466ee6658b63bf501
3
+ metadata.gz: 9198bc1eaeae6ba231d8bfd7f03c1a856ad4ab91
4
+ data.tar.gz: 6f3ddf8fa74331373f9b1b95aa4d280466f99573
5
5
  SHA512:
6
- metadata.gz: e3ca5dd5570c3430ec2c371b0052f6899db7d3fa9d694aab8a8f1a47e81d4ba40ab04758c2a07ce1af82f476cf24c14a5dd048ec8fc0dd9062ee4256d73c9646
7
- data.tar.gz: 625f0be42e00de4a547d434ae7f497dac1d05fe150d9283b5d2d9f470895f45c3735f230784b53588dc34e3f883b2d106c60f92893e3b16ccef2d8804c21ffe6
6
+ metadata.gz: a0b83f75cb7edfb91a939f456b32e343f0eebadc093b9f301b413ba1e3aa9d178e8cef9aab1246f54f6bf1f12de410ff4429de01c871b811536c94b761f7b85e
7
+ data.tar.gz: e8cd46791c3f1b57987eea8b8e92faaceedac10630391740bf78cc28f645a846809c8c98b25792d9406d9c45f48db75c6257fb6761b6f3f90d5f5df41e1b13a5
@@ -1,3 +1,3 @@
1
1
  module VueCrud
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -91,12 +91,6 @@ function vue_init(params = {}) {
91
91
  event_hub.$on('cancel_customMode', function() {
92
92
  this.customMode = false;
93
93
  }.bind(this));
94
- event_hub.$on('toggle_modal_open', function() {
95
- if(this.onModalOpen !== undefined) this.onModalOpen();
96
- }.bind(this));
97
- event_hub.$on('toggle_modal_close', function() {
98
- if(this.onModalClose !== undefined) this.onModalClose();
99
- }.bind(this));
100
94
  },
101
95
  methods: {
102
96
  deleteModel: function () {
@@ -156,6 +150,7 @@ function vue_init(params = {}) {
156
150
  mixins: [root_mixin],
157
151
  el: '#vue_crud',
158
152
  data: {
153
+ default_url: '',
159
154
  column_type: options.column_type || 'card',
160
155
  models: [],
161
156
  info: {
@@ -173,7 +168,8 @@ function vue_init(params = {}) {
173
168
  filteredModelCount: null,
174
169
  is_calculating: false,
175
170
  model_prefix: getParameterByName("mp"),
176
- selected_attribute: getParameterByName("sa")
171
+ selected_attribute: getParameterByName("sa"),
172
+ selected_text: getParameterByName("st")
177
173
  },
178
174
  mounted: function() {
179
175
  var that = this;
@@ -182,7 +178,7 @@ function vue_init(params = {}) {
182
178
  success: function(res) {
183
179
  that.info = res;
184
180
  that.model = obj_to_json(that.info.structure);
185
-
181
+ that.default_url = that.info.url_prefix + location.search;
186
182
  $.ajax({
187
183
  url: that.info.url_prefix + options.suffix + location.search,
188
184
  success: function(res) {
@@ -194,22 +190,19 @@ function vue_init(params = {}) {
194
190
  event_hub.$on('update_progress', function(progress) {
195
191
  this.progress = progress;
196
192
  }.bind(this));
197
- event_hub.$on('toggle_modal_open', function() {
198
- if(this.onModalOpen !== undefined) this.onModalOpen();
199
- }.bind(this));
200
- event_hub.$on('toggle_modal_close', function() {
201
- if(this.onModalClose !== undefined) this.onModalClose();
202
- }.bind(this));
203
193
  $('#form-progress').change(function(){
204
194
  event_hub.$emit('update_progress', $(this).val());
205
195
  });
206
196
  $(document).delegate('.attribute_option', 'click', function(event) {
207
197
  var model_prefix = $('.attribute_select').find('.item.selected').attr('model_prefix');
208
- var selected_attribute = $('.attribute_select').find('.item.selected').attr('target') || "id";
198
+ var selected_attribute = $('.attribute_select').find('.item.selected').attr('target') || "Attribute";
199
+ var selected_text = $('.attribute_select').find('.item.selected').attr('target_text') || "欄位";
209
200
  that.model_prefix = model_prefix;
210
201
  that.selected_attribute = selected_attribute;
202
+ that.selected_text = selected_text;
211
203
  updateQueryStringParam('mp', that.model_prefix);
212
204
  updateQueryStringParam('sa', that.selected_attribute);
205
+ updateQueryStringParam('st', that.selected_text);
213
206
  });
214
207
  },
215
208
  computed: {
@@ -307,11 +300,11 @@ $(document).ready(function() {
307
300
  onShow: function() {
308
301
  $(this).find('select.ui.dropdown').dropdown();
309
302
  $(this).find('.ui.checkbox').checkbox();
310
- event_hub.$emit('toggle_modal_open');
303
+ if(modalOpen !== undefined) modalOpen();
311
304
  },
312
305
  onHide: function() {
313
306
  event_hub.$emit('cancel_customMode');
314
- event_hub.$emit('toggle_modal_close');
307
+ if(modalClose !== undefined) modalClose();
315
308
  }
316
309
  }).modal('show');
317
310
  });
Binary file
Binary file
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.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Chiang
@@ -80,6 +80,8 @@ files:
80
80
  - vendor/assets/stylesheets/vue_crud.css
81
81
  - vue_crud-0.1.5.gem
82
82
  - vue_crud-0.1.6.gem
83
+ - vue_crud-0.1.7.gem
84
+ - vue_crud-0.1.8.gem
83
85
  - vue_crud.gemspec
84
86
  homepage: http://www.mynet.com.tw
85
87
  licenses: