mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-03-23 09:20:25 +00:00
30 lines
No EOL
481 B
JavaScript
30 lines
No EOL
481 B
JavaScript
define( [
|
|
'underscore',
|
|
'jquery',
|
|
'backbone'
|
|
],
|
|
function ( _, $, Backbone ) {
|
|
"use strict";
|
|
|
|
return Backbone.View.extend( {
|
|
|
|
initialize : function ( template ) {
|
|
_.bindAll( this );
|
|
if( template ) {
|
|
this.template = _.template( template );
|
|
}
|
|
},
|
|
|
|
render : function () {
|
|
this.$el.html( this.template( this.model.toJSON() ) );
|
|
},
|
|
|
|
show : function () {
|
|
this.$el.show();
|
|
},
|
|
|
|
hide : function () {
|
|
this.$el.hide();
|
|
}
|
|
} );
|
|
} ); |