/// class ProspectDirector.Web.UI.Queries.SelectAnchorDialog
/// using ProspectDirector.Web.UI.SelectionDialogBase

/**
@constructor
@class SelectAnchorDialog
@namespace Web.UI.Queries
@extends Web.UI.SelectionDialogBase
**/
ProspectDirector.Web.UI.Queries.SelectAnchorDialog = ProspectDirector.Web.UI.SelectionDialogBase.extend({

    //================================
    // CONSTRUCTOR
    //================================

    init: function (options) {

        this.options = $.extend({
            config: {
                modal: true,
                height: 400,
                width: 550,
                iframe: false,
                resizable: false,
                title: "Select Anchor"
            }
        }, options);

        this._super(this.options);

    },

    //================================
    // PUBLIC METHODS
    //================================

    DOM: function () {
        
        if (!this._DOM) {

            this._DOM = new ProspectDirector.Web.UI.Queries.SelectAnchorDialogDOM({
                windowDOM: this.get_window().DOM(),
                close: $.proxy(this.close, this),
                closeAndReturn: $.proxy(this.closeAndReturn, this)
            });

        }

        return this._DOM;

    },

    //================================
    // PROTECTED METHODS
    //================================
    
    _init_dialog: function () {
        this.DOM().render();
        this.DOM().activate();
    }

});

ProspectDirector.Web.UI.Queries.SelectAnchorDialog.open = function (options) {
    return new ProspectDirector.Web.UI.Queries.SelectAnchorDialog(options);
};