1/* 2 * overrides.js Copyright PaperThin, Inc. 3 */ 4hasRTE = false; 5 6checkDlg = function() 7{ 8 ResizeWindow(); 9} 10 11CloseWindow = function() 12{ 13 top.commonspot.lightbox.closeCurrent(); 14} 15 16cs_OpenURLinOpener = function(workUrl) 17{ 18 OpenURLInOpener(workUrl); 19} 20 21doCPOpenInOpener = function(workUrl) 22{ 23 OpenURLInOpener(workUrl); 24} 25 26DoFocus = function(){}; 27 28handleLoad = function() 29{ 30 ResizeWindow(); 31} 32 33if (typeof handleLoad != 'function') 34{ 35 handleLoad = function() 36 { 37 ResizeWindow(); 38 } 39} 40 41csExtendedWindow = function(name, url, windowProps) 42{ 43 var wnd = window.open(url, name, windowProps); 44} 45 46newWindow = function(name, url, customOverlayMsg, openInWindow, windowProps) 47{ 48 var customOverlayMsg = customOverlayMsg ? customOverlayMsg : null; 49 var openInWindow = openInWindow ? openInWindow : false; 50 var windowProps = windowProps ? windowProps : null; 51 var wnd = top; 52 var opr; 53 var url = typeof url != 'undefined' ? url : ''; 54 if (openInWindow == true) 55 { 56 var wnd = window.open(url, name, windowProps); 57 return wnd; 58 } 59 if (url.indexOf('/commonspot/dashboard/') == 0 || url.indexOf('controls/imagecommon/add-image') > 0) 60 { 61 if (!top.commonspot.util.browser.valid) 62 { 63 alert('This functionality requires Internet Explorer versions 9 (or later) or Firefox Extended Support Release (ESR) versions or Safari 6 or 7 (only on Mac OS) or Chrome 31 (or later).'); 64 return; 65 } 66 var setupComplete = checkDashboardSetup(); 67 if (!setupComplete) 68 { 69 setTimeout(function(){ 70 newWindow(name, url, customOverlayMsg); 71 },1); 72 return; 73 } 74 } 75 76 if (top.commonspot && top.commonspot.lightbox) 77 { 78 if (top.commonspot.lightbox.stack.length > 0) 79 opr = top.commonspot.lightbox.stack.last().getWindow(); 80 top.commonspot.lightbox.openDialog(url, null, name, customOverlayMsg, null, opr); 81 wnd = top.commonspot.lightbox.stack.last().getWindow(); 82 } 83 return wnd; 84} 85 86OpenURLandClose = function(workUrl) 87{ 88 var openerWin = top.commonspot.lightbox.getOpenerWindow(); 89 openerWin.location.href = workUrl; 90 if (document.getElementById("leavewindowopen").checked == false) 91 { 92 setTimeout('window.close()', 250); 93 } 94} 95 96OpenURLInOpener = function(workUrl) 97{ 98 var openWin = top.commonspot.lightbox.getOpenerWindow(); 99 if (openWin) 100 { 101 openWin.location.href = workUrl; 102 } 103} 104 105RefreshAndCloseWindow = function(clearQueryParams) 106{ 107 clearQueryParams = clearQueryParams ? clearQueryParams : 0; 108 var openWin, openFrame; 109 if (clearQueryParams) 110 { 111 ResetParentWindow(); 112 return; 113 } 114 try // without this try-catch IE throws Access Denied for dialogs called from site-admin 115 { 116 if (top.commonspot.util.browser.chrome || top.commonspot.util.browser.safari) // 117 { 118 openFrame = top.commonspot.lightbox.getOpenerLightboxFrame(); 119 // next line are exceptions to this special case, re accurev 17450 and 17894 120 var doSpecialCase = false; 121 122 if (openFrame && (openFrame.src.indexOf('/dashboard/dialogs/siteadmin/metadata-form-addedit.html') === -1) && (openFrame.src.indexOf('/commonspot/dashboard/null') === -1) && (openFrame.src.indexOf('loader.cfm?CSRF_Token=' + top.commonspot.util.cookie.readCookie('CSRFTOKEN') + '&csModule=metadata/form_control/edit&id=') === -1)) 123 doSpecialCase = true; 124 if (doSpecialCase) 125 openFrame.src = openFrame.contentWindow.location.href; 126 else 127 { 128 openWin = top.commonspot.lightbox.getOpenerWindow(); 129 if (openWin) 130 openWin.location.reload(); 131 } 132 } 133 else 134 { 135 openWin = top.commonspot.lightbox.getOpenerWindow(); 136 if (openWin) 137 openWin.location.reload(); 138 } 139 } 140 catch(e) {} 141 CloseWindow(); 142} 143 144ResetParentWindow = function() 145{ 146 var pWin = top.commonspot.lightbox.getOpenerWindow(); 147 try // without this try-catch IE throws Access Denied for dialogs called from site-admin 148 { 149 if (pWin) 150 { 151 var addPageInLView = 0; 152 var pSearch = pWin.location.search; 153 if (pSearch.indexOf('cs_pgIsInLView=1') >= 0) 154 addPageInLView = 1; 155 var pHref = pWin.location.href; 156 if (pHref.length && pSearch.length) 157 pHref = pHref.replace(pSearch, ''); 158 if (addPageInLView) 159 pHref = pHref + '?cs_pgIsInLView=1'; 160 if (pHref != pWin.location.href) 161 pWin.location.href = pHref; 162 else 163 pWin.location.reload(); 164 } 165 } 166 catch(e) {} 167 CloseWindow(); 168} 169 170ReloadAndFocus = function(tabID) 171{ 172 var win = top.commonspot.lightbox.stack.last().getWindow(); 173 if (typeof win['tabDialog'] == 'function') 174 { 175 top.commonspot.util.event.addEvent(win, "load", tabDialog(tabID)); 176 win.location.reload(); 177 } 178} 179 180RefreshParentWindow = function() 181{ 182 var openerWin = top.commonspot.lightbox.getOpenerWindow(); 183 pageid = openerWin.js_gvPageID; 184 if (pageid > 0) 185 { 186 openerWin.document.cookie = "scrollPage=" + pageid; 187 openerWin.document.cookie = "scrollX=" + cd_scrollLeft; 188 openerWin.document.cookie = "scrollY=" + cd_scrollTop; 189 } 190 openerWin.location.reload(); 191 DoFocus(self); 192 DoFocusDone=1; // not done, but we don't want the focus 193} 194 195ResizeWindow = function(doRecalc, curTab) 196{ 197 if (!top || !top.commonspot || !top.commonspot.lightbox || typeof window['csInDlg'] == 'undefined') 198 return; 199 var currentDialog = top.commonspot.lightbox.stack.last(); 200 if (currentDialog.isMaximized) 201 return; 202 if (!curTab && typeof window['delayReload'] != 'undefined') 203 { 204 hasRTE = 1; 205 if (window['delayReload'] == 1 && window['hasActiveRTE'] != 1) 206 return; 207 } 208 if (typeof ResizeWindowSafe != 'undefined') // this variable is set in dlgcommon-head for legacy dialogs (initially set to 0, then to 1 upon calling dlgcommon-foot) 209 { 210 if (ResizeWindowSafe == 1) 211 ResizeWindow_Meat(doRecalc, curTab); // this function is defined in over-rides.js 212 else 213 ResizeWindowCalledCount++; 214 } 215 else 216 ResizeWindow_Meat(doRecalc, curTab); // this function is defined in over-rides.js 217} 218 219 220ResizeWindow_Meat = function(doRecalc, currentTab) 221{ 222 var maintable = document.getElementById('MainTable'); 223 if (maintable) 224 { 225 if (doRecalc) 226 { 227 if (top.commonspot) 228 { 229 top.commonspot.lightbox.initCurrentServerDialog(currentTab); 230 ResizeWindow_Meat(); 231 } 232 } 233 else 234 { 235 var pendingRTEs = checkRTELoadingState(top.commonspot.lightbox, currentTab); 236 if (pendingRTEs === 1) 237 { 238 setTimeout(function(){ 239 ResizeWindow_Meat(doRecalc, currentTab); 240 },1); 241 return; 242 } 243 244 fixMinHeightAndWidth(maintable); 245 if (top.commonspot) 246 { 247 top.commonspot.lightbox.initCurrent(maintable.offsetWidth+5, maintable.offsetHeight + 42); 248 fixFooterWidth(maintable.offsetWidth,maintable.offsetHeight + 40); 249 } 250 } 251 // to fix IE7 insanity! without this, in ie7 the maintable is not getting its gray background set. 252 var mClass = maintable.className; 253 if (mClass.indexOf('csMainTable') < 0) 254 mClass += ' csMainTable'; 255 maintable.className = mClass; 256 } 257} 258 259fixMinHeightAndWidth = function(maintable) 260{ 261 var curScript; 262 var minWidth = 350; 263 var minHeight = 130; 264 // first check if there are tabs rendered in the dialog 265 try 266 { 267 var ele = maintable.getElementsByClassName('cs_tab_active'); 268 if (ele.length > 2) 269 minWidth = 550; 270 } 271 catch(e){}; 272 var jsScripts = document.getElementsByTagName('SCRIPT'); 273 for (var i=0; i<jsScripts.length; i++) 274 { 275 curScript = jsScripts[i]; 276 try 277 { 278 if (curScript.src && (curScript.src).indexOf('calendar.js') >0) 279 minHeight = 180; 280 } 281 catch(e){}; 282 283 } 284 if (maintable.offsetHeight < minHeight) 285 maintable.style.height = minHeight+'px'; 286 else
287 maintable.style.height = ''; 288 if (maintable.offsetWidth < minWidth) 289 maintable.style.width = minWidth+'px'; 290}; 291 292fixFooterWidth = function() 293{ 294 var proxyBtnTable = document.getElementById('clsProxyButtonTable'); 295 var maintable = document.getElementById('MainTable'); 296 //debugger; 297 if (proxyBtnTable && maintable && proxyBtnTable.offsetWidth > (maintable.offsetWidth+10)) 298 { 299 maintable.style.width = proxyBtnTable.offsetWidth + 'px'; 300 top.commonspot.lightbox.initCurrent(proxyBtnTable.offsetWidth, maintable.offsetHeight + 50); 301 } 302}; 303 304setthefocus = function(){}; 305 306 307checkDashboardSetup = function() 308{ 309 if (top.commonspot.clientUI && top.commonspot.dialog && top.commonspot.dialog.server) 310 return true; 311 312 313 doDashboardSetup(); 314} 315 316doDashboardSetup = function() 317{ 318 if (parent.window.document.getElementById("hiddenframeDiv")) 319 return true; 320 if (document.parentWindow) 321 var curWin = document.parentWindow; 322 else 323 var curWin = window; 324 var iframeDiv = curWin.parent.parent.document.createElement('div'); 325 iframeDiv.id = 'hiddenframeDiv'; 326 iframeDiv.style.left = '-1000px'; 327 iframeDiv.style.top = '-1000px'; 328 329 var iframeHTML = '<iframe src="/commonspot/dashboard/hidden_iframe.html" name="hidden_frame" id="hidden_frame" width="1" height="1" scrolling="no" frameborder="0"></iframe>'; 330 iframeDiv.innerHTML = iframeHTML; 331 var hiddenFrame = iframeDiv.childNodes[0]; 332 parent.window.document.body.appendChild(iframeDiv); 333 return true; 334} 335 336 337convertHrefToOnclick = function(doc, elemID) 338{ 339 var newOC,existingOC,href,shown,style,isJS,itms; 340 var elemID = elemID ? elemID : null; 341 var doc = doc ? doc : document; 342 if (elemID) 343 itms = document.getElementById(elemID).getElementsByTagName('a'); 344 else 345 itms = document.getElementsByTagName('a'); 346 for (var i=0; i<itms.length; i++) 347 { 348 elem = itms[i]; 349 href = elem.getAttribute('href'); 350 isJS = /javascript/.test(href); 351 style = elem.style; 352 shown = style ? style.display : ''; 353 // walk the links only if they have a href attrib and it is displayed 354 if (href && shown!='none' && href != '#' && isJS) 355 { 356 newOC = href.replace(/javascript:/gi, ''); 357 if (newOC == ';') // handle situation where we have just javascript:; in href attribute 358 newOC = ''; 359 existingOC = elem.getAttribute('onclick'); 360 // replace when newOC is not empty and not already in existingOC OR when there is no existingOC 361 if ((existingOC && newOC != '' && existingOC.indexOf(newOC) == -1) || !existingOC ) 362 existingOC = (existingOC ? (existingOC + ';') : '') + newOC; 363 elem.setAttribute('onclick', existingOC); 364 elem.setAttribute('href', 'javascript:;'); 365 //elem.removeAttribute('href'); 366 } 367 } 368} 369 370if (typeof(onLightboxLoad) == "undefined") 371{ 372 /** 373 * Hook that gets called by lightbox whenever the dialog gets loaded 374 */ 375 onLightboxLoad = function() 376 { 377 try{ 378 var rootDiv = document.getElementById('cs_commondlg') 379 }catch(e){ 380 // $ function is not defined when there is an error. 381 // in that case, just return so we can show the error msg. 382 return; 383 } 384 convertHrefToOnclick(document); 385 if (rootDiv) 386 { 387 // Check if we have buttons 388 var outerDiv = document.getElementById('clsPushButtonsDiv'); 389 var tableEle = document.getElementById('clsPushButtonsTable'); 390 var otherBtns = top.commonspot.util.dom.getElementsByClassName('clsDialogButton', document); 391 if (tableEle || otherBtns.length) 392 { 393 // Remove existing "proxy" buttons first 394 var btnHolder = document.getElementById('clsProxyButtonHolder'); 395 if (btnHolder) 396 { 397 btnHolder.parentNode.removeChild(btnHolder); 398 } 399 400 // check if cf debug is on 401 var arr = top.commonspot.util.dom.getElementsByClassName('cfdebug', document); 402 // Append a new <div> that will contain the "proxy" buttons 403 var dom = document.createElement('div'); 404 dom.id = "clsProxyButtonHolder"; 405 dom.innerHTML = '<table id="clsProxyButtonTable" border="0" cellspacing="2" cellpadding="0"><tr><td id="clsProxySpellCheckCell" nowrap="nowrap"></td><td id="clsProxyButtonCell" nowrap="nowrap"></td></tr></table>'; 406 if (arr.length > 0) // stick in after root div and before CF debug table 407 { 408 /* 409 IE ver < 10 has problem with appending node before a script node. to get around it we add a div 410 node around the script tags we have after rootDiv (dlgcommon-foot.cfm) and manipulate its innerHTML 411 however, non-ie browsers has problem with manipulating innerHTML so doing it ol'way 412 */ 413 if (top.commonspot.util.browser.ie && top.commonspot.util.browser.version < 10) 414 { 415 var inHTML = dom.outerHTML + rootDiv.nextSibling.innerHTML; 416 rootDiv.nextSibling.innerHTML = inHTML; 417 } 418 else 419 rootDiv.parentNode.insertBefore(dom, rootDiv.nextElementSibling); 420 } 421 else 422 rootDiv.parentNode.appendChild(dom); 423 424 proxySpellChecker(cs$('#clsProxySpellCheckCell')); 425 proxyPushButtons(cs$('#clsProxyButtonCell')); 426 // Hide the "real" buttons 427 if (outerDiv) 428 outerDiv.style.display='none'; 429 if (tableEle) 430 tableEle.style.display='none'; 431 } 432 } 433 } 434} 435 436proxyPushButtons = function(targetNode) 437{ 438 if (typeof cs$ == 'undefined') 439 return; 440 var cellNode = cs$('#clsProxyButtonCell'); 441 var tableNodes = cs$('#clsPushButtonsTable').find('input'); 442 var buttons = cs$(tableNodes).map(function(){ 443 if (cs$(this).attr('type') == 'submit' || cs$(this).attr('type') == 'button') 444 return this; 445 }); 446 447 var moreButtons = top.commonspot.util.dom.getElementsByClassName('clsDialogButton', document, 'INPUT'); 448 var addClose = 0; 449 for (var i=0; i<moreButtons.length; i++) 450 { 451 // lame! but FF is not happy with concat arrays feature; 452 buttons.push(moreButtons[i]); 453 } 454 if ((buttons.length == 1 && buttons[0].value == 'Help') || buttons.length == 0) 455 addClose = 1; 456 cleanRadioAndCheckBoxes(cs$('#MainTable input[type="checkbox"]', '#MainTable input[type="radio"]')); 457 var doneButtons = []; 458 var buttonString = []; 459 460 461 for(var i=0; i<buttons.length; i++) 462 { 463 cs$(buttons[i]).css({display : 'none'}); 464 var buttonText = buttons[i].value.replace(/^\s+|\s+$/g, ''); 465 buttonString[i] = buttonText.toLowerCase(); 466 } 467 // show prev button 468 var indexButton = arrayIndexOf(buttonString,'prev'); 469 var proxyIndex = 1; 470 if (indexButton != -1 && arrayIndexOf(doneButtons,'prev') == -1) 471 { 472 cellNode.append(createProxyButton(buttons[indexButton],proxyIndex++)); 473 doneButtons.push('prev'); 474 } 475 476 // show next button 477 indexButton = arrayIndexOf(buttonString,'next'); 478 if (indexButton != -1 && arrayIndexOf(doneButtons,'next') == -1) 479 { 480 cellNode.append(createProxyButton(buttons[indexButton],proxyIndex++)); 481 doneButtons.push('next'); 482 } 483 // show all misc. buttons that are not submit and not cancel or close 484 for(var i=0; i<buttons.length; i++) 485 { 486 buttonText = buttons[i].value.replace(/^\s+|\s+$/g, ''); 487 if (buttonText != 'Help' && 488 buttonText != 'Close' && 489 buttonText != 'No' && 490 buttonText != 'Cancel' && 491 buttons[i].type == 'button' && 492 arrayIndexOf(doneButtons,buttonText) == -1) 493 { 494 cellNode.append(createProxyButton(buttons[i],proxyIndex++)); 495 doneButtons.push(buttonText); 496 } 497 } 498 499 500 // show all submit buttons that are not cancel or close 501 for(var i=0; i<buttons.length; i++) 502 { 503 buttonText = buttons[i].value.replace(/^\s+|\s+$/g, ''); 504 if (buttonText != 'Help' && 505 buttonText != 'Close' && 506 buttonText != 'No' && 507 buttonText != 'Cancel' && 508 buttons[i].type == 'submit' && 509 arrayIndexOf(doneButtons,buttonText) == -1) 510 { 511 cellNode.append(createProxyButton(buttons[i],proxyIndex++)); 512 doneButtons.push(buttonText); 513 } 514 } 515 516 // show cancel and close buttons 517 for(var i=0; i<buttons.length; i++) 518 { 519 buttonText = buttons[i].value.replace(/^\s+|\s+$/g, ''); 520 if (buttonText != 'Help' && arrayIndexOf(doneButtons,buttonText) == -1) 521 { 522 cellNode.append(createProxyButton(buttons[i],proxyIndex++)); 523 doneButtons.push(buttonText); 524 } 525 } 526 527 if (arrayIndexOf(doneButtons, 'cancel') != -1 || arrayIndexOf(doneButtons, 'close') != -1) 528 addClose = 0; 529 530 // show close button if there are no buttons in the lighbox 531 if (addClose && cellNode) 532 { 533 var closeNode = { 534 value: 'Close', 535 className: 'clsCloseButton', 536 type: 'button', 537 name: 'Close' 538 }; 539 cellNode.append(createProxyButton(closeNode,proxyIndex++)); 540 } 541} 542 543cleanRadioAndCheckBoxes = function(buttons) 544{ 545 var cName = ""; 546 for (var i=0; i<buttons.length; i++) 547 { 548 cName = buttons[i].className; 549 if (cName.indexOf('clsNoBorderInput')==-1) 550 { 551 buttons[i].className = cName+' clsNoBorderInput'; 552 } 553 } 554} 555 556checkRTELoadingState = function(frame, tab) 557{ 558 var wn = frame.getCurrentWindow();
559// hasActiveRTE 560 var rteObjs = {}; 561 var key; 562 563 if (wn && typeof wn['RTEInstances'] != 'undefined') 564 { 565 if (typeof wn['hasActiveRTE'] == 'undefined' || !wn['hasActiveRTE']) 566 return 0; 567 rteObjs = wn['RTEInstances']; 568 for (key in rteObjs) 569 { 570 if (rteObjs[key] == false) 571 return 1; 572 } 573 } 574 else 575 return 0; 576} 577proxySpellChecker = function(targetNode) 578{ 579 if (typeof cs$ == 'undefined') 580 return; 581 var boxNode = cs$('#OldSpellCheckOn'); 582 // Proxy the node only if it's visible (it could be hidden) 583 if (boxNode.length && (boxNode[0].type == 'checkbox')) 584 { 585 var proxyLabel = document.createElement('label'); 586 var proxyBox = document.createElement('input'); 587 cs$(proxyBox).attr('id', 'SpellCheckOn') 588 .attr('name', 'SpellCheckOn') 589 .attr('type', 'checkbox') 590 .val(1) 591 .addClass('clsNoBorderInput') 592 .on('click', function(){ 593 var o = cs$('#OldSpellCheckOn'); 594 if (o.length) 595 o.prop('checked', cs$(this).prop('checked')); 596 }); 597 598 cs$(proxyLabel).append(proxyBox); 599 cs$(proxyLabel).append(document.createTextNode('Check Spelling')); 600 cs$(targetNode).append(proxyLabel); 601 // Reflect original's status 602 cs$(proxyBox).prop('checked', boxNode.prop('checked')); 603 cs$('#OldSpellCheckOn').hide(); 604 } 605} 606 607/** 608 * Helper method. Generate a proxy DOM node out of an original button 609 * @param buttonNode (node). Required. The original button DOM node 610 * @return node 611 */ 612createProxyButton = function(buttonNode,index) 613{ 614 /* 615 Buttons must be styled to look as links. 616 Since this can be tricky accross browsers, we wrap a <span> around the buttons 617 */ 618 619 // Use trimmed value for text 620 var buttonText = buttonNode.value.replace(/^\s+|\s+$/g, ''); 621 var newButtonText = buttonText; 622 if (buttonText == 'OK' || buttonText == 'Finish') 623 newButtonText = 'Save'; 624 625 var proxyContainer = document.createElement('span'); 626 var $proxyContainer = cs$(proxyContainer); 627 $proxyContainer.attr('id', 'proxyButton' + index).addClass(buttonNode.className); 628 629 if (buttonNode.title) 630 $proxyContainer.attr('title', buttonNode.title); 631 632 if ((buttonText == 'Cancel' || buttonText == 'Close') && 633 (buttonNode.className.indexOf('clsPushButton') >= 0 || buttonNode.className.indexOf('clsCancelButton') >= 0 || buttonNode.className.indexOf('clsCloseButton') >= 0)){ 634 $proxyContainer.addClass('cls'+buttonText+'Button'); 635 } 636 637 var proxyBox = document.createElement('input'); 638 var $proxyBox = cs$(proxyBox); 639 640 if (buttonNode.type == 'submit' && typeof buttonNode.click == 'function'){ 641 $proxyBox.attr('type', 'button'); 642 } 643 else{ 644 $proxyBox.attr('type', buttonNode.type); 645 } 646 $proxyBox.attr('name', buttonNode.name).attr('value', newButtonText).attr('id', buttonText); 647 648 if (newButtonText=='Cancel' || newButtonText=='Close') 649 { 650 $proxyContainer.on('click', function() 651 { 652 if (typeof buttonNode.click == 'function' || typeof buttonNode.click == 'object') 653 { 654 buttonNode.click(); 655 } 656 else 657 top.commonspot.lightbox.closeCurrent(); 658 }); 659 } 660 else 661 { 662 $proxyContainer.on('click', function() 663 { 664 if (typeof buttonNode.click == 'function' || typeof buttonNode.click == 'object') 665 { 666 buttonNode.click(); 667 } 668 return false; 669 }); 670 } 671 $proxyBox.on('mouseover', function() 672 { 673 cs$(this).css({'text-decoration':'underline'}); 674 return false; 675 }); 676 677 $proxyBox.on('mouseout', function() 678 { 679 cs$(this).css({'text-decoration':'none'}); 680 return false; 681 }); 682 683 $proxyContainer.append(proxyBox); 684 return proxyContainer; 685} 686/** 687* Helper method. Return index of an element in an array NOT case-sensitive. 688* @param _this Required. Array 689 * @param x Required. key 690* @return index 691*/ 692arrayIndexOf = function(_this,x) 693{ 694 for(var i=0;i<_this.length;i++) 695 { 696 if (_this[i].toLowerCase()==x.toLowerCase()) 697 return i; 698 } 699 return-1; 700} 701 702if (typeof(onLightboxResize) == "undefined") 703{ 704 705 /** 706 * Hook that gets called by lightbox whenever the dialog gets resized 707 * @param w (int). Required. Width 708 * @param h (int). Required. Height 709 */ 710 onLightboxResize = function(w, h) 711 { 712 // Remove margins from the dialog's body 713 document.body.style.margin = 0; 714 document.body.style.padding = 0; 715 var rootDiv = document.getElementById('cs_commondlg'); 716 if (rootDiv) 717 { 718 main_table = document.getElementById('MainTable'); 719 if (main_table && main_table.style) 720 { 721 if (w >= 300) 722 { 723 main_table.style.width = (w-35)+'px'; 724 rootDiv.style.width = (w-10)+'px'; 725 } 726 main_table.style.height = (h - 45) + 'px'; 727 main_table.style.marginTop = 0; 728 rootDiv.style.marginTop = '10px'; 729 rootDiv.style.height = (h - 30) + 'px'; 730 } 731 732 // Add scrollbars to the main box 733 rootDiv.style.overflow = 'auto'; 734 } 735 } 736}
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.