GprsController.js 1.13 KB
Ext.define('App.controller.Gprs', {
    extend : 'Ext.app.Controller',
    
    init : function() {
 
    	this.control({
    		'toolbar  button[action=saveGprs]' : {
                click : this.saveGprs
            },
            
            'toolbar  button[action=loadGprs]' : {
                click : this.loadGprs
            }
            
        });
    	
    
   	
    	
    this.loadGprs();
    	
    
    },
    
    loadGprs:function() {
    	
    	 Ext.Ajax.request({
        	  method: "GET",
              url: 'api/devcontrol/dateinfo',
              headers: {
                  'Accept': 'application/json',
                  'Content-Type': 'application/json'
              },
         
              success: function(response, opts) {
             	 
             	var result = Ext.JSON.decode(response.responseText);
             
            
             //	Ext.getCmp('dtCurrent').setValue(result.dt);
             //	Ext.getCmp('ntpServer').setValue(result.ntp);
             			
              }, failure: function(response, opts) {
              }
         });
    	
    	
    	
    }
    
   
    
    });