Subversion Repositories oidplus

Rev

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

Rev 1287 Rev 1289
Line 190... Line 190...
190
        //                            on back-button), although document.title() is
190
        //                            on back-button), although document.title() is
191
        //                            set inside the AJAX-callback [Firefox bug?!]
191
        //                            set inside the AJAX-callback [Firefox bug?!]
192
 
192
 
193
        $('#real_title').html(" ");
193
        $('#real_title').html(" ");
194
        $('#real_content').html(_L("Loading..."));
194
        $('#real_content').html(_L("Loading..."));
195
        $('#static_link').attr("href", "index.php?goto="+encodeURIComponent(id));
195
        $('#static_link').attr("href", oidplus_webpath_absolute_canonical+"?goto="+encodeURIComponent(id));
196
        $("#gotoedit").val(id);
196
        $("#gotoedit").val(id);
197
 
197
 
198
        // Normal opening of a description
198
        // Normal opening of a description
199
        $.ajax({
199
        $.ajax({
200
                url:"ajax.php",
200
                url:"ajax.php",
Line 226... Line 226...
226
 
226
 
227
                                var state = {
227
                                var state = {
228
                                        "node_id":id,
228
                                        "node_id":id,
229
                                        "titleHTML":(data.icon ? '<img src="'+data.icon+'" width="48" height="48" alt="'+data.title.htmlentities()+'"> ' : '') + data.title.htmlentities(),
229
                                        "titleHTML":(data.icon ? '<img src="'+data.icon+'" width="48" height="48" alt="'+data.title.htmlentities()+'"> ' : '') + data.title.htmlentities(),
230
                                        "textHTML":data.text,
230
                                        "textHTML":data.text,
231
                                        "staticlinkHREF":"index.php?goto="+encodeURIComponent(id),
231
                                        "staticlinkHREF":oidplus_webpath_absolute_canonical+"?goto="+encodeURIComponent(id),
232
                                };
232
                                };
233
                                if (current_node != id) {
233
                                if (current_node != id) {
234
                                        window.history.pushState(state, data.title, "?goto="+encodeURIComponent(id));
234
                                        window.history.pushState(state, data.title, "?goto="+encodeURIComponent(id));
235
                                } else {
235
                                } else {
236
                                        window.history.replaceState(state, data.title, "?goto="+encodeURIComponent(id));
236
                                        window.history.replaceState(state, data.title, "?goto="+encodeURIComponent(id));
Line 367... Line 367...
367
                current_node = goto;
367
                current_node = goto;
368
                window.history.replaceState({
368
                window.history.replaceState({
369
                        "node_id":goto,
369
                        "node_id":goto,
370
                        "titleHTML":$('#real_title').html(),
370
                        "titleHTML":$('#real_title').html(),
371
                        "textHTML":$('#real_content').html(),
371
                        "textHTML":$('#real_content').html(),
372
                        "staticlinkHREF":"index.php?goto="+encodeURIComponent(goto),
372
                        "staticlinkHREF":oidplus_webpath_absolute_canonical+"?goto="+encodeURIComponent(goto),
373
                }, $('#real_title').html(), "?goto="+encodeURIComponent(goto));
373
                }, $('#real_title').html(), "?goto="+encodeURIComponent(goto));
374
 
374
 
375
                if (goto != null) data.instance.select_node([goto]);
375
                if (goto != null) data.instance.select_node([goto]);
376
 
376
 
377
                setTimeout(glayoutWorkaroundAC, 100);
377
                setTimeout(glayoutWorkaroundAC, 100);
Line 502... Line 502...
502
function gotoButtonClicked() {
502
function gotoButtonClicked() {
503
        openOidInPanel($("#gotoedit").val(), true);
503
        openOidInPanel($("#gotoedit").val(), true);
504
}
504
}
505
 
505
 
506
function setLanguage(lngid) {
506
function setLanguage(lngid) {
507
        setCookie('LANGUAGE', lngid, 0/*Until browser closes*/, oidplus_webpath);
507
        setCookie('LANGUAGE', lngid, 0/*Until browser closes*/, oidplus_webpath_relative);
508
 
508
 
509
        if (current_node == "") return false; // Happens for Setup. Open URL instead.
509
        if (current_node == "") return false; // Happens for Setup. Open URL instead.
510
 
510
 
511
        $(".lng_flag").each(function(){
511
        $(".lng_flag").each(function(){
512
                $(this).addClass("picture_ghost");
512
                $(this).addClass("picture_ghost");