/[drupal]/contributions/modules/uc_vat_number/uc_vat_number.js
ViewVC logotype

Contents of /contributions/modules/uc_vat_number/uc_vat_number.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Nov 18 16:57:18 2008 UTC (12 months, 1 week ago) by zmove
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/javascript
Initial release
1 /*List of European countries (in order of the array)
2 Allemagne
3 Autriche
4 Belgique
5 Danemark
6 Espagne
7 Finlande
8 France
9 Grce
10 Irlande
11 Italie
12 Luxembourg
13 Pays-Bas
14 Portugal
15 Royaume-Uni
16 Sude
17 Chypre
18 Estonie
19 Hongrie
20 Lettonie
21 Lituanie
22 Malte
23 Pologne
24 Rpublique tchque
25 Slovaquie
26 Slovnie*/
27
28 $(document).ready(
29 function() {
30 var european_countries = [276, 040, 056, 208, 724, 246, 250, 300, 372, 380, 442, 528, 620, 826, 752, 196, 233, 348, 428, 440, 470, 616, 203, 703, 705];
31 var vat_label =$('#billing-pane tr:last td.field-label').html();
32 $('#edit-panes-billing-billing-country').change(function () {
33 var in_europe = false;
34 for(var country_id in european_countries) {
35 if(european_countries[country_id] == $('#edit-panes-billing-billing-country').val()) {
36 in_europe = true;
37 }
38 }
39 if(in_europe == true) {
40 $('#billing-pane tr:last td.field-label').html('<span class="form-required">*</span>' + vat_label);
41 //alert(vat_label);
42 $('#billing-pane tr:last').fadeIn();
43 } else {
44 $('#billing-pane tr:last').fadeOut();
45 }
46 })
47 }
48 );

  ViewVC Help
Powered by ViewVC 1.1.2