//# sourceURL=widgets/Text.js
/**
 * $Id: Text.js 304 2019-01-28 18:38:00Z patrick $
*/

import Widget from '../Widget.js';

var Text = function( elem ) {
    Widget.call( this, elem );
    this.name = "Text";
    this.layout = this.getData( 'layout', 'default' );
    $(this.elem).addClass("widget-text");
};

Text.prototype = Object.create( Widget.prototype );
Text.prototype.constructor = Text;

Text.prototype.start = function() {
};

Text.prototype.post_update = function() {
    $(this.elem).removeClass( 'nodata update-pending' );
};

Text.prototype.click = function( ) {
    var link = this.getData( 'link', false );
    if ( link ) {
        document.location.href = link;
        return false;
    }
};

export default Text;
