Rev 1410 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1410 | Rev 1447 | ||
---|---|---|---|
Line 107... | Line 107... | ||
107 | }, |
107 | }, |
108 | error: oidplus_ajax_error, |
108 | error: oidplus_ajax_error, |
109 | success: function (data) { |
109 | success: function (data) { |
110 | oidplus_ajax_success(data, function (data) { |
110 | oidplus_ajax_success(data, function (data) { |
111 | 111 | ||
- | 112 | if (typeof data !== "object" || !("status" in data) || data.status < 0) { |
|
- | 113 | console.error(data); |
|
- | 114 | alert("Error: " + data); |
|
- | 115 | } |
|
- | 116 | ||
112 | var message = _L("Insert OK."); |
117 | var message = _L("Insert OK."); |
113 | var isWarning = false; |
118 | var isWarning = false; |
114 | 119 | ||
115 | if ((data.status & 4) == 4/*IsWellKnownOID*/) { |
120 | if ((data.status & 4) == 4/*IsWellKnownOID*/) { |
116 | isWarning = true; |
121 | isWarning = true; |
Line 157... | Line 162... | ||
157 | parent:parent |
162 | parent:parent |
158 | }, |
163 | }, |
159 | error: oidplus_ajax_error, |
164 | error: oidplus_ajax_error, |
160 | success: function (data) { |
165 | success: function (data) { |
161 | oidplus_ajax_success(data, function (data) { |
166 | oidplus_ajax_success(data, function (data) { |
- | 167 | ||
- | 168 | if (typeof data !== "object" || !("status" in data) || data.status < 0) { |
|
- | 169 | console.error(data); |
|
- | 170 | alert("Error: " + data); |
|
- | 171 | } |
|
- | 172 | ||
162 | var message = _L("Update OK"); |
173 | var message = _L("Update OK"); |
163 | var isWarning = false; |
174 | var isWarning = false; |
164 | 175 | ||
165 | if ((data.status & 4) == 4/*IsWellKnownOID*/) { |
176 | if ((data.status & 4) == 4/*IsWellKnownOID*/) { |
166 | isWarning = true; |
177 | isWarning = true; |
Line 209... | Line 220... | ||
209 | parent:parent |
220 | parent:parent |
210 | }, |
221 | }, |
211 | error: oidplus_ajax_error, |
222 | error: oidplus_ajax_error, |
212 | success: function (data) { |
223 | success: function (data) { |
213 | oidplus_ajax_success(data, function (data) { |
224 | oidplus_ajax_success(data, function (data) { |
- | 225 | ||
- | 226 | if (typeof data !== "object" || !("status" in data) || data.status < 0) { |
|
- | 227 | console.error(data); |
|
- | 228 | alert("Error: " + data); |
|
- | 229 | } |
|
- | 230 | ||
214 | reloadContent(); |
231 | reloadContent(); |
215 | // TODO: Don't use reloadContent(); instead delete node at the left tree and remove the row at the right table |
232 | // TODO: Don't use reloadContent(); instead delete node at the left tree and remove the row at the right table |
216 | }); |
233 | }); |
217 | } |
234 | } |
218 | }); |
235 | }); |