127 url: url, |
127 url: url, |
128 cache: false, |
128 cache: false, |
129 data: data, |
129 data: data, |
130 type: 'POST', |
130 type: 'POST', |
131 success: function(data, status, xhr) { |
131 success: function(data, status, xhr) { |
132 commit(true); |
132 if (data.error) { |
|
133 console.log('delete: ' + data.msg); |
|
134 alert('Fout: ' + data.msg); |
|
135 } else { |
|
136 console.log('delete: success'); |
|
137 } |
|
138 //commit(true); |
133 location.reload(true); |
139 location.reload(true); |
134 }, |
140 }, |
135 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
141 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
136 }); |
142 }); |
137 }, |
143 }, |
142 url: url, |
148 url: url, |
143 cache: false, |
149 cache: false, |
144 data: data, |
150 data: data, |
145 type: 'POST', |
151 type: 'POST', |
146 success: function(data, status, xhr) { |
152 success: function(data, status, xhr) { |
147 commit(true); |
153 if (data.error) { |
|
154 console.log('insert: ' + data.msg); |
|
155 alert('Fout: ' + data.msg); |
|
156 } else { |
|
157 console.log('insert: success'); |
|
158 } |
148 location.reload(true); |
159 location.reload(true); |
149 }, |
160 }, |
150 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
161 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
151 }); |
162 }); |
152 }, |
163 }, |
156 dataType: 'json', |
167 dataType: 'json', |
157 url: url, |
168 url: url, |
158 cache: false, |
169 cache: false, |
159 data: data, |
170 data: data, |
160 type: 'POST', |
171 type: 'POST', |
161 success: function(data, status, xhr) { |
172 success: function(data) { |
162 commit(true); |
173 if (data.error) { |
|
174 console.log('updaterow: ' + data.msg); |
|
175 alert('Fout: ' + data.msg); |
|
176 } else { |
|
177 console.log('updaterow: success'); |
|
178 } |
|
179 //commit(true); |
163 location.reload(true); |
180 location.reload(true); |
164 }, |
181 }, |
165 error: function(jqXHR, textStatus, errorThrown) { commit(false); } |
182 error: function(jqXHR, textStatus, errorThrown) { console.log('updaterow: ' + textStatus); commit(false); } |
166 }); |
183 }); |
167 } |
184 } |
168 }, |
185 }, |
169 dataAdapter = new $.jqx.dataAdapter(source), |
186 dataAdapter = new $.jqx.dataAdapter(source), |
170 editrow = -1; |
187 editrow = -1; |