1// (c) Copyright Microsoft Corporation. 2// This source is subject to the Microsoft Public License. 3// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL. 4// All other rights reserved. 5 6 7/// <reference name="MicrosoftAjax.debug.js" /> 8/// <reference name="MicrosoftAjaxTimer.debug.js" /> 9/// <reference name="MicrosoftAjaxWebForms.debug.js" /> 10/// <reference path="../ExtenderBase/BaseScripts.js" /> 11/// <reference path="../Common/Common.js" /> 12/// <reference path="../Compat/Timer/Timer.js" /> 13/// <reference path="../Animation/Animations.js" /> 14/// <reference path="../Animation/AnimationBehavior.js" /> 15/// <reference path="../PopupExtender/PopupBehavior.js" /> 16 17 18Type.registerNamespace('SDA.Neptun.WebControls'); 19 20SDA.Neptun.WebControls.HoverInfoPanelBehavior = function HoverInfoPanelBehavior(element) { 21 SDA.Neptun.WebControls.HoverInfoPanelBehavior.initializeBase(this, [element]); 22 this._message = ""; 23 this._mouseHover = false; 24 this._mouseEnterHandler = null; 25 this._mouseLeaveHandler = null; 26 this._warningIconVisible = false; 27} 28SDA.Neptun.WebControls.HoverInfoPanelBehavior.prototype = { 29 initialize: function() { 30 this._elementToValidate = this.get_element(); 31 this._elementToValidate.controltovalidate = this._elementToValidate.id; 32 this._ensureCallout(); 33 this._popupTable.style.display = 'none'; 34 if (!this._warningIconVisible) { 35 this._warningIconImage.style.display = 'none'; 36 var div1 = document.createElement("div"); 37 div1.style.border = "none"; 38 div1.style.height = "40px"; 39 div1.style.width = "1px"; 40 this._warningIconImage.parentNode.appendChild(div1); 41 } 42 if (this._mouseHover) { 43 this._closeImage.style.display = 'none'; 44 } 45 var clientState = this.get_ClientState(); 46 if ((null != clientState) && ("" !== clientState)) { 47 this.show(); 48 } 49 if (this._mouseHover) { 50 this._mouseEnterHandler = Function.createDelegate(this, this._onmouseover); 51 this._mouseLeaveHandler = Function.createDelegate(this, this._onmouseout); 52 53 var e = this.get_element(); 54 $addHandler(e, "mouseover", this._mouseEnterHandler); 55 $addHandler(e, "mouseout", this._mouseLeaveHandler); 56 } 57 }, 58 59 dispose: function() { 60 /// <summary> 61 /// Dispose the behavior 62 /// </summary> 63 64 // do cleanup 65 if (this._mouseEnterHandler) { 66 $removeHandler(this.get_element(), "mouseover", this._mouseEnterHandler); 67 } 68 if (this._mouseLeaveHandler) { 69 $removeHandler(this.get_element(), "mouseout", this._mouseLeaveHandler); 70 } 71 SDA.Neptun.WebControls.HoverInfoPanelBehavior.callBaseMethod(this, 'dispose'); 72 }, 73 show: function(force) { 74 SDA.Neptun.WebControls.HoverInfoPanelBehavior.callBaseMethod(this, 'show', [force]); 75 // Apply HightLightCssClass for failed server-side validation 76 if (this._highlightCssClass) { 77 Sys.UI.DomElement.addCssClass(this._elementToValidate, this._highlightCssClass); 78 } 79 80 }, 81 82 hide: function() { 83 SDA.Neptun.WebControls.HoverInfoPanelBehavior.callBaseMethod(this, 'hide'); 84 if (this._highlightCssClass) { 85 Sys.UI.DomElement.removeCssClass(this._elementToValidate, this._highlightCssClass) 86 } 87 }, 88 _onmouseover: function() { 89 if (this._message != "") 90 this.show(true); 91 }, 92 93 _onmouseout: function() { 94 this.hide(); 95 }, 96 _getErrorMessage: function() { 97 return this._message; 98 }, 99 get_message: function() { 100 return this._message; 101 }, 102 set_message: function(value) { 103 this._message = value; 104 this.raisePropertyChanged('message'); 105 }, 106 get_mouseHover: function() { 107 return this._mouseHover; 108 }, 109 set_mouseHover: function(value) { 110 this._mouseHover = value; 111 this.raisePropertyChanged('mouseHover'); 112 }, 113 get_warningIconVisible: function() { 114 return this._warningIconVisible; 115 }, 116 set_warningIconVisible: function(value) { 117 this._warningIconVisible = value; 118 this.raisePropertyChanged('warningIconVisible'); 119 } 120} 121SDA.Neptun.WebControls.HoverInfoPanelBehavior.registerClass('SDA.Neptun.WebControls.HoverInfoPanelBehavior', SDA.Neptun.WebControls.ValidatorCalloutBehavior);
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.