PageSourceSearch

https://www.dgca.gov.in/digigov-portal/assets/DGCA/script/custom-datatable.js?v=1.24

js dgca.gov.in collected 2026-09-24 18:35:39 UTC 5,569 bytes, 148 lines download raw bytes

1var dynamic_checkbox_checked;
2var table;
3/*$.fn.dataTable.moment( 'DD-MM-YYYY' );
4$.fn.dataTable.moment( 'DD.MM.YYYY' );
5$.fn.dataTable.moment( 'DD/MM/YYYY HH:mm:ss' );*/
6function customDatatable(f){
7
8	var fixedTable = $('.datatable-module-fixedColumn').length; 
9	var loadcontent = $(".datatable-module").parents(".loadContent").length;
10	var disableSort = $(".datatable-module").parents(".disableSort").length;
11	var rowCountDropdown = $(".datatable-module").parent(".rowCountDropdown").length;
12	if(fixedTable){
13		table = $('.datatable-module').DataTable({
14			"destroy": true,
15			"scrollX": true,
16			"ordering": false,
17			scrollCollapse: true,
18			fixedColumns:   {
19	            leftColumns: f
20	        },
21	        drawCallback: function(){
22	        	if($(".datatable-module").hasClass("datatable-module-fixedColumn")){
23	        		$('.paginate_button', this.api().table().container())          
24		               .on('click', function(e){
25		            	   $(".selectall").prop('checked', false);
26		            	   $(dynamic_checkbox_checked).find('input').prop('checked', false);
27		            	   e.stopPropagation();
28		               }); 
29		            $('th', this.api().table().container())          
30		               .on('click', function(e){
31		            	   $(".selectall").prop('checked', false);
32		            	   $(dynamic_checkbox_checked).find('input').prop('checked', false);
33		            	   e.stopPropagation();
34		               });
35		            $('.selectall', this.api().table().container())          
36		               .on('click', function(e){
37		            	if ($(this).is(':checked')) 
38		            	{
39		            		if(!$("input").is(':disabled'))
40		            			$('input').prop('checked', true);
41		            		else
42		            		{
43		            			alert("You cannot use 'Select All' when any of the entries are disabled! (To enable those entries Pro-forma should be filled and approved)");
44		            			$('input').prop('checked', false);
45		            		}
46		           	    } else {
47		           	        $('input').prop('checked', false);
48		           	    }
49		           	    e.stopPropagation();
50		               });
51		       }
52	         },
53			//"scrollY": '60vh',
54			dom: "<'row'<'col-sm-12'f>>" + "<'row'<'col-sm-12'tr>>" + 
55		    	"<'row'<'col-xl-8 col-lg-8 col-md-12  col-sm-12  'p><'col-xl-3 col-lg-3 col-md-12  col-sm-12 d-flex 'i>>",
56				"oLanguage": {
57			    	"sLengthMenu": "Items per page _MENU_",
58			    	 "sInfo": "Showing _START_ to _END_ of <span> _TOTAL_ items </span>",
59			    "oPaginate": {
60				        "sPrevious": " ",
61				        "sNext": " ",
62				        "sLast" : " ",
63				        "sFirst": " ",
64				      }
65		    	},
66		    	/*lengthMenu: [
67		            [ 5, 25, 50, -1 ],
68		            [ '5 rows', '25 rows', '50 rows', 'Show all' ]
69		        ],*/
70		    	"sPaginationType": "full_numbers",
71		  		//"sPaginationType": "listbox",
72			   //"responsive": true,
73			  })
74	}
75	else if(loadcontent || disableSort){
76		table = $('.datatable-module').DataTable({
77			"destroy": true,
78			"scrollX": true,
79			"ordering": false,
80			dom: "<'row'<'col-sm-12'f>>" + "<'row'<'col-sm-12'tr>>" + 
81		    	"<'row'<'col-xl-8 col-lg-8 col-md-12  col-sm-12  'p><'col-xl-3 col-lg-3 col-md-12  col-sm-12 d-flex 'i>>",
82				"oLanguage": {
83			    	"sLengthMenu": "Items per page _MENU_",
84			    	 "sInfo": "Showing _START_ to _END_ of <span> _TOTAL_ items </span>",
85			    "oPaginate": {
86				        "sPrevious": " ",
87				        "sNext": " ",
88				        "sLast" : " ",
89				        "sFirst": " ",
90				      }
91		    	},
92		    	"sPaginationType": "full_numbers",
93		  		})
94	}
95	else if(rowCountDropdown){
96		table = $('.datatable-module').DataTable({
97			"destroy": true,
98			"scrollX": true,
99			dom: "<'row align-items-center'<'col-xl-4 col-lg-4  col-md-6  col-sm-6  'l><'col-xl-8 col-lg-8 col-md-6  col-sm-6 'f>>" + 
100			"<'row'<'col-sm-12'tr>>" + 
101	    	"<'row'<'col-xl-8 col-lg-8 col-md-12  col-sm-12  'p><'col-xl-3 col-lg-3 col-md-12  col-sm-12 d-flex 'i>>",
102			"oLanguage": {
103			    	"sLengthMenu": "Items per page _MENU_",
104			    	 "sInfo": "Showing _START_ to _END_ of <span> _TOTAL_ items </span>",
105			    "oPaginate": {
106				        "sPrevious": " ",
107				        "sNext": " ",
108				        "sLast" : " ",
109				        "sFirst": " ",
110				      }
111		    	},
112		    	"sPaginationType": "full_numbers",
113		  		})
114	}
115	else{
116		table = $('.datatable-module').DataTable({
117			"destroy": true,
118			"scrollX": true,
119			dom: "<'row'<'col-sm-12'f>>" + "<'row'<'col-sm-12'tr>>" + 
120		    	"<'row'<'col-xl-8 col-lg-8 col-md-12  col-sm-12  'p>
120<'col-xl-3 col-lg-3 col-md-12  col-sm-12 d-flex 'i>>",
121				"oLanguage": {
122			    	"sLengthMenu": "Items per page _MENU_",
123			    	 "sInfo": "Showing _START_ to _END_ of <span> _TOTAL_ items </span>",
124			    "oPaginate": {
125				        "sPrevious": " ",
126				        "sNext": " ",
127				        "sLast" : " ",
128				        "sFirst": " ",
129				      }
130		    	},
131		    	"sPaginationType": "full_numbers",
132		  		})
133	}
134	
135		  
136		  //added for view elogbook 
137		  //get all tr inside datatable
138		   dynamic_checkbox_checked =table.rows().nodes();
139		   if($(".datatable-module").hasClass("datatable-module-fixedColumn")){
140			   $(".selectall").prop('checked', false);
141			   $(dynamic_checkbox_checked).find('input').prop('checked', false);
142		   }
143		   
144		  
145		/* dynamic_checkbox_checked =table.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
146			return;
147		})*/	
148}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.