﻿Type.registerNamespace('eDott.WebUI');

eDott.WebUI.ContentPrintLink = function(element)
{
    eDott.WebUI.ContentPrintLink.initializeBase(this, [element]);
    
    // Inizializzazione
    
    this._callbackID = null;
    this._target = null;
};

eDott.WebUI.ContentPrintLink.prototype =
{
    initialize : function()
    {
        eDott.WebUI.ContentPrintLink.callBaseMethod(this, 'initialize');
    },
    
    dispose : function()
    {
        eDott.WebUI.ContentPrintLink.callBaseMethod(this, 'dispose');
    },
    
    print: function()
    {
        window.print();

        WebForm_DoCallback(this.get_callbackID(),
            this._target,
            null,
            this,
            null,
            true)
    },
    
    get_callbackID: function()
    {
        return this._callbackID;
    },
    
    set_callbackID: function(value)
    {
        this._callbackID = value;
        this.raisePropertyChanged('callbackID');
    },

    get_target: function()
    {
        return this._target;
    },
    
    set_target: function(value)
    {
        this._target = value;
        this.raisePropertyChanged('target');
    }
};

eDott.WebUI.ContentPrintLink.registerClass('eDott.WebUI.ContentPrintLink', Sys.UI.Control);
