1 2$(window).load(function () 3{ 4 if (pageData.xkey) AjaxManager.SetKey(pageData.xkey); 5 6 window.ContentCount = 0; 7 window.ContentLoadedCount = 0; 8 window.IsPreview = pageData.xkey; 9 window.AllItems = []; 10 11 // CONTENT ASYNC 12 if (!WS.Sync) 13 { 14 var contents = $(".Block"); 15 contents.each(function () 16 { 17 var type = $(this).attr("class").match(/Type_([^\s]*)/i)[1]; 18 if (ContentLoader.staticTypes.indexOf(type) === -1) window.ContentCount++; 19 }); 20 21 var _contentLen = contents.length; 22 for (var i = 0; i < _contentLen; i++) 23 { 24 var content = new window.Content(contents.eq(i)); 25 window.AllItems.push(content); 26 } 27 } 28 29 $("#HeaderMenuZone").css('visibility', 'hidden'); // hide menu 30 31 // MENU 32 var Menu = new WS.Editor.Menu($("#Menu")); 33 window.setTimeout(function () 34 { 35 Menu.Bind(); 36 window.setAnchorLinks($("#Menu")); 37 $("#HeaderMenuZone").css('visibility', 'visible'); // show menu 38 }, 1); 39 40 // Safari special treatment for letter spacing 41 var isSafari = /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/Chromium/.test(navigator.userAgent) &&!window.MSStream; 42 43 if (isSafari) { 44 var textBlocks = $(".Block.Type_Text .Block_Wrapper"); 45 textBlocks.each(function () { 46 var lettersp = String($(this).css("letter-spacing")).replace("1px", "0px"); 47 $(this).css("letter-spacing", lettersp); 48 }); 49 50 } 51 52 // IOS special treatment for background images 53 var isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; 54 55 if (isiOS && !window.WS.IsMobile) { $('meta[name=viewport]').attr('content', 'width=1000px'); } 56
57 var Background = $("#Background"); 58 if (Background.length && isiOS) 59 { 60 if (Background.css("background-size") == "cover") 61 { 62 var img = new Image(); 63 img.src = Background.css('background-image').replace(/url\(|\)$/ig, ""); 64 65 imageRatio = img.width / img.height; 66 67 if (Background.width() / Background.height() > imageRatio) 68 { 69 Background.css({ "background-size": "100% auto", "background-position": "center top" }); 70 } 71 else Background.css({ "background-size": "auto 100%", "background-position": "center top" }); 72 73 $(window).on("orientationchange", function () 74 { 75 if (Background.width() / Background.height() > imageRatio) 76 { 77 Background.css("background-size", "100% auto"); 78 } 79 else Background.css("background-size", "auto 100%"); 80 }); 81 } 82 } 83 84 var Header = $('#HeaderWrapper'); 85 if (Header.length && isiOS) 86 { 87 if (Header.css("background-attachment") == "fixed") Header.css("background-attachment", "scroll"); 88 } 89 90 var Zones = $('div[id^="Zone"].Wrapper'); 91 if (Zones.length && isiOS) 92 { 93 var _zoneLen = Zones.length; 94 for (i = 0; i < _zoneLen; i++) 95 { 96 if (Zones.eq(i).css("background-attachment") == "fixed") Zones.eq(i).css("background-attachment", "scroll"); 97 } 98 } 99 // --> 100 101 var OnDocumentMouseDown = function () 102 { 103 window.MessagesHandler.SendDocumentMouseDown(); 104 }; 105 106 if (window.IsPreview) 107 { 108 window.MessagesHandler = new WS.Editor.Messages(); 109 window.MessagesHandler.SendPreviewQuery(); 110 $(document).on('mousedown', OnDocumentMouseDown); 111 } 112 113 // MOBILE 114 if (window.WS.IsMobile) 115 { 116 if (window.IsPreview) 117 { 118 119 // Update the viewer scroll position and the editor scroll element when mousewheel detected 120 $("body").on('mousewheel DOMMouseScroll', function (e) 121 { 122 var event = e.originalEvent; 123 var scrollTop = $(this).scrollTop(); 124 125 if (scrollTop === 0) 126 scrollTop = $("html").scrollTop(); 127 128 e.stopPropagation(); 129 e.preventDefault(); 130 131 if (event.wheelDelta) 132 { 133 delta = Math.round(event.wheelDelta / 120); 134 } 135 else if (event.type === "DOMMouseScroll") 136 { 137 delta = Math.round(-event.detail / 3); 138 } 139 else 140 { 141 delta = Math.round(-event.detail); 142 } 143 144 delta = Math.round(-delta * 100); 145 scrollTop += delta; 146 147 $(this).scrollTop(scrollTop); 148 window.MessagesHandler.SendScrollPosition(scrollTop); 149 }); 150 } 151 152 var toolbarHeight = 0; 153 var ToolBar = null; 154 155 if (window.WS.MobileSettings.DisplayToolBar) 156 { 157 var toolBar = $("#ToolBar"); 158 ToolBar = new WS.Editor.ToolBar(toolBar); 159 toolbarHeight = toolBar.height(); 160 } 161 162 var ResizeWindow = function () 163 { 164 if (window.WS.MobileSettings.DisplayToolBar) 165 { 166 ToolBar.Element.width($("#Background").width()); 167 168 if ($("#stickyFooter").length === 1) 169 { 170 ToolBar.Element.css('bottom', $("#stickyFooter").height() + "px"); 171 } 172 } 173 174 $(window.AllItems).each(function () 175 { 176 this.Resize(); 177 }); 178 179 if ($("#stickyFooter").length === 1) 180 { 181 var unusableSpace = toolbarHeight + $("#stickyFooter").height(); 182 $("#Background").css('padding-bottom', unusableSpace + "px"); 183 } 184 } 185 ResizeWindow(); 186 187 $(window).resize(function () { ResizeWindow(); }); 188 189 } 190 191 // INTRO 192 if (WS.Parameters.Others.Intro) 193 { 194 var Intro = $(".wsIntro"); 195 if (Intro.length > 0) $("body").css({ "overflow": "hidden" }); 196
197 var Quit = Intro.find("input[name=Quit]"); 198 Quit.on("click", function () { location.href = "http://www.google.com"; }); 199 200 var Enter = Intro.find("input[name=Enter]"); 201 Enter.on("click", function () 202 { 203 $("body").css({ "overflow": "" }); 204 Intro.remove(); 205 document.cookie = "x-intro-viewed=1"; 206 }); 207 var Content = Intro.find(".wsContentWrapper"); 208 WS.IsMobile ? Content.css({ "font-size": "16px" }) : ""; 209 } 210 211 // BUTTON UP 212 if (WS.Parameters.Others.Button) 213 { 214 var Button = $(document.createElement("div")); 215 216 Button.attr("class", "ToTop"); 217 //Button.attr("alt", "Allez vers le haut"); 218 Button.css( 219 { 220 "width": "44px", 221 "height": "42px", 222 "background-color": "rgba(0,0,0,0.5)", 223 "background-image": "url('/file/app/1/editor/icon/selector.svg?color1=r255g255b255')", 224 "background-repeat": "no-repeat", 225 "background-size": "contain", 226 "transform": "rotate(180deg)", 227 "-webkit-transform": "rotate(180deg)", 228 "position": "fixed", 229 "cursor": "pointer", 230 "display": "none", 231 "background-size": "30px 30px", 232 "background-repeat": "repeat-y", 233 'background-position': '7px 6px', 234 "border-radius": "3px", 235 }); 236 237 var bottom = 10; 238 if ($("#stickyFooter").length > 0) bottom += $("#stickyFooter").height(); 239 240 if (window.WS.IsMobile) 241 { 242 if ($("#ToolBar").length > 0) bottom += $("#ToolBar").height(); 243 } 244 Button.css('bottom', bottom + "px"); 245 246 if (WS.Parameters.Others.ButtonAlign == 1) { Button.css("right", "10px"); } 247 else { Button.css("left", "10px"); } 248 249 Button.on("click", function () 250 { 251 $(document).scrollTop(0); 252 if (window.IsPreview && window.WS.IsMobile) 253 { 254 window.MessagesHandler.SendScrollPosition(0); 255 } 256 }); 257 $("body").append(Button); 258 259 $(window).scroll(function () 260 { 261 if ($(document).scrollTop() >= 225) { Button.fadeIn(); } 262 else { Button.fadeOut(); } 263 }); 264 } 265 266 // STORECART CHECK (DEFAULT) 267 var _thanks = $(".Block.Type_WebStoreThanks").length > 0; 268 if (!WS.StoreCart && !_thanks) 269 { 270 var HasCartContent = $(".Block.Type_WebStoreCart").length > 0; 271 var HasCartInHeaderMobile = $("#HeaderContentZone .Block.Type_WebStoreCart").length > 0 && window.WS.IsMobile; 272 273 var wbstid = null; 274 var queryString = GetQueryString(location); 275 var name = "wbst-id"; 276 277 if (queryString[name] && queryString[name].length > 0) 278 { 279 wbstid = window.decodeURIComponent(queryString[name]); 280 } 281 282 AjaxManager.Get("/Ext/Store/LoadCart", { Lang: pageData.lang, HasCartContent: HasCartContent, Flagged: pageData.flagged === true, IsMobile: window.WS.IsMobile, "wbst-id": wbstid, HasCartInHeaderMobile: HasCartInHeaderMobile }, function (data, elements) 283 { 284 if (!WS.StoreCart && elements.length > 0) WS.StoreCart = new WS.Store.Cart(elements[0]); 285 }); 286 } 287 288 // Parallax 289 applyParallax(window.WS.ParallaxSelector); 290}); 291 292var getBackgroundCSS = function (fromElement) { 293 var element = $(fromElement); 294 return { 295 backgroundImage: element.css('background-image'), 296 backgroundAttachment: element.css('background-attachment'), 297 backgroundColor: element.css('background-color'), 298 backgroundPosition: element.css('background-position'), 299 backgroundRepeat: element.css('background-repeat'), 300 backgroundSize: element.css('background-size') 301 } 302}; 303 304var applyParallax = function (querySelector) { 305 306 if (!querySelector || typeof Rellax !== 'function') return; 307 308 var layerStyle = { 309 position: 'absolute', 310 width: '100%', 311 height: '120%' 312 }; 313 314 $(querySelector).each(function (i, elem) { 315 var bgLayer = $(elem);
316 var parallaxLayer = $('<div class="bgParallaxLayer"></div>'); 317 318 parallaxLayer.css(layerStyle); 319 parallaxLayer.css(getBackgroundCSS(bgLayer)); 320 321 bgLayer.append(parallaxLayer); 322 bgLayer.addClass('wsParallax'); 323 324 new Rellax(parallaxLayer.get(0), { 325 speed: -4, 326 center: true 327 }); 328 }); 329}; 330 331var onContentsLoaded = function () 332{ 333 var isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; 334 if (window.IsPreview && (isiOS || window.WS.IsMobile)) 335 { 336 if (isiOS) window.MessagesHandler.SendDesktopPreviewHeight(); 337 else window.MessagesHandler.SendBackgroundHeight(); 338 } 339}; 340 341var setAnchorLinks = function (element) 342{ 343 var locationPath = location.pathname.replace(/^\//, '').replace(/\/$/, ''); 344 $(element).find('a[href]').filter(function () 345 { 346 return this.hash.replace(/#/, '').length > 0 347 && (!window.IsPreview && (locationPath == (this.pathname.replace(/^\//, '').replace(/\/$/, '') || locationPath)) || (window.IsPreview && (this.search == location.search))) 348 && (location.hostname == this.hostname || this.hostname.length == 0); 349 }).on('click', function (e) 350 { 351 var hash = this.hash; 352 var anchorName = hash.slice(1); // Remove "#" from hash 353 var anchorElement = $("[data-id='" + anchorName + "']"); 354 if (anchorElement.length > 0) 355 { 356 location.hash = hash; 357 ScrollToElement(anchorElement); 358 e.preventDefault(); 359 } 360 }); 361}; 362 363// CONTENT LOADER 364var ContentLoader = (function () 365{ 366 var contentsTemplate = {}; 367 368 // Constructor 369 var _class = function (content, BeforeAppendHandler, AfterAppendHandler) 370 { 371 this.content = content; 372 this.element = content.children(".Block_Wrapper"); 373 var type = content.attr("class").match(/Type_([^\s]*)/i)[1]; 374 var id = content.attr("id").replace("ct_", ""); 375 this.contentElement = null; 376 this.contentObj = null; 377 this._BeforeAppendHandler = BeforeAppendHandler; 378 this._AfterAppendHandler = AfterAppendHandler; 379 this.workingpush = false; 380 381 var querystring = GetQueryString(location); 382 383 var additionalQuery = null; 384 var found = false; 385 var i = 0; 386 while (i < ContentLoader.DynamicTypes.length) 387 { 388 var query = ContentLoader.DynamicTypes[i]; 389 if (querystring[query] && querystring[query].length > 0) 390 { 391 found = true; 392 additionalQuery = "&" + query + "=" + querystring[query]; 393 } 394 i++; 395 } 396 397 var idxStatic = ContentLoader.staticTypes.indexOf(type); 398 if (idxStatic == -1) 399 { 400 var Flagged = (pageData.flagged ? "&flagged=" : ""); 401 var PreviewID = (pageData.xkey ? "&previewid=" + pageData.xkey : ""); 402 var IsMobile = "&ismobile=" + window.WS.IsMobile.toString(); 403 var url = "/Ext/" + type + "/show?siteid=" + pageData.siteId + Flagged + PreviewID + IsMobile + (additionalQuery != null ? additionalQuery : ""); 404 405 406 window.GlobalContentLoadingQueue.QueueTask(() => { 407 const currentContext = this; 408 return AjaxManager.PromisifiedGet(url, { id: id, pageid: pageData.pageId, contentwidth: content.width(), contentheight: content.height(), isBot: false }, currentContext) 409 .then((elements) => { 410 currentContext.SetContentElement(elements[0]); 411 }); 412 }); 413 } 414 else 415 { 416 if (contentsTemplate[type]) this.SetContentElement($(contentsTemplate[type])); 417 } 418 }; 419 420 // Static methods 421 (function (statics) 422 { 423 statics.staticTypes = ["Spacing"]; 424 statics.DynamicTypes = ["blogcategory", "blogtag", "blogarchives", "blogrss", "post", "webstorecategory", "product", "checkout_order", "wbst-id", "filters", "minprice", "maxprice", "productOptions"]; 425 })(_class); 426 427 // Public methods 428 (function (methods) 429 { 430 methods.SetContentElement = function (element) 431 { 432 this.contentElement = element; 433 if (this._BeforeAppendHandler && typeof this._BeforeAppendHandler === "function") this._BeforeAppendHandler(); 434 this.element.append(element); 435 if (this._AfterAppendHandler && typeof this._AfterAppendHandler === "function") this._AfterAppendHandler(); 436 this.Update(); 437 438 window.setAnchorLinks(this.element); 439 window.ContentLoadedCount++; 440 if (window.ContentLoadedCount === window.ContentCount) onContentsLoaded(); 441 }; 442 443 methods.onLoaded = function (content) 444 { 445 var me = this; 446 var INTERVAL_DOMREADY_CHECK = 8; 447 448 // HANDLE WATCHDOG CONTENT 449 var handleWatchDogContent = function (element) 450 { 451 if (!me.workingpush) 452 { 453 me.workingpush = true; 454 var instance = new watchDogContent(element); 455 instance.push(); 456 me.workingpush = false; 457 } 458 else 459 { 460 window.setTimeout(function () { handleWatchDogContent(element); }, INTERVAL_DOMREADY_CHECK); 461 } 462 }; 463 464 this.contentObj = content; 465 466 // DOM READY (content must implement onLoaded for dynamic resizing) 467 if (this.contentObj.UnregisterEvent) { this.contentObj.UnregisterEvent("dom_ready"); } 468 if (this.contentObj.RegisterEvent) { this.contentObj.RegisterEvent("dom_ready", function (element) { handleWatchDogContent(element); }); } 469 this.Update(); 470 }; 471 472 methods.Update = function () 473 { 474 if (this.contentElement && this.contentObj && this.contentObj.onResize) this.contentObj.onResize(this.element.width(), this.element.height()); 475 if (this.contentElement && this.contentObj && this.contentObj.onResized) this.contentObj.onResized(this.element.width(), this.element.height()); 476 }; 477 478 })(_class.prototype); 479 480 return _class; 481})(); 482 483// Pinterest 484if (!window.WS) window.WS = {}; 485if (!window.WS.Util) window.WS.Util = {}; 486WS.Util.PinterestButton = function (Source, FileName, Position) 487{ 488 // Validation 489 if (!Source) throw "Source cannot be null."; 490 if (!FileName) throw "FileName cannot be null."; 491 if (!Position) Position = { x: 10, y: 10 }; 492 if (Position && (!Position.x || !Position.y)) throw "Position must have x,y"; 493 494 if (!window.location.origin) window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port : ''); 495 var Page = encodeURI(window.location.href); 496 var Media = encodeURI(window.location.origin + Source); 497 var Description = encodeURI(FileName); 498 var PinItURL = "https://www.pinterest.com/pin/create/button/?url=" + Page + "&media=" + Media + "&description=" + Description; 499 500 var Link = $(document.createElement("a")); 501 Link.attr("target", "_blank"); 502 Link.attr("href", PinItURL); 503 504 var Pinterest = $(document.createElement("div"));
505 var Pos = 0; 506 var Width = 0; 507 var Radius = 0; 508 if (WS.Parameters.Social.PinterestColor == 1) 509 { 510 // White 511 if (WS.Parameters.Social.PinterestShape == 1) { Width = 30; Pos = -30; } // Cercle 512 else { Width = 51; Pos = -112; Radius = 3; } // Rectangle 513 } 514 else 515 { 516 // Red 517 if (WS.Parameters.Social.PinterestShape == 1) { Width = 30; Pos = 0; } // Cercle 518 else { Width = 51; Pos = -60; Radius = 3; } // Rectangle 519 } 520 521 Pinterest.css({ 522 "background-image": "url(/file/app/1/editor/image/pinterest.png)", 523 "background-size": "cover", 524 "background-repeat": "no-repeat", 525 "background-position": Pos + "px", 526 "width": Width + "px", 527 "height": "30px", 528 "border-radius": Radius + "px" 529 }); 530 Link.append(Pinterest); 531 Link.css({ position: "absolute", top: Position.y, left: Position.x }); 532 533 return Link; 534}; 535 536// PUSH ENGINE 537var watchDogContent = (function () 538{ 539 var Rect = (function () 540 { 541 var _class = function (x, y, width, height) 542 { 543 if (x === undefined) x = 0; 544 if (y === undefined) y = 0; 545 if (width === undefined) width = 1; 546 if (height === undefined) height = 1; 547 548 this.left = x; 549 this.right = x + width - 1; 550 this.top = y; 551 this.bottom = y + height - 1; 552 }; 553 554 (function (methods) 555 { 556 methods.getHeight = function () 557 { 558 return this.bottom - this.top + 1; 559 }; 560 561 methods.getOverlaps = function (rect) 562 { 563 var overlaps = { y: 0 }; 564 if (this.bottom >= rect.top) overlaps.y = this.bottom - rect.top + 1; 565 566 return overlaps; 567 }; 568 569 })(_class.prototype); 570 571 return _class; 572 })(); 573 574 var MARGIN_BOTTOM = 0; 575 576 var _class = function (element) 577 { 578 if (!element || element.length == 0) throw "the element cannot be null."; 579 580 this._internal = {}; 581 this._internal.element = element; 582 this._internal.wrapper = element.closest(".Block"); 583 this._internal.zone = null; 584 this._internal.contents = null; 585 586 var zoneElement = element.closest(".Content_Zone"); 587 if (zoneElement && zoneElement.length > 0) 588 { 589 this._internal.zone = zoneElement; 590 this._internal.contents = this._internal.zone.children(".Block"); 591 592 if (this._internal.contents && this._internal.contents.length > 0) 593 { 594 // sort the array from the upper rectangle to the lower 595 this._internal.contents.sort(function (a, b) { return $(a).position().top - $(b).position().top; }); 596 } 597 } 598 }; 599 600 (function (methods) 601 { 602 methods.push = function () 603 { 604 if (!this._internal.zone || !this._internal.contents) return; 605 606 var container = this._internal.wrapper; 607 if (!container.data("origin-height")) container.data("origin-height", container.height() + "px"); // origin height 608 609 var origin_h = parseInt(container.data("origin-height")); 610 var bloc_wrapper = container.children(".Block_Wrapper"); 611 var padding_h = bloc_wrapper.length > 0 ? bloc_wrapper.outerHeight(true) - bloc_wrapper.height() : 0; 612 613 var insideElement = this._internal.element; 614 var w = Math.round(insideElement.outerWidth()); 615 var h = Math.round(insideElement.outerHeight()) + padding_h; 616 if (h < origin_h) h = origin_h; // min height set to origin if lower. 617 618 if (!window.WS.IsMobile) 619 { 620 var rectInside = new Rect(container.position().left, container.position().top, w, h); 621 if (insideElement.data("last-height") && insideElement.data("last-height") == rectInside.getHeight()) return; // if the inside rect height same, skip. 622 623 // update last height for inside rect. 624 insideElement.data("last-height", rectInside.getHeight()); 625 626 // find the last content (including current) in zone for margin calculation only. 627 var last = getLastContent.apply(this); 628 MARGIN_BOTTOM = this._internal.zone.height() - (last.position().top + last.height()); 629 630 // first content down 631 var firstDown = getFirstContentBelow.call(this, container); 632 var m = 0; 633 var contentMoved = false; 634 635 if (firstDown) 636 { 637 // margin calculation 638 if (!firstDown.data("origin-margin")) 639 {
640 var data = getDeltaUp.call(this, firstDown); 641 firstDown.data("origin-margin", Math.abs(data.deltaY)); 642 } 643 644 m = firstDown.data("origin-margin"); 645 646 var fw = Math.round(firstDown.outerWidth()); 647 var fh = Math.round(firstDown.outerHeight()); 648 var rectFirst = new Rect(firstDown.position().left, firstDown.position().top - m, fw, fh); 649 650 // check if overlap in Y axis, if so, we push all contents below. 651 var overlap = rectInside.getOverlaps(rectFirst); 652 if (overlap.y > 0) 653 { 654 var deltaY = overlap.y; 655 moveContents.call(this, container, deltaY); 656 contentMoved = true; 657 } 658 } 659 660 // make container fit inside height 661 container.css("height", rectInside.getHeight()); 662 663 if (firstDown && !contentMoved) 664 { 665 var data = getDeltaUp.call(this, firstDown); 666 if (data && data.deltaY + m < 0) moveContents.call(this, data.element, data.deltaY + m); 667 } 668 669 // zone reset 670 last = getLastContent.apply(this); 671 var max_bottom = (last.position().top + last.height()) + MARGIN_BOTTOM; 672 this._internal.zone.css("height", max_bottom); 673 } 674 else 675 { 676 this._internal.zone.css("height", "auto"); 677 container.css("height", h); 678 } 679 }; 680 681 })(_class.prototype); 682 683 var getFirstContentBelow = function (currentElement) 684 { 685 if (!currentElement || currentElement.length == 0) throw "The currentElement cannot be null."; 686 687 var content = null; 688 689 var contents = this._internal.contents; 690 var contentsLen = contents.length; 691 for (var i = 0; i < contentsLen; i++) 692 { 693 var element = contents.eq(i); 694 if (element[0] !== currentElement[0] && element.position().top >= (currentElement.position().top + currentElement.height())) 695 { 696 content = element; 697 break; 698 } 699 } 700 701 return content; 702 }; 703 704 var getDeltaUp = function (currentElement) 705 { 706 if (!currentElement || currentElement.length == 0) throw "The currentElement cannot be null."; 707 708 var refY = null; 709 var refElement = null; 710 711 var contents = this._internal.contents; 712 var contentsLen = contents.length; 713 var lastBottom = 0; 714 for (var i = 0; i < contentsLen; i++) 715 { 716 var element = contents.eq(i); 717 var bottom = element.position().top + element.height(); 718 if (element[0] !== currentElement[0] && bottom <= currentElement.position().top && bottom > lastBottom) 719 { 720 lastBottom = bottom; 721 refY = lastBottom; 722 refElement = element; 723 } 724 } 725 726 return refY ? { deltaY: refY - currentElement.position().top, element: refElement } : null; 727 }; 728 729 var getLastContent = function () 730 { 731 var content = null; 732 733 var maxBottom = 0; 734 var contents = this._internal.contents; 735 var contentsLen = contents.length; 736 for (var i = 0; i < contentsLen; i++) 737 { 738 var element = contents.eq(i); 739 var bottom = element.position().top + element.height(); 740 if (bottom > maxBottom) 741 { 742 content = element; 743 maxBottom = bottom; 744 } 745 } 746 747 return content; 748 }; 749 750 var moveContents = function (originElement, deltaY) 751 { 752 if (!originElement || originElement.length == 0) throw "The element cannot be null."; 753 754 var contents = this._internal.contents; 755 var contentsLen = contents.length; 756 if (contentsLen > 0) 757 { 758 var originTop = originElement.position().top; 759 var originHeight = originElement.height(); 760 for (var i = 0; i < contentsLen; i++) 761 { 762 var element = contents.eq(i); 763 var top = element.position().top; 764 if (top >= originTop + originHeight) element.css("top", top + deltaY); 765 } 766 } 767 }; 768 769 return _class; 770})();
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.