1// Name: DropDown.DropDownBehavior.debug.js 2// Assembly: AjaxControlToolkit 3// Version: 4.5.7.1213 4// FileVersion: 4.5.7.1213 5// (c) 2010 CodePlex Foundation 6 7 8 9/// <reference name="MicrosoftAjax.debug.js" /> 10/// <reference path="../ExtenderBase/BaseScripts.js" /> 11/// <reference path="../Common/Common.js" /> 12/// <reference path="../DynamicPopulate/DynamicPopulateBehavior.js" /> 13/// <reference path="../Animation/Animations.js" /> 14/// <reference path="../Animation/AnimationBehavior.js" /> 15/// <reference path="../PopupExtender/PopupBehavior.js" /> 16/// <reference path="../HoverExtender/HoverBehavior.js" /> 17 18(function() { 19var scriptName = "ExtendedDropDown"; 20 21function execute() { 22 23Type.registerNamespace('Sys.Extended.UI'); 24 25Sys.Extended.UI.DropDownBehavior = function(element) { 26 Sys.Extended.UI.DropDownBehavior.initializeBase(this, [element]); 27 this._dropDownControl = null; 28 this._highlightBorderColor = "#2353B2"; 29 this._highlightBackgroundColor = "#FFF3DB"; 30 this._dropArrowBackgroundColor = "#C6E1FF"; 31 this._dropArrowImageUrl = null; 32 if (Sys.loader) { 33 var url = Sys.loader.basePath; 34 if (url) { 35 if (url.charAt(url.length-1) !== "/") { 36 url += "/"; 37 } 38 this._dropArrowImageUrl = url + "extended/dropdown/drop-arrow.gif"; 39 } 40 } 41 this._dropArrowWidth = "16px"; 42 this._oldBackgroundColor = null; 43 this._dropFrame = null; 44 this._dropArrow = null; 45 this._dropArrowImage = null; 46 this._dropWrapper = null; 47 this._isOpen = false; 48 this._isOver = false; 49 this._wasClicked = null; 50 this._dropWrapperHoverBehavior = null; 51 this._dropPopupPopupBehavior = null; 52 this._onShowJson = null; 53 this._onHideJson = null; 54 55 this._dropDownControl$delegates = { 56 click : Function.createDelegate(this, this._dropDownControl_onclick), 57 contextmenu : Function.createDelegate(this, this._dropDownControl_oncontextmenu) 58 } 59 this._dropFrame$delegates = { 60 click : Function.createDelegate(this, this._dropFrame_onclick), 61 contextmenu : Function.createDelegate(this, this._dropFrame_oncontextmenu) 62 } 63 this._dropWrapper$delegates = { 64 click : Function.createDelegate(this, this._dropWrapper_onclick), 65 contextmenu : Function.createDelegate(this, this._dropWrapper_oncontextmenu) 66 } 67 this._document$delegates = { 68 click : Function.createDelegate(this, this._document_onclick), 69 contextmenu : Function.createDelegate(this, this._document_oncontextmenu) 70 } 71 this._dropWrapperHoverBehavior$delegates = { 72 hover : Function.createDelegate(this, this._dropWrapperHoverBehavior_onhover), 73 unhover : Function.createDelegate(this, this._dropWrapperHoverBehavior_onunhover) 74 } 75} 76Sys.Extended.UI.DropDownBehavior.prototype = { 77 78 79 initialize : function() { 80 Sys.Extended.UI.DropDownBehavior.callBaseMethod(this, 'initialize'); 81 var elt = this.get_element(); 82 var parent = elt.parentNode; 83 84 if (this._dropDownControl == null) { 85 $common.createElementFromTemplate({ 86 parent : parent, 87 nameTable : this, 88 name : "_dropDownControl", 89 nodeName : "div", 90 visible : false, 91 cssClasses : this._dropDownControl ? null : ["ajax__dropdown_panel"], 92 properties : { 93 __GENERATED : true 94 } 95 }); 96 } 97 $addHandlers(this._dropDownControl, this._dropDownControl$delegates); 98 99 var dropArrowImageProperties = {}; 100 if (this._dropArrowImageUrl) { 101 dropArrowImageProperties["src"] = this._dropArrowImageUrl; 102 } 103 $common.createElementFromTemplate({ 104 parent : parent, 105 nameTable : this, 106 name : "_dropFrame", 107 nodeName : "span", 108 visible : false, 109 children : [{ 110 name : "_dropFrameTop", 111 nodeName : "div",
112 cssClasses : ["ajax__dropdown_frame_line"] 113 }, { 114 name : "_dropFrameRight", 115 nodeName : "div", 116 cssClasses : ["ajax__dropdown_frame_line"] 117 }, { 118 name : "_dropFrameBottom", 119 nodeName : "div", 120 cssClasses : ["ajax__dropdown_frame_line"] 121 }, { 122 name : "_dropFrameLeft", 123 nodeName : "div", 124 cssClasses : ["ajax__dropdown_frame_line"] 125 }, { 126 name : "_dropArrow", 127 nodeName : "div", 128 cssClasses : (!this._dropArrowImageUrl) ? ["ajax__dropdown_arrow", "ajax__dropdown_arrow_image"] : ["ajax__dropdown_arrow"], 129 properties : { 130 style : { 131 width : this._dropArrowWidth, 132 backgroundColor : this._dropArrowBackgroundColor 133 } 134 }, 135 events : this._dropFrame$delegates, 136 children : [{ 137 name : "_dropArrowWrapper", 138 nodeName : "div", 139 visible : !!this._dropArrowImageUrl, 140 cssClasses : ["ajax__dropdown_arrow_wrapper"], 141 children : [{ 142 name : "_dropArrowImage", 143 nodeName : "img", 144 properties : dropArrowImageProperties 145 }] 146 }] 147 }] 148 }); 149 150 $common.createElementFromTemplate({ 151 parent : null, 152 nameTable : this, 153 name : "_dropWrapper", 154 nodeName : "span", 155 properties : { 156 id : elt.id + "_dropWrapper", 157 style : { 158 cursor : "default" 159 } 160 }, 161 events : this._dropWrapper$delegates, 162 content : elt 163 }); 164 165 this._dropPopupPopupBehavior = $create(Sys.Extended.UI.PopupBehavior, { 166 positioningMode : Sys.Extended.UI.PositioningMode.BottomRight, 167 parentElement : elt, 168 y : -1 169 }, null, null, this._dropDownControl); 170 171 if (this._onShowJson) { 172 this._dropPopupPopupBehavior.set_onShow(this._onShowJson); 173 } 174 if (this._onHideJson) { 175 this._dropPopupPopupBehavior.set_onHide(this._onHideJson); 176 } 177 178 179 this._dropWrapperHoverBehavior = $create(Sys.Extended.UI.HoverBehavior, { 180 hoverElement : this._dropFrame 181 }, this._dropWrapperHoverBehavior$delegates, null, this._dropWrapper); 182 183 $addHandlers(document, this._document$delegates); 184 }, 185 186 dispose : function() { 187 var elt = this.get_element(); 188 if (this._isOpen) { 189 this.hide(); 190 this.unhover(); 191 this._isOpen = false; 192 } 193 $common.removeHandlers(document, this._document$delegates); 194 this._onShowJson = null; 195 this._onHideJson = null; 196 if (this._dropPopupPopupBehavior) { 197 this._dropPopupPopupBehavior.dispose(); 198 this._dropPopupPopupBehavior = null; 199 } 200 if (this._dropWrapperHoverBehavior) { 201 this._dropWrapperHoverBehavior.dispose(); 202 this._dropWrapperHoverBehavior = null; 203 } 204 if (this._dropFrame) { 205 $common.removeElement(this._dropFrame); 206 this._dropFrame = null; 207 this._dropFrameTop = null; 208 this._dropFrameRight = null; 209 this._dropFrameBottom = null; 210 this._dropFrameLeft = null; 211 this._dropArrow = null; 212 this._dropArrowWrapper = null; 213 this._dropArrowImage = null; 214 } 215 if (this._dropWrapper) { 216 $common.removeHandlers(this._dropWrapper, this._dropWrapper$delegates); 217 $common.unwrapElement(elt, this._dropWrapper); 218 this._dropWrapper = null; 219 } 220 if (this._dropDownControl) { 221 $common.removeHandlers(this._dropDownControl, this._dropDownControl$delegates); 222 if (this._dropDownControl.__GENERATED) { 223 $common.removeElement(this._dropDownControl); 224 } 225 this._dropDownControl = null; 226 } 227 Sys.Extended.UI.DropDownBehavior.callBaseMethod(this, 'dispose'); 228 }, 229 230 hover : function() {
231 var elt = this.get_element(); 232 if (!this._isOver) { 233 this._isOver = true; 234 this.raiseHoverOver(Sys.EventArgs.Empty); 235 236 var bounds = $common.getBounds(elt); 237 238 $common.setLocation(this._dropFrame, {x:0, y:0}); 239 $common.setVisible(this._dropFrame, true); 240 var offset = $common.getLocation(this._dropFrame); 241 $common.setVisible(this._dropFrame, false); 242 243 bounds.x -= offset.x; 244 bounds.y -= offset.y; 245 246 $common.setBounds(this._dropFrameTop, { 247 x : bounds.x, 248 y : bounds.y, 249 width : bounds.width, 250 height : 1 251 }); 252 $common.setBounds(this._dropFrameRight, { 253 x : bounds.x + bounds.width - 1, 254 y : bounds.y, 255 width : 1, 256 height : bounds.height 257 }); 258 $common.setBounds(this._dropFrameBottom, { 259 x : bounds.x, 260 y : bounds.y + bounds.height - 1, 261 width : bounds.width, 262 height : 1 263 }); 264 $common.setBounds(this._dropFrameLeft, { 265 x : bounds.x, 266 y : bounds.y, 267 width : 1, 268 height : bounds.height 269 }); 270 $common.setBounds(this._dropArrow, { 271 x : bounds.x + bounds.width - 17, 272 y : bounds.y + 1, 273 width : 16, 274 height : bounds.height - 2 275 }); 276 this._dropFrameTop.style.backgroundColor = this._highlightBorderColor; 277 this._dropFrameRight.style.backgroundColor = this._highlightBorderColor; 278 this._dropFrameBottom.style.backgroundColor = this._highlightBorderColor; 279 this._dropFrameLeft.style.backgroundColor = this._highlightBorderColor; 280 $common.setVisible(this._dropFrame, true); 281 if (!this._oldBackgroundColor) { 282 this._oldBackgroundColor = $common.getCurrentStyle(elt, 'backgroundColor'); 283 } 284 elt.style.backgroundColor = this._highlightBackgroun
284dColor; 285 } 286 }, 287 288 unhover : function() { 289 var elt = this.get_element(); 290 if (this._isOver || !this._isOpen) { 291 this._isOver = false; 292 if (!this._isOpen) { 293 $common.setVisible(this._dropFrame, false); 294 if (this._oldBackgroundColor) { 295 elt.style.backgroundColor = this._oldBackgroundColor; 296 this._oldBackgroundColor = null; 297 } else { 298 elt.style.backgroundColor = "transparent"; 299 } 300 } 301 this.raiseHoverOut(Sys.EventArgs.Empty); 302 } 303 }, 304 305 show : function() { 306 if (!this._isOpen) { 307 this.hover(); 308 309 var eventArgs = new Sys.CancelEventArgs(); 310 this.raiseShowing(eventArgs); 311 this.raisePopup(eventArgs); 312 if (eventArgs.get_cancel()) { 313 return; 314 } 315 316 this._isOpen = true; 317 this.populate(); 318 if (!this._dynamicPopulateBehavior || (this._dynamicPopulateBehavior._populated && this._cacheDynamicResults)) { 319 this._showPopup(); 320 } 321 } 322 }, 323 324 _showPopup : function() { 325 /// <summary> 326 /// Show the drop down's popup 327 /// </summary> 328 /// <returns /> 329 330 this._dropPopupPopupBehavior.show(); 331 this.raiseShown(Sys.EventArgs.Empty); 332 }, 333 334 hide : function() { 335 if (this._isOpen) { 336 var eventArgs = new Sys.CancelEventArgs(); 337 this.raiseHiding(eventArgs); 338 if (eventArgs.get_cancel()) { 339 return; 340 } 341 342 this._isOpen = false; 343 this._dropPopupPopupBehavior.hide(); 344 345 this.raiseHidden(Sys.EventArgs.Empty); 346 } 347 }, 348 349 _dropWrapperHoverBehavior_onhover : function(sender, e) { 350 this.hover(); 351 }, 352 _dropWrapperHoverBehavior_onunhover : function(sender, e) { 353 this.unhover(); 354 }, 355 _dropWrapper_onclick : function(e) { 356 if(e.target.tagName != "A") { 357 if(!this._isOpen) { 358 this.show(); 359 } else { 360 this.hide(); 361 } 362 this._wasClicked = true; 363 } 364 }, 365 _dropWrapper_oncontextmenu : function(e) { 366 if(e.target.tagName != "A") { 367 this._wasClicked = true; 368 e.preventDefault(); 369 this.show(); 370 } 371 }, 372 _dropFrame_onclick : function(e) { 373 if(!this._isOpen) { 374 this.show(); 375 } else { 376 this.hide(); 377 } 378 this._wasClicked = true; 379 }, 380 _dropFrame_oncontextmenu : function(e) { 381 this._wasClicked = true; 382 e.preventDefault(); 383 this.show(); 384 }, 385 _dropDownControl_onclick : function(e) { 386 }, 387 _dropDownControl_oncontextmenu : function(e) { 388 this._wasClicked = true; 389 e.preventDefault(); 390 }, 391 _document_onclick : function(e) { 392 if(this._wasClicked) { 393 this._wasClicked = false; 394 } else if(this._isOpen) { 395 this.hide(); 396 this.unhover(); 397 } 398 }, 399 _document_oncontextmenu : function(e) { 400 if(this._wasClicked) { 401 this._wasClicked = false; 402 } else if(this._isOpen) { 403 this.hide(); 404 this.unhover(); 405 } 406 }, 407 408 _onPopulated : function(sender, eventArgs) { 409 /// <summary> 410 /// Handler for DynamicPopulate behavior's Populated event 411 /// </summary> 412 /// <param name="sender" type="Object"> 413 /// DynamicPopulate behavior 414 /// </param> 415 /// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false"> 416 /// Event args 417 /// </param> 418 Sys.Extended.UI.DropDownBehavior.callBaseMethod(this, '_onPopulated', [sender, eventArgs]); 419 420 if (this._isOpen) { 421 this._showPopup(); 422 } 423 }, 424 425 get_onShow : function() { 426 /// <value type="String" mayBeNull="true"> 427 /// Generic OnShow Animation's JSON definition 428 /// </value> 429 return this._dropPopupPopupBehavior ? this._dropPopupPopupBehavior.get_onShow() : this._onShowJson; 430 }, 431 set_onShow : function(value) { 432 if (this._dropPopupPopupBehavior) { 433 this._dropPopupPopupBehavior.set_onShow(value) 434 } else { 435 this._onShowJson = value; 436 } 437 this.raisePropertyChanged('onShow'); 438 }, 439 get_onShowBehavior : function() { 440 /// <value type="Sys.Extended.UI.Animation.GenericAnimationBehavior"> 441 /// Generic OnShow Animation's behavior 442 /// </value> 443 return this._dropPopupPopupBehavior ? this._dropPopupPopupBehavior.get_onShowBehavior() : null; 444 }, 445 onShow : function() { 446 /// <summary> 447 /// Play the OnShow animation 448 /// </summary> 449 /// <returns /> 450 if (this._dropPopupPopupBehavior) { 451 this._dropPopupPopupBehavior.onShow(); 452 } 453 }, 454 455 get_onHide : function() { 456 /// <value type="String" mayBeNull="true"> 457 /// Generic OnHide Animation's JSON definition 458 /// </value> 459 return this._dropPopupPopupBehavior ? this._dropPopupPopupBehavior.get_onHide() : this._onHideJson; 460 }, 461 set_onHide : function(value) { 462 if (this._dropPopupPopupBehavior) { 463 this._dropPopupPopupBehavior.set_onHide(value) 464 } else { 465 this._onHideJson = value; 466 } 467 this.raisePropertyChanged('onHide'); 468 }, 469 get_onHideBehavior : function() { 470 /// <value type="Sys.Extended.UI.Animation.GenericAnimationBehavior"> 471 /// Generic OnHide Animation's behavior 472 /// </value> 473 return this._dropPopupPopupBehavior ? this._dropPopupPopupBehavior.get_onHideBehavior() : null; 474 }, 475 onHide : function() { 476 /// <summary> 477 /// Play the OnHide animation 478 /// </summary> 479 /// <returns /> 480 if (this._dropPopupPopupBehavior) { 481 this._dropPopupPopupBehavior.onHide(); 482 } 483 }, 484 485 get_dropDownControl : function() { 486 return this._dropDownControl; 487 }, 488 set_dropDownControl : function(value) { 489 if (this._dropDownControl != value) { 490 this._dropDownControl = value; 491 this.raisePropertyChanged("dropDownControl"); 492 } 493 }, 494 495 get_highlightBorderColor : function() { 496 return this._highlightBorderColor; 497 }, 498 set_highlightBorderColor : function(value) { 499 500 if (this._highlightBorderColor != value) { 501 this._highlightBorderColor = value; 502 this.raisePropertyChanged("highlightBorderColor"); 503 } 504 }, 505
506 get_highlightBackgroundColor : function() { 507 return this._highlightBackgroundColor; 508 }, 509 set_highlightBackgroundColor : function(value) { 510 511 if (this._highlightBackgroundColor != value) { 512 this._highlightBackgroundColor = value; 513 if(this.get_isInitialized() && this._isOpen) { 514 this._dropWrapper.style.backgroundColor = value; 515 } 516 this.raisePropertyChanged("highlightBackgroundColor"); 517 } 518 }, 519 520 get_dropArrowBackgroundColor : function() { 521 return this._dropArrowBackgroundColor; 522 }, 523 set_dropArrowBackgroundColor : function(value) { 524 525 if (this._dropArrowBackgroundColor != value) { 526 this._dropArrowBackgroundColor = value; 527 if(this.get_isInitialized()) { 528 this._dropArrow.style.backgroundColor = value; 529 } 530 this.raisePropertyChanged("dropArrowBackgroundColor"); 531 } 532 }, 533 534 get_dropArrowImageUrl : function() { 535 return this._dropArrowImageUrl; 536 }, 537 set_dropArrowImageUrl : function(value) { 538 if (this._dropArrowImageUrl != value) { 539 this._dropArrowImageUrl = value; 540 if(this.get_isInitialized()) { 541 if (this._dropArrow.className) { 542 this._dropArrow.className = ""; 543 this._dropArrowWrapper.style.display = 'block'; 544 } 545 this._dropArrowImage.src = value; 546 } 547 this.raisePropertyChanged("dropArrowImageUrl"); 548 } 549 }, 550 551 get_dropArrowWidth : function() { 552 return this._dropArrowWidth; 553 }, 554 set_dropArrowWidth : function(value) { 555 if (this._dropArrowWidth != value) { 556 this._dropArrowWidth = value; 557 if(this.get_isInitialized()) { 558 this._dropArrow.style.width = value; 559 } 560 this.raisePropertyChanged("dropArrowWidth"); 561 } 562 }, 563 564 get_isOver : function() { 565 return this._isOver; 566 }, 567 568 get_isOpen : function() { 569 return this._isOpen; 570 }, 571 572 add_showing : function(handler) { 573 /// <summary> 574 /// Add an event handler for the showing event 575 /// </summary> 576 /// <param name="handler" type="Function" mayBeNull="false"> 577 /// Event handler 578 /// </param> 579 /// <returns /> 580 this.get_events().addHandler('showing', handler); 581 }, 582 remove_showing : function(handler) { 583 /// <summary> 584 /// Remove an event handler from the showing event 585 /// </summary> 586 /// <param name="handler" type="Function" mayBeNull="false"> 587 /// Event handler 588 /// </param> 589 /// <returns /> 590 this.get_events().removeHandler('showing', handler); 591 }, 592 raiseShowing : function(eventArgs) { 593 /// <summary> 594 /// Raise the showing event 595 /// </summary> 596 /// <param name="eventArgs" type="Sys.CancelEventArgs" mayBeNull="false"> 597 /// Event arguments for the showing event 598 /// </param> 599 /// <returns /> 600 601 var handler = this.get_events().getHandler('showing'); 602 if (handler) { 603 handler(this, eventArgs); 604 } 605 }, 606 607 add_shown : function(handler) { 608 /// <summary> 609 /// Add an event handler for the shown event 610 /// </summary> 611 /// <param name="handler" type="Function" mayBeNull="false"> 612 /// Event handler 613 /// </param> 614 /// <returns /> 615 this.get_events().addHandler('shown', handler); 616 }, 617 remove_shown : function(handler) { 618 /// <summary> 619 /// Remove an event handler from the shown event 620 /// </summary> 621 /// <param name="handler" type="Function" mayBeNull="false"> 622 /// Event handler 623 /// </param> 624 /// <returns /> 625 this.get_events().removeHandler('shown', handler); 626 }, 627 raiseShown : function(eventArgs) { 628 /// <summary> 629 /// Raise the shown event 630 /// </summary> 631 /// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false"> 632 /// Event arguments for the shown event 633 /// </param> 634 /// <returns /> 635 636 var handler = this.get_events().getHandler('shown'); 637 if (handler) { 638 handler(this, eventArgs); 639 } 640 }, 641 642 add_popup : function(handler) { 643 /// <summary> 644 /// Add an event handler for the popup event 645 /// </summary> 646 /// <param name="handler" type="Function" mayBeNull="false"> 647 /// Event handler 648 /// </param> 649 /// <returns /> 650 /// <obsolete>Use the shown event instead</obsolete> 651 this.get_events().addHandler('popup', handler); 652 }, 653 remove_popup : function(handler) { 654 /// <summary> 655 /// Remove an event handler from the popup event 656 /// </summary> 657 /// <param name="handler" type="Function" mayBeNull="false"> 658 /// Event handler 659 /// </param> 660 /// <returns /> 661 /// <obsolete>Use the shown event instead</obsolete> 662 this.get_events().removeHandler('popup', handler); 663 },
664 raisePopup : function(eventArgs) { 665 /// <summary> 666 /// Raise the popup event 667 /// </summary> 668 /// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false"> 669 /// Event arguments for the popup event 670 /// </param> 671 /// <returns /> 672 /// <obsolete>Use the shown event instead</obsolete> 673 674 var handler = this.get_events().getHandler('popup'); 675 if (handler) { 676 handler(this, eventArgs); 677 } 678 }, 679 680 add_hiding : function(handler) { 681 /// <summary> 682 /// Add an event handler for the hiding event 683 /// </summary> 684 /// <param name="handler" type="Function" mayBeNull="false"> 685 /// Event handler 686 /// </param> 687 /// <returns /> 688 this.get_events().addHandler('hiding', handler); 689 }, 690 remove_hiding : function(handler) { 691 /// <summary> 692 /// Remove an event handler from the hiding event 693 /// </summary> 694 /// <param name="handler" type="Function" mayBeNull="false"> 695 /// Event handler 696 /// </param> 697 /// <returns /> 698 this.get_events().removeHandler('hiding', handler); 699 }, 700 raiseHiding : function(eventArgs) { 701 /// <summary> 702 /// Raise the hiding event 703 /// </summary> 704 /// <param name="eventArgs" type="Sys.CancelEventArgs" mayBeNull="false"> 705 /// Event arguments for the hiding event 706 /// </param> 707 /// <returns /> 708 709 var handler = this.get_events().getHandler('hiding'); 710 if (handler) { 711 handler(this, eventArgs); 712 } 713 }, 714 715 add_hidden : function(handler) { 716 /// <summary> 717 /// Add an event handler for the hidden event 718 /// </summary> 719 /// <param name="handler" type="Function" mayBeNull="false"> 720 /// Event handler 721 /// </param> 722 /// <returns /> 723 this.get_events().addHandler('hidden', handler); 724 }, 725 remove_hidden : function(handler) { 726 /// <summary> 727 /// Remove an event handler from the hidden event 728 /// </summary> 729 /// <param name="handler" type="Function" mayBeNull="false"> 730 /// Event handler 731 /// </param> 732 /// <returns /> 733 this.get_events().removeHandler('hidden', handler); 734 }, 735 raiseHidden : function(eventArgs) { 736 /// <summary> 737 /// Raise the hidden event 738 /// </summary> 739 /// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false"> 740 /// Event arguments for the hidden event 741 /// </param> 742 /// <returns /> 743 744 var handler = this.get_events().getHandler('hidden'); 745 if (handler) { 746 handler(this, eventArgs); 747 } 748 }, 749 750 add_hoverOver : function(handler) { 751 /// <summary> 752 /// Add an event handler for the hoverOver event 753 /// </summary> 754 /// <param name="handler" type="Function" mayBeNull="false"> 755 /// Event handler 756 /// </param> 757 /// <returns /> 758 this.get_events().addHandler('hoverOver', handler); 759 }, 760 remove_hoverOver : function(handler) { 761 /// <summary> 762 /// Remove an event handler from the hoverOver event 763 /// </summary> 764 /// <param name="handler" type="Function" mayBeNull="false"> 765 /// Event handler 766 /// </param> 767 /// <returns /> 768 this.get_events().removeHandler('hoverOver', handler); 769 }, 770 raiseHoverOver : function(eventArgs) { 771 /// <summary> 772 /// Raise the hoverOver event 773 /// </summary> 774 /// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false"> 775 /// Event arguments for the hoverOver event 776 /// </param> 777 /// <returns /> 778 779 var handler = this.get_events().getHandler('hoverOver'); 780 if (handler) { 781 handler(this, eventArgs); 782 } 783 }, 784 785 add_hoverOut : function(handler) { 786 /// <summary> 787 /// Add an event handler for the hoverOut event 788 /// </summary> 789 /// <param name="handler" type="Function" mayBeNull="false"> 790 /// Event handler 791 /// </param> 792 /// <returns /> 793 this.get_events().addHandler('hoverOut', handler); 794 }, 795 remove_hoverOut : function(handler) { 796 /// <summary> 797 /// Remove an event handler from the hoverOut event 798 /// </summary> 799 /// <param name="handler" type="Function" mayBeNull="false"> 800 /// Event handler 801 /// </param> 802 /// <returns /> 803 this.get_events().removeHandler('hoverOut', handler); 804 }, 805 raiseHoverOut : function(eventArgs) { 806 /// <summary> 807 /// Raise the hoverOut event 808 /// </summary> 809 /// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false"> 810 /// Event arguments for the hoverOut event 811 /// </param> 812 /// <returns /> 813 814 var handler = this.get_events().getHandler('hoverOut'); 815 if (handler) { 816 handler(this, eventArgs); 817 } 818 } 819} 820Sys.Extended.UI.DropDownBehavior.registerClass('Sys.Extended.UI.DropDownBehavior', Sys.Extended.UI.DynamicPopulateBehaviorBase); 821Sys.registerComponent(Sys.Extended.UI.DropDownBehavior, { name: "dropDown" }); 822 823} // execute 824 825if (window.Sys && Sys.loader) { 826 Sys.loader.registerScript(scriptName, ["ExtendedDynamicPopulate", "ExtendedAnimationBehavior", "ExtendedPopup", "ExtendedHover"], execute); 827} 828else { 829 execute(); 830} 831 832})();
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.