Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a56b873b

Von Thomas Heck vor fast 11 Jahren hinzugefügt

  • ID a56b873b4586c6b7142a776e1bdfff26bfbb4f59
  • Vorgänger 4dd93922
  • Nachfolger a4d28a1d

Beim Anlegen von neuen Ansprechpersonen: CVars-Standardwert anzeigen

fixt #2422

Unterschiede anzeigen:

js/kivi.CustomerVendor.js
44 44
  this.selectContact = function(params) {
45 45
    var contactId = $('#contact_cp_id').val();
46 46

  
47
    if( contactId ) {
48
      var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId;
47
	  var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId;
49 48

  
50
      $.getJSON(url, function(data) {
51
        var contact = data.contact;
52
        for(var key in contact)
53
          $(document.getElementById('contact_'+ key)).val(contact[key])
49
    $.getJSON(url, function(data) {
50
      var contact = data.contact;
51
      for(var key in contact)
52
        $(document.getElementById('contact_'+ key)).val(contact[key])
54 53

  
55
        var cvars = data.contact_cvars;
56
        for(var key in cvars)
57
          $(document.getElementById('contact_cvars_'+ key)).val(cvars[key]);
54
      var cvars = data.contact_cvars;
55
      for(var key in cvars)
56
        $(document.getElementById('contact_cvars_'+ key)).val(cvars[key]);
58 57

  
58
      if ( contactId )
59 59
        $('#action_delete_contact').show();
60
      else
61
        $('#action_delete_contact').hide();
60 62

  
61
        if( params.onFormSet )
62
          params.onFormSet();
63
      });
64
    }
65
    else {
66
      $('#contacts :input').not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');
67

  
68
      $('#action_delete_contact').hide();
69

  
70
      if( params.onFormSet )
63
      if ( params.onFormSet )
71 64
        params.onFormSet();
72
    }
65
    });
73 66

  
74 67
    $('#contact_cp_title_select, #contact_cp_abteilung_select').val('');
75 68
  };

Auch abrufbar als: Unified diff