1// Name: Common.debug.js 2// Assembly: AjaxControlToolkit 3// Version: 18.1.0.0 4// FileVersion: 18.1.0.0 5Type.registerNamespace('Sys.Extended.UI'); 6 7Sys.Extended.UI.BoxSide = function() { 8 // The BoxSide enumeration describes the sides of a DOM element 9} 10Sys.Extended.UI.BoxSide.prototype = { 11 Top : 0, 12 Right : 1, 13 Bottom : 2, 14 Left : 3 15} 16Sys.Extended.UI.BoxSide.registerEnum("Sys.Extended.UI.BoxSide", false); 17 18 19Sys.Extended.UI._CommonToolkitScripts = function() { 20 // The _CommonToolkitScripts class contains functionality utilized across a number 21 // of controls (but not universally) 22 // You should not create new instances of _CommonToolkitScripts. Instead you should use the shared instance CommonToolkitScripts (or Sys.Extended.UI.CommonToolkitScripts). 23} 24Sys.Extended.UI._CommonToolkitScripts.prototype = { 25 // The order of these lookup tables is directly linked to the BoxSide enum defined above 26 _borderStyleNames: ["borderTopStyle", "borderRightStyle", "borderBottomStyle", "borderLeftStyle"], 27 _borderWidthNames: ["borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth"], 28 _paddingWidthNames: ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"], 29 _marginWidthNames: ["marginTop", "marginRight", "marginBottom", "marginLeft"], 30 31 getCurrentStyle: function(element, attribute, defaultValue) { 32 // CommonToolkitScripts.getCurrentStyle is used to compute the value of a style attribute on an 33 // element that is currently being displayed. This is especially useful for scenarios where 34 // several CSS classes and style attributes are merged, or when you need information about the 35 // size of an element (such as its padding or margins) that is not exposed in any other fashion. 36 // "element" - live DOM element to check style of 37 // "attribute" - the style attribute's name is expected to be in a camel-cased form that you would use when 38 // accessing a JavaScript property instead of the hyphenated form you would use in a CSS 39 // stylesheet (i.e. it should be "backgroundColor" and not "background-color"). 40 // "defaultValue" - in the event of a problem (i.e. a null element or an attribute that cannot be found) we 41 // return this object (or null if none if not specified). 42 // "Object" - �urrent style of the element's attribute 43 44 var currentValue = null; 45 if (element) { 46 if (element.currentStyle) { 47 currentValue = element.currentStyle[attribute]; 48 } else if (document.defaultView && document.defaultView.getComputedStyle) { 49 var style = document.defaultView.getComputedStyle(element, null); 50 if (style) { 51 currentValue = style[attribute]; 52 } 53 } 54 55 if (!currentValue && element.style.getPropertyValue) { 56 currentValue = element.style.getPropertyValue(attribute); 57 } 58 else if (!currentValue && element.style.getAttribute) { 59 currentValue = element.style.getAttribute(attribute); 60 } 61 } 62 63 if ((!currentValue || currentValue == "" || typeof (currentValue) === 'undefined')) { 64 if (typeof (defaultValue) != 'undefined') { 65 currentValue = defaultValue; 66 } 67 else { 68 currentValue = null; 69 } 70 } 71 return currentValue; 72 }, 73 74 getInheritedBackgroundColor: function(element) { 75 // CommonToolkitScripts.getInheritedBackgroundColor provides the ability to get the displayed 76 // background-color of an element. In most cases calling CommonToolkitScripts.getCurrentStyle 77 // won't do the job because it will return "transparent" unless the element has been given a 78 // specific background color. This function will walk up the element's parents until it finds 79 // a non-transparent color. If we get all the way to the top of the document or have any other 80 // problem finding a color, we will return the default value '#FFFFFF'. This function is 81 // especially important when we're using opacity in IE (because ClearType will make text look 82 // horrendous if you fade it with a transparent background color). 83 // Returns background color of the element. 84 // "element" - live DOM element to get the background color of 85 86 if (!element) return '#FFFFFF'; 87 var background = this.getCurrentStyle(element, 'backgroundColor'); 88 try { 89 while (!background || background == '' || background == 'transparent' || background == 'rgba(0, 0, 0, 0)') { 90 element = element.parentNode; 91 if (!element) { 92 background = '#FFFFFF'; 93 } else { 94 background = this.getCurrentStyle(element, 'backgroundColor'); 95 } 96 } 97 } catch (ex) { 98 background = '#FFFFFF'; 99 } 100 return background; 101 }, 102 103 getLocation: function(element) { 104 // Gets the coordinates of a DOM element. 105 // Returns a Point object with two fields, x and y, which contain the pixel coordinates of the element. 106 return Sys.UI.DomElement.getLocation(element); 107 }, 108 109 setLocation: function(element, point) { 110 // Sets the current location for an element. 111 // This method does not attempt to set the positioning mode of an element. 112 // The position is relative from the elements nearest position:relative or 113 // position:absolute element. 114 // "element" - DOM element 115 // "point" - Point object (of the form {x,y}) 116 117 Sys.UI.DomElement.setLocation(element, point.x, point.y); 118 }, 119 120 getContentSize: function(element) { 121 // Gets the "content-box" size of an element. 122 // The "content-box" is the size of the content area *inside* of the borders and 123 // padding of an element. The "content-box" size does not include the margins around 124 // the element. 125 // "element" - DOM element 126 // Returns size of the element (in the form {width,height}) 127 128 if (!element) { 129 throw Error.argumentNull('element'); 130 }
131 var size = this.getSize(element); 132 var borderBox = this.getBorderBox(element); 133 var paddingBox = this.getPaddingBox(element); 134 return { 135 width: size.width - borderBox.horizontal - paddingBox.horizontal, 136 height: size.height - borderBox.vertical - paddingBox.vertical 137 } 138 }, 139 140 getSize: function(element) { 141 // Gets the "border-box" size of an element. 142 // The "border-box" is the size of the content area *outside* of the borders and 143 // padding of an element. The "border-box" size does not include the margins around 144 // the element. 145 // "element" - DOM element 146 // Returns size of the element (in the form {width,height}) 147 148 if (!element) { 149 throw Error.argumentNull('element'); 150 } 151 return { 152 width: element.offsetWidth, 153 height: element.offsetHeight 154 }; 155 }, 156 157 setContentSize: function(element, size) { 158 // Sets the "content-box" size of an element. 159 // The "content-box" is the size of the content area *inside* of the borders and 160 // padding of an element. The "content-box" size does not include the margins around 161 // the element. 162 // "element" - DOM element 163 // "size" - size of the element (in the form {width,height}) 164 165 if (!element) { 166 throw Error.argumentNull('element'); 167 } 168 if (!size) { 169 throw Error.argumentNull('size'); 170 } 171 // FF respects -moz-box-sizing css extension, so adjust the box size for the border-box 172 if (this.getCurrentStyle(element, 'MozBoxSizing') == 'border-box' || this.getCurrentStyle(element, 'BoxSizing') == 'border-box') { 173 var borderBox = this.getBorderBox(element); 174 var paddingBox = this.getPaddingBox(element); 175 size = { 176 width: size.width + borderBox.horizontal + paddingBox.horizontal, 177 height: size.height + borderBox.vertical + paddingBox.vertical 178 }; 179 } 180 element.style.width = size.width.toString() + 'px'; 181 element.style.height = size.height.toString() + 'px'; 182 }, 183 184 setSize: function(element, size) { 185 // Sets the "border-box" size of an element. 186 // The "border-box" is the size of the content area *outside* of the borders and 187 // padding of an element. The "border-box" size does not include the margins around 188 // the element. 189 // "element" - DOM element 190 // "size" - size of the element (in the form {width,height})</param> 191 192 if (!element) { 193 throw Error.argumentNull('element'); 194 } 195 if (!size) { 196 throw Error.argumentNull('size'); 197 } 198 var borderBox = this.getBorderBox(element); 199 var paddingBox = this.getPaddingBox(element); 200 var contentSize = { 201 width: size.width - borderBox.horizontal - paddingBox.horizontal, 202 height: size.height - borderBox.vertical - paddingBox.vertical 203 }; 204 this.setContentSize(element, contentSize); 205 }, 206 207 getBounds: function(element) { 208 // Gets the coordinates, width and height of an element. 209 // Returns a Bounds object with four fields, x, y, width and height, which contain the pixel coordinates, 210 // width and height of the element. 211 return Sys.UI.DomElement.getBounds(element); 212 }, 213 214 setBounds: function(element, bounds) { 215 // Sets the "border-box" bounds of an element 216 // The "border-box" is the size of the content area *outside* of the borders and 217 // padding of an element. The "border-box" size does not include the margins around 218 // the element. 219 // "element" - DOM element 220 // "bounds" - bounds of the element (of the form {x,y,width,height}) 221 222 if (!element) { 223 throw Error.argumentNull('element'); 224 } 225 if (!bounds) { 226 throw Error.argumentNull('bounds'); 227 } 228 this.setSize(element, bounds); 229 $common.setLocation(element, bounds); 230 }, 231 232 getClientBounds: function() { 233 // Gets the width and height of the browser client window (excluding scrollbars) 234 // Returns browser's client width and height 235 236 var clientWidth; 237 var clientHeight; 238 239 // getClientBounds must return dimensions excluding scrollbars, so cannot use window.innerWidth and window.innerHeight. 240 if (document.compatMode == "CSS1Compat") {
241 // Standards-compliant mode 242 clientWidth = document.documentElement.clientWidth; 243 clientHeight = document.documentElement.clientHeight; 244 } 245 else { 246 // Quirks mode 247 clientWidth = document.body.clientWidth; 248 clientHeight = document.body.clientHeight; 249 } 250 return new Sys.UI.Bounds(0, 0, clientWidth, clientHeight); 251 }, 252 253 getMarginBox: function(element) { 254 // Gets the entire margin box sizes. 255 // "element" - DOM element 256 // Returns - element's margin box sizes (of the form {top,left,bottom,right,horizontal,vertical}) 257 258 if (!element) { 259 throw Error.argumentNull('element'); 260 } 261 var box = { 262 top: this.getMargin(element, Sys.Extended.UI.BoxSide.Top), 263 right: this.getMargin(element, Sys.Extended.UI.BoxSide.Right), 264 bottom: this.getMargin(element, Sys.Extended.UI.BoxSide.Bottom), 265 left: this.getMargin(element, Sys.Extended.UI.BoxSide.Left) 266 }; 267 box.horizontal = box.left + box.right; 268 box.vertical = box.top + box.bottom; 269 return box; 270 }, 271 272 getBorderBox: function(element) { 273 // Gets the entire border box sizes. 274 // Returns element's border box sizes (of the form {top,left,bottom,right,horizontal,vertical}) 275 // "element" - DOM element 276 277 if (!element) { 278 throw Error.argumentNull('element'); 279 } 280 var box = { 281 top: this.getBorderWidth(element, Sys.Extended.UI.BoxSide.Top), 282 right: this.getBorderWidth(element, Sys.Extended.UI.BoxSide.Right), 283 bottom: this.getBorderWidth(element, Sys.Extended.UI.BoxSide.Bottom), 284 left: this.getBorderWidth(element, Sys.Extended.UI.BoxSide.Left) 285 }; 286 box.horizontal = box.left + box.right; 287 box.vertical = box.top + box.bottom; 288 return box; 289 }, 290 291 getPaddingBox: function(element) { 292 // Gets the entire padding box sizes. 293 // Returns element's padding box sizes (of the form {top,left,bottom,right,horizontal,vertical}) 294 // "element" - DOM element 295 296 if (!element) { 297 throw Error.argumentNull('element'); 298 } 299 var box = { 300 top: this.getPadding(element, Sys.Extended.UI.BoxSide.Top), 301 right: this.getPadding(element, Sys.Extended.UI.BoxSide.Right), 302 bottom: this.getPadding(element, Sys.Extended.UI.BoxSide.Bottom), 303 left: this.getPadding(element, Sys.Extended.UI.BoxSide.Left) 304 }; 305 box.horizontal = box.left + box.right; 306 box.vertical = box.top + box.bottom; 307 return box; 308 }, 309 310 isBorderVisible: function(element, boxSide) { 311 // Gets whether the current border style for an element on a specific boxSide is not 'none'. 312 // "element" - DOM element 313 // "boxSide" - side of the element 314 315 if (!element) { 316 throw Error.argumentNull('element'); 317 } 318 if (boxSide < Sys.Extended.UI.BoxSide.Top || boxSide > Sys.Extended.UI.BoxSide.Left) { 319 throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'Sys.Extended.UI.BoxSide')); 320 } 321 var styleName = this._borderStyleNames[boxSide]; 322 var styleValue = this.getCurrentStyle(element, styleName); 323 return styleValue != "none"; 324 }, 325 326 getMargin: function(element, boxSide) { 327 // Gets the margin thickness of an element on a specific boxSide. 328 // "element" - DOM element 329 // "boxSide" - side of the element 330 // Returns margin thickness on the element's specified side 331 332 if (!element) { 333 throw Error.argumentNull('element'); 334 } 335 if (boxSide < Sys.Extended.UI.BoxSide.Top || boxSide > Sys.Extended.UI.BoxSide.Left) { 336 throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'Sys.Extended.UI.BoxSide')); 337 } 338 var styleName = this._marginWidthNames[boxSide]; 339 var styleValue = this.getCurrentStyle(element, styleName); 340 try { return this.parsePadding(styleValue); } catch (ex) { return 0; } 341 }, 342 343 getBorderWidth: function(element, boxSide) { 344 // Gets the border thickness of an element on a specific boxSide. 345 // "element" - DOM element 346 // "boxSide" - side of the element 347 348 if (!element) { 349 throw Error.argumentNull('element'); 350 } 351 if (boxSide < Sys.Extended.UI.BoxSide.Top || boxSide > Sys.Extended.UI.BoxSide.Left) { 352 throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'Sys.Extended.UI.BoxSide')); 353 } 354 if (!this.isBorderVisible(element, boxSide)) { 355 return 0; 356 } 357 var styleName = this._borderWidthNames[boxSide]; 358 var styleValue = this.getCurrentStyle(element, styleName); 359 return this.parseBorderWidth(styleValue); 360 }, 361 362 getPadding: function(element, boxSide) { 363 // Gets the padding thickness of an element on a specific boxSide. 364 // "element" - DOM element 365 // "boxSide" - side of the element 366 367 if (!element) { 368 throw Error.argumentNull('element'); 369 } 370 if (boxSide < Sys.Extended.UI.BoxSide.Top || boxSide > Sys.Extended.UI.BoxSide.Left) { 371 throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'Sys.Extended.UI.BoxSide')); 372 } 373 var styleName = this._paddingWidthNames[boxSide]; 374 var styleValue = this.getCurrentStyle(element, styleName); 375 return this.parsePadding(styleValue); 376 }, 377 378 parseBorderWidth: function(borderWidth) { 379 // Parses a border-width string into a pixel size 380 // Returns number of pixels in the border-width 381 // "borderWidth" - type of border ('thin','medium','thick','inherit',px unit,null,'') 382 383 if (!this._borderThicknesses) { 384 385 // Populate the borderThicknesses lookup table 386 var borderThicknesses = {}; 387 var div0 = document.createElement('div'); 388 div0.style.visibility = 'hidden'; 389 div0.style.position = 'absolute'; 390 div0.style.fontSize = '1px'; 391 document.body.appendChild(div0) 392 var div1 = document.createElement('div'); 393 div1.style.height = '0px'; 394 div1.style.overflow = 'hidden'; 395 div0.appendChild(div1); 396 var base = div0.offsetHeight; 397 div1.style.borderTop = 'solid black'; 398 div1.style.borderTopWidth = 'thin'; 399 borderThicknesses['thin'] = div0.offsetHeight - base; 400 div1.style.borderTopWidth = 'medium'; 401 borderThicknesses['medium'] = div0.offsetHeight - base; 402 div1.style.borderTopWidth = 'thick'; 403 borderThicknesses['thick'] = div0.offsetHeight - base; 404 div0.removeChild(div1); 405 document.body.removeChild(div0); 406 this._borderThicknesses = borderThicknesses; 407 } 408 409 if (borderWidth) { 410 switch (borderWidth) { 411 case 'thin': 412 case 'medium': 413 case 'thick': 414 return this._borderThicknesses[borderWidth]; 415 case 'inherit': 416 return 0; 417 } 418 var unit = this.parseUnit(borderWidth); 419 Sys.Debug.assert(unit.type == 'px', String.format(Sys.Extended.UI.Resources.Common_InvalidBorderWidthUnit, unit.type)); 420 return unit.size; 421 } 422 return 0; 423 }, 424 425 parsePadding: function(padding) { 426 // Parses a padding string into a pixel size 427 // "padding" - padding to parse ('inherit',px unit,null,'') 428 // Returns number of pixels in the padding 429 430 if (padding) { 431 if (padding == 'inherit') { 432 return 0; 433 } 434 var unit = this.parseUnit(padding); 435 if (unit.type !== 'px') { 436 Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.Common_InvalidPaddingUnit, unit.type)); 437 } 438 return unit.size; 439 } 440 return 0; 441 }, 442 443 parseUnit: function(value) {
444 // Parses a unit string into a unit object 445 // Returns parsed unit (of the form {size,type}) 446 // "value" - value to parse (of the form px unit,% unit,em unit,...) 447 448 if (!value) { 449 throw Error.argumentNull('value'); 450 } 451 452 value = value.trim().toLowerCase(); 453 var l = value.length; 454 var s = -1; 455 for (var i = 0; i < l; i++) { 456 var ch = value.substr(i, 1); 457 if ((ch < '0' || ch > '9') && ch != '-' && ch != '.' && ch != ',') { 458 break; 459 } 460 s = i; 461 } 462 if (s == -1) { 463 throw Error.create(Sys.Extended.UI.Resources.Common_UnitHasNoDigits); 464 } 465 var type; 466 var size; 467 if (s < (l - 1)) { 468 type = value.substring(s + 1).trim(); 469 } else { 470 type = 'px'; 471 } 472 size = parseFloat(value.substr(0, s + 1)); 473 if (type == 'px') { 474 size = Math.floor(size); 475 } 476 return { 477 size: size, 478 type: type 479 }; 480 }, 481 482 getElementOpacity: function(element) { 483 // Get the element's opacity 484 // "element" - element 485 486 if (!element) { 487 throw Error.argumentNull('element'); 488 } 489 490 var hasOpacity = false; 491 var opacity; 492 493 if (element.filters) { 494 var filters = element.filters; 495 if (filters.length !== 0) { 496 var alphaFilter = filters['DXImageTransform.Microsoft.Alpha']; 497 if (alphaFilter) { 498 opacity = alphaFilter.opacity / 100.0; 499 hasOpacity = true; 500 } 501 } 502 } 503 else { 504 opacity = this.getCurrentStyle(element, 'opacity', 1); 505 hasOpacity = true; 506 } 507 508 if (hasOpacity === false) { 509 return 1.0; 510 } 511 return parseFloat(opacity); 512 }, 513 514 setElementOpacity: function(element, value) { 515 // Set the element's opacity 516 // "element" - element 517 // "value" - opacity of the element 518 519 if (!element) { 520 throw Error.argumentNull('element'); 521 } 522 523 if (element.filters) { 524 var filters = element.filters; 525 var createFilter = true; 526 if (filters.length !== 0) { 527 var alphaFilter = filters['DXImageTransform.Microsoft.Alpha']; 528 if (alphaFilter) { 529 createFilter = false; 530 alphaFilter.opacity = value * 100; 531 } 532 } 533 if (createFilter) { 534 element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (value * 100) + ')'; 535 } 536 } 537 else { 538 element.style.opacity = value; 539 } 540 }, 541 542 getVisible: function(element) { 543 // Check if an element is visible 544 // Returns true if the element is visible, false otherwise 545 // element"- element 546 // Note: reference to CommonToolkitScripts must be left intact (i.e. don't 547 // replace with 'this') because this function will be aliased 548 549 return (element && 550 ("none" != $common.getCurrentStyle(element, "display")) && 551 ("hidden" != $common.getCurrentStyle(element, "visibility"))); 552 }, 553 554 setVisible: function(element, value) { 555 // Check if an element is visible 556 // "element" - element 557 // "value" - true to make the element visible, false to hide it 558 // Note: reference to CommonToolkitScripts must be left intact (i.e. don't 559 // replace with 'this') because this function will be aliased 560 561 if (element) { 562 if (value) { 563 if (element.style.removeAttribute) { 564 element.style.removeAttribute("display"); 565 } else { 566 element.style.removeProperty("display"); 567 } 568 } else { 569 element.style.display = 'none'; 570 } 571 element.style.visibility = value ? 'visible' : 'hidden'; 572 } 573 }, 574 575 resolveFunction: function(value) {
576 // Returns a function reference that corresponds to the provided value 577 // Returns reference to the function, or null if not found 578 // "value" - the value can either be a Function, the name of a function (that can be found using window['name']), 579 // or an expression that evaluates to a function. 580 581 if (value) { 582 if (value instanceof Function) { 583 return value; 584 } else if (String.isInstanceOfType(value) && value.length > 0) { 585 var func; 586 if ((func = window[value]) instanceof Function) { 587 return func; 588 } else if ((func = eval(value)) instanceof Function) { 589 return func; 590 } 591 } 592 } 593 return null; 594 }, 595 596 addCssClasses: function(element, classNames) { 597 // Adds multiple css classes to a DomElement 598 // "element"- the element to modify 599 // "classNames" - the class names to add 600 601 for (var i = 0; i < classNames.length; i++) { 602 Sys.UI.DomElement.addCssClass(element, classNames[i]); 603 } 604 },
605 removeCssClasses: function(element, classNames) { 606 // Removes multiple css classes to a DomElement 607 // "element" - the element to modify 608 // "classNames" - the class names to remove 609 610 for (var i = 0; i < classNames.length; i++) { 611 Sys.UI.DomElement.removeCssClass(element, classNames[i]); 612 } 613 }, 614 setStyle: function(element, style) { 615 // Sets the style of the element using the supplied style template object 616 // "element" - the element to modify 617 // "style" - the template 618 619 $common.applyProperties(element.style, style); 620 }, 621 removeHandlers: function(element, events) { 622 // Removes a set of event handlers from an element 623 // This is NOT the same as $clearHandlers which removes all delegates from a DomElement. This rather removes select delegates 624 // from a specified element and has a matching signature as $addHandlers 625 // "element" - the element to modify 626 // "events" - the template object that contains event names and delegates 627 628 for (var name in events) { 629 $removeHandler(element, name, events[name]); 630 } 631 }, 632 633 overlaps: function(r1, r2) { 634 // Determine if two rectangles overlap 635 // "r1" - rectangle 636 // "r2" - rectangle 637 // Returns true if the rectangles overlap, false otherwise 638 639 return r1.x < (r2.x + r2.width) 640 && r2.x < (r1.x + r1.width) 641 && r1.y < (r2.y + r2.height) 642 && r2.y < (r1.y + r1.height); 643 }, 644 645 containsPoint: function(rect, x, y) { 646 // Tests whether a point (x,y) is contained within a rectangle 647 // "rect" - the rectangle 648 // "x" - the x coordinate of the point 649 // "y" - the y coordinate of the point 650 651 return x >= rect.x && x < (rect.x + rect.width) && y >= rect.y && y < (rect.y + rect.height); 652 }, 653 654 isKeyDigit: function(keyCode) { 655 // Gets whether the supplied key-code is a digit 656 // "keyCode" - the key code of the event (from Sys.UI.DomEvent) 657 658 return (0x30 <= keyCode && keyCode <= 0x39); 659 }, 660 661 isKeyNavigation: function(keyCode) { 662 // Gets whether the supplied key-code is a navigation key 663 // "keyCode" - the key code of the event (from Sys.UI.DomEvent) 664 665 return (Sys.UI.Key.left <= keyCode && keyCode <= Sys.UI.Key.down); 666 }, 667 668 padLeft: function(text, size, ch, truncate) { 669 // Pads the left hand side of the supplied text with the specified pad character up to the requested size 670 // "text" - the text to pad 671 // "size" - the size to pad the text (default is 2) 672 // "ch" - the single character to use as the pad character (default is ' ') 673 // "truncate" - whether to truncate the text to size (default is false) 674 675 return $common._pad(text, size || 2, ch || ' ', 'l', truncate || false); 676 }, 677 678 padRight: function(text, size, ch, truncate) { 679 // Pads the right hand side of the supplied text with the specified pad character up to the requested size 680 // "text" - the text to pad 681 // "size" - the size to pad the text (default is 2) 682 // "ch" - the single character to use as the pad character (default is ' ') 683 // "truncate" - whether to truncate the text to size (default is false) 684 685 return $common._pad(text, size || 2, ch || ' ', 'r', truncate || false); 686 }, 687 688 _pad: function(text, size, ch, side, truncate) { 689 // Pads supplied text with the specified pad character up to the requested size 690 // "text" - the text to pad< 691 // "size" - the size to pad the text 692 // "ch" - the single character to use as the pad character 693 // "side" - either 'l' or 'r' to siginfy whether to pad the Left or Right side respectively 694 // "truncate" - whether to truncate the text to size 695 696 text = text.toString(); 697 var length = text.length; 698 var builder = new Sys.StringBuilder(); 699 if (side == 'r') { 700 builder.append(text); 701 } 702 while (length < size) { 703 builder.append(ch); 704 length++; 705 } 706 if (side == 'l') { 707 builder.append(text); 708 } 709 var result = builder.toString(); 710 if (truncate && result.length > size) { 711 if (side == 'l') { 712 result = result.substr(result.length - size, size); 713 } else { 714 result = result.substr(0, size); 715 } 716 } 717 return result; 718 }, 719 720 __DOMEvents: { 721 focusin: { eventGroup: "UIEvents", init: function(e, p) { e.initUIEvent("focusin", true, false, window, 1); } }, 722 focusout: { eventGroup: "UIEvents", init: function(e, p) { e.initUIEvent("focusout", true, false, window, 1); } }, 723 activate: { eventGroup: "UIEvents", init: function(e, p) { e.initUIEvent("activate", true, true, window, 1); } }, 724 focus: { eventGroup: "UIEvents", init: function(e, p) { e.initUIEvent("focus", false, false, window, 1); } }, 725 blur: { eventGroup: "UIEvents", init: function(e, p) { e.initUIEvent("blur", false, false, window, 1); } }, 726 click: { eventGroup: "MouseEvents", init: function(e, p) { e.initMouseEvent("click", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } }, 727 dblclick: { eventGroup: "MouseEvents", init: function(e, p) { e.initMouseEvent("click", true, true, window, 2, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } }, 728 mousedown: { eventGroup: "MouseEvents", init: function(e, p) { e.initMouseEvent("mousedown", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } }, 729 mouseup: { eventGroup: "MouseEvents", init: function(e, p) { e.initMouseEvent("mouseup", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } }, 730 mouseover: { eventGroup: "MouseEvents", init: function(e, p) { e.initMouseEvent("mouseover", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } }, 731 mousemove: { eventGroup: "MouseEvents", init: function(e, p) { e.initMouseEvent("mousemove", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } }, 732 mouseout: { eventGroup: "MouseEvents", init: function(e, p) { e.initMouseEvent("mousemove", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } }, 733 load: { eventGroup: "HTMLEvents", init: function(e, p) { e.initEvent("load", false, false); } }, 734 unload: { eventGroup: "HTMLEvents", init: function(e, p) { e.initEvent("unload", false, false); } }, 735 select: { eventGroup: "HTMLEvents", init: function(e, p) { e.initEvent("select", true, false); } }, 736 change: { eventGroup: "HTMLEvents", init: function(e, p) { e.initEvent("change", true, false); } }, 737 submit: { eventGroup: "HTMLEvents", init: function(e, p) { e.initEvent("submit", true, true); } }, 738 reset: { eventGroup: "HTMLEvents", init: function(e, p) { e.initEvent("reset", true, false); } }, 739 resize: { eventGroup: "HTMLEvents", init: function(e, p) { e.initEvent("resize", true, false); } }, 740 scroll: { eventGroup: "HTMLEvents", init: function(e, p) { e.initEvent("scroll", true, false); } } 741 }, 742 743 tryFireRawEvent: function(element, rawEvent) { 744 // Attempts to fire a raw DOM event on an element 745 // Returns true if the event was successfully fired, otherwise false 746 // "element" - the element to fire the event 747 // "rawEvent" - the raw DOM event object to fire. Must not be Sys.UI.DomEvent 748 749 try { 750 if (element.fireEvent) { 751 element.fireEvent("on" + rawEvent.type, rawEvent); 752 return true; 753 } else if (element.dispatchEvent) { 754 element.dispatchEvent(rawEvent); 755 return true; 756 } 757 } catch (e) { 758 } 759 return false;
760 }, 761 762 tryFireEvent: function(element, eventName, properties) { 763 // Attempts to fire a DOM event on an element 764 // Returns true if the event was successfully fired, otherwise false< 765 // "element" - the element to fire the event 766 // "eventName" - the name of the event to fire (without an 'on' prefix) 767 // "properties"- properties to add to the event 768 769 try { 770 if (document.createEventObject) { 771 var e = document.createEventObject(); 772 $common.applyProperties(e, properties || {}); 773 element.fireEvent("on" + eventName, e); 774 return true; 775 } else if (document.createEvent) { 776 var def = $common.__DOMEvents[eventName]; 777 if (def) { 778 var e = document.createEvent(def.eventGroup); 779 def.init(e, properties || {}); 780 element.dispatchEvent(e); 781 return true; 782 } 783 } 784 } catch (e) { 785 } 786 return false; 787 }, 788 789 wrapElement: function(innerElement, newOuterElement, newInnerParentElement) { 790 // Wraps an inner element with a new outer element at the same DOM location as the inner element 791 // "innerElement" - the element to be wrapped 792 // "newOuterElement" - the new parent for the element 793 794 var parent = innerElement.parentNode; 795 parent.replaceChild(newOuterElement, innerElement); 796 (newInnerParentElement || newOuterElement).appendChild(innerElement); 797 }, 798 799 unwrapElement: function(innerElement, oldOuterElement) { 800 // Unwraps an inner element from an outer element at the same DOM location as the outer element 801 // "innerElement" - the element to be wrapped 802 // "newOuterElement" - the new parent for the element 803 804 var parent = oldOuterElement.parentNode; 805 if (parent != null) { 806 $common.removeElement(innerElement); 807 parent.replaceChild(innerElement, oldOuterElement); 808 } 809 }, 810 811 removeElement: function(element) { 812 // Removes an element from the DOM tree 813 // "element" - the element to be removed 814 815 var parent = element.parentNode; 816 if (parent != null) { 817 parent.removeChild(element); 818 } 819 }, 820 821 applyProperties: function(target, properties) { 822 // Quick utility method to copy properties from a template object to a target object 823 // "target" - the object to apply to 824 // "properties" - the template to copy values from< 825 826 for (var p in properties) { 827 var pv = properties[p]; 828 if (pv != null && Object.getType(pv) === Object) { 829 var tv = target[p]; 830 $common.applyProperties(tv, pv); 831 } else { 832 target[p] = pv; 833 } 834 } 835 }, 836 837 createElementFromTemplate: function(template, appendToParent, nameTable) { 838 // Creates an element for the current document based on a template object 839 // "template" - the template from which to create the element 840 // "appendToParent" - a DomElement under which to append this element 841 // "nameTable" - an object to use as the storage for the element using template.name as the key 842 // This method is useful if you find yourself using the same or similar DomElement constructions throughout a class. You can even set the templates 843 // as static properties for a type to cut down on overhead. This method is often called with a JSON style template: 844 // <code> 845 // var elt = $common.createElementFromTemplate({ 846 // nodeName : "div", 847 // properties : { 848 // style : { 849 // height : "100px", 850 // width : "100px", 851 // backgroundColor : "white" 852 // }, 853 // expandoAttribute : "foo" 854 // }, 855 // events : { 856 // click : function() { alert("foo"); }, 857 // mouseover : function() { elt.backgroundColor = "silver"; }, 858 // mouseout : function() { elt.backgroundColor = "white"; } 859 // },
860 // cssClasses : [ "class0", "class1" ], 861 // visible : true, 862 // opacity : .5 863 // }, someParent); 864 // </code> 865 866 // if we wish to override the name table we do so here 867 if (typeof (template.nameTable) != 'undefined') { 868 var newNameTable = template.nameTable; 869 if (String.isInstanceOfType(newNameTable)) { 870 newNameTable = nameTable[newNameTable]; 871 } 872 if (newNameTable != null) { 873 nameTable = newNameTable; 874 } 875 } 876 877 // get a name for the element in the nameTable 878 var elementName = null; 879 if (typeof (template.name) !== 'undefined') { 880 elementName = template.name; 881 } 882 883 // create or acquire the element 884 var elt = document.createElement(template.nodeName); 885 886 // if our element is named, add it to the name table 887 if (typeof (template.name) !== 'undefined' && nameTable) { 888 nameTable[template.name] = elt; 889 } 890 891 // if we wish to supply a default parent we do so here 892 if (typeof (template.parent) !== 'undefined' && appendToParent == null) { 893 var newParent = template.parent; 894 if (String.isInstanceOfType(newParent)) { 895 newParent = nameTable[newParent]; 896 } 897 if (newParent != null) { 898 appendToParent = newParent; 899 } 900 } 901 902 // properties are applied as expando values to the element 903 if (typeof (template.properties) !== 'undefined' && template.properties != null) { 904 $common.applyProperties(elt, template.properties); 905 } 906 907 // css classes are added to the element's className property 908 if (typeof (template.cssClasses) !== 'undefined' && template.cssClasses != null) { 909 $common.addCssClasses(elt, template.cssClasses); 910 } 911 912 // events are added to the dom element using $addHandlers 913 if (typeof (template.events) !== 'undefined' && template.events != null) { 914 $addHandlers(elt, template.events); 915 } 916 917 // if the element is visible or not its visibility is set 918 if (typeof (template.visible) !== 'undefined' && template.visible != null) { 919 this.setVisible(elt, template.visible); 920 } 921 922 // if we have an appendToParent we will now append to it 923 if (appendToParent) { 924 appendToParent.appendChild(elt); 925 } 926 927 // if we have opacity, apply it 928 if (typeof (template.opacity) !== 'undefined' && template.opacity != null) { 929 $common.setElementOpacity(elt, template.opacity); 930 } 931 932 // if we have child templates, process them 933 if (typeof (template.children) !== 'undefined' && template.children != null) { 934 for (var i = 0; i < template.children.length; i++) { 935 var subtemplate = template.children[i]; 936 $common.createElementFromTemplate(subtemplate, elt, nameTable); 937 } 938 } 939 940 // if we have a content presenter for the element get it (the element itself is the default presenter for content) 941 var contentPresenter = elt; 942 if (typeof (template.contentPresenter) !== 'undefined' && template.contentPresenter != null) { 943 contentPresenter = nameTable[contentPresenter]; 944 } 945 946 // if we have content, add it 947 if (typeof (template.content) !== 'undefined' && template.content != null) { 948 var content = template.content; 949 if (String.isInstanceOfType(content)) { 950 content = nameTable[content]; 951 } 952 if (content.parentNode) { 953 $common.wrapElement(content, elt, contentPresenter); 954 } else { 955 contentPresenter.appendChild(content); 956 } 957 } 958 959 // return the created element 960 return elt; 961 }, 962 963 prepareHiddenElementForATDeviceUpdate: function() { 964 // JAWS, an Assistive Technology device responds to updates to form elements 965 // and refreshes its document buffer to what is showing live 966 // in the browser. To ensure that Toolkit controls that make XmlHttpRequests to 967 // retrieve content are useful to users with visual disabilities, we update a 968 // hidden form element to ensure that JAWS conveys what is in 969 // the browser. See this article for more details: 970 // http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php 971 // This method creates a hidden input on the screen for any page that uses a Toolkit 972 // control that will perform an XmlHttpRequest. 973 var objHidden = document.getElementById('hiddenInputToUpdateATBuffer_C
973ommonToolkitScripts'); 974 if (!objHidden) { 975 var objHidden = document.createElement('input'); 976 objHidden.setAttribute('type', 'hidden'); 977 objHidden.setAttribute('value', '1'); 978 objHidden.setAttribute('id', 'hiddenInputToUpdateATBuffer_CommonToolkitScripts'); 979 objHidden.setAttribute('name', 'hiddenInputToUpdateATBuffer_CommonToolkitScripts'); 980 if (document.forms[0]) { 981 document.forms[0].appendChild(objHidden); 982 } 983 } 984 }, 985 986 updateFormToRefreshATDeviceBuffer: function() { 987 // Updates the hidden buffer to ensure that the latest document stream is picked up 988 // by the screen reader. 989 var objHidden = document.getElementById('hiddenInputToUpdateATBuffer_CommonToolkitScripts'); 990 991 if (objHidden) { 992 if (objHidden.getAttribute('value') == '1') { 993 objHidden.setAttribute('value', '0'); 994 } else { 995 objHidden.setAttribute('value', '1'); 996 } 997 } 998 }, 999 1000 appendElementToFormOrBody: function(element) { 1001 // Tries to append an element to the current form. If no form exists, the element will be appended to the body element. 1002 // "element" - the element to append. 1003 if (document.forms && document.forms[0]) { 1004 document.forms[0].appendChild(element); 1005 } else { 1006 document.body.appendChild(element); 1007 } 1008 }, 1009 1010 setText: function (element, text) { 1011 if (document.all) 1012 element.innerText = text; 1013 else 1014 element.textContent = text; 1015 } 1016} 1017 1018// Create the singleton instance of the CommonToolkitScripts 1019CommonToolkitScripts = Sys.Extended.UI.CommonToolkitScripts = new Sys.Extended.UI._CommonToolkitScripts(); 1020$common = CommonToolkitScripts; 1021 1022// Alias functions that were moved from BlockingScripts into Common 1023Sys.UI.DomElement.getVisible = $common.getVisible; 1024Sys.UI.DomElement.setVisible = $common.setVisible; 1025Sys.UI.Control.overlaps = $common.overlaps; 1026 1027Sys.Extended.UI._DomUtility = function() { 1028 // Utility functions for manipulating the DOM 1029} 1030Sys.Extended.UI._DomUtility.prototype = { 1031 isDescendant : function(ancestor, descendant) { 1032 // Whether the specified element is a descendant of the ancestor 1033 // "ancestor" - ancestor node 1034 // "descendant" - possible descendant node 1035 1036 for (var n = descendant.parentNode; n != null; n = n.parentNode) { 1037 if (n == ancestor) return true; 1038 } 1039 return false; 1040 }, 1041 isDescendantOrSelf : function(ancestor, descendant) { 1042 // Whether the specified element is a descendant of the ancestor or the same as the ancestor 1043 // "ancestor" - ancestor node 1044 // "descendant" - possible descendant node 1045 1046 if (ancestor === descendant) 1047 return true; 1048 return Sys.Extended.UI.DomUtility.isDescendant(ancestor, descendant); 1049 }, 1050 isAncestor : function(descendant, ancestor) { 1051 // Whether the specified element is an ancestor of the descendant 1052 // "descendant" - descendant node 1053 // "ancestor" - possible ancestor node 1054 1055 return Sys.Extended.UI.DomUtility.isDescendant(ancestor, descendant); 1056 }, 1057 isAncestorOrSelf : function(descendant, ancestor) { 1058 // Whether the specified element is an ancestor of the descendant or the same as the descendant 1059 // "descendant" - descendant node 1060 // "ancestor" - possible ancestor node 1061 1062 if (descendant === ancestor) 1063 return true; 1064 1065 return Sys.Extended.UI.DomUtility.isDescendant(ancestor, descendant); 1066 }, 1067 isSibling : function(self, sibling) { 1068 // Whether the specified element is a sibling of the self element 1069 // "self" - self node 1070 // "sibling" - possible sibling node 1071 1072 var parent = self.parentNode; 1073 for (var i = 0; i < parent.childNodes.length; i++) { 1074 if (parent.childNodes[i] == sibling) return true; 1075 } 1076 return false; 1077 } 1078} 1079Sys.Extended.UI._DomUtility.registerClass("Sys.Extended.UI._DomUtility"); 1080Sys.Extended.UI.DomUtility = new Sys.Extended.UI._DomUtility(); 1081 1082 1083Sys.Extended.UI.TextBoxWrapper = function(element) { 1084 // Class that wraps a TextBox (INPUT type="text") to abstract-out the 1085 // presence of a watermark (which may be visible to the user but which 1086 // should never be read by script. 1087 // "element" - the DOM element the behavior is associated with 1088 Sys.Extended.UI.TextBoxWrapper.initializeBase(this, [element]); 1089 this._current = element.value; 1090 this._watermark = null; 1091 this._isWatermarked = false;
1092} 1093 1094Sys.Extended.UI.TextBoxWrapper.prototype = { 1095 1096 dispose : function() { 1097 this.get_element().TextBoxWrapper = null; 1098 Sys.Extended.UI.TextBoxWrapper.callBaseMethod(this, 'dispose'); 1099 }, 1100 1101 get_Current : function() { 1102 // Current value actually in the TextBox (i.e., TextBox.value) 1103 this._current = this.get_element().value; 1104 return this._current; 1105 }, 1106 set_Current : function(value) { 1107 this._current = value; 1108 this._updateElement(); 1109 }, 1110 1111 get_Value : function() { 1112 // Conceptual "value" of the TextBox - its contents if no watermark is present 1113 // or "" if one is 1114 if (this.get_IsWatermarked()) { 1115 return ""; 1116 } else { 1117 return this.get_Current(); 1118 } 1119 }, 1120 set_Value : function(text) { 1121 this.set_Current(text); 1122 if (!text || (0 == text.length)) { 1123 if (null != this._watermark) { 1124 this.set_IsWatermarked(true); 1125 } 1126 } else { 1127 this.set_IsWatermarked(false); 1128 } 1129 }, 1130 1131 get_Watermark : function() { 1132 // Text of the watermark for the TextBox 1133 return this._watermark; 1134 }, 1135 set_Watermark : function(value) { 1136 this._watermark = value; 1137 this._updateElement(); 1138 }, 1139 1140 get_IsWatermarked : function() { 1141 // true iff the TextBox is watermarked 1142 return this._isWatermarked; 1143 }, 1144 set_IsWatermarked : function(isWatermarked) { 1145 if (this._isWatermarked != isWatermarked) { 1146 this._isWatermarked = isWatermarked; 1147 this._updateElement(); 1148 this._raiseWatermarkChanged(); 1149 } 1150 }, 1151 1152 _updateElement : function() { 1153 // Updates the actual contents of the TextBox according to what should be there 1154 var element = this.get_element(); 1155 if (this._isWatermarked) { 1156 if (element.value != this._watermark) { 1157 element.value = this._watermark; 1158 } 1159 } else { 1160 if (element.value != this._current) { 1161 element.value = this._current; 1162 } 1163 } 1164 }, 1165 1166 add_WatermarkChanged : function(handler) { 1167 // Adds a handler for the WatermarkChanged event 1168 // "handler" - handler 1169 this.get_events().addHandler("WatermarkChanged", handler); 1170 }, 1171 remove_WatermarkChanged : function(handler) { 1172 // Removes a handler for the WatermarkChanged event 1173 // "handler" - handler 1174 this.get_events().removeHandler("WatermarkChanged", handler); 1175 }, 1176 _raiseWatermarkChanged : function() { 1177 // Raises the WatermarkChanged event 1178 var onWatermarkChangedHandler = this.get_events().getHandler("WatermarkChanged"); 1179 if (onWatermarkChangedHandler) { 1180 onWatermarkChangedHandler(this, Sys.EventArgs.Empty); 1181 } 1182 } 1183} 1184Sys.Extended.UI.TextBoxWrapper.get_Wrapper = function(element) { 1185 // Gets (creating one if necessary) the TextBoxWrapper for the specified TextBox 1186 // Returns - TextBoxWrapper instance 1187 // "element" - textBox for which to get the wrapper 1188 1189 if (null == element.TextBoxWrapper) { 1190 element.TextBoxWrapper = new Sys.Extended.UI.TextBoxWrapper(element); 1191 } 1192 return element.TextBoxWrapper; 1193} 1194Sys.Extended.UI.TextBoxWrapper.registerClass('Sys.Extended.UI.TextBoxWrapper', Sys.UI.Behavior); 1195 1196Sys.Extended.UI.TextBoxWrapper.validatorGetValue = function(id) { 1197 // Wrapper for ASP.NET's validatorGetValue to return the value from the wrapper if present 1198 // Returns value from the wrapper or result of original ValidatorGetValue 1199 // "id" - id of the element 1200 1201 var control = $get(id); 1202 if (control && control.TextBoxWrapper) { 1203 return control.TextBoxWrapper.get_Value(); 1204 } 1205 return Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue(id); 1206} 1207 1208// Wrap ASP.NET's ValidatorGetValue with Sys.Extended.UI.TextBoxWrapper.validatorGetValue 1209// to make validators work properly with watermarked TextBoxes 1210if (typeof(ValidatorGetValue) == 'function') { 1211 Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue = ValidatorGetValue; 1212 ValidatorGetValue = Sys.Extended.UI.TextBoxWrapper.validatorGetValue; 1213} 1214 1215 1216// Temporary fix null reference bug in Sys.CultureInfo._getAbbrMonthIndex 1217if (Sys.CultureInfo && Sys.CultureInfo.prototype._getAbbrMonthIndex) { 1218 Sys.CultureInfo.prototype._getAbbrMonthIndex = function(value) { 1219 if (!this._upperAbbrMonths) { 1220 this._upperAbbrMonths = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames); 1221 } 1222 return Array.indexOf(this._upperAbbrMonths, this._toUpper(value)); 1223 } 1224 Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex = Sys.CultureInfo.prototype._getAbbrMonthIndex; 1225 Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex = Sys.CultureInfo.prototype._getAbbrMonthIndex; 1226} 1227
1228Sys.Extended.UI.ScrollBars = function () { throw Error.invalidOperation(); } 1229Sys.Extended.UI.ScrollBars.prototype = { 1230 None: 0x00, 1231 Horizontal: 0x01, 1232 Vertical: 0x02, 1233 Both: 0x03, 1234 Auto: 0x04 1235} 1236Sys.Extended.UI.ScrollBars.registerEnum("Sys.Extended.UI.ScrollBars", false); 1237 1238Sys.Extended.UI.zIndex = function() {}; 1239Sys.Extended.UI.zIndex.BubbleChartTooltip = 10000; 1240Sys.Extended.UI.zIndex.ComboBoxList = 10000; 1241Sys.Extended.UI.zIndex.DropWatcherDragVisual= 99999; 1242Sys.Extended.UI.zIndex.LineChartTooltip= 10000; 1243Sys.Extended.UI.zIndex.MaskedEditDivTip = 99999; 1244Sys.Extended.UI.zIndex.ModalPopupBackground = 10000; 1245Sys.Extended.UI.zIndex.PasswordStrengthTextDisplay = 10001; 1246Sys.Extended.UI.zIndex.Popup = 1000; 1247Sys.Extended.UI.zIndex.SeadragonContainer = 99999999; 1248Sys.Extended.UI.zIndex.SliderDragHandle = 999;
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.