Beispiel #1
0
 showDialog : function(){
     if(!dialog) {
         var cfg = new MapDialogConfig.MapDialog({
             coords: [47.61357, -122.213516],
             navigateTo: [47.612001, -122.298549]
         }).build();
         dialog = new Dialog(cfg);
         dialog.show();
     }else{
         dialog.show({
             coords: [47.612001, -122.298549],
             navigateTo: [47.61357, -122.213516]
         });
     }
 }
Beispiel #2
0
    //
    // No apps in this folder.
    //
    function noAppsForYou() {
        var menu = this.getChamber('menu');

        // TODO: fix dialog bug so we can separate the addButton.  Right now, it fails for some reason so we have to
        // create one of two different dialog versions

        var dialogConfig;
        if(haveInstallAPI) {
            dialogConfig = new DialogConfig.InfoDialog(
                {
                    title: "No Apps in this category.",
                    text: "Go to the Showroom to install Apps.",
                    hide: function (ev, control, status) {
                        if (status === 'Confirm') {
                            menu.setCurrentNodePath([0]);
                        }
                    }
                }
            ).addButton('Confirm',
                {
                    text: 'Showroom',
                    classNames: ['oc-confirm-button']
                }
            ).addButton('Dismiss',
                {
                    text: 'Close Dialog',
                    timeout: 36000
                }
            ).build();
        }
        else {
            dialogConfig = new DialogConfig.InfoDialog(
                {
                    title: "No Apps in this category.",
                    text: "Visit insidetrack.opencar.com for available applications to download"
                }
            ).addButton('Dismiss',
                {
                    text: 'Close Dialog',
                    timeout: 36000
                }
            ).build();
        }

        noAppsDialog = new Dialog(dialogConfig);
        noAppsDialog.show();
    }