Subversion Repositories oidplus

Rev

Rev 1400 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1400 Rev 1410
Line 106... Line 106...
106
                                parent:parent
106
                                parent:parent
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
                                        var message = _L("Insert OK.");
112
                                        var message = _L("Insert OK.");
112
                                        var isWarning = false;
113
                                        var isWarning = false;
113
 
114
 
114
                                        if ((data.status & 4) == 4/*IsWellKnownOID*/) {
115
                                        if ((data.status & 4) == 4/*IsWellKnownOID*/) {
115
                                                isWarning = true;
116
                                                isWarning = true;
116
                                                message = message + ' ' + _L("However, the RA and the ASN.1 and IRI identifiers were overwritten, because this OID is a well-known OID.");
117
                                                message = message + ' ' + _L("However, the RA and the ASN.1 and IRI identifiers were overwritten, because this OID is a well-known OID.");
117
                                        }
118
                                        }
118
 
119
 
119
                                        if ((data.status & 2) == 2/*RaNotExistingNoInvitation*/) {
-
 
120
                                                //message = _L("Insert OK.");
-
 
121
                                        }
-
 
122
 
-
 
123
                                        message = message + "\n\n";
-
 
124
 
-
 
125
                                        if ((data.status & 1) == 1/*RaNotExisting*/) {
-
 
126
                                                if (confirm(message + _L("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")[0].value))) {
-
 
127
                                                        OIDplusPagePublicObjects.crudActionSendInvitation(parent, $("#ra_email")[0].value);
-
 
128
                                                        return;
-
 
129
                                                }
-
 
130
                                                message = ""; // In the further messages, do not show this part of the message a second time
-
 
131
                                        }
-
 
132
 
-
 
133
                                        if ((data.status & 8) == 8/*HasWriteRights*/) {
-
 
134
                                                if (confirm(message + _L("Do you want to open the newly created object now?"))) {
-
 
135
                                                        openAndSelectNode(data.inserted_id, parent);
-
 
136
                                                        return;
-
 
137
                                                }
-
 
138
                                                message = ""; // In the further messages, do not show this part of the message a second time
-
 
139
                                        }
-
 
140
 
-
 
141
                                        if (message.trim() != "") {
120
                                        if (message.trim() != "") {
142
                                                if (isWarning) {
121
                                                if (isWarning) {
143
                                                        alertWarning(message.trim())
122
                                                        alertWarning(message.trim())
144
                                                } else {
123
                                                } else {
145
                                                        alertSuccess(message.trim());
124
                                                        alertSuccess(message.trim());
146
                                                }
125
                                                }
147
                                        }
126
                                        }
148
 
127
 
149
                                        // 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
-
 
150
                                        reloadContent();
128
                                        openAndSelectNode(data.inserted_id, parent);
151
                                });
129
                                });
152
                        }
130
                        }
153
                });
131
                });
154
        },
132
        },
155
 
133
 
Line 193... Line 171...
193
                                                // message = _L("Update OK");
171
                                                // message = _L("Update OK");
194
                                        }
172
                                        }
195
 
173
 
196
                                        message = message + "\n\n";
174
                                        message = message + "\n\n";
197
 
175
 
198
                                        if ((data.status & 1) == 1/*RaNotExisting*/) {
-
 
199
                                                if (confirm(message + _L("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))) {
-
 
200
                                                        OIDplusPagePublicObjects.crudActionSendInvitation(parent, $("#ra_email_" + $.escapeSelector(id))[0].value);
-
 
201
                                                        return;
-
 
202
                                                }
-
 
203
                                                message = ""; // In the further messages, do not show this part of the message a second time
-
 
204
                                        }
-
 
205
 
-
 
206
                                        //if ((data.status & 8) == 8/*HasWriteRights*/) {
-
 
207
                                        //      if (confirm(message + _L("Do you want to open the updated object now?"))) {
-
 
208
                                        //              openAndSelectNode(id, parent);
-
 
209
                                        //              return;
-
 
210
                                        //      }
-
 
211
                                        //      message = ""; // In the further messages, do not show this part of the message a second time
-
 
212
                                        //}
-
 
213
 
-
 
214
                                        if (message.trim() != "") {
176
                                        if (message.trim() != "") {
215
                                                if (isWarning) {
177
                                                if (isWarning) {
216
                                                        alertWarning(message.trim())
178
                                                        alertWarning(message.trim())
217
                                                } else {
179
                                                } else {
218
                                                        alertSuccess(message.trim());
180
                                                        alertSuccess(message.trim());
Line 294... Line 256...
294
                                });
256
                                });
295
                        }
257
                        }
296
                });
258
                });
297
        },
259
        },
298
 
260
 
299
        crudActionSendInvitation: function(origin, email) {
-
 
300
                // window.location.href = "?goto=oidplus%3Ainvite_ra%24"+encodeURIComponent(email)+"%24"+encodeURIComponent(origin);
-
 
301
                openOidInPanel('oidplus:invite_ra$'+email+'$'+origin, false);
-
 
302
        },
-
 
303
 
-
 
304
        frdl_weid_change: function() {
261
        frdl_weid_change: function() {
305
                var from_base = 36;
262
                var from_base = 36;
306
                var from_control = "#weid";
263
                var from_control = "#weid";
307
                var to_base = 10;
264
                var to_base = 10;
308
                var to_control = "#id";
265
                var to_control = "#id";