mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 04:53:26 +00:00
refactored code to use newer version of backbone.js and underscore.js
This commit is contained in:
@@ -17,6 +17,7 @@ define([
|
||||
var AlertView = Backbone.View.extend({
|
||||
tagName: "div",
|
||||
className: "alert",
|
||||
template: _.template($("#alert_template").html()),
|
||||
initialize: function (options) {
|
||||
var self = this;
|
||||
|
||||
@@ -32,11 +33,8 @@ define([
|
||||
},
|
||||
render: function () {
|
||||
var self = this;
|
||||
var template = _.template($("#alert_template").html(), {
|
||||
msg: this.message
|
||||
});
|
||||
|
||||
this.$el.addClass("alert-" + this.alert).html(template).alert();
|
||||
this.$el.addClass("alert-" + this.alert).html(this.template({msg: this.message})).alert();
|
||||
|
||||
if (this.delay > 0) {
|
||||
window.setTimeout(function () {
|
||||
|
Reference in New Issue
Block a user