1. Sebastian Sdorra
  2. scm-manager

Commits

Sebastian Sdorra  committed f564246

added combobox for python installation

  • Participants
  • Parent commits 04c27b7
  • Branches default

Comments (0)

Files changed (1)

File plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js

View file
  • Ignore whitespace
 Sonia.hg.ConfigWizard = Ext.extend(Ext.Window,{
   
   hgConfig: null,
+  title: 'Mercurial Configuration Wizard',
   
   initComponent: function(){
     
     this.addEvents('finish');
     
     var config = {
+      title: this.title,
       layout: 'fit',
       width: 540,
       height: 320,
       plain: true,
       border: false,
       modal: true,
+      bodyCssClass: 'x-panel-mc',
       items: [{
         id: 'hgConfigWizardPanel',
         xtype: 'hgConfigWizardPanel',
   
   hgConfig: null,
   
-  title: 'Mercurial Configuration Wizard',
-  
   initComponent: function(){
     
     var navHandler = function(direction) {
         url: restUrl + 'config/repositories/hg/installations/hg.json'
       }),
       fields: [ 'path' ],
-      reader: new Sonia.hg.InstallationJsonReader()
+      reader: new Sonia.hg.InstallationJsonReader(),
+      autoLoad: true,
+      autoDestroy: true
     });
     
-    hgInstallationStore.load();
+    var pythonInstallationStore = new Ext.data.Store({
+      proxy: new  Ext.data.HttpProxy({
+        url: restUrl + 'config/repositories/hg/installations/python.json'
+      }),
+      fields: [ 'path' ],
+      reader: new Sonia.hg.InstallationJsonReader(),
+      autoLoad: true,
+      autoDestroy: true
+    });
     
     var config = {
-      title: this.title,
       layout: 'card',
       activeItem: 0,
-      bodyStyle: 'padding:15px',
+      bodyStyle: 'padding: 5px',
       defaults: {
-        border:false
+        bodyCssClass: 'x-panel-mc',
+        border: false
       },
       bbar: ['->',{
         id: 'move-prev',
           valueField: 'path',
           displayField: 'path',
           allowBlank: false
+        },{
+          fieldLabel: 'Python Installation',
+          name: 'python',
+          xtype: 'combo',
+          readOnly: false,
+          triggerAction: 'all',
+          lazyRender: true,
+          mode: 'local',
+          editable: true,
+          store: pythonInstallationStore,
+          valueField: 'path',
+          displayField: 'path',
+          allowBlank: false          
         }]
       },{
         id: 'step-2',