refactored code to use newer version of backbone.js and underscore.js

This commit is contained in:
Mike Ng
2018-02-05 16:14:13 +04:00
parent df85aa8827
commit 1337a6994f
11 changed files with 37 additions and 45 deletions

View File

@@ -20,6 +20,7 @@ define([
events: {
"click .confirm": "confirmAction"
},
template: _.template($("#modal_template").html()),
initialize: function (options) {
var self = this;
// remove view when modal is closed
@@ -32,11 +33,7 @@ define([
}
},
render: function () {
var template = _.template($("#modal_template").html(), {
msg: this.message || ""
});
this.$el.html(template).modal();
this.$el.html(this.template({msg: this.message || ""})).modal();
return this;
},