1(function ($) { 2 $.fn.extend({ 3 "showCover": function (node) { 4 if ($(".coverBg").length == 0) { 5 $("body").append('<div class="coverBg"></div>'); 6 var cover = $(".coverBg"); 7 cover.css({ 8 opacity: 0.7, 9 position: 'fixed', 10 width: $(window).width(), 11 height: $(window).height(), 12 background: '#000', 13 zIndex: 1000, 14 display: 'none', 15 top: '0px', 16 left: '0px' 17 }).bind('click', function () { 18 cover.hide(); 19 }); 20 } else { 21 var cover = $(".coverBg"); 22 } 23 cover.show(); 24 if ($(".coverMain").length == 0) { 25 $("body").append('<div class="coverMain"><span class="coverClose"></span><div class="coverBody"></div></div>'); 26 27 var coverMain = $(".coverMain"); 28 coverMain.css({ 29 position: 'fixed', 30 width: '666px', 31 32 left: '50%', 33 marginLeft: '-333px', 34 top: '50%', 35 marginTop: '-300px', 36 background: '#fff', 37 zIndex: 1001, 38 display: 'none' 39 }); 40 if ($(window).height() < 600) { 41 coverMain.height($(window).height()); 42 } else { 43 coverMain.css('min-height', '600px'); 44 } 45 $(".coverClose").css({ 46 position: 'absolute', 47 width: '25px', 48 height: '25px', 49 background: 'url(/frontend/assets/new/closeBtn.png) center no-repeat', 50 backgroundSize: '100% 100%', 51 right: '25px', 52 top: '25px', 53 cursor: 'pointer' 54 }).bind('click', function () { 55 $('body').hideCover(); 56 }); 57 $(".coverBody").css({ 58 width: 666, 59 margin: '90px auto 70px auto' 60 }); 61 } else { 62 var coverMain = $(".coverMain"); 63 } 64 if (node != undefined) { 65 var nodeHtml = $(node).html(); 66 $(".coverBody").html(nodeHtml); 67 coverMain.show(); 68 var height = coverMain.height() / 2 69 coverMain.css('margin-top', '-' + height + 'px'); 70 } 71 72 73 }, 74 "hideCover": function () { 75 $(".coverBg").hide(); 76 $(".coverMain").hide(); 77 $(".coverBody").html(''); 78 }, 79 "showOnCover": function (nodeHtml) { 80 if ($(".coverMain2").length == 0) { 81 $("body").append('<div class="coverMain2"><span class="coverClose2"></span><div class="coverBody2"></div></div>'); 82 83 var coverMain = $(".coverMain2"); 84 coverMain.css({ 85 position: 'fixed', 86 width: '666px', 87 minHeight: '600px', 88 left: '50%', 89 marginLeft: '-333px', 90 top: '50%', 91 marginTop: '-300px', 92 background: '#fff', 93 zIndex: 1002, 94 display: 'none' 95 96 }); 97 if ($(window).height() <= 700) { 98 coverMain.height($(window).height()).css('min-height', $(window).height() + 'px').css('overflow-y', 'scroll').css('overflow-x', 'hidden'); 99 } 100 $(".coverClose2").css({ 101 position: 'absolute', 102 width: '25px', 103 height: '25px', 104 background: 'url(/frontend/assets/new/closeBtn.png) center no-repeat', 105 right: '25px', 106 backgroundSize: '100% 100%', 107 top: '25px', 108 cursor: 'pointer' 109 }).bind('click', function () { 110 $('body').hideOnCover(); 111 }); 112 $(".coverBody2").css({ 113 width: 666, 114 margin: '70px auto 70px auto' 115 }); 116 } else { 117 var coverMain = $(".coverMain2"); 118 } 119 $(".coverBody2").html(nodeHtml); 120 coverMain.show(); 121 var height = coverMain.height() / 2 122 coverMain.css('margin-top', '-' + height + 'px'); 123 $(".coverMain").hide(); 124 }, 125 "hideOnCover": function () { 126 $(".coverMain2").hide(); 127 $(".coverBody2").html(''); 128 $(".coverMain").show(); 129 }, 130 131 "showOnVideo": function (nodeHtml) { 132 if ($(".coverMain2").length == 0) { 133 $("body").append('<div class="coverMain2"><span class="coverClose2"></span><div class="coverBody2"></div></div>'); 134 135 var coverMain = $(".coverMain2"); 136 coverMain.css({ 137 position: 'fixed', 138 width: '1200px', 139 minHeight: '700px', 140 left: '50%', 141 marginLeft: '-600px', 142 top: '50%', 143 marginTop: '-350px', 144 background: '#fff', 145 zIndex: 1002, 146 display: 'none' 147 148 }); 149 if ($(window).height() <= 700) { 150 coverMain.height($(window).height()).css('min-height', $(window).height() + 'px').css('overflow-y', 'scroll').css('overflow-x', 'hidden'); 151 } 152 $(".coverClose2").css({ 153 position: 'absolute', 154 width: '25px', 155 height: '25px', 156 background: 'url(/frontend/assets/new/closeBtn.png) center no-repeat', 157 right: '25px', 158 backgroundSize: '100% 100%', 159 top: '25px', 160 cursor: 'pointer', 161 zIndex:1000 162 }).bind('click', function () { 163 $('body').hideOnVideo(); 164 }); 165 $(".coverBody2").css({ 166 width: 1200, 167 margin: '0px auto 0px auto', 168 height:800 169 }); 170 } else { 171 var coverMain = $(".coverMain2"); 172 } 173 $(".coverBody2").html(nodeHtml); 174 coverMain.show(); 175 var height = coverMain.height() / 2 176 coverMain.css('margin-top', '-' + height + 'px'); 177 $(".coverMain").hide(); 178 }, 179 "hideOnVideo": function () { 180 $(".coverMain2").hide(); 181 $(".coverBody2").html(''); 182 $("body").hideCover(); 183 }, 184 "setNav": function (title) { 185 if (title != undefined) { 186 $('.nav a').each(function () { 187 if ($(this).html() == title) { 188 $(this).parent('li').addClass('selected'); 189 } 190 }); 191 } else { 192 if ($(".position a").length > 0) { 193 var title = $(".position a:eq(1)").html(); 194 $('.nav a').each(function () { 195 if ($(this).html() == title) { 196 $(this).parent('li').addClass('selected'); 197 } 198 }); 199 } 200 } 201 }, 202 //add by jianjie.fu 203 systemMsg: function (options) { 204 var defaults = { 205 postUrl: 'index.php?r=messager', 206 url: '#', 207 title: 'ä¿¡æ¯æç¤º', 208 content: '', 209 type: 'ajax', 210 seconds: '3' 211 } 212 if (options) { 213 $.extend(defaults, options); 214 } 215 $.ajax({ 216 type: 'post', 217 url: defaults.postUrl, 218 data: defaults, 219 success: function (html) { 220 $.generateWindow({ 221 whtml: html 222 }); 223 } 224 }) 225 return this; 226 } 227 }); 228 $.extend({ 229 generateWindow: function (windowOption) { 230 var options = { 231 whtml: '' 232 } 233 if (windowOption) { 234 $.extend(options, windowOption); 235 var popBox; 236 if ($('#POP').size() > 0) { 237 popBox = $('#POP'); 238 popBox.append(options.whtml); 239 } else { 240 var _html = '<div id="POP"><div id="bodyOPCover"></div>' + options.whtml + '</div>'; 241 $('body').append(_html); 242 } 243 popBox = $('#POP');
244 var id_appendNode = popBox.children().last().attr('id'); 245 var last_appendNode = $('#' + id_appendNode); 246 var closeBtn = last_appendNode.find('.event_close'); 247 closeBtn.bind('click', function () { 248 var num = popBox.children().size(); 249 if (num > 2) { 250 last_appendNode.empty().remove(); 251 } else { 252 popBox.empty().remove(); 253 } 254 }) 255 } 256 }, 257 closeWindow: function () { 258 popBox = $('#POP'); 259 var id_appendNode = popBox.children().last().attr('id'); 260 var last_appendNode = $('#' + id_appendNode); 261 var num = popBox.children().size(); 262 if (num > 2) { 263 last_appendNode.empty().remove(); 264 } else { 265 popBox.empty().remove(); 266 } 267 } 268 }) 269})(jQuery); 270var hasLogin = 0; 271 272function showLogin() { 273 $('body').showCover(); 274 $(".floatLogin").show(); 275} 276 277function checkLogin() { 278 $.ajax({ 279 url: '/member-info.html', 280 dataType: 'json', 281 success: function (msg) { 282 if (msg.msg == 'success') { 283 $("#navLogin").html(msg.html); 284 hasLogin = 1; 285 } else { 286 $("#navLogin").find('span[node=reg]').unbind('click').bind('click', function (msg) { 287 window.location.href = 'member-reg.html'; 288 }); 289 $("#navLogin").find('span[node=login]').unbind('click').bind('click', function (msg) { 290 showLogin() 291 }); 292 } 293 } 294 }) 295} 296 297$(document).ready(function () { 298 $('body').setNav(); 299 300 checkLogin(); 301}); 302 303function setPosition(name) { 304 if (name == '') { 305 return; 306 } 307 var html = " > <span>" + name + "</span>"; 308 $(".position").find('.clear').before(html); 309}
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.