Mercurial > hg > LGMap
annotate map.js @ 21:2104dde1a7e4
do not display about infomation automatically
author | Calvin Yeh <cyeh@mpipw-berlin.mpg.com> |
---|---|
date | Thu, 23 Mar 2017 11:18:41 +0100 |
parents | 3f1800e63c48 |
children |
rev | line source |
---|---|
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
1 |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
2 |
0 | 3 //geoserver url |
4 var url="http://geoserver.mpiwg-berlin.mpg.de/geoserver/China_Monograph_Project/ows"; | |
6 | 5 |
0 | 6 //"name": "layer name" |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
7 var overlayArray=[ |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
8 {name:"中國1820省界", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
9 file:"China_Monograph_Project:AD1820ChinaProfPolgon", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
10 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
11 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
12 {name:"中國1820府界", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
13 file:"China_Monograph_Project:AD1820ChinaPrefPolygon", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
14 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
15 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
16 {name:"中國1820省名", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
17 file:"China_Monograph_Project:AD1820ChinaProfPoint", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
18 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
19 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
20 {name:"China 1820 Province", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
21 file:"China_Monograph_Project:AD1820ChinaProfPoint_PY", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
22 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
23 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
24 {name:"中國1820府名", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
25 file:"China_Monograph_Project:AD1820ChinaPrefPoint", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
26 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
27 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
28 {name:"China 1820 Prefecture", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
29 file:"China_Monograph_Project:AD1820ChinaPrefPoint_PY", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
30 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
31 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
32 {name:"中國1820縣市名", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
33 file:"China_Monograph_Project:AD1820ChinaCountyPoints", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
34 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
35 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
36 {name:"China 1820 County", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
37 file:"China_Monograph_Project:AD1820ChinaCountyPoints_PY", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
38 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
39 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
40 {name:"中國1820鄉鎮名", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
41 file:"China_Monograph_Project:AD1820ChinaTownPoint", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
42 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
43 }, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
44 {name:"China 1820 village", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
45 file:"China_Monograph_Project:AD1820ChinaTownPoint_PY", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
46 preload:false |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
47 }, |
19
3f1800e63c48
new overlay : China 1820 Prefecture (boundaries-only)
Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
parents:
17
diff
changeset
|
48 {name:"China 1820 Prefecture (boundaries-only)", |
3f1800e63c48
new overlay : China 1820 Prefecture (boundaries-only)
Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
parents:
17
diff
changeset
|
49 file:"China_Monograph_Project:v5_1820_pref_pgn_utf_wgs84", |
3f1800e63c48
new overlay : China 1820 Prefecture (boundaries-only)
Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
parents:
17
diff
changeset
|
50 preload:false |
3f1800e63c48
new overlay : China 1820 Prefecture (boundaries-only)
Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
parents:
17
diff
changeset
|
51 }, |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
52 {name:"provincial distribution of local monographs", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
53 file:"China_Monograph_Project:monograph_distribution_prov_x", |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
54 preload:false |
0 | 55 }, |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
56 /*{ |
0 | 57 name:"test", |
58 file:"China_Monograph_Project:v5_citas90_pref_pgn_utf", | |
59 preload:false | |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
60 },*/ |
0 | 61 { |
62 name:"provincial capitals", | |
63 file:"China_Monograph_Project:all_monographs_capital_points", | |
64 preload:false | |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
65 } |
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
66 ]; |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
67 var datasetArray=[ |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
68 |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
69 {name:"distribution of local monographs", |
0 | 70 file:"./datasets/books_coordinates.csv", |
71 preload:true | |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
72 |
0 | 73 }, |
74 { | |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
75 name:"蝗神廟之分佈", |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
76 file:"./datasets/locust_temples.csv", |
0 | 77 preload:false |
78 }]; | |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
79 var backgroundMapArray=[ |
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
80 /*{ |
0 | 81 name: 'Barrington Roman Empire', |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
82 url: 'http://pelagios.dme.ait.ac.at/tilesets/imperium/${z}/${x}/${y}.png', |
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
83 type:'XYZ', |
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
84 attribution: "(c) Barrington Roman Empiry, <a href='http://pelagios.dme.ait.ac.at/maps/greco-roman/'>Pelagios</a>" |
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
85 },*/ |
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
86 { |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
87 name: '世界地形圖', |
17 | 88 url: '../ts/t/terrain/${z}/${x}/${y}.png', |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
89 type:'XYZ', |
16 | 90 attribution: "<a href='../ts/index.html?y=1982' target='_blank'>Data Source</a>" |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
91 } |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
92 , |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
93 /*,{ |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
94 name: '西元1820年 清朝 行政區', |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
95 url: 'http://wmsproxy.appspot.com/map.jsp?l=China1820-png-${z}-${x}-${y}', |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
96 type:'XYZ', |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
97 attribution: "© NTU CSIE 303 Lab, <a href='http://archimedes.csie.ntu.edu.tw/lab_web1/'>NTU CSIE 303 Lab</a>" |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
98 }*/ |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
99 ]; |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
100 //mpgiwg layers |
11 | 101 if (client_ip.substring(0,9)=="141.14.23") { |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
102 backgroundMapArray.push( |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
103 { |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
104 |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
105 name: '陳正祥–蝗神廟之分佈', |
17 | 106 url: '../ts/t/pa_cha/${z}/${x}/${y}.png', |
8
8f05c2a84bba
Apply new platin and Add tree layers
nylin@mpiwg-berlin.mpg.de
parents:
7
diff
changeset
|
107 type:'XYZ', |
16 | 108 attribution: "© 中國文化地理 陳正祥, <a href='../ts/index.html?y=1982' target='_blank'>Data Source</a>" |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
109 } |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
110 ); |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
111 } |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
112 |
0 | 113 var colorArray=[{//blue |
114 r1 : 0, | |
115 g1 : 128, | |
116 b1 : 255, | |
117 r0 : 205, | |
118 g0 : 230, | |
119 b0 : 255 | |
120 },{//red | |
121 r1 : 255, | |
122 g1 : 84, | |
123 b1 : 22, | |
124 r0 : 255, | |
125 g0 : 218, | |
126 b0 : 205 | |
127 }, {//purple | |
128 r1 : 132, | |
129 g1 : 0, | |
130 b1 : 255, | |
131 r0 : 231, | |
132 g0 : 205, | |
133 b0 : 255 | |
134 }, {//green | |
135 r1 : 0, | |
136 g1 : 225, | |
137 b1 : 116, | |
138 r0 : 180, | |
139 g0 : 225, | |
140 b0 : 204 | |
141 }, {//yellow | |
142 r1 : 255, | |
143 g1 : 191, | |
144 b1 : 0, | |
145 r0 : 255, | |
146 g0 : 243, | |
147 b0 : 205 | |
148 }]; | |
149 var map, table,timeline,pieChart; | |
150 var urlParameter=new Array(); | |
151 $(document).ready(function(){ | |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
152 |
0 | 153 GeoTemConfig.datasets=[]; |
154 GeoTemConfig.colors=colorArray; | |
155 getUrlParameter(); | |
156 if(urlParameter['name']!=undefined&&urlParameter['file']!=undefined){ //See if this page is referred by search result | |
157 var file="./datasets/"+decodeURI(urlParameter['file']); | |
158 var name=decodeURI(urlParameter['name']); | |
159 var obj={name:name,file:file,preload:true}; | |
160 datasetArray.splice(0,0,obj); | |
161 } | |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
162 |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
163 // zoe added for incoming json object from LGDataverse |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
164 if (urlParameter['name']!=undefined && urlParameter['file']==undefined && urlParameter['fileId']!=undefined) { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
165 var file=undefined; |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
166 var name=decodeURI(urlParameter['name']); |
15
f17f43f0a63f
bug fixed: download error for data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
167 var obj={name:name,file:file,preload:true}; |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
168 datasetArray.splice(0,0,obj); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
169 }; |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
170 // end |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
171 |
0 | 172 initWindowWidget(); |
173 initWidget(); //initial Sebastian's widgets | |
174 initToolbar(); //initial the left side icons | |
175 // Syncronize checkboxes and table widget | |
176 var subscriber; | |
177 Publisher.Subscribe('filterData',subscriber,function(data){ | |
178 $("#datasetContainer input:checkbox").each(function(){ | |
179 var name=$(this).attr("name"); | |
180 var dataset=$.grep(data,function(val,key){ | |
181 return val.label==name; | |
182 }); | |
183 if(dataset.length==0){ | |
184 this.checked=false; | |
185 } | |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
186 // zoe added |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
187 if (urlParameter['file']==undefined && urlParameter['fileId']!=undefined && name==urlParameter['name']) { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
188 this.checked = true; |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
189 this.disabled = true; |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
190 } |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
191 // end |
0 | 192 }); |
193 }); | |
194 $(".windowWidget").hide(); | |
195 $(".windowWidget .windowWidgetBar .visibilityButton").click(); | |
196 | |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
197 // debug by yao |
21
2104dde1a7e4
do not display about infomation automatically
Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
parents:
19
diff
changeset
|
198 // $("#aboutIcon").click(); |
15
f17f43f0a63f
bug fixed: download error for data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
199 |
0 | 200 }); |
201 function getUrlParameter(){ | |
202 //examine the parameter "mode" in the url | |
203 var url=window.location.href; | |
204 var pos=url.indexOf("?"); | |
205 if(pos!=-1){ | |
206 var params=url.substring(pos+1); | |
207 var varArray=params.split("&"); | |
208 for(var i=0; i<varArray.length; i++){ | |
209 pos=varArray[i].indexOf("="); | |
210 var name=varArray[i].substring(0,pos); | |
211 var value=varArray[i].substring(pos+1); | |
212 urlParameter[name]=value; | |
213 /* | |
214 if(name=="mode"){ | |
215 mode=value; | |
216 }*/ | |
217 } | |
218 } | |
219 } | |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
220 |
0 | 221 function loadDataset(name,fileName){ |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
222 // zoe added |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
223 if (fileName==undefined) { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
224 // Get file json object from POST from LGDataverse by fileId in url |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
225 var fileId = urlParameter['fileId']; |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
226 var lgdv_url = lgdataverse_url + "getDatafile?fileId="+fileId; // lgdataverse_url is a global var |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
227 console.log("lgdv_url:"+lgdv_url); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
228 |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
229 var fileData = {}; |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
230 $.ajax({ |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
231 url : lgdataverse_url+"getDatafile", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
232 async : false, |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
233 type : 'GET', |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
234 data: 'fileId='+fileId, |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
235 dataType: "json", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
236 success: function (data) { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
237 console.log("getting file from LGDataverse success!"); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
238 fileData = data; |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
239 }, |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
240 error: function (data) { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
241 console.log("getting file from LGDataverse failed!" + data); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
242 alert("Data "+ urlParameter['name'] +" CANNOT be shown on the map."); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
243 |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
244 } |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
245 }).done(function(result) { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
246 |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
247 }); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
248 |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
249 if (fileData.state == "ok") { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
250 /* |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
251 var json = [ |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
252 { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
253 // these fields are required in map |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
254 "description":"20卷 ╱ (民國) 崔正春修 (民國) 尚希寳纂 ╱ 民國十八年鉛印本", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
255 "lat":36.974178, |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
256 "lon":115.259262, |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
257 "place":"威縣", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
258 // ---- |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
259 "tableContent":{ |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
260 // these fields are shown as columns in the table |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
261 "description":"20卷 ╱ (民國) 崔正春修 (民國) 尚希寳纂 ╱ 民國十八年鉛印本", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
262 "name":"(民國) 威縣志", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
263 "place":"威縣", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
264 "testColumn1":"content1", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
265 "testColumn2":"content2", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
266 "testColumn3":"content3", |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
267 |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
268 } |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
269 } |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
270 ]; |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
271 */ |
15
f17f43f0a63f
bug fixed: download error for data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
272 |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
273 var dataCSVformat = fileData.file.dataString; |
15
f17f43f0a63f
bug fixed: download error for data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
274 dataCSVformat = dataCSVformat.substring(0, dataCSVformat.length-2); // remove the last two characters which are "\n" |
f17f43f0a63f
bug fixed: download error for data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
275 // it will cause download error since the last element in table is null |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
276 //console.log(dataCSVformat); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
277 var json = GeoTemConfig.convertCsv(dataCSVformat); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
278 GeoTemConfig.addDataset(new Dataset(GeoTemConfig.loadJson(json),name)); |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
279 |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
280 } |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
281 } else { |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
282 // zoe end |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
283 |
0 | 284 var csvFile=GeoTemConfig.getCsv(fileName, |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
285 function(json){ |
0 | 286 GeoTemConfig.addDataset(new Dataset(GeoTemConfig.loadJson(json),name)); |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
287 |
0 | 288 //checking the checkbox has to be done here, because if done in the each loop below, it will be unchecked again in the Publisher.Subscribe function. For the Publisher.Subscribe function may be called when the dataset is not yet loaded, which causes dataset.length to be 0 and unchecks the checkbox |
289 $("#datasetContainer input:checkbox[value*='"+fileName+"']").prop("checked",true); | |
290 //rename the column "name" to "title" | |
291 $(".headerLabel").each(function(){ | |
292 if ($(this).html() == "name"){ | |
293 $(this).empty(); | |
294 $(this).html("title"); | |
295 } | |
296 }); | |
297 /*//this is redundant when calling GeoTemConfig.addDataset | |
298 //display in all widgets | |
299 map.display(GeoTemConfig.datasets); | |
300 timeline.display(GeoTemConfig.datasets); | |
301 table.display(GeoTemConfig.datasets); | |
302 pieChart.display(GeoTemConfig.datasets); */ | |
15
f17f43f0a63f
bug fixed: download error for data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
303 |
0 | 304 } |
15
f17f43f0a63f
bug fixed: download error for data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
305 |
0 | 306 ); |
15
f17f43f0a63f
bug fixed: download error for data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
307 |
7
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
308 } |
0330b2138c87
add collecting post data from LGDataverse
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
6
diff
changeset
|
309 |
0 | 310 } |
311 function closeDataset(name,fileName){ | |
312 var idx; | |
313 //find the dataset to close by name | |
314 var data=$.grep(GeoTemConfig.datasets,function(val,key){ | |
315 if(val.label==name){ | |
316 idx=key; | |
317 } | |
318 return val.label==name; | |
319 }); | |
320 //GeoTemConfig.datasets.splice(idx,1); | |
321 GeoTemConfig.removeDataset(idx); | |
322 } | |
323 function initWidget(){ | |
324 var mapElem=document.getElementById("mapContainer"); | |
325 map=new WidgetWrapper(); | |
326 var mapWidget=new MapWidget(map,mapElem,{ | |
327 mapTitle:"", | |
10
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
328 minimumRadius:2, |
8f5635197895
new filter by columns and new layers
nylin@mpiwg-berlin.mpg.de
parents:
9
diff
changeset
|
329 baseLayer:'世界地形圖', //底圖 |
0 | 330 alternativeMap:backgroundMapArray |
331 }); | |
332 | |
333 var overlayLoaderElem=document.getElementById("overlayLoaderContainer"); | |
334 var overlayLoader=new WidgetWrapper(); | |
335 var overlayLoaderWidget=new OverlayloaderWidget(overlayLoader,overlayLoaderElem); | |
336 overlayLoaderWidget.attachMapWidget(mapWidget); | |
337 //insert overlay checkboxes | |
338 $.each(overlayArray,function(idx,obj){ | |
339 var name=obj.name; | |
340 var file=obj.file; | |
341 var preload=obj.preload; | |
342 var optionObj=$("<div class='option'></div>"); | |
343 $("#overlayContainer").append(optionObj); | |
344 var checkBoxObj=$("<input type='checkbox' name='"+name+"' value='"+file+"'>"); | |
345 checkBoxObj.prop("checked",preload); | |
346 optionObj.append(checkBoxObj); | |
347 var nameObj=$("<div class='label'>"+name+"</div>"); | |
348 optionObj.append(nameObj); | |
349 if(preload){ | |
350 overlayLoaderWidget.overlayLoader.distributeArcGISWMS(url,file); | |
351 } | |
352 }); | |
353 | |
354 $("#overlayContainer input:checkbox").click(function(e){ | |
355 //dirty insertion and deletion, delete all the overlays and insert them in the specified sequence | |
356 //in order to maintain the sequence of overlays, so that the smaller one will always be on top of the bigger ones | |
357 //in the overlayLoader, clicking on the "x" button deletes the overlay. Here deletion is done by triggering the click event rather than deleting the overlay directly | |
358 while($("#overlayLoaderContainer div:last-child a").length!=0){ | |
359 $("#overlayLoaderContainer div a:nth-child(1)").click(); | |
360 } | |
361 | |
362 $("#overlayContainer input:checkbox").each(function(){ | |
363 if($(this).is(":checked")){ | |
364 overlayLoaderWidget.overlayLoader.distributeArcGISWMS(url, | |
365 $(this).val()); | |
366 } | |
367 }); | |
368 //stop the event from propagating, or the list would close every time the user checks an item | |
369 e.stopPropagation(); | |
370 /* | |
371 //normal insertion and deletion | |
372 if($(this).is(":checked")){//selected | |
373 overlayLoaderWidget.overlayLoader.distributeArcGISWMS("http://geoserver.mpiwg-berlin.mpg.de/geoserver/China_Monograph_Project/ows", | |
374 $(this).val()); | |
375 }else{//deselect | |
376 var name=url+" - "+$(this).val(); | |
377 var layerNameArray=$("#overlayLoaderContainer > div:last-child").html().split('<a href="">(x)</a>'); | |
378 var idx=$.inArray(name,layerNameArray); | |
379 $("#overlayLoaderContainer div a:nth-child("+(idx+1)+")").click(); | |
380 }*/ | |
381 }); | |
382 | |
383 | |
384 //insert dataset checkboxes | |
385 $.each(datasetArray,function(idx,obj){ | |
386 var name=obj.name; | |
387 var file=obj.file; | |
388 var preload=obj.preload; | |
389 var optionObj=$("<div class='option'></div>"); | |
390 $("#datasetContainer ").append(optionObj); | |
391 var checkBoxObj=$("<input type='checkbox' name='"+name+"' value='"+file+"'>"); | |
392 optionObj.append(checkBoxObj); | |
393 //checkBoxObj.prop("checked",preload); | |
394 var nameObj=$("<div class='label'>"+name+"</div>"); | |
395 optionObj.append(nameObj); | |
396 if(preload){ | |
397 loadDataset(name,file); | |
398 } | |
399 }); | |
400 $("#datasetContainer input:checkbox").click(function(){ | |
401 /* | |
402 //dirty insertion and deletion, too slow | |
403 while($("#tableContainer .tableTabs").children().length!=0){ | |
404 //console.log($("#tableContainer .tableTabs").children().length); | |
405 //$("#tableContainer .tableTabs .tableTab:nth-child(1) .smallButton")[0].onclick(); | |
406 GeoTemConfig.removeDataset(0); | |
407 } | |
408 | |
409 $("#datasetContainer .content input:checkbox").each(function(){ | |
410 if($(this).is(":checked")){ | |
411 loadDataset($(this).attr("name"),$(this).val()); | |
412 } | |
413 }); | |
414 */ | |
415 if($(this).is(":checked")){//selected | |
416 loadDataset($(this).attr("name"),$(this).val()); | |
417 }else{ | |
418 closeDataset($(this).attr("name"),$(this).val()); | |
419 } | |
420 }); | |
421 var timelineElem=document.getElementById("timelineContainer"); | |
422 timeline=new WidgetWrapper(); | |
423 var timelineWidget=new FuzzyTimelineWidget(timeline,timelineElem,{ | |
424 timelineTitle:"" | |
425 }); | |
426 | |
427 var tableElem=document.getElementById("tableContainer"); | |
428 table=new WidgetWrapper(); | |
429 var tableWidget=new TableWidget(table,tableElem); | |
430 | |
431 var pieChartElem=document.getElementById("pieChartContainer"); | |
432 pieChart=new WidgetWrapper(); | |
433 var pieChartWidget=new PieChartWidget(pieChart,pieChartElem); | |
434 //pieChartWidget.addPieChart(0,"place"); | |
435 } | |
436 function initToolbar(){ | |
11 | 437 var mode=1; |
0 | 438 if(urlParameter['mode']!=undefined) |
439 mode=urlParameter['mode']; | |
440 if(mode==1){//locate the overlay selector on the map toolbar | |
441 $("#overlayIcon").hide(); | |
442 var overlayContainerObj=$("#overlayContainer"); | |
443 var overlayTitleObj=$("<td>Overlay</td>"); | |
444 overlayTitleObj.insertAfter("#mapContainer .absoluteToolbar tr:nth-child(1) td:nth-child(1)"); | |
445 var overlaySelectorObj=$("<td></td>"); | |
446 var overlayContainerPadding=5; | |
447 overlayContainerObj.css("padding",overlayContainerPadding+"px"); | |
448 //give the overlay selector the same look as the that of the background map and adjust the width | |
449 overlaySelectorObj.append("<div class='dropdownLeft'></div>"); | |
450 overlaySelectorObj.append("<div class='dropdownSelection'>select overlays</div>"); | |
451 overlaySelectorObj.append("<div class='dropdownButtonEnabled'></div>"); | |
452 overlaySelectorObj.insertAfter("#mapContainer .absoluteToolbar tr:nth-child(2) td:nth-child(1)"); | |
453 var w=parseInt(overlayContainerPadding*2+overlayContainerObj.width()); | |
454 overlaySelectorObj.width(w); | |
455 w=w-overlaySelectorObj.children(".dropdownLeft").width()-overlaySelectorObj.children(".dropdownButtonEnabled").width(); | |
456 overlaySelectorObj.children(".dropdownSelection").width(w); | |
457 overlaySelectorObj.append(overlayContainerObj); | |
458 //hide the overlay list and adjust the position | |
459 overlayContainerObj.hide(); | |
460 overlayContainerObj.css("position","absolute"); | |
461 var t=overlaySelectorObj.offset().top-parseInt(overlayContainerObj.css("padding"))+overlaySelectorObj.children(".dropdownButtonEnabled").height(); | |
462 //var l=overlaySelectorObj.offset().left-overlayContainerObj.width()/2; | |
463 var l=overlaySelectorObj.position().left-$("#rightWrapper").css("margin-left"); | |
464 overlayContainerObj.css("top",t); | |
465 overlayContainerObj.css("left",l); | |
466 overlayContainerObj.css("z-index",20000); | |
467 //toggle the visibility of the overlay list by clicking on the selector | |
468 overlaySelectorObj.click(function(){ | |
469 var visible=overlayContainerObj.is(":visible"); | |
470 if(visible){ | |
471 $(this).children(".selector").show(); | |
472 overlayContainerObj.hide(); | |
473 }else{ | |
474 $(this).children(".selector").hide(); | |
475 overlayContainerObj.show(); | |
476 } | |
477 }); | |
478 } | |
479 | |
480 $(".icon").each(function(){//adjust the position of the windows | |
481 var t=$(this).offset().top; | |
482 var l=$("#rightWrapper").css("margin-left"); | |
483 var windowName="."+$(this).attr("id"); | |
484 windowName=windowName.replace("Icon",""); | |
485 var windowObj=$(windowName); | |
486 windowObj.css("top",t); | |
487 windowObj.css("left",l); | |
488 }); | |
489 | |
490 // The following two sections are to hide/show the windows | |
491 $(".icon").click(function(){//toggle the visibility of the window by clicking on the icons | |
492 var windowName="."+$(this).attr("id"); | |
493 windowName=windowName.replace("Icon",""); | |
494 var windowObj=$(windowName); | |
495 if(windowObj.is(":visible")){ | |
496 //hide the window | |
497 windowObj.hide(); | |
498 $(this).removeClass("selected"); | |
499 }else{ | |
500 //show the window | |
501 if(windowObj.children(".windowWidgetBar").children(".visibilityButton").html()=="+"){ | |
502 windowObj.children(".windowWidgetBar").children(".visibilityButton").click(); | |
503 } | |
504 windowObj.show(); | |
505 $(this).addClass("selected"); | |
506 } | |
507 }); | |
508 $(".windowWidget .windowWidgetBar .visibilityButton").click(function(){ | |
509 if($(this).html()=="+"){//if the window is minimized, it should be hidden | |
510 $(this).parent().parent().hide(); | |
511 var windowName=$(this).parent().parent().attr("class"); | |
512 windowName=windowName.replace("container",""); | |
513 windowName=windowName.replace("windowWidget",""); | |
514 windowName=windowName.replace("ui-draggable",""); | |
515 windowName=windowName.replace(" ",""); | |
516 windowName=windowName.trim(); | |
517 windowName="#"+windowName+"Icon"; | |
518 $(windowName).removeClass("selected"); | |
519 } | |
520 }); | |
521 | |
522 } |