PageSourceSearch

http://www.ville-brouvelieures88.fr/Views/js/popup.js

js ville-brouvelieures88.fr collected 2026-10-03 02:47:39 UTC 1,962 bytes, 72 lines download raw bytes

1/*
2 * Ouvre une popup en iframe
3 */
4function popupAjax(c, a, width_min, height_min, title, getData) {
5	popup		 = null;
6	editor_popup = null;
7
8	if(width_min > 0 && height_min > 0) {
9		width_popup = width_min;
10		height_popup = height_min;
11	} else {
12		// Nous recherchons une taille de popup
13		wBody	= $(window).width();
14		hBody	= $(window).height();
15
16		width_popup		= Math.ceil(wBody -((wBody*15)/100));
17		height_popup	= Math.ceil(hBody -((hBody*15)/100));
18	}
19
20
21	// Nous évitons d'afficher deux popup simultanément (double clic and co)
22	if ( $('.popup').length <= 0 ) {
23		//Recurépation de la page
24
25		rouyouyou = $('#bigRouyouyou').clone();
26
27		popup = $('<div class="popup"></div>');
28
29		fram = $('<iframe class="popupframe" style="height: 100%; width: 100%; border: none;" name="popupframe" id="popupframe" src="?c='+c+'&a='+a+(getData == '' ? '' : '&'+getData)+'"></iframe>');
30		fram.one("load", function(){
31			rouyouyou.remove();
32		});
33
34		popup.append( rouyouyou );
35
36		rouyouyou.css({top: "3%", left: "47%"});
37
38		popup.append( fram );
39
40		popup.dialog({
41						height: height_popup,
42						width: width_popup,
43						title: title,
44						modal: true,
45						buttons: [
46							{ text: 'Fermer', click: function() { popupAjaxClose( $(this) ); } }
47						],
48						close: function() {
49							popupAjaxClose( $(this) );
50						},
51					});
52
53	}
54}
55
56// ferme une popup ouverte par dialog
57function popupAjaxClose( popup ) {
58	$( popup ).dialog("destroy");
59	$( popup ).remove();
60}
61
62// insère un élement dans le DOM pour l'afficher en tant que dialog
63function writeMsgSlide(msg) {
64	$('body').prepend('<div id="msg_slide">'+msg+'</div>');
65	$('#msg_slide').dialog({ modal: true, title : "", minHeight: 100, minWidth: 200, buttons: [ { text: "Fermer", click: function() { $( this ).dialog( "close" ); } } ] });
66}
67
68// fonction appelée en cas de succes de traitement d'un controller ajax
69function success(msg) {
70	popupAjaxClose($('div.popup'));
71	if(msg != '') writeMsgSlide(msg);
72}

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.