tw_zipcode 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3f2d3c5b0dca99be1caa90c9beb13c24daec5558
4
+ data.tar.gz: 616631312d51fc60590389ab160d38999f486882
5
+ SHA512:
6
+ metadata.gz: 51937762d1ec61ad926bd9280ca8e2264bcc70ca26006e93d1b0e63a8fbd75bf5345ffaa8badff4bab46368736650c88ef4ae94e8291f1a8b3e0bebfc3d8cf21
7
+ data.tar.gz: d38d91f4af32cf21950218cd3b9d430873942267fd24f689d915c505523ae8f47298d93f6e6f60baa6aeaa0011b4657980cc991ddf0c7771471c5ff7418ab451
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in tw_zipcode.gemspec
4
+ gemspec
5
+ gem 'jquery-rails'
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Gary Lai
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # tw_zipcode
2
+
3
+ 來自 [jQuery TWzipcode](http://app.essoduke.org/twzipcode/)
4
+
5
+ > 在網頁建立多組 3 碼台灣郵遞區號表單元素的 jQuery Plugin ─ 讀取快速、不需使用資料庫。
6
+
7
+ ## 安裝/Installation
8
+
9
+ 將此 gem 加入到 Gemfile:
10
+
11
+ gem 'tw_zipcode'
12
+
13
+ 安裝:
14
+
15
+ $ bundle
16
+
17
+ 或是可以安裝到電腦內:
18
+
19
+ $ gem install tw_zipcode
20
+
21
+ ## 使用說明/Usage
22
+
23
+ 把以下這行加入到`application.js`:
24
+
25
+ ```
26
+ //= require tw_zipcode
27
+ ```
28
+ ### Example
29
+
30
+ 預設樣式:
31
+
32
+ ```
33
+ <div id="twzipcode"></div>
34
+ ```
35
+
36
+ 自訂樣式:
37
+
38
+ ```
39
+ <div id="twzipcode">
40
+ <div data-role="county" data-style="county"></div>
41
+ <!--自訂縣市選單容器,以及套用 .county 樣式-->
42
+ <div data-role="district" data-style="district"></div>
43
+ <!--自訂鄉鎮市區選單容器,以及套用 .district 樣式-->
44
+ <div data-role="zipcode" data-style="zipcode"></div>
45
+ <!--自訂郵遞區號容器,以及套用 .zipcode 樣式-->
46
+ </div>
47
+ ```
48
+
49
+ javascripts:
50
+
51
+ ```
52
+ $(function () {
53
+ $('#twzipcode').twzipcode({
54
+ countyName: 'address[city]',
55
+ districtName: 'address[district]',
56
+ zipcodeName: 'address[zip_code]',
57
+ });
58
+ });
59
+ ```
60
+ 裡面設定countyName, districtName, zipcodeName 可以配合自己的 model 跟 form_for helper。有時間看能不能把這些 javascripts 的設定改成用 helper 來使用。
61
+
62
+ ## 參數
63
+
64
+ 名稱 | 類型 | 說明
65
+ --- | --- | ---
66
+ detect | Boolean | 是否偵測用戶位置 **預設 false, 此功能提供的數據並非絕對正確,僅供參考**
67
+ countyName | String | 指定縣市下拉清單的表單名稱 **預設 county**
68
+ districtName | String | 指定鄉鎮市區下拉清單的表單名稱 **預設 district**
69
+ zipcodeName | String | 指定郵遞區號輸入框的表單名稱 **預設 zipcode**
70
+ countySel | String | 縣市預設值
71
+ districtSel | String | 鄉鎮市區預設值
72
+ zipcodeSel | String | 郵遞區號預設值
73
+ onCountySelect | Function | 綁定縣市選單 Change 事件。 **version 1.5**
74
+ onDistrictSelect | Function | 綁定鄉鎮市區選單 Change 事件。 **version 1.5**
75
+ onZipcodeKeyUp | Function | 綁定郵遞區號輸入框 keyUp 事件(readonly 必須為 false)。 **version 1.5**
76
+ readonly | Boolean | 郵遞區號輸入框是否唯讀? **預設 true**
77
+ css | Array | 表單元件樣式名稱 **格式: ['縣市', '鄉鎮市區', '郵遞區號']**
78
+
79
+ ## 方法
80
+
81
+ 方法 | 說明
82
+ --- | ---
83
+ destory | 從指定的元素移除 Plugin: **$(selector).twzipcode('destory');**
84
+ reset | 將指定的元素恢復未選狀態: **$(selector).twzipcode('reset');**
85
+ serialize | 將指定的元素輸出為 URL Query: **$(selector).twzipcode('serialize');**
86
+
87
+ ## Contributing
88
+
89
+ 1. Fork it
90
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
91
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
92
+ 4. Push to the branch (`git push origin my-new-feature`)
93
+ 5. Create new Pull Request
94
+
95
+ ## Contact
96
+
97
+ [@garylai1990](http://www.twitter.com/garylai1990)
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,3 @@
1
+ module TwZipcode
2
+ VERSION = "1.5.2"
3
+ end
data/lib/tw_zipcode.rb ADDED
@@ -0,0 +1,8 @@
1
+ require "tw_zipcode/version"
2
+
3
+ module TwZipcode
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'tw_zipcode/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "tw_zipcode"
8
+ spec.version = TwZipcode::VERSION
9
+ spec.authors = ["Gary Lai"]
10
+ spec.email = ["garylai1990@gmail.com"]
11
+ spec.description = %q{Provide taiwan's zipcode selector}
12
+ spec.summary = %q{This is a jquery plugin for Taiwan's zipcode selector}
13
+ spec.homepage = "https://github.com/garylai1990/tw_zipcode"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "jquery-rails"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "rake"
25
+ end
@@ -0,0 +1,366 @@
1
+ /**
2
+ * 本著作係依據創用 姓名標示-相同方式分享 3.0 Unported (CC BY-SA 3.0) 授權條款進行授權。
3
+ * 如欲瀏覽本授權條款之副本,請造訪 http://creativecommons.org/licenses/by-sa/3.0/deed.zh_TW
4
+ *
5
+ * This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0).
6
+ * To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/deed.en
7
+ *
8
+ * jQuery TWzipcode 台灣郵遞區號 jQuery 擴充套件
9
+ * 輕鬆地建立多組台灣郵遞區號下拉清單,讀取快速、完全不需使用資料庫。
10
+ * http://app.essoduke.org/twzipcode/
11
+ *
12
+ * @author: Essoduke Chang
13
+ * @version: 1.5.2
14
+ *
15
+ * [Changelog]
16
+ * fix datasheet (Hsinchu, Chiayi)
17
+ * Last Modify: Mon, 17 June 2013 04:30:11 GMT
18
+ */
19
+ ;(function ($) {
20
+
21
+ 'use strict';
22
+
23
+ // Zipcode JSON data
24
+ var data = {
25
+ '基隆市': {'仁愛區': '200', '信義區': '201', '中正區': '202', '中山區': '203', '安樂區': '204', '暖暖區': '205', '七堵區': '206'},
26
+ '台北市': {'中正區': '100', '大同區': '103', '中山區': '104', '松山區': '105', '大安區': '106', '萬華區': '108', '信義區': '110', '士林區': '111', '北投區': '112', '內湖區': '114', '南港區': '115', '文山區': '116'},
27
+ '新北市': {
28
+ '萬里區': '207', '金山區': '208', '板橋區': '220', '汐止區': '221', '深坑區': '222', '石碇區': '223',
29
+ '瑞芳區': '224', '平溪區': '226', '雙溪區': '227', '貢寮區': '228', '新店區': '231', '坪林區': '232',
30
+ '烏來區': '233', '永和區': '234', '中和區': '235', '土城區': '236', '三峽區': '237', '樹林區': '238',
31
+ '鶯歌區': '239', '三重區': '241', '新莊區': '242', '泰山區': '243', '林口區': '244', '蘆洲區': '247',
32
+ '五股區': '248', '八里區': '249', '淡水區': '251', '三芝區': '252', '石門區': '253'
33
+ },
34
+ '宜蘭縣': {
35
+ '宜蘭市': '260', '頭城鎮': '261', '礁溪鄉': '262', '壯圍鄉': '263', '員山鄉': '264', '羅東鎮': '265',
36
+ '三星鄉': '266', '大同鄉': '267', '五結鄉': '268', '冬山鄉': '269', '蘇澳鎮': '270', '南澳鄉': '272',
37
+ '釣魚台列嶼': '290'
38
+ },
39
+ '新竹市': {'東區': '300', '北區': '300', '香山區': '300'},
40
+ '新竹縣': {
41
+ '竹北市': '302', '湖口鄉': '303', '新豐鄉': '304', '新埔鎮': '305', '關西鎮': '306', '芎林鄉': '307',
42
+ '寶山鄉': '308', '竹東鎮': '310', '五峰鄉': '311', '橫山鄉': '312', '尖石鄉': '313', '北埔鄉': '314',
43
+ '峨嵋鄉': '315'
44
+ },
45
+ '桃園縣': {
46
+ '中壢市': '320', '平鎮市': '324', '龍潭鄉': '325', '楊梅鎮': '326', '新屋鄉': '327', '觀音鄉': '328',
47
+ '桃園市': '330', '龜山鄉': '333', '八德市': '334', '大溪鎮': '335', '復興鄉': '336', '大園鄉': '337',
48
+ '蘆竹鄉': '338'
49
+ },
50
+ '苗栗縣': {
51
+ '竹南鎮': '350', '頭份鎮': '351', '三灣鄉': '352', '南庄鄉': '353', '獅潭鄉': '354', '後龍鎮': '356',
52
+ '通霄鎮': '357', '苑裡鎮': '358', '苗栗市': '360', '造橋鄉': '361', '頭屋鄉': '362', '公館鄉': '363',
53
+ '大湖鄉': '364', '泰安鄉': '365', '銅鑼鄉': '366', '三義鄉': '367', '西湖鄉': '368', '卓蘭鎮': '369'
54
+ },
55
+ '台中市': {
56
+ '中區': '400', '東區': '401', '南區': '402', '西區': '403', '北區': '404', '北屯區': '406', '西屯區': '407', '南屯區': '408',
57
+ '太平區': '411', '大里區': '412', '霧峰區': '413', '烏日區': '414', '豐原區': '420', '后里區': '421',
58
+ '石岡區': '422', '東勢區': '423', '和平區': '424', '新社區': '426', '潭子區': '427', '大雅區': '428',
59
+ '神岡區': '429', '大肚區': '432', '沙鹿區': '433', '龍井區': '434', '梧棲區': '435', '清水區': '436',
60
+ '大甲區': '437', '外埔區': '438', '大安區': '439'
61
+ },
62
+ '彰化縣': {
63
+ '彰化市': '500', '芬園鄉': '502', '花壇鄉': '503', '秀水鄉': '504', '鹿港鎮': '505', '福興鄉': '506',
64
+ '線西鄉': '507', '和美鎮': '508', '伸港鄉': '509', '員林鎮': '510', '社頭鄉': '511', '永靖鄉': '512',
65
+ '埔心鄉': '513', '溪湖鎮': '514', '大村鄉': '515', '埔鹽鄉': '516', '田中鎮': '520', '北斗鎮': '521',
66
+ '田尾鄉': '522', '埤頭鄉': '523', '溪州鄉': '524', '竹塘鄉': '525', '二林鎮': '526', '大城鄉': '527',
67
+ '芳苑鄉': '528', '二水鄉': '530'
68
+ },
69
+ '南投縣': {
70
+ '南投市': '540', '中寮鄉': '541', '草屯鎮': '542', '國姓鄉': '544', '埔里鎮': '545', '仁愛鄉': '546',
71
+ '名間鄉': '551', '集集鎮': '552', '水里鄉': '553', '魚池鄉': '555', '信義鄉': '556', '竹山鎮': '557',
72
+ '鹿谷鄉': '558'
73
+ },
74
+ '嘉義市': {'東區': '600', '西區': '600'},
75
+ '嘉義縣': {
76
+ '番路鄉': '602', '梅山鄉': '603', '竹崎鄉': '604', '阿里山': '605', '中埔鄉': '606', '大埔鄉': '607',
77
+ '水上鄉': '608', '鹿草鄉': '611', '太保市': '612', '朴子市': '613', '東石鄉': '614', '六腳鄉': '615',
78
+ '新港鄉': '616', '民雄鄉': '621', '大林鎮': '622', '溪口鄉': '623', '義竹鄉': '624', '布袋鎮': '625'
79
+ },
80
+ '雲林縣': {
81
+ '斗南鎮': '630', '大埤鄉': '631', '虎尾鎮': '632', '土庫鎮': '633', '褒忠鄉': '634', '東勢鄉': '635',
82
+ '臺西鄉': '636', '崙背鄉': '637', '麥寮鄉': '638', '斗六市': '640', '林內鄉': '643', '古坑鄉': '646',
83
+ '莿桐鄉': '647', '西螺鎮': '648', '二崙鄉': '649', '北港鎮': '651', '水林鄉': '652', '口湖鄉': '653',
84
+ '四湖鄉': '654', '元長鄉': '655'
85
+ },
86
+ '台南市': {
87
+ '中西區': '700', '東區': '701', '南區': '702', '北區': '704', '安平區': '708', '安南區': '709',
88
+ '永康區': '710', '歸仁區': '711', '新化區': '712', '左鎮區': '713', '玉井區': '714', '楠西區': '715',
89
+ '南化區': '716', '仁德區': '717', '關廟區': '718', '龍崎區': '719', '官田區': '720', '麻豆區': '721',
90
+ '佳里區': '722', '西港區': '723', '七股區': '724', '將軍區': '725', '學甲區': '726', '北門區': '727',
91
+ '新營區': '730', '後壁區': '731', '白河區': '732', '東山區': '733', '六甲區': '734', '下營區': '735',
92
+ '柳營區': '736', '鹽水區': '737', '善化區': '741', '大內區': '742', '山上區': '743', '新市區': '744',
93
+ '安定區': '745'
94
+ },
95
+ '高雄市': {
96
+ '新興區': '800', '前金區': '801', '苓雅區': '802', '鹽埕區': '803', '鼓山區': '804', '旗津區': '805',
97
+ '前鎮區': '806', '三民區': '807', '楠梓區': '811', '小港區': '812', '左營區': '813',
98
+ '仁武區': '814', '大社區': '815', '岡山區': '820', '路竹區': '821', '阿蓮區': '822', '田寮鄉': '823',
99
+ '燕巢區': '824', '橋頭區': '825', '梓官區': '826', '彌陀區': '827', '永安區': '828', '湖內鄉': '829',
100
+ '鳳山區': '830', '大寮區': '831', '林園區': '832', '鳥松區': '833', '大樹區': '840', '旗山區': '842',
101
+ '美濃區': '843', '六龜區': '844', '內門區': '845', '杉林區': '846', '甲仙區': '847', '桃源區': '848',
102
+ '那瑪夏區': '849', '茂林區': '851', '茄萣區': '852'
103
+ },
104
+ '屏東縣': {
105
+ '屏東市': '900', '三地門': '901', '霧臺鄉': '902', '瑪家鄉': '903', '九如鄉': '904', '里港鄉': '905',
106
+ '高樹鄉': '906', '鹽埔鄉': '907', '長治鄉': '908', '麟洛鄉': '909', '竹田鄉': '911', '內埔鄉': '912',
107
+ '萬丹鄉': '913', '潮州鎮': '920', '泰武鄉': '921', '來義鄉': '922', '萬巒鄉': '923', '崁頂鄉': '924',
108
+ '新埤鄉': '925', '南州鄉': '926', '林邊鄉': '927', '東港鎮': '928', '琉球鄉': '929', '佳冬鄉': '931',
109
+ '新園鄉': '932', '枋寮鄉': '940', '枋山鄉': '941', '春日鄉': '942', '獅子鄉': '943', '車城鄉': '944',
110
+ '牡丹鄉': '945', '恆春鎮': '946', '滿州鄉': '947'
111
+ },
112
+ '台東縣': {
113
+ '臺東市': '950', '綠島鄉': '951', '蘭嶼鄉': '952', '延平鄉': '953', '卑南鄉': '954', '鹿野鄉': '955',
114
+ '關山鎮': '956', '海端鄉': '957', '池上鄉': '958', '東河鄉': '959', '成功鎮': '961', '長濱鄉': '962',
115
+ '太麻里鄉': '963', '金峰鄉': '964', '大武鄉': '965', '達仁鄉': '966'
116
+ },
117
+ '花蓮縣': {
118
+ '花蓮市': '970', '新城鄉': '971', '秀林鄉': '972', '吉安鄉': '973', '壽豐鄉': '974', '鳳林鎮': '975',
119
+ '光復鄉': '976', '豐濱鄉': '977', '瑞穗鄉': '978', '萬榮鄉': '979', '玉里鎮': '981', '卓溪鄉': '982',
120
+ '富里鄉': '983'
121
+ },
122
+ '金門縣': {'金沙鎮': '890', '金湖鎮': '891', '金寧鄉': '892', '金城鎮': '893', '烈嶼鄉': '894', '烏坵鄉': '896'},
123
+ '連江縣': {'南竿鄉': '209', '北竿鄉': '210', '莒光鄉': '211', '東引鄉': '212'},
124
+ '澎湖縣': {'馬公市': '880', '西嶼鄉': '881', '望安鄉': '882', '七美鄉': '883', '白沙鄉': '884', '湖西鄉': '885'},
125
+ '南海諸島': {'東沙': '817', '南沙': '819'}
126
+ };
127
+
128
+ // Public functions
129
+ var methods = {
130
+
131
+ // Initialize
132
+ init: function (options) {
133
+
134
+ return this.each(function () {
135
+
136
+ // Default settings
137
+ var opts = $.extend({
138
+ detect: false, //v1.4
139
+ countyName: 'county',
140
+ districtName: 'district',
141
+ zipcodeName: 'zipcode',
142
+ countySel: '',
143
+ districtSel: '',
144
+ zipcodeSel: '',
145
+ readonly: false,
146
+ onCountySelect: null, //v1.5
147
+ onDistrictSelect: null, //v1.5
148
+ onZipcodeKeyUp: null, //v1.5
149
+ css: []
150
+ }, options),
151
+ self = $(this),
152
+ tpl = [],
153
+ wrap = {},
154
+ county = {},
155
+ opt = ['<option value="">縣市</option>', '<option value="">鄉鎮市區</option>'],
156
+ // Data property
157
+ role = {
158
+ county: self.find('[data-role="county"]:first'),
159
+ district: self.find('[data-role="district"]:first'),
160
+ zipcode: self.find('[data-role="zipcode"]:first')
161
+ };
162
+
163
+ // Elements create
164
+ $('<select/>')
165
+ .attr({'name': opts.countyName, 'id': opts.countyName})
166
+ .addClass(role.county.data('style') || (undefined !== opts.css[0] ? opts.css[0] : ''))
167
+ .appendTo(role.county.length ? role.county : this);
168
+
169
+ $('<select/>')
170
+ .attr({'name': opts.districtName, 'id': opts.districtName})
171
+ .addClass(role.district.data('style') || (undefined !== opts.css[1] ? opts.css[1] : ''))
172
+ .appendTo(role.district.length ? role.district : this);
173
+
174
+ $('<input/>')
175
+ .attr({'type': 'text', 'name': opts.zipcodeName, 'id': opts.zipcodeName})
176
+ .prop('readonly', opts.readonly)
177
+ .addClass(role.zipcode.data('style') || (undefined !== opts.css[2] ? opts.css[2] : ''))
178
+ .appendTo(role.zipcode.length ? role.zipcode : this);
179
+
180
+ // Elements collection
181
+ wrap.selector = {
182
+ county: 'select[name="' + opts.countyName + '"][id="' + opts.countyName + '"]:first',
183
+ district: 'select[name="' + opts.districtName + '"][id="' + opts.districtName + '"]:first',
184
+ zipcode: 'input[type=text][name="' + opts.zipcodeName + '"][id="' + opts.zipcodeName + '"]:first'
185
+ };
186
+ wrap.county = self.find(wrap.selector.county);
187
+ wrap.district = self.find(wrap.selector.district);
188
+ wrap.zipcode = self.find(wrap.selector.zipcode);
189
+
190
+ // Fill up the county list
191
+ $(opt[0]).appendTo(wrap.county);
192
+ $(opt[1]).appendTo(wrap.district);
193
+
194
+ for (county in data) {
195
+ if (data.hasOwnProperty(county)) {
196
+ tpl.push('<option value="');
197
+ tpl.push(county);
198
+ tpl.push('">');
199
+ tpl.push(county);
200
+ tpl.push('</option>');
201
+ }
202
+ }
203
+
204
+ $(tpl.join('')).appendTo(wrap.county);
205
+
206
+ // County change event
207
+ self.on('change', wrap.selector.county, function () {
208
+ var val = $(this).val(), tpl = [], district;
209
+ wrap.district.empty();
210
+ if (val) {
211
+ for (district in data[val]) {
212
+ if (data[val].hasOwnProperty(district)) {
213
+ tpl.push('<option value="');
214
+ tpl.push(district);
215
+ tpl.push('">');
216
+ tpl.push(district);
217
+ tpl.push('</option>');
218
+ }
219
+ }
220
+ wrap.district.append(tpl.join('')).trigger('change');
221
+ } else {
222
+ wrap.county.children('option:first').prop('selected', true);
223
+ wrap.district.empty().append(opt[1]);
224
+ wrap.zipcode.val('');
225
+ }
226
+ // callback binding
227
+ if ('function' === typeof opts.onCountySelect) {
228
+ opts.onCountySelect.call(this, wrap.county);
229
+ }
230
+ });
231
+
232
+ // District change event
233
+ self.on('change', wrap.selector.district, function () {
234
+ var val = $(this).val();
235
+ if (wrap.county.val()) {
236
+ wrap.zipcode.val(data[wrap.county.val()][val]);
237
+ }
238
+ if ('function' === typeof opts.onDistrictSelect) {
239
+ opts.onDistrictSelect.call(this, wrap.district);
240
+ }
241
+ });
242
+
243
+ // Zipcode keyup, blur event
244
+ self.on('keyup blur', wrap.selector.zipcode, function () {
245
+ var me = $(this), val = '', i, j;
246
+ me.val(me.val().replace(/[^0-9]/g, ''));
247
+ val = me.val().toString();
248
+ if (3 === val.length) {
249
+ for (i in data) {
250
+ if (data.hasOwnProperty(i)) {
251
+ for (j in data[i]) {
252
+ if (data[i].hasOwnProperty(j)) {
253
+ if (val === data[i][j]) {
254
+ wrap.county.val(i).trigger('change');
255
+ wrap.district.val(j).trigger('change');
256
+ break;
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ if ('function' === typeof opts.onZipcodeKeyUp) {
264
+ opts.onZipcodeKeyUp.call(this, wrap.zipcode);
265
+ }
266
+ });
267
+
268
+ // After DOM creating successful trigger the event.
269
+ wrap.county.val(opts.countySel).trigger('change');
270
+
271
+ if (0 !== opts.districtSel.length) {
272
+ wrap.district.val(opts.districtSel);
273
+ } else {
274
+ wrap.district.children('option:first').prop('selected', true);
275
+ }
276
+ wrap.zipcode.val(opts.zipcodeSel).trigger('blur');
277
+ wrap.district.trigger('change');
278
+
279
+ /**
280
+ * location detection by W3C Geolocation API.
281
+ * @version: 1.4.1
282
+ */
283
+ if (true === opts.detect) {
284
+ // Ensure the google maps API has loaded.
285
+ if ('object' !== typeof google.maps) {
286
+ alert('Google Maps API was not reloaded.');
287
+ return;
288
+ }
289
+ try {
290
+ // browser supported
291
+ if (undefined !== navigator.geolocation) {
292
+ navigator.geolocation.getCurrentPosition(function (loc) {
293
+ if (loc) {
294
+ var geocoder = new google.maps.Geocoder(),
295
+ latlng = new google.maps.LatLng(loc.coords.latitude, loc.coords.longitude);
296
+ console.log(latlng);
297
+ geocoder.geocode({'latLng': latlng}, function (results, status) {
298
+ if (status === google.maps.GeocoderStatus.OK) {
299
+ if (results[1]) {
300
+ var zipcode = results[1].formatted_address.substring(0, 3);
301
+ console.log(zipcode);
302
+ if (0 !== zipcode) {
303
+ wrap.zipcode.val(zipcode).trigger('blur');
304
+ }
305
+ }
306
+ } else {
307
+ alert('Geocoder failed due to: ' + status);
308
+ }
309
+ });
310
+ }
311
+ }, function (err) {
312
+ console.log(err);
313
+ });
314
+ } else {
315
+ alert('Your browser is not supported W3C Geolocation API.');
316
+ return;
317
+ }
318
+ } catch (ignore) {
319
+ }
320
+ }
321
+ });
322
+ },
323
+
324
+ //destroy
325
+ destroy: function () {
326
+ return this.each(function () {
327
+ //unbind and destroy
328
+ $(this).off('change', 'select')
329
+ .off('keyup blur', 'input')
330
+ .remove();
331
+ });
332
+ },
333
+ //reset values
334
+ reset: function () {
335
+ return this.each(function () {
336
+ $(this).find('select:first').children('option:first').prop('selected', true).trigger('change');
337
+ });
338
+ },
339
+
340
+ //serialize result
341
+ serialize: function () {
342
+ var result = [], obj = {}, s = {}, sel = {}, ele = {};
343
+ this.each(function () {
344
+ obj = $(this), sel = obj.find('select,input');
345
+ if (sel.length) {
346
+ sel.each(function () {
347
+ ele = $(this);
348
+ result.push(ele.attr('name') + '=' + ele.val());
349
+ });
350
+ } else {
351
+ $(this).children().each(function () {
352
+ s = $(this);
353
+ result.push(s.attr('name') + '=' + s.val());
354
+ });
355
+ }
356
+ });
357
+ return result.join('&');
358
+ }
359
+ };
360
+
361
+ // main
362
+ $.fn.twzipcode = function (method) {
363
+ return 'string' === typeof method ? methods[method].apply(this, Array.prototype.slice.call(arguments, 1)) : methods.init.apply(this, arguments);
364
+ };
365
+
366
+ }(jQuery));
@@ -0,0 +1 @@
1
+ eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(l($){\'4a 2U\';v h={\'基隆市\':{\'仁愛區\':\'62\',\'信義區\':\'63\',\'中正區\':\'64\',\'中山區\':\'65\',\'安樂區\':\'66\',\'暖暖區\':\'67\',\'七堵區\':\'68\'},\'台北市\':{\'中正區\':\'6a\',\'大同區\':\'6b\',\'中山區\':\'6c\',\'松山區\':\'6d\',\'大安區\':\'6e\',\'萬華區\':\'6f\',\'信義區\':\'6g\',\'士林區\':\'6h\',\'北投區\':\'6i\',\'內湖區\':\'6j\',\'南港區\':\'6k\',\'文山區\':\'6l\'},\'新北市\':{\'萬里區\':\'6m\',\'金山區\':\'6n\',\'板橋區\':\'6o\',\'汐止區\':\'6p\',\'深坑區\':\'6q\',\'石碇區\':\'6r\',\'瑞芳區\':\'6s\',\'平溪區\':\'6t\',\'雙溪區\':\'6u\',\'貢寮區\':\'6v\',\'新店區\':\'6w\',\'坪林區\':\'6x\',\'烏來區\':\'6y\',\'永和區\':\'6z\',\'中和區\':\'6A\',\'土城區\':\'6B\',\'三峽區\':\'6C\',\'樹林區\':\'6D\',\'鶯歌區\':\'6E\',\'三重區\':\'6F\',\'新莊區\':\'6G\',\'泰山區\':\'6H\',\'林口區\':\'6I\',\'蘆洲區\':\'6J\',\'五股區\':\'6K\',\'八里區\':\'6L\',\'淡水區\':\'6M\',\'三芝區\':\'6N\',\'石門區\':\'6O\'},\'宜蘭縣\':{\'宜蘭市\':\'6P\',\'頭城鎮\':\'6Q\',\'礁溪鄉\':\'6R\',\'壯圍鄉\':\'6S\',\'員山鄉\':\'6T\',\'羅東鎮\':\'6U\',\'三星鄉\':\'6V\',\'大同鄉\':\'6W\',\'五結鄉\':\'6X\',\'冬山鄉\':\'6Y\',\'蘇澳鎮\':\'6Z\',\'南澳鄉\':\'70\',\'釣魚台列嶼\':\'71\'},\'新竹市\':{\'東區\':\'1a\',\'北區\':\'1a\',\'香山區\':\'1a\'},\'新竹縣\':{\'竹北市\':\'73\',\'湖口鄉\':\'74\',\'新豐鄉\':\'75\',\'新埔鎮\':\'76\',\'關西鎮\':\'77\',\'芎林鄉\':\'78\',\'寶山鄉\':\'79\',\'竹東鎮\':\'7a\',\'五峰鄉\':\'7b\',\'橫山鄉\':\'7c\',\'尖石鄉\':\'7d\',\'北埔鄉\':\'7e\',\'峨嵋鄉\':\'7h\'},\'桃園縣\':{\'中壢市\':\'7k\',\'平鎮市\':\'7l\',\'龍潭鄉\':\'7m\',\'楊梅鎮\':\'7p\',\'新屋鄉\':\'7r\',\'觀音鄉\':\'7u\',\'桃園市\':\'7v\',\'龜山鄉\':\'7x\',\'八德市\':\'7y\',\'大溪鎮\':\'7z\',\'復興鄉\':\'7A\',\'大園鄉\':\'7B\',\'蘆竹鄉\':\'7D\'},\'苗栗縣\':{\'竹南鎮\':\'7G\',\'頭份鎮\':\'7H\',\'三灣鄉\':\'7K\',\'南庄鄉\':\'7N\',\'獅潭鄉\':\'82\',\'後龍鎮\':\'86\',\'通霄鎮\':\'87\',\'苑裡鎮\':\'88\',\'苗栗市\':\'89\',\'造橋鄉\':\'8d\',\'頭屋鄉\':\'8h\',\'公館鄉\':\'1H\',\'大湖鄉\':\'1I\',\'泰安鄉\':\'1J\',\'銅鑼鄉\':\'1K\',\'三義鄉\':\'1L\',\'西湖鄉\':\'1M\',\'卓蘭鎮\':\'1N\'},\'台中市\':{\'中區\':\'1O\',\'東區\':\'1P\',\'南區\':\'1Q\',\'西區\':\'1R\',\'北區\':\'1S\',\'北屯區\':\'1T\',\'西屯區\':\'1U\',\'南屯區\':\'1V\',\'太平區\':\'1W\',\'大里區\':\'1X\',\'霧峰區\':\'1Y\',\'烏日區\':\'1Z\',\'豐原區\':\'20\',\'后里區\':\'21\',\'石岡區\':\'22\',\'東勢區\':\'23\',\'和平區\':\'24\',\'新社區\':\'25\',\'潭子區\':\'26\',\'大雅區\':\'27\',\'神岡區\':\'28\',\'大肚區\':\'29\',\'沙鹿區\':\'2a\',\'龍井區\':\'2b\',\'梧棲區\':\'2c\',\'清水區\':\'2d\',\'大甲區\':\'2e\',\'外埔區\':\'2f\',\'大安區\':\'2g\'},\'彰化縣\':{\'彰化市\':\'2h\',\'芬園鄉\':\'2i\',\'花壇鄉\':\'2j\',\'秀水鄉\':\'2k\',\'鹿港鎮\':\'2l\',\'福興鄉\':\'2m\',\'線西鄉\':\'2n\',\'和美鎮\':\'2o\',\'伸港鄉\':\'2p\',\'員林鎮\':\'2q\',\'社頭鄉\':\'2r\',\'永靖鄉\':\'2s\',\'埔心鄉\':\'2t\',\'溪湖鎮\':\'2u\',\'大村鄉\':\'2v\',\'埔鹽鄉\':\'2w\',\'田中鎮\':\'2x\',\'北斗鎮\':\'2y\',\'田尾鄉\':\'2z\',\'埤頭鄉\':\'2A\',\'溪州鄉\':\'2B\',\'竹塘鄉\':\'2C\',\'二林鎮\':\'2D\',\'大城鄉\':\'2E\',\'芳苑鄉\':\'2F\',\'二水鄉\':\'2G\'},\'南投縣\':{\'南投市\':\'2H\',\'中寮鄉\':\'2I\',\'草屯鎮\':\'2J\',\'國姓鄉\':\'2K\',\'埔里鎮\':\'2L\',\'仁愛鄉\':\'2M\',\'名間鄉\':\'2N\',\'集集鎮\':\'2O\',\'水里鄉\':\'2P\',\'魚池鄉\':\'2Q\',\'信義鄉\':\'2R\',\'竹山鎮\':\'2S\',\'鹿谷鄉\':\'2T\'},\'嘉義市\':{\'東區\':\'1o\',\'西區\':\'1o\'},\'嘉義縣\':{\'番路鄉\':\'2V\',\'梅山鄉\':\'2W\',\'竹崎鄉\':\'2X\',\'阿里山\':\'2Y\',\'中埔鄉\':\'2Z\',\'大埔鄉\':\'30\',\'水上鄉\':\'31\',\'鹿草鄉\':\'32\',\'太保市\':\'33\',\'朴子市\':\'34\',\'東石鄉\':\'35\',\'六腳鄉\':\'36\',\'新港鄉\':\'37\',\'民雄鄉\':\'38\',\'大林鎮\':\'39\',\'溪口鄉\':\'3a\',\'義竹鄉\':\'3b\',\'布袋鎮\':\'3c\'},\'雲林縣\':{\'斗南鎮\':\'3d\',\'大埤鄉\':\'3e\',\'虎尾鎮\':\'3f\',\'土庫鎮\':\'3g\',\'褒忠鄉\':\'3h\',\'東勢鄉\':\'3i\',\'臺西鄉\':\'3j\',\'崙背鄉\':\'3k\',\'麥寮鄉\':\'3l\',\'斗六市\':\'3m\',\'林內鄉\':\'3n\',\'古坑鄉\':\'3o\',\'莿桐鄉\':\'3p\',\'西螺鎮\':\'3q\',\'二崙鄉\':\'3r\',\'北港鎮\':\'3s\',\'水林鄉\':\'3t\',\'口湖鄉\':\'3u\',\'四湖鄉\':\'3v\',\'元長鄉\':\'3w\'},\'台南市\':{\'中西區\':\'3x\',\'東區\':\'3y\',\'南區\':\'3z\',\'北區\':\'3A\',\'安平區\':\'3B\',\'安南區\':\'3C\',\'永康區\':\'3D\',\'歸仁區\':\'3E\',\'新化區\':\'3F\',\'左鎮區\':\'3G\',\'玉井區\':\'3H\',\'楠西區\':\'3I\',\'南化區\':\'3J\',\'仁德區\':\'3K\',\'關廟區\':\'3L\',\'龍崎區\':\'3M\',\'官田區\':\'3N\',\'麻豆區\':\'3O\',\'佳里區\':\'3P\',\'西港區\':\'3Q\',\'七股區\':\'3R\',\'將軍區\':\'3S\',\'學甲區\':\'3T\',\'北門區\':\'3U\',\'新營區\':\'3V\',\'後壁區\':\'3W\',\'白河區\':\'3X\',\'東山區\':\'3Y\',\'六甲區\':\'3Z\',\'下營區\':\'40\',\'柳營區\':\'41\',\'鹽水區\':\'42\',\'善化區\':\'43\',\'大內區\':\'44\',\'山上區\':\'45\',\'新市區\':\'46\',\'安定區\':\'47\'},\'高雄市\':{\'新興區\':\'48\',\'前金區\':\'49\',\'苓雅區\':\'8i\',\'鹽埕區\':\'4b\',\'鼓山區\':\'4c\',\'旗津區\':\'4d\',\'前鎮區\':\'4e\',\'三民區\':\'4f\',\'楠梓區\':\'4g\',\'小港區\':\'4h\',\'左營區\':\'4i\',\'仁武區\':\'4j\',\'大社區\':\'4k\',\'岡山區\':\'4l\',\'路竹區\':\'4m\',\'阿蓮區\':\'4n\',\'田寮鄉\':\'4o\',\'燕巢區\':\'4p\',\'橋頭區\':\'4q\',\'梓官區\':\'4r\',\'彌陀區\':\'4s\',\'永安區\':\'4t\',\'湖內鄉\':\'4u\',\'鳳山區\':\'4v\',\'大寮區\':\'4w\',\'林園區\':\'4x\',\'鳥松區\':\'4y\',\'大樹區\':\'4z\',\'旗山區\':\'4A\',\'美濃區\':\'4B\',\'六龜區\':\'4C\',\'內門區\':\'4D\',\'杉林區\':\'4E\',\'甲仙區\':\'4F\',\'桃源區\':\'4G\',\'那瑪夏區\':\'4H\',\'茂林區\':\'4I\',\'茄萣區\':\'4J\'},\'屏東縣\':{\'屏東市\':\'4K\',\'三地門\':\'4L\',\'霧臺鄉\':\'4M\',\'瑪家鄉\':\'4N\',\'九如鄉\':\'4O\',\'里港鄉\':\'4P\',\'高樹鄉\':\'4Q\',\'鹽埔鄉\':\'4R\',\'長治鄉\':\'4S\',\'麟洛鄉\':\'4T\',\'竹田鄉\':\'4U\',\'內埔鄉\':\'4V\',\'萬丹鄉\':\'4W\',\'潮州鎮\':\'4X\',\'泰武鄉\':\'4Y\',\'來義鄉\':\'4Z\',\'萬巒鄉\':\'50\',\'崁頂鄉\':\'51\',\'新埤鄉\':\'52\',\'南州鄉\':\'53\',\'林邊鄉\':\'54\',\'東港鎮\':\'55\',\'琉球鄉\':\'56\',\'佳冬鄉\':\'57\',\'新園鄉\':\'58\',\'枋寮鄉\':\'59\',\'枋山鄉\':\'5a\',\'春日鄉\':\'5b\',\'獅子鄉\':\'5c\',\'車城鄉\':\'5d\',\'牡丹鄉\':\'5e\',\'恆春鎮\':\'5f\',\'滿州鄉\':\'5g\'},\'台東縣\':{\'臺東市\':\'5h\',\'綠島鄉\':\'5i\',\'蘭嶼鄉\':\'5j\',\'延平鄉\':\'5k\',\'卑南鄉\':\'5l\',\'鹿野鄉\':\'5m\',\'關山鎮\':\'5n\',\'海端鄉\':\'5o\',\'池上鄉\':\'5p\',\'東河鄉\':\'5q\',\'成功鎮\':\'5r\',\'長濱鄉\':\'5s\',\'太麻里鄉\':\'5t\',\'金峰鄉\':\'5u\',\'大武鄉\':\'5v\',\'達仁鄉\':\'5w\'},\'花蓮縣\':{\'花蓮市\':\'5x\',\'新城鄉\':\'5y\',\'秀林鄉\':\'5z\',\'吉安鄉\':\'5A\',\'壽豐鄉\':\'5B\',\'鳳林鎮\':\'5C\',\'光復鄉\':\'5D\',\'豐濱鄉\':\'5E\',\'瑞穗鄉\':\'5F\',\'萬榮鄉\':\'5G\',\'玉里鎮\':\'5H\',\'卓溪鄉\':\'5I\',\'富里鄉\':\'5J\'},\'金門縣\':{\'金沙鎮\':\'5K\',\'金湖鎮\':\'5L\',\'金寧鄉\':\'5M\',\'金城鎮\':\'5N\',\'烈嶼鄉\':\'5O\',\'烏坵鄉\':\'5P\'},\'連江縣\':{\'南竿鄉\':\'5Q\',\'北竿鄉\':\'5R\',\'莒光鄉\':\'5S\',\'東引鄉\':\'5T\'},\'澎湖縣\':{\'馬公市\':\'5U\',\'西嶼鄉\':\'5V\',\'望安鄉\':\'5W\',\'七美鄉\':\'5X\',\'白沙鄉\':\'5Y\',\'湖西鄉\':\'5Z\'},\'南海諸島\':{\'東沙\':\'60\',\'南沙\':\'61\'}};v k={1D:l(g){B 7.G(l(){v f=$.69({1z:1C,N:\'6\',M:\'5\',K:\'n\',1n:\'\',19:\'\',1t:\'\',1b:1C,1c:1d,15:1d,1i:1d,A:[]},g),u=$(7),o=[],4={},6={},11=[\'<r 13="">縣市</r>\',\'<r 13="">鄉鎮市區</r>\'],p={6:u.y(\'[F-p="6"]:t\'),5:u.y(\'[F-p="5"]:t\'),n:u.y(\'[F-p="n"]:t\')};$(\'<C/>\').J({\'x\':f.N,\'H\':f.N}).1l(p.6.F(\'1k\')||(10!==f.A[0]?f.A[0]:\'\')).I(p.6.E?p.6:7);$(\'<C/>\').J({\'x\':f.M,\'H\':f.M}).1l(p.5.F(\'1k\')||(10!==f.A[1]?f.A[1]:\'\')).I(p.5.E?p.5:7);$(\'<Q/>\').J({\'1w\':\'1G\',\'x\':f.K,\'H\':f.K}).S(\'1b\',f.1b).1l(p.n.F(\'1k\')||(10!==f.A[2]?f.A[2]:\'\')).I(p.n.E?p.n:7);4.D={6:\'C[x="\'+f.N+\'"][H="\'+f.N+\'"]:t\',5:\'C[x="\'+f.M+\'"][H="\'+f.M+\'"]:t\',n:\'Q[1w=1G][x="\'+f.K+\'"][H="\'+f.K+\'"]:t\'};4.6=u.y(4.D.6);4.5=u.y(4.D.5);4.n=u.y(4.D.n);$(11[0]).I(4.6);$(11[1]).I(4.5);U(6 V h){m(h.X(6)){o.q(\'<r 13="\');o.q(6);o.q(\'">\');o.q(6);o.q(\'</r>\')}}$(o.18(\'\')).I(4.6);u.17(\'w\',4.D.6,l(){v a=$(7).8(),o=[],5;4.5.1E();m(a){U(5 V h[a]){m(h[a].X(5)){o.q(\'<r 13="\');o.q(5);o.q(\'">\');o.q(5);o.q(\'</r>\')}}4.5.1m(o.18(\'\')).z(\'w\')}O{4.6.14(\'r:t\').S(\'16\',12);4.5.1E().1m(11[1]);4.n.8(\'\')}m(\'l\'===L f.1c){f.1c.Z(7,4.6)}});u.17(\'w\',4.D.5,l(){v a=$(7).8();m(4.6.8()){4.n.8(h[4.6.8()][a])}m(\'l\'===L f.15){f.15.Z(7,4.5)}});u.17(\'1A W\',4.D.n,l(){v a=$(7),8=\'\',i,j;a.8(a.8().7f(/[^0-9]/g,\'\'));8=a.8().7g();m(3===8.E){U(i V h){m(h.X(i)){U(j V h[i]){m(h[i].X(j)){m(8===h[i][j]){4.6.8(i).z(\'w\');4.5.8(j).z(\'w\');7i}}}}}}m(\'l\'===L f.1i){f.1i.Z(7,4.n)}});4.6.8(f.1n).z(\'w\');m(0!==f.19.E){4.5.8(f.19)}O{4.5.14(\'r:t\').S(\'16\',12)}4.n.8(f.1t).z(\'W\');4.5.z(\'w\');m(12===f.1z){m(\'7j\'!==L R.P){1e(\'7n 7o 1p 7q 1q 7s.\');B}7t{m(10!==1r.1s){1r.1s.7w(l(d){m(d){v e=1u R.P.1v(),1f=1u R.P.7C(d.1x.7E,d.1x.7F);1g.1h(1f);e.7I({\'7J\':1f},l(a,b){m(b===R.P.7L.7M){m(a[1]){v c=a[1].7O.7P(0,3);1g.1h(c);m(0!==c){4.n.8(c).z(\'W\')}}}O{1e(\'1v 7Q 7R 7S: \'+b)}})}},l(a){1g.1h(a)})}O{1e(\'7T 7U 7V 1q 7W 7X 7Y 1p.\');B}}7Z(80){}}})},81:l(){B 7.G(l(){$(7).1B(\'w\',\'C\').1B(\'1A W\',\'Q\').83()})},84:l(){B 7.G(l(){$(7).y(\'C:t\').14(\'r:t\').S(\'16\',12).z(\'w\')})},85:l(){v a=[],1j={},s={},Y={},T={};7.G(l(){1j=$(7),Y=1j.y(\'C,Q\');m(Y.E){Y.G(l(){T=$(7);a.q(T.J(\'x\')+\'=\'+T.8())})}O{$(7).14().G(l(){s=$(7);a.q(s.J(\'x\')+\'=\'+s.8())})}});B a.18(\'&\')}};$.8a.8b=l(a){B\'8c\'===L a?k[a].1F(7,8e.8f.8g.Z(1y,1)):k.1D.1F(7,1y)}}(72));',62,515,'||||wrap|district|county|this|val|||||||||||||function|if|zipcode|tpl|role|push|option||first|self|var|change|name|find|trigger|css|return|select|selector|length|data|each|id|appendTo|attr|zipcodeName|typeof|districtName|countyName|else|maps|input|google|prop|ele|for|in|blur|hasOwnProperty|sel|call|undefined|opt|true|value|children|onDistrictSelect|selected|on|join|districtSel|300|readonly|onCountySelect|null|alert|latlng|console|log|onZipcodeKeyUp|obj|style|addClass|append|countySel|600|API|not|navigator|geolocation|zipcodeSel|new|Geocoder|type|coords|arguments|detect|keyup|off|false|init|empty|apply|text|363|364|365|366|367|368|369|400|401|402|403|404|406|407|408|411|412|413|414|420|421|422|423|424|426|427|428|429|432|433|434|435|436|437|438|439|500|502|503|504|505|506|507|508|509|510|511|512|513|514|515|516|520|521|522|523|524|525|526|527|528|530|540|541|542|544|545|546|551|552|553|555|556|557|558|strict|602|603|604|605|606|607|608|611|612|613|614|615|616|621|622|623|624|625|630|631|632|633|634|635|636|637|638|640|643|646|647|648|649|651|652|653|654|655|700|701|702|704|708|709|710|711|712|713|714|715|716|717|718|719|720|721|722|723|724|725|726|727|730|731|732|733|734|735|736|737|741|742|743|744|745|800|801|use|803|804|805|806|807|811|812|813|814|815|820|821|822|823|824|825|826|827|828|829|830|831|832|833|840|842|843|844|845|846|847|848|849|851|852|900|901|902|903|904|905|906|907|908|909|911|912|913|920|921|922|923|924|925|926|927|928|929|931|932|940|941|942|943|944|945|946|947|950|951|952|953|954|955|956|957|958|959|961|962|963|964|965|966|970|971|972|973|974|975|976|977|978|979|981|982|983|890|891|892|893|894|896|209|210|211|212|880|881|882|883|884|885|817|819|200|201|202|203|204|205|206|extend|100|103|104|105|106|108|110|111|112|114|115|116|207|208|220|221|222|223|224|226|227|228|231|232|233|234|235|236|237|238|239|241|242|243|244|247|248|249|251|252|253|260|261|262|263|264|265|266|267|268|269|270|272|290|jQuery|302|303|304|305|306|307|308|310|311|312|313|314|replace|toString|315|break|object|320|324|325|Google|Maps|326|was|327|reloaded|try|328|330|getCurrentPosition|333|334|335|336|337|LatLng|338|latitude|longitude|350|351|geocode|latLng|352|GeocoderStatus|OK|353|formatted_address|substring|failed|due|to|Your|browser|is|supported|W3C|Geolocation|catch|ignore|destroy|354|remove|reset|serialize|356|357|358|360|fn|twzipcode|string|361|Array|prototype|slice|362|802'.split('|'),0,{}))
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tw_zipcode
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.2
5
+ platform: ruby
6
+ authors:
7
+ - Gary Lai
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-08-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jquery-rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Provide taiwan's zipcode selector
56
+ email:
57
+ - garylai1990@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - .gitignore
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - lib/tw_zipcode.rb
68
+ - lib/tw_zipcode/version.rb
69
+ - tw_zipcode.gemspec
70
+ - vendor/assets/javascripts/tw_zipcode.js
71
+ - vendor/assets/javascripts/tw_zipcode.min.js
72
+ homepage: https://github.com/garylai1990/tw_zipcode
73
+ licenses:
74
+ - MIT
75
+ metadata: {}
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 2.0.6
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: This is a jquery plugin for Taiwan's zipcode selector
96
+ test_files: []