PageSourceSearch

https://adresses-france-occupee.fr/static/js/gridManager.js

js adresses-france-occupee.fr collected 2026-10-05 23:36:00 UTC 3,283 bytes, 126 lines download raw bytes

1(function() {
2	"use strict";
3	
4	/**
5	 * Services lists
6	 */
7
8	Project.Modal = {
9		init: function() {
10			Project.Grid.gridgridServicesModal.render('grid-gridServicesModal');
11		    $('#place-img-modal-link').click(function(){
12		        $('#place-img-modal .content').empty()
13		        	.append($(this).html() + $(this).next().html());
14		        return true;
15		    });
16
17			$('#move_place_btn').click(function(){
18				$('#grid-address-modal').modal('hide');
19				Project.Map.Place.move({place_id: $('#place-pop-in').data('placeid')});
20			});
21		}
22	};
23	Project.Grid = {
24		init: function() {
25			Project.waitVar(
26				function(){return Project.Grid.gridgridServices!= undefined},
27				function(){
28					Project.Grid.gridgridServices.render('grid-gridServices');
29				}
30			);
31		}
32	};
33
34	Project.Modal.openPlaceModal = function (placeId) {
35		var url = '/' + Project.getLang() + '/place/view-modal/place_id/' + placeId + '/format/inline';
36		
37		// if not closed, the grid in the infowindow can cause id collision 
38		Project.Map.placeInfoWindow.close();
39		Project.Map.Place.disableMoveMode();
40		
41		$.get(url, function(data) {
42			$('#grid-address-modal')
43				.empty()
44				.append(data)
45				.modal()
46				.css({
47					'width': 500
48				}).on('shown',function(){
49					Project.Modal.init();
50					Project.Modal.onLoad(Project.Fav.initFavButtons);
51					var position = new google.maps.LatLng(
52						parseFloat($('#place_img').data('latitude')),
53						parseFloat($('#place_img').data('longitude'))
54					);
55					Project.Map.displayStreetView(position);
56				});
57		});
58	}
59
60	$('#list_tab').on('shown', function (e) {
61		Project.reloadTransl8();
62	});
63	
64	$(Project.Grid.init);
65	
66	Project.Grid.reload = function(filters, retries) {
67		Project.waitVar(
68			function() {
69				return Project.Grid.gridgridServices != undefined;
70			},
71			function(){
72				var dataStore = Project.Grid.gridgridServices.getGrid().getStore();
73				if ('s' in filters) {
74					dataStore.baseParams = {'s[]': filters.s, 'lang': Project.getLang()};
75				} else {
76					dataStore.baseParams = {
77						'q': filters.q || null, 
78						'y[]':filters.y || null,
79						'inc[]': filters.inc || null,
80						'lang': Project.getLang(),
81						'place_status': filters.place_status
82					};
83				}
84				Project.Grid.gridgridServices.getGrid().getStore().reload(filters);
85			}
86		);
87	};
88	
89	Project.Grid.onLoad = function(callback) {
90		// add store reload callback
91		Project.waitVar(
92			function(){
93				return 	Project.Grid.gridgridServices != undefined 
94			},
95			function(){
96				Project.Grid.gridgridServices.getGrid().getStore().on('load',callback);
97			}
98		);
99		// wait for the grid to load (this version of ext does not support usefull events)
100		Project.waitVar(
101			function(){
102				return $('#grid-gridServices .x-grid3-row-table').length > 0
103			},
104			callback
105		);
106	}
107	
108	Project.Modal.onLoad = function(callback) {
109		// add store reload callback
110		Project.waitVar(
111			function(){
112				return 	Project.Grid.gridgridServicesModal != undefined 
113			},
114			function(){
115				Project.Grid.gridgridServicesModal.getGrid().getStore().on('load',callback);
116			}
117		);
118		// wait for the grid to load (this version of ext does not support usefull events)
119		Project.waitVar(
120			function(){
121				return $('#grid-gridServicesModal .x-grid3-row-table').length > 0
122			},
123			callback
124		);
125	}
126})();

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.