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