1function tmpdisplay(){ 2 this.close = 1 ; 3 this.tout = null; 4 this.tmpdiv = null; 5 this.tmpdiv = document.createElement('div'); 6 this.tmpdiv.style.position='absolute'; 7 this.tmpdiv.style.left='100px'; 8 this.tmpdiv.style.top='100px'; 9 this.tmpdiv.style.width="100px"; 10 this.tmpdiv.style.height="100px"; 11 this.tmpdiv.style.backgroundColor="transparent"; 12 this.tmpdiv.className='cc view-current view-bg'; 13 this.tmpdiv.style.display='none'; 14 document.body.appendChild(this.tmpdiv); 15 16 //ÏÔʾ²ã 17 this.disdiv=function(left,top,width,height,display) { 18 this.tmpdiv.style.left=left+'px'; 19 this.tmpdiv.style.top=top+'px'; 20 this.tmpdiv.style.width=width+'px'; 21 this.tmpdiv.style.height=height+'px'; 22 this.tmpdiv.style.display=display; 23 } 24 25 //»ñÈ¡¾ø¶Ô·¾¶ 26 this.getpos=function(o) { 27 var rect = o.getBoundingClientRect(); 28 return {"x" : rect.left+ietruebody().scrollLeft, "y" : rect.top+ietruebody().scrollTop}; 29 30 } 31} 32var G_MODE_SWITCH=0;//È«¾ÖÄ£¿é¹ÜÀí¿ª¹Ø 33var portalBox; 34var frontAdmin = Class({}, 35{ 36 _mode: 'area', 37 Create: function (container,tag,mode) { 38 tmpdis = new tmpdisplay; 39 this.container = container; 40 this.editClass = 'open-none'; 41 42 43 this.tag = tag; 44 if (mode) { 45 this._mode = mode; 46 } 47 this.current = null; 48 this._init(); 49 }, 50 _init: function () { 51 var list = getElementsByClassName(this.tag,this.container); 52 var self = this; 53 for (var i = 0; i< list.length; i++ ) { 54 this._addEvent(list[i],'mouseover',this._mouseover); 55 this._addEvent(list[i],'mouseout',this._mouseout); 56 } 57 //this._initEditLink(); 58 var configBox = document.createElement('div'); 59 configBox.innerHTML = '<div class="open-none" style="width:100%;height:22px;z-index:7;background:#666;filter:alpha(opacity=80);opacity:0.8;padding:0;margin:0"></div><div class="open-none" style="padding:0;margin:0;overflow:hidden;text-align:left;text-indent:.5em;font:700 12px/22px a;color:#fff;height:22px;z-index:8;top:0;position:absolute"></div><span class="open-none" style="overflow:hidden;height:22px;font:700 12px/22px a;background:#F60;cursor:pointer;position:absolute;z-index:9;color:#FF0;padding:0 15px;margin:0;right:0;top:0;">¹ÜÀí</span>'; 60 configBox.style.position='absolute'; 61 configBox.style.display='none'; 62 configBox.id="configBox"; 63 configBox.onmouseover=function(){ 64 if(tmpdis.tout) 65 clearTimeout(tmpdis.tout); 66 }; 67 configBox.onmouseout=function(){ 68 if(tmpdis.tout) { 69 clearTimeout(tmpdis.tout); 70 } 71 thisself = self._getElementsByClassName('view-current')[0]; 72 thisself.className = 'cc view-current'; 73 74 tmpdis.close=1; 75 tmpdis.tout=setTimeout(function() { 76 if(tmpdis.close == 1) { 77 thisself.className = 'cc view-hover'; 78 tmpdis.disdiv(0,0,0,0,'none'); 79 getObj('configBox').style.display='none'; 80 } 81 },500); 82 }; 83 configBox.childNodes[2].onclick=this._initEditLink; 84 document.body.appendChild(configBox); 85 }, 86 _mouseover: function () { 87 if(!G_MODE_SWITCH){ 88 return false; 89 } 90 if(tmpdis.tout) 91 clearTimeout(tmpdis.tout); 92 if(this.className=='cc view-current') 93 return; 94 //Ð޸ĴóСλÖà 95 var rect = this.getBoundingClientRect(); 96 var configBox = getObj('configBox'); 97 98 configBox.style.left = rect.left+ietruebody().scrollLeft-1+'px'; 99 configBox.style.top = rect.top+ietruebody().scrollTop-23+'px'; 100 configBox.style.width = this.clientWidth+2+'px'; 101 var altname = this.getAttribute('altname'); 102 var invokename = this.getAttribute('invokename'); 103 var channelId = this.getAttribute('channelid'); 104 configBox.childNodes[1].innerHTML=invokename; 105 configBox.childNodes[2].id=altname; 106 configBox.childNodes[2].channelId=channelId; 107 configBox.style.display=''; 108 //ÏÔʾ³öÀ´ 109 var thispos=tmpdis.getpos(this); 110 tmpdis.disdiv(thispos.x-1,thispos.y-1,this.offsetWidth,this.offsetHeight,'block'); 111 this.className = 'cc view-current'; 112 this.style.zIndex =2; 113 tmpdis.close=0; 114 }, 115 116 _initEditLink: function () { 117 frontAdmin._sendmsg((getObj('headbase') ? getObj('headbase').href : '') + 'mode.php?m=area&q=dialog&invokename='+encodeURI(this.id)+'&channelid='+this.channelId,'');//frontadmin 118 }, 119 120 _sendmsg :function(url,data,id) { 121 portalBox = new PwMenu('portalBox'); 122 portalBox.obj = (typeof id == 'undefined' || !id) ? null : getObj(id); 123 //portalBox.guide(); 124 setTimeout(function(){ajax.send(url,data,function(){ajax.get(portalBox)});},100); 125 },
126 _mouseout: function () { 127 if(!G_MODE_SWITCH){ 128 return false; 129 } 130 if(tmpdis.tout) { 131 clearTimeout(tmpdis.tout); 132 } 133 var thisself=this; 134 this.className = 'cc view-current'; 135 tmpdis.close=1; 136 tmpdis.tout=setTimeout(function() { 137 if(tmpdis.close == 1) { 138 thisself.className = 'cc view-hover'; 139 tmpdis.disdiv(0,0,0,0,'none'); 140 getObj('configBox').style.display='none'; 141 } 142 },500); 143 144 }, 145 _addEvent: function (el,evname,func) { 146 var self = this; 147 el['on'+evname]=function(){self._changView(el,func);} 148 if(document.all) { 149 el.attachEvent("on" + evname,function(){ 150 self._changView(el,func); 151 }); 152 } else { 153 el.addEventListener(evname,function(){ 154 self._changView(el,func); 155 },true); 156 } 157 }, 158 _changView:function(el,func){ 159 if (this.current) { 160 this.current.className = 'cc view-hover'; 161 } 162 this.current = el; 163 func.call(el); 164 }, 165 166 _getElementsByClassName : function (className, parentElement) { 167 if (typeof(parentElement)=='object') { 168 var elems = parentElement.getElementsByTagName("*"); 169 } else { 170 var elems = (document.getElementById(parentElement)||document.body).getElementsByTagName("*"); 171 } 172 var result=[]; 173 for (i=0; j=elems[i]; i++) { 174 if ((" "+j.className+" ").indexOf(" "+className+" ")!=-1) { 175 result.push(j); 176 } 177 } 178 return result; 179 } 180} 181); 182 183function countlen(element,num) { 184 if (element.value.length>num){ 185 alert('³¬¹ý×ÖÊýÏÞÖÆ'); 186 element.value=element.value.substring(0,num); 187 } 188 return true; 189} 190 191function addPush(invokepieceid,fid,loopid,channelid) { 192 if (typeof(mode) == 'undefined') { 193 var temp = frontAdmin._mode; 194 } else { 195 var temp = mode; 196 197 198 } 199 var url = "mode.php?m="+temp+"&q=frontadmin&action=addpush&invokepieceid="+invokepieceid+"&fid="+fid+"&loopid="+loopid+'&channelid='+channelid; 200 var pushkey= 0; 201 if (getObj('pushkey')) { 202 pushkey = getObj('pushkey').value; 203 } 204 ajax.send(url,'pushkey='+pushkey,ajax.get); 205} 206 207function delPush(element,pushid,channelid) { 208 if (!confirm("È·¶¨ÒªÉ¾³ý´ËÌõÄ¿Âð£¿")){ 209 return false; 210 } 211 var url = "mode.php?m=area&q=frontadmin&action=deletepush"; 212 ajax.send(url,'pushid='+pushid+'&channelid='+channelid,function () { 213 if (ajax.request.responseText=='success') { 214 delTr(element); 215 } else { 216 alert(ajax.request.responseText); 217 } 218 }); 219} 220 221function styleOnclick(e,obj){ 222 var objclass = e.className; 223 var temp = objclass.split(' '); 224 var newclass = ''; 225 for (var n=0; n<temp.length; n++){ 226 if (temp[n]=='one') { 227 continue; 228 } 229 newclass += ' ' + temp[n]; 230 } 231 if (objclass.match(/one/)) { 232 e.className = newclass; 233 getObj(obj).value = ''; 234 } else { 235 e.className = newclass + ' one'; 236 getObj(obj).value = 1; 237 } 238} 239function colorCancel(){ 240 getObj('color_show').style.backgroundColor='#FFFFFF'; 241 getObj('title1').value=''; 242} 243//¹ÜÀíÄ£¿é========= 244(function(){ 245 var ChannelManage=function(status,url,ns,mode){//mode 1ÃÅ»§ 0ÆäËû(²»ÏÔʾˢкͲ鿴) 246 //´´½¨¿ª¹Ø 247 this.handler=document.createElement("div"); 248 this.handler.innerHTML='<div id="pw_divTop"></div><a href="javascript:;">Ä£¿é¹ÜÀí</a>'; 249 this.handler.id="J_channelManage"; 250 this.handler.className="pw_diy"; 251 //´´½¨¿ØÖÆÃæ°å 252 this.console=document.createElement("div"); 253 this.console.id="consolePanel"; 254 this.console.style.display="none"; 255 var html=['<a href="javascript:void(0)" id="console_close" class="fr">¹Ø±Õ</a><span class="mr20">Ŀǰ´¦ÓÚÄ£¿é¹ÜÀíģʽ£¬Äã¿ÉÒÔ<a id="console_showAll" href="javascript:void(0)">ÏÔʾËùÓÐÄ£¿é</a>±ãÓÚ²éÕÒÒþ²ØÄ£¿é</span>','<span class="bt2" id="console_refresh"><span><button type="button">ˢо²Ì¬</button></span></span><span class="bt2" id="console_showStatic"><span><button type="button">²é¿´¾²Ì¬</button></span></span>']; 256 this.console.innerHTML=mode?html.join(" "):html[0]; 257 document.body.appendChild(this.handler); 258 document.body.appendChild(this.console); 259 this.closeBtn=document.getElementById("console_close"); 260 this.showAllBtn=document.getElementById("console_showAll"); 261 this.refreshBtn=mode?document.getElementById("console_refresh"):null; 262 this.staticBtn=mode?document.getElementById("console_showStatic"):null; 263 this.modes=this.getElementsByClassName("view-hover"); 264 this.defaultStatus=status;
264//¿ØÖÆÌ¨Ä¬ÈÏ״̬ 0(ĬÈÏ) 1:ÏÔʾ¿ØÖÆÌ¨ 2:ÏÔʾ¿ØÖÆÌ¨ºÍÄ£¿é 265 this.staticUrl=url; 266 this.namespace=ns; 267 this.mode=mode; 268 } 269 ChannelManage.prototype={ 270 "init":function(){ 271 var that=this; 272 if(that.defaultStatus==1){ 273 this.show(); 274 } 275 if(this.defaultStatus==2){ 276 this.defaultStatus=1; 277 this.show(1); 278 } 279 this.addEvent(this.handler,"click",function(){ 280 if(getStyle(that.console,"display")=="none"){ 281 that.show(); 282 }else{ 283 that.hide(1); 284 } 285 }); 286 this.addEvent(that.closeBtn,"click",function(){ 287 that.hide(1); 288 }) 289 this.addEvent(that.showAllBtn,"click",function(){ 290 that.toggleModes(); 291 }) 292 if(this.mode){ 293 this.addEvent(that.refreshBtn,"click",function(){ 294 updateCache(that.namespace);//ˢо²Ì¬ 295 }) 296 this.addEvent(that.staticBtn,"click",function(){ 297 location.href=that.staticUrl; 298 }) 299 } 300 }, 301 "esc":function(){ 302 var that=this; 303 if(this.isEsc){ 304 return false; 305 }else{ 306 this.isEsc=1; 307 this.addEvent(document,"keyup",function(e){ 308 var e=e||window.event; 309 var keyCode=e.which||e.keyCode; 310 if(keyCode==27){ 311 that.hide(1); 312 } 313 }) 314 } 315 }, 316 "show":function(all){//all:ÊÇ·ñ²Ù×÷ËùÓÐÄ£¿é 1/0 ÏÂͬ 317 G_MODE_SWITCH=1; 318 this.console.style.display=""; 319 this.esc(); 320 if(all){ 321 this.toggleModes(); 322 } 323 }, 324 "hide":function(all){ 325 G_MODE_SWITCH=0; 326 this.console.style.display="none"; 327 if(all){ 328 this.defaultStatus=2; 329 this.toggleModes(); 330 } 331 }, 332 "toggleModes":function(){ 333 if(this.defaultStatus!=2){ 334 for(var i=0,len=this.modes.length;i<len;i++){ 335 this.modes[i].style.cssText="_height:16px;min-height:16px;display:block;background:#ffffdb;border:1px solid #F60;"; 336 } 337 }else{ 338 for(var i=0,len=this.modes.length;i<len;i++){ 339 this.modes[i].style.cssText=""; 340 } 341 } 342 this.defaultStatus=this.defaultStatus==2?0:2; 343 this.showAllBtn.innerHTML=this.defaultStatus==2?"¹Ø±ÕÄ£¿éÏÔʾ":"ÏÔʾËùÓÐÄ£¿é"; 344 345 }, 346 "addEvent":function(elem,type,fn){ 347 if (elem.addEventListener) { 348 elem.addEventListener(type, fn, false); 349 } else { 350 elem['$e' + type + fn] = fn; 351 elem[type + fn] = function(){elem['$e' + type + fn](window.event)}; 352 elem.attachEvent('on' + type, elem[type + fn]); 353 }; 354 }, 355 "getElementsByClassName":function(classname,obj){ 356 var arr=[]; 357 var eles=(obj?obj:document).getElementsByTagName("*"); 358 for(var i=0,len=eles.length;i<len;i++){//±éÀú·ûºÏÌõ¼þµÄÔªËØ 359 var ele=eles[i]; 360 var classnames=ele.className; 361 if(classnames!=""&&classnames.replace(/\s+/g," ")!=" "){//Èç¹û¸ÃÔªËØÓÐclassname²¢ÇÒ²»Îª¿Õ 362 var names=classnames.match(/[^\s]+/g);//½«Æäclassname±£´æÔÚÒ»¸öÊý×é 363 if(!-[1,]){//<=ie8 364 for(var j=0,len2=names.length;j<len2;j++){ 365 if(names[j]==classname){ 366 arr.push(ele); 367 } 368 } 369 }else{ 370 if(names.indexOf(classname)!=-1){//ie9 other 371 arr.push(ele); 372 } 373 } 374 } 375 } 376 return arr; 377 } 378 } 379 window.ChannelManage=ChannelManage; 380})(); 381/* 382onReady(function(){ 383 //²ÎÊý½éÉÜ£º 384 //--ĬÈÏÏÔʾ:0-Ö»ÏÔʾģ¿é¹ÜÀí(ĬÈÏ) 1-ÏÔʾ¿ØÖÆÀ¸ 2-ÏÔʾ¿ØÖÆÀ¸ºÍÈ«²¿Ä£¿é 385 //--²é¿´¾²Ì¬url:URL 386 //--ˢо²Ì¬ÃüÃû 387 //--¿ØÖÆÀ¸³ÊÏÖģʽ:1-ÃÅ»§(ĬÈÏ) 0-ÆäËû,ÈçÂÛ̳(²»ÏÔʾˢкͲ鿴) 388 var console=new ChannelManage(0,"http://www.phpwind.net","home85",1); 389 console.init(); 390}) 391*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.