|
|
|
@ -2,7 +2,7 @@ define(function(require) { |
|
|
|
/** |
|
|
|
* @class Modal |
|
|
|
* @param {Object} Configurations |
|
|
|
* |
|
|
|
* |
|
|
|
* @return {Object} |
|
|
|
* */ |
|
|
|
function Modal(config) |
|
|
|
@ -16,7 +16,7 @@ define(function(require) { |
|
|
|
if (!(name in c)) |
|
|
|
c[name] = defaults[name]; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.model = new ModalM(c); |
|
|
|
var obj = { |
|
|
|
model : this.model, |
|
|
|
@ -25,33 +25,41 @@ define(function(require) { |
|
|
|
|
|
|
|
this.modal = new ModalView(obj); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Modal.prototype = { |
|
|
|
|
|
|
|
|
|
|
|
getModel : function(){ |
|
|
|
return this.model; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
render : function(){ |
|
|
|
return this.modal.render().$el; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
show : function(){ |
|
|
|
return this.modal.show(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
hide : function(){ |
|
|
|
return this.modal.hide(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setTitle : function(v){ |
|
|
|
return this.modal.setTitle(v); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setContent : function(v){ |
|
|
|
return this.modal.setContent(v); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns content element |
|
|
|
* @return {HTMLElement} |
|
|
|
*/ |
|
|
|
getContentEl: function(){ |
|
|
|
return this.modal.getContent(); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return Modal; |
|
|
|
}); |