Proxy.js 4.73 KB

Ext.define('App.view.Proxy', {
    extend : 'Ext.form.Panel',
    xtype  : 'mvvm-ProxyView',
    
    width: 550,
    bodyPadding: 10,
    
    
    bbar: {
    	
    	items: [ {
            xtype: 'button',
            iconCls:'save',
            itemId: 'SaveProxyButton',
            text: 'Сохранить',
            action: 'saveProxy',
            disabled:false
        },
        {
            xtype: 'button',
            iconCls:'load',
            itemId: 'LoadProxyButton',
            text: 'Обновить',
            action: 'loadProxy',
            disabled:false
        }
        ]
    	
    	
    },
    
  
    
    
    items: [
            
            {
    xtype:'fieldset',
    checkboxToggle:true,
    itemId:'fshttp',
    title: 'HTTP',
    defaultType: 'textfield',
    collapsed: false,
    layout: 'anchor',
    defaults: {
        anchor: '100%'
    },
    items :[ // HTTP
             {
			        fieldLabel: 'IP адрес',
			        itemId: 'httpAdress',
			        allowBlank:false
			    },{
			        fieldLabel: 'Порт',
			        itemId: 'httpPort',
			        allowBlank:false
			    }, 
			    {
			        xtype:'fieldset',
			        checkboxToggle:true,
			        itemId:'fshttpAuth',
			        title: 'Авторизация',
			        defaultType: 'textfield',
			        collapsed: true,
			        layout: 'anchor',
			        defaults: {
			            anchor: '100%'
			        },
			        items :[{
								fieldLabel: 'Логин',
								itemId: 'httpLogin',
								allowBlank:false
							 },
							 {
								fieldLabel: 'Пароль',
								itemId: 'httpPassword',
								allowBlank:false
						  }]
			    }
			    
			    
			    ]
    		 }, 
    		 
    		 //HTTPS 
    		 
    		 {
    			    xtype:'fieldset',
    			    checkboxToggle:true,
    			    itemId:'fshttps',
    			    title: 'HTTPS',
    			    defaultType: 'textfield',
    			    collapsed: true,
    			    layout: 'anchor',
    			    defaults: {
    			        anchor: '100%'
    			    },
    			    items :[ {
    						        fieldLabel: 'IP адрес',
    						        itemId: 'httpsAdress',
    						        allowBlank:false
    						    },{
    						        fieldLabel: 'Порт',
    						        itemId: 'httpsPort',
    						        allowBlank:false
    						    }, 
    						    {
    						        xtype:'fieldset',
    						        checkboxToggle:true,
    						        itemId:'fshttpsAuth',
    						        title: 'Авторизация',
    						        defaultType: 'textfield',
    						        collapsed: true,
    						        layout: 'anchor',
    						        defaults: {
    						            anchor: '100%'
    						        },
    						        items :[{
    											fieldLabel: 'Логин',
    											itemId: 'httpsLogin',
    											allowBlank:false
    										 },
    										 {
    											fieldLabel: 'Пароль',
    											itemId: 'httpsPassword',
    											allowBlank:false
    									  }]
    						    }
    						    
    						    
    						    ]
    			    		 },
    			    
    			    		 //FTP
    			    		 
    			    		 {
    			    			    xtype:'fieldset',
    			    			    checkboxToggle:true,
    			    			    itemId:'fsftp',
    			    			    title: 'FTP',
    			    			    defaultType: 'textfield',
    			    			    collapsed: true,
    			    			    layout: 'anchor',
    			    			    defaults: {
    			    			        anchor: '100%'
    			    			    },
    			    			    items :[ {
    			    						        fieldLabel: 'IP адрес',
    			    						        itemId: 'ftpAdress',
    			    						        allowBlank:false
    			    						    },{
    			    						        fieldLabel: 'Порт',
    			    						        itemId: 'ftpPort',
    			    						        allowBlank:false
    			    						    }, 
    			    						    {
    			    						        xtype:'fieldset',
    			    						        checkboxToggle:true,
    			    						        title: 'Авторизация',
    			    						        defaultType: 'textfield',
    			    						        itemId:'fsftpAuth',
    			    						        collapsed: true,
    			    						        layout: 'anchor',
    			    						        defaults: {
    			    						            anchor: '100%'
    			    						        },
    			    						        items :[{
    			    											fieldLabel: 'Логин',
    			    											itemId: 'ftpLogin',
    			    											allowBlank:false
    			    										 },
    			    										 {
    			    											fieldLabel: 'Пароль',
    			    											itemId: 'ftpPassword',
    			    											allowBlank:false
    			    									  }]
    			    						    }
    			    						    
    			    						    
    			    						    ]
    			    			    		 }
    ]


   
});