Subversion Repositories eFlore/Applications.cel

Rev

Rev 3433 | Rev 3435 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3433 Rev 3434
Line 82... Line 82...
82
	}
82
	}
83
};
83
};
Line 84... Line 84...
84
 
84
 
85
WidgetsSaisiesCommun.prototype.initEvtsFichier = function() {
85
WidgetsSaisiesCommun.prototype.initEvtsFichier = function() {
-
 
86
	const lthis = this;
Line -... Line 87...
-
 
87
	var elem = document.createElement('input');
-
 
88
 
-
 
89
		elem.type = 'file';
86
	const lthis = this;
90
 
87
 
91
	if ( !elem.disabled ) {
88
	// Sur téléchargement image
92
		// Sur téléchargement image
Line 89... Line 93...
89
	$( '#fichier' ).on( 'change', function ( event ) {
93
		$( '#fichier' ).on( 'change', function ( event ) {
-
 
94
			lthis.arreter ( event );
-
 
95
 
-
 
96
			var options        = {
-
 
97
				beforeSend : function ( jqXHR, settings ) {
-
 
98
					$( '#miniatures' ).on( 'click', '.effacer-miniature', function() {
90
		lthis.arreter ( event );
99
						jqXHR.abort(jqXHR);
91
 
100
					});
92
		var options        = {
101
				},
93
			success: lthis.afficherMiniature.bind( lthis ), // post-submit callback
102
				success: lthis.afficherMiniature.bind( lthis ), // post-submit callback
94
			dataType: 'xml', // 'xml', 'script', or 'json' (expected server response type)
103
				dataType: 'xml', // 'xml', 'script', or 'json' (expected server response type)
Line 127... Line 136...
127
		if ( !lthis.valOk( $('.miniature-chargement' ) ) ) {
136
			if ( !lthis.valOk( $('.miniature-chargement' ) ) ) {
128
			$( '#ajouter-obs' ).removeClass( 'hidden' );
137
				$( '#ajouter-obs' ).removeClass( 'hidden' );
129
			$( '#message-chargement' ).addClass( 'hidden' );
138
				$( '#message-chargement' ).addClass( 'hidden' );
130
		}
139
			}
131
	});
140
		});
-
 
141
	} else {
-
 
142
		$( '#form-upload' )
-
 
143
			.addClass( 'hidden' )
-
 
144
			.after(
-
 
145
				'<div class="alert alert-info" role="alert">'+
-
 
146
					this.msgTraduction( 'upload-non-suppote' )+
-
 
147
				'</div>'
-
 
148
			);
-
 
149
	}
-
 
150
 
132
};
151
};
Line 133... Line 152...
133
 
152
 
134
WidgetsSaisiesCommun.prototype.initEvtsGeoloc = function( isFormArbre = false ) {
153
WidgetsSaisiesCommun.prototype.initEvtsGeoloc = function( isFormArbre = false ) {
Line 1496... Line 1515...
1496
							$( '#bloc-controle-liste-obs,#bloc-gauche' ).addClass( 'hidden' );
1515
							$( '#bloc-controle-liste-obs,#bloc-gauche' ).addClass( 'hidden' );
1497
						}
1516
						}
1498
						$( '#chargement' ).addClass( 'hidden' );
1517
						$( '#chargement' ).addClass( 'hidden' );
1499
						$( '#dialogue-obs-transaction-ok .alert-txt' ).append( $( '#tpl-transmission-ok' ).clone().html() );
1518
						$( '#dialogue-obs-transaction-ok .alert-txt' ).append( $( '#tpl-transmission-ok' ).clone().html() );
1500
						$( '#dialogue-obs-transaction-ok' ).removeClass( 'hidden' );
1519
						$( '#dialogue-obs-transaction-ok' ).removeClass( 'hidden' );
1501
						if ( !lthis.isASL ) {
-
 
1502
							lthis.initialiserObs.bind( lthis );
-
 
1503
						}
-
 
1504
					}, 1500 );
1520
					}, 1500 );
1505
				}
1521
				}
1506
			}
1522
			}
1507
		}
1523
		}
1508
	});
1524
	});