vue_crud 0.1.9 → 0.1.9.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08c989f44305a8b5ae2272acb4581c181f7b29b2
|
4
|
+
data.tar.gz: aa48ea64508d221566ca74ca87d1826ba2675a46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d690bee88c197a2708879be18becc184dd498f5e5016a7b070c51a849c3daa6ac5737448fef830f4133dc5c98236e5daacd5e074bfec59712c9e1355721fcc1b
|
7
|
+
data.tar.gz: 92f0e102446ec468c60b904b7c8abeff0814e8303975923f8ea620ba696e595b28edeb9ace596ae9c55736e35c94d922aa0e9c1a4dd73a44cbc7d57cf03440fa
|
@@ -39,7 +39,7 @@ $(document).ready(function() {
|
|
39
39
|
<div class="sub header"><small>{{ info.titles.subtitle }}</small></div>
|
40
40
|
</h1>
|
41
41
|
<div class="ui animated fade green button" data-modal="#modelModal" tabindex="0">
|
42
|
-
<div class="visible content"
|
42
|
+
<div class="visible content">新增 {{ info.titles.model_name }}</div>
|
43
43
|
<div class="hidden content">
|
44
44
|
<i class="right plus icon"></i>
|
45
45
|
</div>
|
@@ -47,12 +47,12 @@ $(document).ready(function() {
|
|
47
47
|
<div class="ui divider"></div>
|
48
48
|
<!-- NOTE: Filter -->
|
49
49
|
<div class="ui left action right icon labeled input filter" :class="{loading: is_calculating}">
|
50
|
-
<a :href="
|
50
|
+
<a :href="default_url" class="ui button red" v-show="selected_attribute">Reset</a>
|
51
51
|
<div class="ui basic floating dropdown button">
|
52
|
-
<div class="text">{{
|
52
|
+
<div class="text">{{ selected_text || '請選擇欄位' }}</div>
|
53
53
|
<i class="dropdown icon"></i>
|
54
54
|
<div class="menu attribute_select">
|
55
|
-
<div class="item attribute_option" v-for="attribute in info.model_attributes" :model_prefix="attribute.model_prefix || ''" :target="attribute.name" :class="{selected: selected_attribute == attribute.name,active: selected_attribute == attribute.name}">{{ attribute.display_name }}</div>
|
55
|
+
<div class="item attribute_option" v-for="attribute in info.model_attributes" :model_prefix="attribute.model_prefix || ''" :target="attribute.name" :target_text="attribute.display_name" :class="{selected: selected_attribute == attribute.name,active: selected_attribute == attribute.name}">{{ attribute.display_name }}</div>
|
56
56
|
</div>
|
57
57
|
</div>
|
58
58
|
<input type="text" id="searchQuery" :placeholder="searchStatus" v-model="searchQuery">
|
@@ -84,7 +84,7 @@ $(document).ready(function() {
|
|
84
84
|
{{ attribute.display_name }}
|
85
85
|
</th>
|
86
86
|
<th>
|
87
|
-
|
87
|
+
動作
|
88
88
|
</th>
|
89
89
|
<th></th>
|
90
90
|
</tr>
|
@@ -114,7 +114,7 @@ $(document).ready(function() {
|
|
114
114
|
|
115
115
|
<!-- NOTE: modal for new action -->
|
116
116
|
<div class="ui modal new_modal" id="modelModal">
|
117
|
-
<div class="header"
|
117
|
+
<div class="header">創建 {{ info.titles.title }}</div>
|
118
118
|
<!-- NOTE: Vue form -->
|
119
119
|
<div class="content vue_form_for_new"></div>
|
120
120
|
<div class="actions">
|
@@ -162,8 +162,8 @@ $(document).ready(function() {
|
|
162
162
|
<div v-show="customMode"><div class="custom_modal_body"></div></div>
|
163
163
|
</div>
|
164
164
|
<div class="actions">
|
165
|
-
<button class="ui basic gray cancel button"
|
166
|
-
<button @click="updateModel" class="ui button blue" v-show="!customMode"
|
165
|
+
<button class="ui basic gray cancel button">取消</button>
|
166
|
+
<button @click="updateModel" class="ui button blue" v-show="!customMode">更新</button>
|
167
167
|
<!-- NOTE: Custom modal action -->
|
168
168
|
<div class="inline-block custom_modal_action"></div>
|
169
169
|
</div>
|
@@ -177,13 +177,13 @@ $(document).ready(function() {
|
|
177
177
|
<!-- NOTE: Custom action -->
|
178
178
|
<div class="inline-block custom_action"></div>
|
179
179
|
<div class="ui animated fade blue button" :data-modal="'#editModal_' + model.id" tabindex="0">
|
180
|
-
<div class="visible content"
|
180
|
+
<div class="visible content">編輯</div>
|
181
181
|
<div class="hidden content">
|
182
182
|
<i class="right edit icon"></i>
|
183
183
|
</div>
|
184
184
|
</div>
|
185
185
|
<div class="ui animated fade red button" @click="deleteModel" class="ui basic red button" v-show="!deleteMode" tabindex="0">
|
186
|
-
<div class="visible content"
|
186
|
+
<div class="visible content">刪除</div>
|
187
187
|
<div class="hidden content">
|
188
188
|
<i class="right trash icon"></i>
|
189
189
|
</div>
|
@@ -241,13 +241,13 @@ $(document).ready(function() {
|
|
241
241
|
<!-- NOTE: Custom action -->
|
242
242
|
<div class="inline-block custom_action"></div>
|
243
243
|
<div class="ui animated fade blue button" :data-modal="'#editModal_' + model.id" tabindex="0">
|
244
|
-
<div class="visible content"
|
244
|
+
<div class="visible content">編輯</div>
|
245
245
|
<div class="hidden content">
|
246
246
|
<i class="right edit icon"></i>
|
247
247
|
</div>
|
248
248
|
</div>
|
249
249
|
<div class="ui animated fade right floated red button" @click="deleteModel" class="ui basic red button" v-show="!deleteMode" tabindex="0">
|
250
|
-
<div class="visible content"
|
250
|
+
<div class="visible content">刪除</div>
|
251
251
|
<div class="hidden content">
|
252
252
|
<i class="right trash icon"></i>
|
253
253
|
</div>
|
@@ -266,8 +266,8 @@ $(document).ready(function() {
|
|
266
266
|
<div v-show="customMode"><div class="custom_modal_body"></div></div>
|
267
267
|
</div>
|
268
268
|
<div class="actions">
|
269
|
-
<button class="ui basic gray cancel button"
|
270
|
-
<button @click="updateModel" class="ui button blue" v-show="!customMode"
|
269
|
+
<button class="ui basic gray cancel button">取消</button>
|
270
|
+
<button @click="updateModel" class="ui button blue" v-show="!customMode">更新</button>
|
271
271
|
<!-- NOTE: Custom modal action -->
|
272
272
|
<div class="inline-block custom_modal_action"></div>
|
273
273
|
</div>
|
@@ -284,10 +284,10 @@ $(document).ready(function() {
|
|
284
284
|
<div v-for="attribute in info.model_attributes" v-if="attribute.editable">
|
285
285
|
<div class="field" v-if="attribute.type == 'select'">
|
286
286
|
<label :for="'model_' + attribute.display_name">{{ attribute.display_name }}</label>
|
287
|
-
<select :id="'model_' + attribute.display_name" v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]" class="ui fluid dropdown">
|
287
|
+
<select :id="'model_' + attribute.display_name" v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]" class="ui fluid dropdown" :class="attribute.input_class">
|
288
288
|
<option v-for="option in attribute.options" :value="option.value" v-text="option.text"></option>
|
289
289
|
</select>
|
290
|
-
<select :id="'model_' + attribute.display_name" v-else v-model="model[attribute.name]" class="ui fluid dropdown">
|
290
|
+
<select :id="'model_' + attribute.display_name" v-else v-model="model[attribute.name]" class="ui fluid dropdown" :class="attribute.input_class">
|
291
291
|
<option v-for="option in attribute.options" :value="option.value" v-text="option.text"></option>
|
292
292
|
</select>
|
293
293
|
<div class="ui pointing red basic label" v-show="errors[attribute.name]">
|
@@ -298,10 +298,10 @@ $(document).ready(function() {
|
|
298
298
|
</div>
|
299
299
|
<div class="field" v-if="attribute.type == 'multiSelect'">
|
300
300
|
<label :for="'model_' + attribute.display_name">{{ attribute.display_name }}</label>
|
301
|
-
<select :id="'model_' + attribute.display_name" multiple v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]" class="ui fluid dropdown">
|
301
|
+
<select :id="'model_' + attribute.display_name" multiple v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]" class="ui fluid dropdown" :class="attribute.input_class">
|
302
302
|
<option v-for="option in attribute.options" :value="option.value" v-text="option.text"></option>
|
303
303
|
</select>
|
304
|
-
<select :id="'model_' + attribute.display_name" multiple v-else v-model="model[attribute.name]" class="ui fluid dropdown">
|
304
|
+
<select :id="'model_' + attribute.display_name" multiple v-else v-model="model[attribute.name]" class="ui fluid dropdown" :class="attribute.input_class">
|
305
305
|
<option v-for="option in attribute.options" :value="option.value" v-text="option.text"></option>
|
306
306
|
</select>
|
307
307
|
<div class="ui pointing red basic label" v-show="errors[attribute.name]">
|
@@ -312,8 +312,8 @@ $(document).ready(function() {
|
|
312
312
|
</div>
|
313
313
|
<div class="field" v-if="attribute.type == 'textarea'">
|
314
314
|
<label :for="'model_' + attribute.display_name">{{ attribute.display_name }}</label>
|
315
|
-
<textarea :id="'model_' + attribute.display_name" v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]"></textarea>
|
316
|
-
<textarea :id="'model_' + attribute.display_name" v-else v-model="model[attribute.name]"></textarea>
|
315
|
+
<textarea :id="'model_' + attribute.display_name" v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]" :class="attribute.input_class"></textarea>
|
316
|
+
<textarea :id="'model_' + attribute.display_name" v-else v-model="model[attribute.name]" :class="attribute.input_class"></textarea>
|
317
317
|
<div class="ui pointing red basic label" v-show="errors[attribute.name]">
|
318
318
|
<span style="color: red" v-for="(error, index) in errors[attribute.name]">
|
319
319
|
<span v-if="index > 0">,</span> {{ error }}
|
@@ -323,8 +323,8 @@ $(document).ready(function() {
|
|
323
323
|
|
324
324
|
<div class="field" v-if="attribute.type == 'checkbox'">
|
325
325
|
<div class="ui toggle checkbox">
|
326
|
-
<input type="checkbox" tabindex="0" class="hidden" :id="'model_' + attribute.display_name" v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]">
|
327
|
-
<input type="checkbox" tabindex="0" class="hidden" :id="'model_' + attribute.display_name" v-else v-model="model[attribute.name]">
|
326
|
+
<input type="checkbox" tabindex="0" class="hidden" :id="'model_' + attribute.display_name" v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]" :class="attribute.input_class">
|
327
|
+
<input type="checkbox" tabindex="0" class="hidden" :id="'model_' + attribute.display_name" v-else v-model="model[attribute.name]" :class="attribute.input_class">
|
328
328
|
<label>{{ attribute.display_name }}</label>
|
329
329
|
</div>
|
330
330
|
<div class="ui pointing red basic label" v-show="errors[attribute.name]">
|
@@ -335,8 +335,8 @@ $(document).ready(function() {
|
|
335
335
|
</div>
|
336
336
|
<div class="field" v-if="attribute.type != 'select' && attribute.type != 'multiSelect' && attribute.type != 'textarea' && attribute.type != 'checkbox'">
|
337
337
|
<label :for="'model_' + attribute.display_name">{{ attribute.display_name }}</label>
|
338
|
-
<input :type="attribute.type" :id="'model_' + attribute.display_name" v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]">
|
339
|
-
<input :type="attribute.type" :id="'model_' + attribute.display_name" v-else v-model="model[attribute.name]">
|
338
|
+
<input :type="attribute.type" :id="'model_' + attribute.display_name" v-if="attribute.model_prefix" v-model="model[attribute.model_prefix][attribute.name]" :class="attribute.input_class">
|
339
|
+
<input :type="attribute.type" :id="'model_' + attribute.display_name" v-else v-model="model[attribute.name]" :class="attribute.input_class">
|
340
340
|
<div class="ui pointing red basic label" v-show="errors[attribute.name]">
|
341
341
|
<span style="color: red" v-for="(error, index) in errors[attribute.name]">
|
342
342
|
<span v-if="index > 0">,</span> {{ error }}
|
data/lib/vue_crud/version.rb
CHANGED
@@ -208,9 +208,9 @@ function vue_init(params = {}) {
|
|
208
208
|
computed: {
|
209
209
|
searchStatus: function() {
|
210
210
|
if (this.is_calculating) {
|
211
|
-
return '
|
211
|
+
return '處理中...'
|
212
212
|
} else {
|
213
|
-
return '✓
|
213
|
+
return '✓ 完成';
|
214
214
|
}
|
215
215
|
},
|
216
216
|
pageStart: function() {
|
@@ -300,11 +300,11 @@ $(document).ready(function() {
|
|
300
300
|
onShow: function() {
|
301
301
|
$(this).find('select.ui.dropdown').dropdown();
|
302
302
|
$(this).find('.ui.checkbox').checkbox();
|
303
|
-
if(modalOpen !== undefined) modalOpen();
|
303
|
+
if(typeof modalOpen !== "undefined") modalOpen(this);
|
304
304
|
},
|
305
305
|
onHide: function() {
|
306
306
|
event_hub.$emit('cancel_customMode');
|
307
|
-
if(modalClose !== undefined) modalClose();
|
307
|
+
if(typeof modalClose !== "undefined") modalClose(this);
|
308
308
|
}
|
309
309
|
}).modal('show');
|
310
310
|
});
|
data/vue_crud-0.1.9.gem
ADDED
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.9
|
4
|
+
version: 0.1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donald Chiang
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- vue_crud-0.1.6.gem
|
83
83
|
- vue_crud-0.1.7.gem
|
84
84
|
- vue_crud-0.1.8.gem
|
85
|
+
- vue_crud-0.1.9.gem
|
85
86
|
- vue_crud.gemspec
|
86
87
|
homepage: http://www.mynet.com.tw
|
87
88
|
licenses:
|