annotate index.html @ 11:1b8c5c3afaf5

Round up
author nanaya <me@myconan.net>
date Fri, 17 Jun 2016 10:36:02 +0900
parents bc14e1e8d046
children 13d740477326
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
1 <!doctype html>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
2 <head>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
3 <title>Kalkulator</title>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
4 <meta name="viewport" content="width=device-width">
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
5 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
6 <style type="text/css">
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
7 body {
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
8 font-size: 12px;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
9 font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
10 line-height: 1.5;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
11 margin: 0px;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
12 background-color: #eee;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
13 }
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
14 #content {
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
15 width: 100%;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
16 min-height: 100vh;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
17 padding: 10px;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
18 margin: auto;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
19 background-color: #fff;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
20 }
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
21 @media (min-width: 600px) {
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
22 #content {
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
23 width: 500px;
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
24 }
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
25 }
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
26 * { box-sizing: border-box; }
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
27 ul { padding-left: 20px; }
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
28 #n, .js { display: none; }
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
29 input, button, select, option, .js { font-size: 150%; }
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
30 </style>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
31 </head>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
32 <body>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
33 <div id="content">
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
34 <h1>Konversi buat nitip</h1>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
35 <form>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
36 <p>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
37 <label for="x">Jumlah dalam yen:</label>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
38 <br>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
39 <input id="x" name="x" type="number" autofocus>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
40 </p>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
41 <p>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
42 <button type="submit">Hitung</button>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
43 <button type="reset">Hapus</button>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
44 </p>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
45 </form>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
46 <div class="js" id="loading">
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
47 <p>Memuat data nilai tukar...</p>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
48 </div>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
49 <div class="js" id="ok">
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
50 <p>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
51 Biaya:
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
52 </p>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
53 <ul>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
54 <li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
55 Bank transfer:
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
56 <span id="result-bank"></span> IDR
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
57 (<span id="rate-text"></span> IDR/JPY)
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
58 </li>
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
59
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
60 <li>
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
61 Bank transfer (alt):
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
62 <span id="result-bank-bni"></span> IDR
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
63 (<span id="rate-text-bni"></span> IDR/JPY)
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
64 </li>
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
65
0
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
66 <li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
67 PayPal:
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
68 <span id="result-paypal"></span> JPY
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
69 </li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
70 </ul>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
71 </div>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
72 <div class="js" id="error">
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
73 <p>Koneksi ke server nilai tukar bermasalah.</p>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
74 </div>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
75
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
76 <hr>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
77 <ul>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
78 <li>Ongkir, cukai, dll tidak termasuk.</li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
79 <li>Berhubung sudah punya timbangan, ongkir (estimasi) bisa dihitung sebelum dikirim.</li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
80 <li><a href="http://www.post.japanpost.jp/int/charge/list/ems1_en.html">Tabel ongkir EMS</a>.</li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
81 <li>Perhitungan:
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
82 <ul>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
83 <li>Bank: <code>jumlah &times; 1.07 &times; nilai_tukar</code>, dibulatkan ke seribuan terdekat.</li>
9
c7f8d6c21edd Increase rate
nanaya <me@myconan.net>
parents: 8
diff changeset
84 <li>Bank (alt): <code>jumlah &times; 1.02 &times; nilai_tukar + 25000</code>, dibulatkan ke seribuan terdekat. Rekeningnya sama.</li>
0
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
85 <li>PayPal: <code>jumlah &times; 1.05</code>, dibulatkan ke satuan terdekat.</li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
86 </ul>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
87 </li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
88 <li>Jangan lupa memastikan jumlah setelah pajak dan ongkir (lokal).</li>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
89 <li>Data nilai tukar didapat dari layanan <a href="http://fixer.io/">Fixer.io</a>.</li>
10
bc14e1e8d046 Update info
nanaya <me@myconan.net>
parents: 9
diff changeset
90 <li>Data nilai tukar "(alt)" didapat dari <a href="http://bni.co.id/informasivalas.aspx">BNI</a>.</li>
0
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
91 </ul>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
92 </div>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
93
2
9e5f60aae01c Update jquery version.
nanaya <me@myconan.net>
parents: 1
diff changeset
94 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
0
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
95 <script>
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
96 var input = function() { return parseFloat($xForm.val()); }
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
97
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
98 var $loading = $("#loading");
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
99 var $doButton = $("button[type=submit]");
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
100 var $xForm = $("#x");
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
101
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
102 var locks = {};
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
103 var lock = function(isLoading) {
7
c1086c23ef29 Wrong conditional
nanaya <me@myconan.net>
parents: 4
diff changeset
104 if (!isLoading && (locks.fixer === true || locks.bni === true)) { return; }
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
105 $loading.toggle(isLoading);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
106 $doButton.attr("disabled", isLoading);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
107 };
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
108
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
109 var rates = {};
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
110
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
111 var displayResult = function() {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
112 if (rates.fixer === undefined || rates.bni === undefined) { return; }
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
113 var x = input();
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
114
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
115 $("#rate-text").text(rates.fixer.toLocaleString());
11
1b8c5c3afaf5 Round up
nanaya <me@myconan.net>
parents: 10
diff changeset
116 $("#result-bank").text((Math.ceil(x * 1.07 * rates.fixer / 1000) * 1000).toLocaleString());
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
117
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
118 if (rates.bni !== 0) {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
119 $("#rate-text-bni").text(rates.bni.toLocaleString());
9
c7f8d6c21edd Increase rate
nanaya <me@myconan.net>
parents: 8
diff changeset
120 $("#result-bank-bni").text((Math.ceil(x * 1.02 * rates.bni / 1000) * 1000 + 25000).toLocaleString());
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
121 } else {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
122 $("#rate-text-bni").text('x');
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
123 $("#result-bank-bni").text('x');
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
124 };
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
125
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
126 $("#result-paypal").text((Math.round(x * 1.05)).toLocaleString());
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
127 $("#ok").show();
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
128 lock(false);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
129 };
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
130
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
131 var action = function(e) {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
132 e.preventDefault()
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
133 $(".js").hide()
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
134
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
135 var x = input();
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
136
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
137 if (x === NaN || x === undefined) { return false; };
0
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
138
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
139 if (rates.fixer === undefined) {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
140 lock(true);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
141 locks.fixer = true;
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
142
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
143 $.getJSON("https://api.fixer.io/latest", { base: "JPY", symbols: "IDR" })
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
144 .done(function(data) {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
145 rates.fixer = parseFloat(data.rates["IDR"]);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
146
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
147 displayResult();
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
148 })
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
149 .fail(function() {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
150 $("#error").show();
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
151 })
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
152 .always(function() {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
153 locks.fixer = false;
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
154 lock(false);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
155 });
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
156 };
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
157
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
158 if (rates.bni === undefined) {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
159 lock(true);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
160 locks.bni = true;
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
161
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
162 $.get("bni-jpyidr.txt")
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
163 .done(function(data) {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
164 if (data === "") {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
165 rates.bni = 0;
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
166 } else {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
167 rates.bni = parseFloat(data);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
168 }
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
169
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
170 displayResult();
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
171 })
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
172 .fail(function() {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
173 $("#error").show();
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
174 })
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
175 .always(function() {
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
176 locks.bni = false;
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
177 lock(false);
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
178 });
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
179 };
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
180
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
181 displayResult();
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
182 };
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
183
0
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
184 $("form").submit(action)
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents: 2
diff changeset
185 $("button[type=reset]").click(function(e) { xForm.focus(); });
0
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
186 </script>
3c9ac4a429a5 Initial import.
nanaya <me@myconan.net>
parents:
diff changeset
187 </body>