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