[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
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 10 Vtiger_List_Js("Settings_Vtiger_List_Js",{ 11 12 triggerDelete : function(event,url){ 13 event.stopPropagation(); 14 var instance = Vtiger_List_Js.getInstance(); 15 instance.DeleteRecord(url); 16 } 17 },{ 18 19 /* 20 * Function to register the list view delete record click event 21 */ 22 DeleteRecord: function(url){ 23 var thisInstance = this; 24 var css = jQuery.extend({'text-align' : 'left'},css); 25 26 AppConnector.request(url).then( 27 function(data) { 28 if(data) { 29 app.showModalWindow(data,function(container){ 30 thisInstance.postDeleteAction(container); 31 }); 32 } 33 }, 34 function(error,err){ 35 36 } 37 ); 38 }, 39 40 /** 41 * Function to load list view after deletion of record from list view 42 */ 43 postDeleteAction : function(container){ 44 var thisInstance = this; 45 var deleteConfirmForm = jQuery(container).find('#DeleteModal'); 46 deleteConfirmForm.on('submit', function(e){ 47 e.preventDefault(); 48 var deleteActionUrl = deleteConfirmForm.serializeFormData(); 49 AppConnector.request(deleteActionUrl).then( 50 function() { 51 app.hideModalWindow(); 52 var params = { 53 text: app.vtranslate('JS_RECORD_DELETED_SUCCESSFULLY') 54 }; 55 Settings_Vtiger_Index_Js.showMessage(params); 56 jQuery('#recordsCount').val(''); 57 jQuery('#totalPageCount').text(''); 58 thisInstance.getListViewRecords().then(function(){ 59 thisInstance.updatePagination(); 60 }); 61 }, 62 function(error,err){ 63 app.hideModalWindow(); 64 } 65 ); 66 }) 67 }, 68 69 /** 70 * Function to get Page Jump Params 71 */ 72 getPageJumpParams : function(){ 73 var module = app.getModuleName(); 74 var cvId = this.getCurrentCvId(); 75 var pageCountParams = { 76 'module' : module, 77 'parent' : "Settings", 78 'action' : "ListAjax", 79 'mode' : "getPageCount", 80 "viewname": cvId 81 } 82 var sourceModule = jQuery('#moduleFilter').val(); 83 if(typeof sourceModule != 'undefined'){ 84 pageCountParams['sourceModule'] = sourceModule; 85 } 86 return pageCountParams; 87 }, 88 89 registerEvents : function() { 90 //this.triggerDisplayTypeEvent(); 91 this.registerRowClickEvent(); 92 this.registerHeadersClickEvent(); 93 this.registerPageNavigationEvents(); 94 this.registerEventForTotalRecordsCount(); 95 } 96 });
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |