ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Client side

Obout.Ajax.UI.HTMLEditor.Popups.Popup class

 Inheritance Hierarchy

It is a client-side representation of the server-side Obout.Ajax.UI.HTMLEditor.Popups.Popup class.

Base class for all popups in Obout.Ajax.UI.HTMLEditor.Popups namespace.

Note Note
To get property values for client API properties, you must call property accessor method that is named with the get_ prefix. For example, to get a value for a property such as id, you call the get_id method:
var _id = popupObject.get_id();

Properties

Name Description
propertyadditionalCss string. Gets comma separated paths of additional CSS files for this popup.
propertyattached boolean. Gets a value indicating whether the popup is 'attached' to a button called this popup.
propertyautoClose boolean. Gets a value indicating whether the popup is closed on click outside it.
propertyautoDimensions boolean. Gets a value indicating whether the size of the popup is determining automatically.
propertycssPath string. Gets the main style file path.
propertydesignPanel object. Gets the DesignPanel object if the popup is used in context of EditPanel and in Design mode, otherwise - null.
propertyeditPanel object. Gets the EditPanel object if the popup is used in context of EditPanel, otherwise - null.
propertyelement string. Gets the DOM element that the current Control instance is associated with. (Inherited from Sys.UI.Control.)
propertyid string. Gets the identifier for the current Control object. The default is the id value of the associated Sys.UI.DomElement object. (Inherited from Sys.UI.Control.)
propertyinitialContent string. Gets the popup's HTML content.
propertypopupHolder object. Gets the associated Popup Holder object.
propertyposition object. Gets or sets the coordinates of the popup position.
The position object has the following fields:
  • left - left position in pixels;
  • top - top position in pixels.

Example:

var position = popup.get_position();
// move it 100px to right down
popup.set_position({ left: (position.left + 100), top: (position.top + 100) });

Methods

Name Description
propertycancel(contentWindow) This method is called on popup canceled.
contentWindow of the popup's iframe is passed as parameter.
This method can be overridden in the derived class.

Example from the Obout.Ajax.UI.HTMLEditor.Popups.GalleryManager class code:

cancel: function(contentWindow) {
  Obout.Ajax.UI.HTMLEditor.Popups.GalleryManager.callBaseMethod
        (this, "cancel", [contentWindow]);
  this._removeEvents();
},

NoteNote
Don't call this method directly.
propertycancelCheck(contentWindow) This method is called before the popup canceled.
contentWindow of the popup's iframe is passed as parameter.
If this method returns true, the popup will be closed and cancel method will be called. Otherwise it will not be closed. By default it returns true.
This method can be overridden in the derived class.

Example:

cancelCheck: function(contentWindow) {
  var retval =
    CustomPopups.MyPopup.callBaseMethod
                   (this, "cancelCheck", [contentWindow]);
  if (retval) {
      retval = this._myCheckCancel();
  }
  return retval;
},

NoteNote
Don't call this method directly.
propertygetDocument() Gets the document element of the popup's iframe.
propertymoveToCenter() Moves the popup to the center of the visible area of the document.
propertypreOpen(contentWindow) This method is called before popup is opened.
contentWindow of the popup's iframe is passed as parameter.
This method can be overridden in the derived class.

Example:

preOpen: function(contentWindow) {
  this._preparePopup(contentWindow);
},

NoteNote
Don't call this method directly.

Access to registered in Server-Side fields and handlers

When popup is loaded, into its iframe's contentWindow is added an object named popupMediator. This object can be used for access to registered in Server-Side fields and handlers. How to register fields and handlers see code examples: RegisteredFields and RegisteredHandlers.

In the table below you can see the popupMediator's methods.
Name Description
propertygetCallMethodByName(name) Gets the delegate function for 'onclick' event handling.
name - handler's name.
propertygetField(name) Gets the DOM element associated with the field.
name - field's name.

See example code here.
propertygetHandler(name) Gets the Sys.UI.Control associated with the handler.
name - handler's name.
propertysetCallMethodByName(name, value) Sets the delegate function (value) for 'onclick' event handling.
name - handler's name.

Events

Name Description
propertybeforeHidden Raised before the popup is hidden.
Event's argument has type Sys.EventArgs.Empty.
propertybeforeShown Raised before the popup is shown.
Event's argument has type Sys.EventArgs.Empty.
propertyhidden Raised after the popup is hidden.
Event's argument has type Sys.EventArgs.Empty.
propertyshown Raised after the popup is shown.
Event's argument has type Sys.EventArgs.Empty.

"The controls you've created here are definitely the best and easiest to use that I've ever seen or worked with. ;)"

Daniel Burgess

Random testimonial   All testimonials