code: 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;
          }
docs: 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}