Dialog Window API prototype 4 HTML5 web-app

HTML-standard should define the Dialog Window API for browsers. There is the idea of a Universal Dialog Window for application. Positive experiences using Unified Dialog Window for classical applications (text editor - fig 1; vector graphics editor - fig 2; spreadsheet processor - fig 3) and for web- (jQueryUI library - fig 4) and for canvas-applications (Jigrein4WEB - fig 5). Notice - all the dialog boxes have one style.

dwPSPad.png, 24kB

Fig. 1

dwDia.png, 204kB

Fig. 2

dwExcel.png, 42kB

Fig. 3

dwjQueryUI.png, 49kB

Fig. 4. jQuery UI Dialog Window

dwJigrein1.png, 81kB

Fig. 5. Jigrein's Unified Dialog Window. Today, created thousands of mathematical models with different sets of parameters. One Unified Dialog Window allows you to configure all possible parameter sets

I suggest using this Dialog Window (fig 5, 6 and button "showDialogWindow") as a prototype Dialog Window API for the browser.

dwJigrein2.png, 30kB

Fig. 6. If the set a lot of options for change,
Unified Dialog Window should on scrolling

On the other hand dialog window for web-page (window.showModalDialog) causes debate among professionals. For this reason, the standard should define the JSON-object for the browser's Dialog Window API (see javascript-listing below, ShaDialog variable).

// Simple Example
function showDialogWindow2() {
    var hem, attributes,
        ShaDialog = {
            DlgName: "Example",
            pPRMARRAY:
            [
                {
                    defValue: 1,
                    Label: "ampl",
                    Mask: "", // TODO: === input:pattern
                    Name: "Параметр",
                    Prompt: "Значение параметра",
                    Type: 3
                }
            ],
            prmValue: [3.14]
        };
    hem = ((ShaDialog.prmValue.length * 2) + 8) * 0.8;
    attributes = "resizable:1;status:0;center:1;edge:raised;"
        + "dialogTop:;dialogLeft:;dialogHeight:" + hem + "em;dialogWidth:20.0em;";
    // Only IE accepts argument dialogHeight, dialogWidth in [em]
    // This is the HTML5 standard error.
    return window.showModalDialog("JS\\DlgShaPropEm.htm", ShaDialog, attributes);
}

If the Unified Dialog Window has a button to access the wizard (see fig 1, 6, ). The browser's Dialog Window API should call window.showModalDialog. And should not interview user.

20130219


Context Menu API prototype 4 HTML5 web-app