You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
22 KiB
1 line
22 KiB
10 months ago
|
/**/_jsload2 && _jsload2('citylistcontrol', 'x.object.extend(Yc.prototype,{yf:function(){this.D&&this.Ie(this.D)},initialize:function(a){var b=this;if(this.gW&&!this.kR(a))return p;Rc.prototype.initialize.call(this,a);Rc.prototype.Ba.call(this);this.dM(function(){b.Ab();Rc.prototype.Eo.call(b);b.ca(a)});return this.C},Ab:function(){var a=this.fr=H("div",{"class":"ui_city_change"}),b=this.k.anchor,c="",d=q;switch(b){case Sc:c="float: left";break;case Tc:c="float: right";break;case Uc:c="float: left";d=o;break;case 3:c="float: right",d=o}a.innerHTML= \'<a href="javascript:void(0)" onclick="return false" class="ui_city_change_inner" style="\'+c+\'"><span id="cur_city_name" class="cur_city_name">\'+this.D.dh+"</span><i><em></em></i></a>";a.style.position="relative";a.style.height="26px";d||(x.K.Ta(a,"ui_city_change_top"),this.C.appendChild(a));c=this.Rj=H("div",{"class":"citylist_popup_main"});Db(c,\'<div class="citylist_ctr_title">\\u57ce\\u5e02\\u5217\\u8868</div>\');var e=H("div",{"class":"citylist_ctr_content"}),f=H("div",{"class":"city_content_top"}); f.innerHTML=\'<p class="cur_city_info">\\u5f53\\u524d\\u57ce\\u5e02\\uff1a<span id="cur_city_spn">\'+this.D.dh+"</span</p>";Db(f,\'<form id="city_ctrl_form" onsubmit="Instance("\'+this.ba+\'").search(this);return false"><input type="text" class="sel_city_input" id="selCityWd" name="wd" placeholder="\\u8bf7\\u8f93\\u5165\\u57ce\\u5e02\\u540d" autocomplete="off"><span id="selCitySubmit">\\u641c\\u7d22</span><div id="selCityTip" style="display:none;height:20px;line-height:20px;color:#AE6842;border:1px solid #E8AA6C;background:#FEFAF1;width:121px;text-align:center">\\u8bf7\\u8f93\\u5165\\u6b63\\u786e\\u7684\\u57ce\\u5e02</div></form>\'); e.appendChild(f);f=H("div",{"class":"city_content_medium"});Db(f,\'<div id="hot_city_ids" class="sel_city_hotcity">\'+this.xS()+"</div>"+(\'<div id="sel_city_letter_list" class="sel_city_letterbar">\'+this.wS()+"</div>"));e.appendChild(f);f=H("div",{"class":"city_content_bottom",id:"city_detail_tpl"});f.innerHTML=this.vS();e.appendChild(f);c.appendChild(e);e=this.Af=H("button",{id:"popup_close"});c.appendChild(e);this.k.expand?this.qq(o):this.qq(q);if(b==Tc||3==b)c.style.left="-2px";this.C.appendChild(c); d&&(x.K.Ta(a,"ui_city_change_bottom"),this.C.appendChild(a));x.K.Ta(this.C,"BMap_CityListCtrl")},kR:function(a){return a.width&&400<a.width&&a.height&&350<a.height?o:q},ca:function(){function a(a){pa(a);var b=(d.OI.clientHeight||d.OI.offsetHeight)-((d.Tg.clientHeight||d.Tg.offsetHeight)-20);0<(0<(Math.ceil(a.wheelDelta/120)||-a.detail/3)?1:-1)?(d.Tg.scrollTop-=60,0>=d.Tg.scrollTop&&(d.Tg.scrollTop=0)):(d.Tg.scrollTop+=60,d.Tg.scrollTop>=b&&(d.Tg.scrollTop=b))}function b(){d.pV()}function c(a,b){var a= a||window.event,c=(a.target||a.srcElement).getAttribute("name");oa(a);var f=o;switch(b){case "cityHotIds":for(var g=0;g<e.length;g++)e[g]&&e[g]();d.HC(c);break;case "cityLetters":"other"==c&&(c="Z");c=x.$("ctr_tr_"+c);d.Tg.scrollTop=c.offsetTop;f=q;break;case "cityName":for(g=0;g<e.length;g++)e[g]&&e[g]();d.HC(c)}f&&setTimeout(function(){d.qq(q)},200)}var d=this,e=d.onChangeBefore||[];if(d.C){var f=d.fr,g=d.Af,i=x.$("hot_city_ids"),j=x.$("sel_city_letter_list"),l=x.$("city_detail_table"),m=x.$("cur_city_name"), n=x.$("cur_city_spn");Ub(c,i,"cityHotIds");Ub(c,j,"cityLetters");Ub(c,l,"cityName");x.M(f,"click",b);x.M(g,"click",function(){d.qq(q)});d.D.addEventListener("citychange",function(){d.dM(function(){d.ij=d.D.dh;"\\u4e2d\\u56fd"==d.D.dh&&(d.ij="\\u5168\\u56fd");d.Q2=d.D.Cs;m.innerHTML=d.ij;n.innerHTML=d.ij})});x.M(d.Rj,"mousewheel",function(a){pa(a)});window.addEventListener&&d.Rj.addEventListener("DOMMouseScroll",function(a){pa(a)},q);f=d.Tg=x.$("city_detail_tpl");d.OI=x.$("city_detail_table");x.M(f,"mousewheel", a);window.addEventListener&&f.addEventListener("DOMMouseScroll",a,q);x.$("selCitySubmit").addEventListener("click",function(a){pa(a);for(a=0;a<e.length;a++)e[a]&&e[a]();a=x.$("selCityWd").value;0<a.length&&20>a.length?(a=a.replace(/(\\s)/g,"").replace(/</g,"<").replace(/>/g,">"),d.HC(a,o)):x.$("selCityTip").style.display="bl
|