mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 20:13:28 +00:00
Add global register feature
Tweak admin field app Fix typo Tweaks Fix typo
This commit is contained in:

committed by
Romain Neutron

parent
9a9235a15e
commit
0539db7598
@@ -1,19 +1,20 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone',
|
||||
'i18n',
|
||||
'bootstrap'
|
||||
], function(_, Backbone, i18n, bootstrap) {
|
||||
"jquery",
|
||||
"underscore",
|
||||
"backbone",
|
||||
"i18n",
|
||||
"bootstrap"
|
||||
], function($, _, Backbone, i18n, bootstrap) {
|
||||
var ModalView = Backbone.View.extend({
|
||||
tagName: "div",
|
||||
className: "modal",
|
||||
events: {
|
||||
'click .confirm': 'confirmAction'
|
||||
"click .confirm": "confirmAction"
|
||||
},
|
||||
initialize: function (options) {
|
||||
var self = this;
|
||||
// remove view when modal is closed
|
||||
this.$el.on('hidden', function() {
|
||||
this.$el.on("hidden", function() {
|
||||
self.remove();
|
||||
});
|
||||
|
||||
@@ -22,8 +23,8 @@ define([
|
||||
}
|
||||
},
|
||||
render: function() {
|
||||
var template = _.template($("#modal_delete_confirm_template").html(), {
|
||||
msg: this.message || ''
|
||||
var template = _.template($("#modal_template").html(), {
|
||||
msg: this.message || ""
|
||||
});
|
||||
|
||||
this.$el.html(template).modal();
|
||||
@@ -31,8 +32,8 @@ define([
|
||||
return this;
|
||||
},
|
||||
confirmAction: function () {
|
||||
this.trigger('modal:confirm');
|
||||
this.$el.modal('hide');
|
||||
this.trigger("modal:confirm");
|
||||
this.$el.modal("hide");
|
||||
this.remove();
|
||||
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user