 /*+*******************************************************************************
 * The content of this file is subject to the CRMTiger Pro license.
 * ("License"); You may not use this file except in compliance with the License
 * The Initial Developer of the Original Code is vTiger
 * The Modified Code of the Original Code owned by https://crmtiger.com/
 * Portions created by CRMTiger.com are Copyright(C) CRMTiger.com
 * All Rights Reserved.
  ***************************************************************************** */
jQuery.Class("CTMobileSettings_TimeTrackingModule_Js",{
    editInstance:false,
    getInstance: function(){
        if(CTMobileSettings_TimeTrackingModule_Js.editInstance == false){
            var instance = new CTMobileSettings_Settings_Js();
            CTMobileSettings_TimeTrackingModule_Js.editInstance = instance;
            return instance;
        }
        return CTMobileSettings_TimeTrackingModule_Js.editInstance;
    }
},{ 
    registerSaveSettings:function() {
        jQuery(".btnSaveModule").on("click", function(e) {
            var moduleList = jQuery('#moduleFields').val();
            var progressIndicatorElement = jQuery.progressIndicator();
            var params= {
                "module" : "CTMobileSettings",
                "action" :"SaveTimeTrackerSettings",
                "moduleList" : moduleList,
            };
            AppConnector.request(params).then(function(data){
                progressIndicatorElement.progressIndicator({'mode' : 'hide'});
                var params = {
                   title : app.vtranslate('CTMobile Time Tracking Modules Save Successfully'),
                   text: app.vtranslate("CTMobile Time Tracking Modules Save Successfully"),
                   animation: 'show',
                   type: 'info'
                };
                Vtiger_Helper_Js.showPnotify(params);
            });
        });
    },

   
    registerEvents : function() {
        this.registerSaveSettings(); 
    }
});

