[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/layouts/vlayout/modules/Reports/resources/ -> Edit3.js (source)

   1  /*+***********************************************************************************
   2   * The contents of this file are subject to the vtiger CRM Public License Version 1.0
   3   * ("License"); You may not use this file except in compliance with the License
   4   * The Original Code is:  vtiger CRM Open Source
   5   * The Initial Developer of the Original Code is vtiger.
   6   * Portions created by vtiger are Copyright (C) vtiger.
   7   * All Rights Reserved.
   8   *************************************************************************************/
   9  Reports_Edit_Js("Reports_Edit3_Js",{},{
  10      
  11      step3Container : false,
  12      
  13      advanceFilterInstance : false,
  14      
  15      init : function() {
  16          this.initialize();
  17      },
  18      /**
  19       * Function to get the container which holds all the report step3 elements
  20       * @return jQuery object
  21       */
  22      getContainer : function() {
  23          return this.step3Container;
  24      },
  25  
  26      /**
  27       * Function to set the report step3 container
  28       * @params : element - which represents the report step3 container
  29       * @return : current instance
  30       */
  31      setContainer : function(element) {
  32          this.step3Container = element;
  33          return this;
  34      },
  35      
  36      /**
  37       * Function  to intialize the reports step3
  38       */
  39      initialize : function(container) {
  40          if(typeof container == 'undefined') {
  41              container = jQuery('#report_step3');
  42          }
  43          
  44          if(container.is('#report_step3')) {
  45              this.setContainer(container);
  46          }else{
  47              this.setContainer(jQuery('#report_step3'));
  48          }
  49      },
  50      
  51      calculateValues : function(){
  52          //handled advanced filters saved values.
  53          var advfilterlist = this.advanceFilterInstance.getValues();
  54          jQuery('#advanced_filter').val(JSON.stringify(advfilterlist));
  55      },
  56      
  57      registerSubmitEvent : function(){
  58          var thisInstance = this;
  59          var form = this.getContainer();
  60          form.submit(function(e){
  61              thisInstance.calculateValues();
  62          });
  63      },
  64      
  65      registerEvents : function(){
  66          var container = this.getContainer();
  67          app.changeSelectElementView(container);
  68          this.advanceFilterInstance = Vtiger_AdvanceFilter_Js.getInstance(jQuery('.filterContainer',container));
  69          this.registerSubmitEvent();
  70          container.validationEngine();
  71      }
  72  });
  73      
  74  
  75  
  76  


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1