partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

PartKeeprSetup.js (1452B)


      1 Ext.application({
      2     name: 'PartKeeprSetup',
      3     launch: function ()
      4     {
      5         PartKeeprSetup.application = this;
      6         this.createLayout();
      7     },
      8     setupConfig: {},
      9     /**
     10      * Creates the main viewport
     11      */
     12     createLayout: function ()
     13     {
     14         var initialConfig = {
     15             values: {
     16                 database_driver: "",
     17                 database_host: "",
     18                 database_port: "",
     19                 database_name: "",
     20                 database_user: "",
     21                 database_password: "",
     22                 authentication_provider: "PartKeepr.Auth.HTTPBasicAuthenticationProvider",
     23                 locale: "en"
     24             },
     25             adminuser: {
     26                 username: "",
     27                 password: "",
     28                 email: ""
     29             },
     30             createUser: false,
     31             legacyAuth: false,
     32             existingUsers: 0,
     33             legacyUsers: 0,
     34             authKey: ""
     35         };
     36 
     37         Ext.apply(this.setupConfig, initialConfig);
     38 
     39         var win = Ext.create("Ext.window.Window", {
     40             layout: "fit",
     41             constrain: true,
     42             title: "PartKeepr Setup",
     43             items: Ext.create("PartKeeprSetup.SetupWizard")
     44         });
     45 
     46         win.show();
     47     },
     48     getSetupConfig: function ()
     49     {
     50         return this.setupConfig;
     51 
     52     },
     53     statics: {
     54         getApplication: function ()
     55         {
     56             return PartKeeprSetup.application;
     57         }
     58     }
     59 });