📄 modalpopupbehavior.js
字号:
},
get_PopupControlID : function() {
/// <value type="String">
/// The ID of the element to display as a modal popup
/// </value>
return this._PopupControlID;
},
set_PopupControlID : function(value) {
if (this._PopupControlID != value) {
this._PopupControlID = value;
this.raisePropertyChanged('PopupControlID');
}
},
get_X: function() {
/// <value type="Number" integer="true">
/// The number of pixels from the left of the browser to position the modal popup.
/// </value>
return this._xCoordinate;
},
set_X: function(value) {
if (this._xCoordinate != value) {
this._xCoordinate = value;
this.raisePropertyChanged('X');
}
},
get_Y: function() {
/// <value type="Number" integer="true">
/// The number of pixels from the top of the browser to position the modal popup.
/// </value>
return this._yCoordinate;
},
set_Y: function(value) {
if (this._yCoordinate != value) {
this._yCoordinate = value;
this.raisePropertyChanged('Y');
}
},
get_PopupDragHandleControlID : function() {
/// <value type="String">
/// The ID of the element to display as the drag handle for the modal popup
/// </value>
return this._PopupDragHandleControlID;
},
set_PopupDragHandleControlID : function(value) {
if (this._PopupDragHandleControlID != value) {
this._PopupDragHandleControlID = value;
this.raisePropertyChanged('PopupDragHandleControlID');
}
},
get_BackgroundCssClass : function() {
/// <value type="String">
/// The CSS class to apply to the background when the modal popup is displayed
/// </value>
return this._BackgroundCssClass;
},
set_BackgroundCssClass : function(value) {
if (this._BackgroundCssClass != value) {
this._BackgroundCssClass = value;
this.raisePropertyChanged('BackgroundCssClass');
}
},
get_DropShadow : function() {
/// <value type="Boolean">
/// Whether or not a drop-shadow should be added to the modal popup
/// </value>
return this._DropShadow;
},
set_DropShadow : function(value) {
if (this._DropShadow != value) {
this._DropShadow = value;
this.raisePropertyChanged('DropShadow');
}
},
get_Drag : function() {
/// <value type="Boolean">
/// Obsolete: Setting the _Drag property is a noop
/// </value>
return this._Drag;
},
set_Drag : function(value) {
if (this._Drag != value) {
this._Drag = value;
this.raisePropertyChanged('Drag');
}
},
get_OkControlID : function() {
/// <value type="String">
/// The ID of the element that dismisses the modal popup
/// </value>
return this._OkControlID;
},
set_OkControlID : function(value) {
if (this._OkControlID != value) {
this._OkControlID = value;
this.raisePropertyChanged('OkControlID');
}
},
get_CancelControlID : function() {
/// <value type="String">
/// The ID of the element that cancels the modal popup
/// </value>
return this._CancelControlID;
},
set_CancelControlID : function(value) {
if (this._CancelControlID != value) {
this._CancelControlID = value;
this.raisePropertyChanged('CancelControlID');
}
},
get_OnOkScript : function() {
/// <value type="String">
/// Script to run when the modal popup is dismissed with the OkControlID
/// </value>
return this._OnOkScript;
},
set_OnOkScript : function(value) {
if (this._OnOkScript != value) {
this._OnOkScript = value;
this.raisePropertyChanged('OnOkScript');
}
},
get_OnCancelScript : function() {
/// <value type="String">
/// Script to run when the modal popup is dismissed with the CancelControlID
/// </value>
return this._OnCancelScript;
},
set_OnCancelScript : function(value) {
if (this._OnCancelScript != value) {
this._OnCancelScript = value;
this.raisePropertyChanged('OnCancelScript');
}
},
get_repositionMode : function() {
/// <value type="AjaxControlToolkit.ModalPopupRepositionMode">
/// Determines if the ModalPopup should be repositioned on window resize/scroll
/// </value>
return this._repositionMode;
},
set_repositionMode : function(value) {
if (this._repositionMode !== value) {
this._repositionMode = value;
this.raisePropertyChanged('RepositionMode');
}
},
add_showing : function(handler) {
/// <summary>
/// Add an event handler for the showing event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('showing', handler);
},
remove_showing : function(handler) {
/// <summary>
/// Remove an event handler from the showing event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('showing', handler);
},
raiseShowing : function(eventArgs) {
/// <summary>
/// Raise the showing event
/// </summary>
/// <param name="eventArgs" type="Sys.CancelEventArgs" mayBeNull="false">
/// Event arguments for the showing event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('showing');
if (handler) {
handler(this, eventArgs);
}
},
add_shown : function(handler) {
/// <summary>
/// Add an event handler for the shown event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('shown', handler);
},
remove_shown : function(handler) {
/// <summary>
/// Remove an event handler from the shown event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('shown', handler);
},
raiseShown : function(eventArgs) {
/// <summary>
/// Raise the shown event
/// </summary>
/// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false">
/// Event arguments for the shown event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('shown');
if (handler) {
handler(this, eventArgs);
}
},
add_hiding : function(handler) {
/// <summary>
/// Add an event handler for the hiding event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('hiding', handler);
},
remove_hiding : function(handler) {
/// <summary>
/// Remove an event handler from the hiding event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('hiding', handler);
},
raiseHiding : function(eventArgs) {
/// <summary>
/// Raise the hiding event
/// </summary>
/// <param name="eventArgs" type="Sys.CancelEventArgs" mayBeNull="false">
/// Event arguments for the hiding event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('hiding');
if (handler) {
handler(this, eventArgs);
}
},
add_hidden : function(handler) {
/// <summary>
/// Add an event handler for the hidden event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('hidden', handler);
},
remove_hidden : function(handler) {
/// <summary>
/// Remove an event handler from the hidden event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('hidden', handler);
},
raiseHidden : function(eventArgs) {
/// <summary>
/// Raise the hidden event
/// </summary>
/// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false">
/// Event arguments for the hidden event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('hidden');
if (handler) {
handler(this, eventArgs);
}
}
}
AjaxControlToolkit.ModalPopupBehavior.registerClass('AjaxControlToolkit.ModalPopupBehavior', AjaxControlToolkit.DynamicPopulateBehaviorBase);
AjaxControlToolkit.ModalPopupBehavior.invokeViaServer = function(behaviorID, show) {
/// <summary>
/// This static function (that is intended to be called from script emitted
/// on the server) will show or hide the behavior associated with behaviorID
/// (i.e. to use this, the ModalPopupExtender must have an ID or BehaviorID) and
/// will either show or hide depending on the show parameter.
/// </summary>
/// <param name="behaviorID" type="String">
/// ID of the modal popup behavior
/// </param>
/// <param name="show" type="Boolean">
/// Whether to show or hide the modal popup
/// </param>
var behavior = $find(behaviorID);
if (behavior) {
if (show) {
behavior.show();
} else {
behavior.hide();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -