Subversion Repositories oidplus

Rev

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

Rev 150 Rev 154
Line 69... Line 69...
69
        return (goto != null) ? "ajax.php?action=tree_load&goto="+encodeURIComponent(goto)
69
        return (goto != null) ? "ajax.php?action=tree_load&goto="+encodeURIComponent(goto)
70
                              : "ajax.php?action=tree_load";
70
                              : "ajax.php?action=tree_load";
71
}
71
}
72
 
72
 
73
function reloadContent() {
73
function reloadContent() {
74
        // document.location = "?goto="+encodeURIComponent(current_node);
74
        // window.location.href = "?goto="+encodeURIComponent(current_node);
75
        openOidInPanel(current_node, false);
75
        openOidInPanel(current_node, false);
76
        $('#oidtree').jstree("refresh");
76
        $('#oidtree').jstree("refresh");
77
}
77
}
78
 
78
 
79
function x_rec(x_data, i) {
79
function x_rec(x_data, i) {
Line 222... Line 222...
222
                }
222
                }
223
        });
223
        });
224
}
224
}
225
 
225
 
226
function crudActionSendInvitation(origin, email) {
226
function crudActionSendInvitation(origin, email) {
227
        // document.location = "?goto=oidplus:invite_ra$"+encodeURIComponent(email)+"$"+encodeURIComponent(origin);
227
        // window.location.href = "?goto=oidplus:invite_ra$"+encodeURIComponent(email)+"$"+encodeURIComponent(origin);
228
        openOidInPanel('oidplus:invite_ra$'+email+'$'+origin, false);
228
        openOidInPanel('oidplus:invite_ra$'+email+'$'+origin, false);
229
}
229
}
230
 
230
 
231
function crudActionInsert(parent) {
231
function crudActionInsert(parent) {
232
        $.ajax({
232
        $.ajax({
Line 345... Line 345...
345
                success:function(data) {
345
                success:function(data) {
346
                        if ("error" in data) {
346
                        if ("error" in data) {
347
                                alert("Error: " + data.error);
347
                                alert("Error: " + data.error);
348
                        } else if (data.status == 0) {
348
                        } else if (data.status == 0) {
349
                                alert("Done.");
349
                                alert("Done.");
350
                                if (goto != null) document.location = "?goto="+encodeURIComponent(goto);
350
                                if (goto != null) window.location.href = "?goto="+encodeURIComponent(goto);
351
                                // reloadContent();
351
                                // reloadContent();
352
                        } else {
352
                        } else {
353
                                alert("Error: " + data.error);
353
                                alert("Error: " + data.error);
354
                        }
354
                        }
355
                }
355
                }
Line 362... Line 362...
362
                $('#oidtree').jstree('open_node', parentID, function(e, data) { // open parent node
362
                $('#oidtree').jstree('open_node', parentID, function(e, data) { // open parent node
363
                        if ($('#oidtree').jstree(true).get_node(childID)) { // is the child there?
363
                        if ($('#oidtree').jstree(true).get_node(childID)) { // is the child there?
364
                                $('#oidtree').jstree('deselect_all').jstree('select_node', childID); // select it
364
                                $('#oidtree').jstree('deselect_all').jstree('select_node', childID); // select it
365
                        } else {
365
                        } else {
366
                                // This can happen if the content page contains brand new items which are not in the treeview yet
366
                                // This can happen if the content page contains brand new items which are not in the treeview yet
367
                                document.location = "?goto="+encodeURIComponent(childID);
367
                                window.location.href = "?goto="+encodeURIComponent(childID);
368
                        }
368
                        }
369
                }, true);
369
                }, true);
370
        } else {
370
        } else {
371
                // This should usually not happen
371
                // This should usually not happen
372
                document.location = "?goto="+encodeURIComponent(childID);
372
                window.location.href = "?goto="+encodeURIComponent(childID);
373
        }
373
        }
374
}
374
}
375
 
375
 
376
$(window).on("popstate", function(e) {
376
$(window).on("popstate", function(e) {
377
        popstate_running = true;
377
        popstate_running = true;