Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
16825 efrain 1
<!DOCTYPE html>
2
<html>
3
  <head>
4
    <meta charset="utf-8">
5
    <title>Example: Modify country data</title>
6
    <link rel="stylesheet" href="../css/prism.css">
7
    <link rel="stylesheet" href="../../build/css/intlTelInput.css?1603274336113">
8
    <link rel="stylesheet" href="../../build/css/demo.css?1603274336113">
9
 
10
 
11
    <!-- GOOGLE ANALYTICS -->
12
    <script>
13
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
14
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
15
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
16
      })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
17
      ga('create', 'UA-85394876-1', 'auto');
18
      ga('send', 'pageview');
19
    </script>
20
    <!-- /GOOGLE ANALYTICS -->
21
  </head>
22
 
23
  <body>
24
    <a href="/">Back</a>
25
    <h1>Example: Modify country data</h1>
26
    <p>Use static getCountryData method to update the data to only show localised country names.</p>
27
 
28
    <h2>Markup</h2>
29
    <pre><code class="language-markup">&lt;input id=&quot;phone&quot; type=&quot;tel&quot;&gt;</code></pre>
30
 
31
    <h2>Code</h2>
32
    <pre><code class="language-javascript">var countryData = window.intlTelInputGlobals.getCountryData(),
33
  input = document.querySelector(&quot;#phone&quot;);
34
 
35
for (var i = 0; i &lt; countryData.length; i++) {
36
  var country = countryData[i];
37
  country.name = country.name.replace(/.+\((.+)\)/,&quot;$1&quot;);
38
}
39
 
40
window.intlTelInput(input, {
41
  utilsScript: &quot;../../build/js/utils.js?1603274336113&quot; // just for formatting/placeholders etc
42
});
43
</code></pre>
44
 
45
    <h2>Result</h2>
46
    <div id="result">
47
      <input id="phone" type="tel">
48
    </div>
49
 
50
    <script src="../js/prism.js"></script>
51
    <script src="../../build/js/intlTelInput.js?1603274336113"></script>
52
    <script src="./js/modifyCountryData.js?1603274336113"></script>
53
  </body>
54
</html>