Rev 752 | Rev 962 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 752 | Rev 833 | ||
---|---|---|---|
Line 104... | Line 104... | ||
104 | weid:($("#weid")[0] ? $("#weid")[0].checked : null), |
104 | weid:($("#weid")[0] ? $("#weid")[0].checked : null), |
105 | parent:parent |
105 | parent:parent |
106 | }, |
106 | }, |
107 | error:function(jqXHR, textStatus, errorThrown) { |
107 | error:function(jqXHR, textStatus, errorThrown) { |
108 | if (errorThrown == "abort") return; |
108 | if (errorThrown == "abort") return; |
109 | alert(_L("Error: %1",errorThrown)); |
109 | alertError(_L("Error: %1",errorThrown)); |
110 | }, |
110 | }, |
111 | success:function(data) { |
111 | success:function(data) { |
112 | if ("error" in data) { |
112 | if ("error" in data) { |
113 | alert(_L("Error: %1",data.error)); |
113 | alertError(_L("Error: %1",data.error)); |
114 | } else if (data.status >= 0) { |
114 | } else if (data.status >= 0) { |
115 | if (data.status == 0/*OK*/) { |
115 | if (data.status == 0/*OK*/) { |
116 | if (confirm(_L("Insert OK.")+"\n\n"+_L("Do you want to open the newly created object now?"))) { |
116 | if (confirm(_L("Insert OK.")+"\n\n"+_L("Do you want to open the newly created object now?"))) { |
117 | openAndSelectNode(data.inserted_id, parent); |
117 | openAndSelectNode(data.inserted_id, parent); |
118 | return; |
118 | return; |
Line 146... | Line 146... | ||
146 | } |
146 | } |
147 | 147 | ||
148 | // TODO: Don't use reloadContent(); instead add a node at the tree at the left add at the right add a new row to the table |
148 | // TODO: Don't use reloadContent(); instead add a node at the tree at the left add at the right add a new row to the table |
149 | reloadContent(); |
149 | reloadContent(); |
150 | } else { |
150 | } else { |
151 | alert(_L("Error: %1",data)); |
151 | alertError(_L("Error: %1",data)); |
152 | } |
152 | } |
153 | } |
153 | } |
154 | }); |
154 | }); |
155 | }, |
155 | }, |
156 | 156 | ||
Line 179... | Line 179... | ||
179 | confidential:($("#hide_"+$.escapeSelector(id))[0] ? $("#hide_"+$.escapeSelector(id))[0].checked : null), |
179 | confidential:($("#hide_"+$.escapeSelector(id))[0] ? $("#hide_"+$.escapeSelector(id))[0].checked : null), |
180 | parent:parent |
180 | parent:parent |
181 | }, |
181 | }, |
182 | error:function(jqXHR, textStatus, errorThrown) { |
182 | error:function(jqXHR, textStatus, errorThrown) { |
183 | if (errorThrown == "abort") return; |
183 | if (errorThrown == "abort") return; |
184 | alert(_L("Error: %1",errorThrown)); |
184 | alertError(_L("Error: %1",errorThrown)); |
185 | }, |
185 | }, |
186 | success:function(data) { |
186 | success:function(data) { |
187 | if ("error" in data) { |
187 | if ("error" in data) { |
188 | alert(_L("Error: %1",data.error)); |
188 | alertError(_L("Error: %1",data.error)); |
189 | } else if (data.status >= 0) { |
189 | } else if (data.status >= 0) { |
190 | if (data.status == 0/*OK*/) { |
190 | if (data.status == 0/*OK*/) { |
191 | alert(_L("Update OK")); |
191 | alertSuccess(_L("Update OK")); |
192 | } |
192 | } |
193 | 193 | ||
194 | if ((data.status & 1) == 1/*RaNotExisting*/) { |
194 | if ((data.status & 1) == 1/*RaNotExisting*/) { |
195 | if (confirm(_L("Update OK. However, the email address you have entered (%1) is not in our system. Do you want to send an invitation, so that the RA can register an account to manage their OIDs?",$("#ra_email_"+$.escapeSelector(id))[0].value))) { |
195 | if (confirm(_L("Update OK. However, the email address you have entered (%1) is not in our system. Do you want to send an invitation, so that the RA can register an account to manage their OIDs?",$("#ra_email_"+$.escapeSelector(id))[0].value))) { |
196 | OIDplusPagePublicObjects.crudActionSendInvitation(parent, $("#ra_email_"+$.escapeSelector(id))[0].value); |
196 | OIDplusPagePublicObjects.crudActionSendInvitation(parent, $("#ra_email_"+$.escapeSelector(id))[0].value); |
197 | return; |
197 | return; |
198 | } |
198 | } |
199 | } |
199 | } |
200 | 200 | ||
201 | if ((data.status & 2) == 2/*RaNotExistingNoInvitation*/) { |
201 | if ((data.status & 2) == 2/*RaNotExistingNoInvitation*/) { |
202 | alert(_L("Update OK")); |
202 | alertSuccess(_L("Update OK")); |
203 | } |
203 | } |
204 | 204 | ||
205 | if ((data.status & 4) == 4/*IsWellKnownOID*/) { |
205 | if ((data.status & 4) == 4/*IsWellKnownOID*/) { |
206 | alert(_L("Update OK. However, the RA and the ASN.1 and IRI identifiers were overwritten, because this OID is a well-known OID.")); |
206 | alertWarning(_L("Update OK. However, the RA and the ASN.1 and IRI identifiers were overwritten, because this OID is a well-known OID.")); |
207 | } |
207 | } |
208 | 208 | ||
209 | // reloadContent(); |
209 | // reloadContent(); |
210 | $('#oidtree').jstree("refresh"); |
210 | $('#oidtree').jstree("refresh"); |
211 | } else { |
211 | } else { |
212 | alert(_L("Error: %1",data)); |
212 | alertError(_L("Error: %1",data)); |
213 | } |
213 | } |
214 | } |
214 | } |
215 | }); |
215 | }); |
216 | }, |
216 | }, |
217 | 217 | ||
Line 235... | Line 235... | ||
235 | id:id, |
235 | id:id, |
236 | parent:parent |
236 | parent:parent |
237 | }, |
237 | }, |
238 | error:function(jqXHR, textStatus, errorThrown) { |
238 | error:function(jqXHR, textStatus, errorThrown) { |
239 | if (errorThrown == "abort") return; |
239 | if (errorThrown == "abort") return; |
240 | alert(_L("Error: %1",errorThrown)); |
240 | alertError(_L("Error: %1",errorThrown)); |
241 | }, |
241 | }, |
242 | success:function(data) { |
242 | success:function(data) { |
243 | if ("error" in data) { |
243 | if ("error" in data) { |
244 | alert(_L("Error: %1",data.error)); |
244 | alertError(_L("Error: %1",data.error)); |
245 | } else if (data.status >= 0) { |
245 | } else if (data.status >= 0) { |
246 | reloadContent(); |
246 | reloadContent(); |
247 | // TODO: Don't use reloadContent(); instead delete node at the left tree and remove the row at the right table |
247 | // TODO: Don't use reloadContent(); instead delete node at the left tree and remove the row at the right table |
248 | } else { |
248 | } else { |
249 | alert(_L("Error: %1",data.error)); |
249 | alertError(_L("Error: %1",data.error)); |
250 | } |
250 | } |
251 | } |
251 | } |
252 | }); |
252 | }); |
253 | }, |
253 | }, |
254 | 254 | ||
Line 272... | Line 272... | ||
272 | //description:($("#description")[0] ? $("#description")[0].value : null) |
272 | //description:($("#description")[0] ? $("#description")[0].value : null) |
273 | description:tinyMCE.get('description').getContent() |
273 | description:tinyMCE.get('description').getContent() |
274 | }, |
274 | }, |
275 | error:function(jqXHR, textStatus, errorThrown) { |
275 | error:function(jqXHR, textStatus, errorThrown) { |
276 | if (errorThrown == "abort") return; |
276 | if (errorThrown == "abort") return; |
277 | alert(_L("Error: %1",errorThrown)); |
277 | alertError(_L("Error: %1",errorThrown)); |
278 | }, |
278 | }, |
279 | success:function(data) { |
279 | success:function(data) { |
280 | if ("error" in data) { |
280 | if ("error" in data) { |
281 | alert(_L("Error: %1",data.error)); |
281 | alertError(_L("Error: %1",data.error)); |
282 | } else if (data.status >= 0) { |
282 | } else if (data.status >= 0) { |
283 | alert(_L("Update OK")); |
283 | alertSuccess(_L("Update OK")); |
284 | //reloadContent(); |
284 | //reloadContent(); |
285 | $('#oidtree').jstree("refresh"); |
285 | $('#oidtree').jstree("refresh"); |
286 | var h1s = $("h1"); |
286 | var h1s = $("h1"); |
287 | for (var i = 0; i < h1s.length; i++) { |
287 | for (var i = 0; i < h1s.length; i++) { |
288 | var h1 = h1s[i]; |
288 | var h1 = h1s[i]; |
Line 291... | Line 291... | ||
291 | document.title = combine_systemtitle_and_pagetitle(getOidPlusSystemTitle(), $("#titleedit")[0].value); |
291 | document.title = combine_systemtitle_and_pagetitle(getOidPlusSystemTitle(), $("#titleedit")[0].value); |
292 | 292 | ||
293 | var mce = tinymce.get('description'); |
293 | var mce = tinymce.get('description'); |
294 | if (mce != null) mce.setDirty(false); |
294 | if (mce != null) mce.setDirty(false); |
295 | } else { |
295 | } else { |
296 | alert(_L("Error: %1",data.error)); |
296 | alertError(_L("Error: %1",data.error)); |
297 | } |
297 | } |
298 | } |
298 | } |
299 | }); |
299 | }); |
300 | }, |
300 | }, |
301 | 301 |