回答編集履歴
3
修正
test
CHANGED
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
submitFormHandlerWithUpload(location.href, 'postProjectForm', 'Please wait..', function (data) {
|
68
68
|
|
69
|
-
if (data.redirect != null
|
69
|
+
if (data.redirect != null && data.redirect !== '') {
|
70
70
|
|
71
71
|
setTimeout(function () {
|
72
72
|
|
@@ -92,7 +92,7 @@
|
|
92
92
|
|
93
93
|
|
94
94
|
|
95
|
-
※ 外側の `$(function() { ... });` で囲っている部分は、すでにもしこれが存在しているのであれば改めて囲う必要はありません。
|
95
|
+
※ 外側の `$(function () { ... });` で囲っている部分は、すでにもしこれが存在しているのであれば改めて囲う必要はありません。
|
96
96
|
|
97
97
|
|
98
98
|
|
2
修正
test
CHANGED
@@ -93,3 +93,7 @@
|
|
93
93
|
|
94
94
|
|
95
95
|
※ 外側の `$(function() { ... });` で囲っている部分は、すでにもしこれが存在しているのであれば改めて囲う必要はありません。
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
※ 一応 `data-ele` 属性を自分で定義しましたが、ライブラリ側で勝手にボタンに付与してくれるのであればこれも書く必要はありません。
|
1
追記
test
CHANGED
@@ -11,3 +11,85 @@
|
|
11
11
|
</button>
|
12
12
|
|
13
13
|
```
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
---
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
【追記】
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
```html
|
26
|
+
|
27
|
+
<button type="button" class="btn" data-ele="finish">
|
28
|
+
|
29
|
+
投稿する
|
30
|
+
|
31
|
+
</button>
|
32
|
+
|
33
|
+
```
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
```js
|
40
|
+
|
41
|
+
$(function () {
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
$('[data-ele="finish"]').click(function () {
|
46
|
+
|
47
|
+
if (!$('#postProjectForm').isValid()) {
|
48
|
+
|
49
|
+
return;
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
if ($('#fileupload').fileupload('active') > 0) {
|
54
|
+
|
55
|
+
toastr.error('Uploads are still in progress. Please wait a little more, enjoy a sip of coffee instead.');
|
56
|
+
|
57
|
+
return;
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
this.disabled = true;
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
submitFormHandlerWithUpload(location.href, 'postProjectForm', 'Please wait..', function (data) {
|
68
|
+
|
69
|
+
if (data.redirect != null || data.redirect !== '') {
|
70
|
+
|
71
|
+
setTimeout(function () {
|
72
|
+
|
73
|
+
location.href = data.redirect;
|
74
|
+
|
75
|
+
}, 500);
|
76
|
+
|
77
|
+
}
|
78
|
+
|
79
|
+
});
|
80
|
+
|
81
|
+
});
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
});
|
86
|
+
|
87
|
+
```
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
これでどうですか?依然として見えない部分が多いのでだいぶ推測で書いていますが…
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
※ 外側の `$(function() { ... });` で囲っている部分は、すでにもしこれが存在しているのであれば改めて囲う必要はありません。
|