Welcome to mirror list, hosted at ThFree Co, Russian Federation.

querywindow.js « js - github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ba9fe6e18f83d4ddfda32eab417a75b459ca2787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function PMA_queryAutoCommit()
{
    document.getElementById('sqlqueryform').target = window.opener.frame_content.name;
    document.getElementById('sqlqueryform').submit();
    return;
}

function PMA_querywindowCommit(tab)
{
    document.getElementById('hiddenqueryform').querydisplay_tab.value = tab;
    document.getElementById('hiddenqueryform').submit();
    return false;
}

function PMA_querywindowSetFocus()
{
    document.getElementById('sqlquery').focus();
}

function PMA_querywindowResize()
{
    // for Gecko
    if (typeof(self.sizeToContent) == 'function') {
        self.sizeToContent();
        //self.scrollbars.visible = false;
        // give some more space ... to prevent 'fli(pp/ck)ing'
        self.resizeBy(10, 50);
        return;
    }

    // for IE, Opera
    if (document.getElementById && typeof(document.getElementById('querywindowcontainer')) != 'undefined') {

        // get content size
        var newWidth  = document.getElementById('querywindowcontainer').offsetWidth;
        var newHeight = document.getElementById('querywindowcontainer').offsetHeight;

        // set size to contentsize
        // plus some offset for scrollbars, borders, statusbar, menus ...
        self.resizeTo(newWidth + 45, newHeight + 75);
    }
}