112 dataType: 'json', |
112 dataType: 'json', |
113 url: url, |
113 url: url, |
114 cache: false, |
114 cache: false, |
115 data: data, |
115 data: data, |
116 type: 'POST', |
116 type: 'POST', |
117 success: function(data, status, xhr) { |
117 success: function(data) { |
118 commit(true); |
118 if (data.error) { |
|
119 console.log('delete: ' + data.msg); |
|
120 alert('Fout: ' + data.msg); |
|
121 } else { |
|
122 console.log('delete: success'); |
|
123 } |
119 location.reload(true); |
124 location.reload(true); |
120 }, |
125 }, |
121 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
126 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
122 }); |
127 }); |
123 }, |
128 }, |
127 dataType: 'json', |
132 dataType: 'json', |
128 url: url, |
133 url: url, |
129 cache: false, |
134 cache: false, |
130 data: data, |
135 data: data, |
131 type: 'POST', |
136 type: 'POST', |
132 success: function(data, status, xhr) { |
137 success: function(data) { |
133 commit(true); |
138 if (data.error) { |
|
139 console.log('insert: ' + data.msg); |
|
140 alert('Fout: ' + data.msg); |
|
141 } else { |
|
142 console.log('insert: success'); |
|
143 } |
134 location.reload(true); |
144 location.reload(true); |
135 }, |
145 }, |
136 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
146 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
137 }); |
147 }); |
138 }, |
148 }, |
142 dataType: 'json', |
152 dataType: 'json', |
143 url: url, |
153 url: url, |
144 cache: false, |
154 cache: false, |
145 data: data, |
155 data: data, |
146 type: 'POST', |
156 type: 'POST', |
147 success: function(data, status, xhr) { |
157 success: function(data) { |
148 commit(true); |
158 if (data.error) { |
|
159 console.log('updaterow: ' + data.msg); |
|
160 alert('Fout: ' + data.msg); |
|
161 } else { |
|
162 console.log('updaterow: success'); |
|
163 } |
149 location.reload(true); |
164 location.reload(true); |
150 }, |
165 }, |
151 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
166 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
152 }); |
167 }); |
153 } |
168 } |