public/build/static/application.js
function(cls, options) {
            var d = Q.defer();

            cls = cls || DialogView;
            var diag = new cls(options);

            diag.once("close", function(result, e) {
                if (result != null) {
                    d.resolve(result);
                } else {
                    d.reject(result);
                }
            });
            setTimeout(function() {
                d.notify(diag);
            }, 1);
            diag.update();

            return d.promise;
        }
function(cls, options) {
            var d = Q.defer();

            cls = cls || DialogView;
            var diag = new cls(options);

            diag.once("close", function(result, e) {
                if (result != null) {
                    d.resolve(result);
                } else {
                    d.reject(result);
                }
            });
            setTimeout(function() {
                d.notify(diag);
            }, 1);
            diag.update();

            return d.promise;
        }
function ( cls , options ) { var d = Q . defer ( ) ; cls = cls || DialogView ; var diag = new cls ( options ) ; diag . once ( "close" , function ( result , e ) { if ( result != null ) { d . resolve ( result ) ; } else { d . reject ( result ) ; } } ) ; setTimeout ( function ( ) { d . notify ( diag ) ; } , 1 ) ; diag . update ( ) ; return d . promise ; }
Open a dialog from a specific view class with some configuration

@param {DialogView} cls dialog view class
@param {options} options dialog view constructor options
@return {promise}
Open a dialog from a specific view class with some configuration