91 dataType: 'json', |
91 dataType: 'json', |
92 url: url, |
92 url: url, |
93 cache: false, |
93 cache: false, |
94 data: data, |
94 data: data, |
95 type: 'POST', |
95 type: 'POST', |
96 success: function(data, status, xhr) { |
96 success: function(data) { |
97 commit(true); |
97 if (data.error) { |
|
98 console.log('delete: ' + data.msg); |
|
99 alert('Fout: ' + data.msg); |
|
100 } else { |
|
101 console.log('delete: success'); |
|
102 } |
98 location.reload(true); |
103 location.reload(true); |
99 }, |
104 }, |
100 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
105 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
101 }); |
106 }); |
102 }, |
107 }, |
106 dataType: 'json', |
111 dataType: 'json', |
107 url: url, |
112 url: url, |
108 cache: false, |
113 cache: false, |
109 data: data, |
114 data: data, |
110 type: 'POST', |
115 type: 'POST', |
111 success: function(data, status, xhr) { |
116 success: function(data) { |
112 commit(true); |
117 if (data.error) { |
|
118 console.log('insert: ' + data.msg); |
|
119 alert('Fout: ' + data.msg); |
|
120 } else { |
|
121 console.log('insert: success'); |
|
122 } |
113 location.reload(true); |
123 location.reload(true); |
114 }, |
124 }, |
115 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
125 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
116 }); |
126 }); |
117 }, |
127 }, |
121 dataType: 'json', |
131 dataType: 'json', |
122 url: url, |
132 url: url, |
123 cache: false, |
133 cache: false, |
124 data: data, |
134 data: data, |
125 type: 'POST', |
135 type: 'POST', |
126 success: function(data, status, xhr) { |
136 success: function(data) { |
127 commit(true); |
137 if (data.error) { |
|
138 console.log('updaterow: ' + data.msg); |
|
139 alert('Fout: ' + data.msg); |
|
140 } else { |
|
141 console.log('updaterow: success'); |
|
142 } |
128 location.reload(true); |
143 location.reload(true); |
129 }, |
144 }, |
130 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
145 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
131 }); |
146 }); |
132 } |
147 } |