All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.primefaces.mobile.widgets.dialog.js Maven / Gradle / Ivy

There is a newer version: 14.0.0-RC2
Show newest version
/**
 * PrimeFaces Mobile Dialog Widget
 */
PrimeFaces.widget.Dialog = PrimeFaces.widget.BaseWidget.extend({
    
    init: function(cfg) {
        this._super(cfg);
        this.content = this.jq.children('.ui-content');
        this.titlebar = this.jq.children('.ui-header');
        this.closeIcon = this.titlebar.children('.ui-icon-delete');
        
        this.jq.popup({
            positionTo: 'window',
            dismissible: false,
            overlayTheme: 'b'
        });
    
        this.bindEvents();
    },
        
    bindEvents: function() {
        var $this = this;
        
        this.closeIcon.on('click', function(e) {
            $this.hide();
            e.preventDefault();
        });
    },
    
    show: function() {
        this.jq.removeClass('ui-dialog-container').popup('open', {transition:this.cfg.showEffect});
    },
    
    hide: function() {
        this.jq.popup('close');
    }
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy