Subversion Repositories oidplus

Rev

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

Rev 1036 Rev 1055
Line 311... Line 311...
311
        }
311
        }
312
});
312
});
313
 
313
 
314
$(document).ready(function () {
314
$(document).ready(function () {
315
 
315
 
316
        if ($('#oidtree').length == 0) return; // we are not in the main view (index.php). We might be in oobe.php etc.
-
 
317
 
-
 
318
        executeAllCallbacks(pageLoadedCallbacks.documentReadyBefore);
316
        executeAllCallbacks(pageLoadedCallbacks.documentReadyBefore);
319
 
317
 
320
        /*
318
        /*
321
        window.onbeforeunload = function(e) {
319
        window.onbeforeunload = function(e) {
322
                // TODO: This won't be called because TinyMCE overrides it??
320
                // TODO: This won't be called because TinyMCE overrides it??
Line 337... Line 335...
337
                oidplus_menu_width = oidplus_menu_width_uservalue;
335
                oidplus_menu_width = oidplus_menu_width_uservalue;
338
        }
336
        }
339
 
337
 
340
        // --- JsTree
338
        // --- JsTree
341
 
339
 
342
        $('#oidtree')
340
        if ($('#oidtree').length > 0) $('#oidtree')
343
        .jstree({
341
        .jstree({
344
                plugins: ['massload','search','conditionalselect'],
342
                plugins: ['massload','search','conditionalselect'],
345
                'core' : {
343
                'core' : {
346
                        'data' : {
344
                        'data' : {
347
                                "url" : getTreeLoadURL(),
345
                                "url" : getTreeLoadURL(),
Line 361... Line 359...
361
        })
359
        })
362
        .on('ready.jstree', function (e, data) {
360
        .on('ready.jstree', function (e, data) {
363
                var url = new URL(window.location.href);
361
                var url = new URL(window.location.href);
364
                var goto = url.searchParams.get("goto");
362
                var goto = url.searchParams.get("goto");
365
                if (goto == null) goto = "oidplus:system"; // the page was not called with ?goto=...
363
                if (goto == null) goto = "oidplus:system"; // the page was not called with ?goto=...
366
                $("#gotoedit").val(goto);
364
                if ($('#gotoedit').length > 0) $("#gotoedit").val(goto);
367
 
365
 
368
                // By setting current_node, select_node() will not cause ajax.php?action=get_description to load (since we already loaded the first static content via PHP, for search engines mainly)
366
                // By setting current_node, select_node() will not cause ajax.php?action=get_description to load (since we already loaded the first static content via PHP, for search engines mainly)
369
                // But then we need to set the history state manually
367
                // But then we need to set the history state manually
370
                current_node = goto;
368
                current_node = goto;
371
                window.history.replaceState({
369
                window.history.replaceState({
Line 392... Line 390...
392
                }
390
                }
393
        });
391
        });
394
 
392
 
395
        // --- Layout
393
        // --- Layout
396
 
394
 
397
        $("#system_title_menu")[0].style.display = "block";
395
        if ($('#system_title_menu').length > 0) $("#system_title_menu")[0].style.display = "block";
398
 
396
 
399
        var tmpObjectTree = _L("OBJECT TREE").replace(/(.{1})/g,"$1<br>");
397
        var tmpObjectTree = _L("OBJECT TREE").replace(/(.{1})/g,"$1<br>");
400
        tmpObjectTree = tmpObjectTree.substring(0, tmpObjectTree.length-"<br>".length);
398
        tmpObjectTree = tmpObjectTree.substring(0, tmpObjectTree.length-"<br>".length);
401
 
399
 
402
        $('#oidtree').addClass('ui-layout-west');
400
        if ($('#oidtree').length > 0) $('#oidtree').addClass('ui-layout-west');
403
        $('#content_window').addClass('ui-layout-center');
401
        if ($('#content_window').length > 0) $('#content_window').addClass('ui-layout-center');
404
        $('#system_title_bar').addClass('ui-layout-north');
402
        if ($('#system_title_bar').length > 0) $('#system_title_bar').addClass('ui-layout-north');
405
        glayout = $('#frames').layout({
403
        if ($('#frames').length > 0) glayout = $('#frames').layout({
406
                north__size:                  40,
404
                north__size:                  40,
407
                north__slidable:              false,
405
                north__slidable:              false,
408
                north__closable:              false,
406
                north__closable:              false,
409
                north__resizable:             false,
407
                north__resizable:             false,
410
                west__size:                   oidplus_menu_width,
408
                west__size:                   oidplus_menu_width,
Line 417... Line 415...
417
                west__slideTrigger_open:      "mouseover",
415
                west__slideTrigger_open:      "mouseover",
418
                center__maskContents:         true, // IMPORTANT - enable iframe masking
416
                center__maskContents:         true, // IMPORTANT - enable iframe masking
419
                onresize_start:                           function() { if (typeof handle_glayout_onresize_start == 'function') handle_glayout_onresize_start(); }
417
                onresize_start:               function() { if (typeof handle_glayout_onresize_start == 'function') handle_glayout_onresize_start(); }
420
        });
418
        });
421
 
419
 
-
 
420
        if ($('#gotobox').length == 0) $("#languageBox").css('right', '20px'); // Language Box to the right if there is no goto-box
-
 
421
 
422
        $("#gotobox").addClass("mobilehidden");
422
        if ($('#gotobox').length > 0) $("#gotobox").addClass("mobilehidden");
423
        $("#languageBox").addClass("mobilehidden");
423
        if ($('#languageBox').length > 0) $("#languageBox").addClass("mobilehidden");
424
        $("#gotobox")[0].style.display = "block";
424
        if ($('#gotobox').length > 0) $("#gotobox")[0].style.display = "block";
425
        $('#gotoedit').keypress(function(event) {
425
        if ($('#gotoedit').length > 0) $('#gotoedit').keypress(function(event) {
426
                var keycode = (event.keyCode ? event.keyCode : event.which);
426
                var keycode = (event.keyCode ? event.keyCode : event.which);
427
                if (keycode == '13') {
427
                if (keycode == '13') {
428
                        gotoButtonClicked();
428
                        gotoButtonClicked();
429
                }
429
                }
430
        });
430
        });