/[openfoncier]/branches/3.2.x/app/js/script.js
ViewVC logotype

Diff of /branches/3.2.x/app/js/script.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 643 by vpihour, Fri Nov 9 14:07:37 2012 UTC revision 660 by fmichon, Mon Nov 12 09:13:10 2012 UTC
# Line 237  function tmpUpload(champ) { Line 237  function tmpUpload(champ) {
237      fenetreouverte = true;      fenetreouverte = true;
238  }  }
239    
240  $(function() {  //$(function() {
241      //hideFields();  //    if ( $('#date_demande').length > 0 && !$('#dossier_autorisation_type_detaille').is(':disabled') )
242  });  //        hideFields();
243    //        
244    //    
245    //});
246    
247  function changeDemandeType(){  function changeDemandeType(){
248            
# Line 250  function changeDemandeType(){ Line 253  function changeDemandeType(){
253          changeDataSelect('demande_type','dossier_autorisation_type_detaille');          changeDataSelect('demande_type','dossier_autorisation_type_detaille');
254                    
255         $('#demande_type').parent().parent().show();         $('#demande_type').parent().parent().show();
256          
257           $('.terrain_references_cadastrales_custom').append(
258               '<div class="field field-type-text" >'+
259                    '<div class="form-libelle">' +
260                        '<label '+
261                            'class="libelle-terrain_references_cadastrales" '+
262                            'for="terrain_references_cadastrales">'+
263                            ' terrain_references_cadastrales '+
264                        '</label>' +
265                    '</div>' +
266                    '<div class="form-content reference_cadastrale_custom_fields">' +
267                        '<input ' +
268                            'class="champFormulaire reference_cadastrale_custom_field" ' +
269                            'type="text" ' +
270                            'onchange="VerifNum(this)" ' +
271                            'maxlength="3" ' +
272                            'size="3" ' +
273                            'value="" />' +
274                        '<input ' +
275                            'class="champFormulaire reference_cadastrale_custom_field" ' +
276                            'type="text" ' +
277                            'maxlength="2" ' +
278                            'size="2" ' +
279                            'value="" />' +
280                        '<input ' +
281                            'class="champFormulaire reference_cadastrale_custom_field" ' +
282                            'type="text" ' +
283                            'onchange="VerifNum(this)" ' +
284                            'maxlength="4" ' +
285                            'size="4" ' +
286                            'value="" />' +
287                    '</div>' +
288               '</div>' +
289               '<div id="moreFieldReferenceCadastrale"> + ajouter d\'autres champs</div>'
290           );
291          
292           $('#moreFieldReferenceCadastrale').click( function() {
293                $('.reference_cadastrale_custom_fields').append(newInputReferenceCadastrale());
294            });
295            
296            $('form').submit(
297                function(){
298                    
299                    var reference_cadastrale = '';
300                    
301                    $('.reference_cadastrale_custom_field').each(
302                        function(){
303                            
304                            reference_cadastrale += $(this).val();
305                        }
306                    );
307                    
308                    $('#terrain_references_cadastrales').val(reference_cadastrale);
309                }
310            );
311            
312            $('.terrain_references_cadastrales_custom:').find(">:first-child").hide();
313      }      }
314      else {      else {
315          hideFields();          hideFields();
# Line 280  function showFormsDemande(){ Line 340  function showFormsDemande(){
340      $('.field-type-text').show();      $('.field-type-text').show();
341      $('input[type=submit]').show();      $('input[type=submit]').show();
342  }  }
343    
344    function newInputReferenceCadastrale(){
345        return '<input ' +
346                'class="champFormulaire reference_cadastrale_custom_field" ' +
347                'type="text" ' +
348                'maxlength="1" ' +
349                'size="1" ' +
350                'value="" />' +
351            '<input ' +
352                'class="champFormulaire reference_cadastrale_custom_field" ' +
353                'type="text" ' +
354                'onchange="VerifNum(this)" ' +
355                'maxlength="4" ' +
356                'size="4" ' +
357                'value="" />';
358    }
359    
360    // Desactivation des fonctions widget du tableau de bord inutiles sur le nouveau
361    // tableau de bord
362    function widget_bind_move_actions() {}
363    function widget_bind_add_action() {}
364    function widget_bind_edit_actions(widget_selector) {}
365    

Legend:
Removed from v.643  
changed lines
  Added in v.660

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26