Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions web_external/Datasets/ApplyMetadataView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Backbone from 'backbone';
import $ from 'jquery';
import _ from 'underscore';

import {SORT_DESC} from 'girder/constants';
Expand Down Expand Up @@ -148,16 +147,7 @@ const ApplyMetadataView = View.extend({
escapedHtml: true,
yesText: 'Save',
yesClass: 'btn-primary',
confirmCallback: () => {
// Ensure dialog is hidden before continuing. Otherwise,
// when validateMetadata() displays its modal alert dialog,
// the Bootstrap-created element with class "modal-backdrop"
// is erroneously not removed.
$('#g-dialog-container').on('hidden.bs.modal', () => {
let save = true;
this.validateMetadata(save);
});
}
confirmCallback: _.bind(this.validateMetadata, this, true)
});
}
},
Expand Down
9 changes: 1 addition & 8 deletions web_external/Featuresets/FeaturesetView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import $ from 'jquery';
import _ from 'underscore';

import LoadingAnimation from 'girder/views/widgets/LoadingAnimation';
Expand Down Expand Up @@ -49,13 +48,7 @@ const FeaturesetView = View.extend({
confirm({
text: `<h4>Permanently delete <b>"${_.escape(this.model.name())}"</b> featureset?</h4>`,
escapedHtml: true,
confirmCallback: () => {
// Ensure dialog is hidden before continuing. Otherwise,
// when destroy() displays its modal alert dialog,
// the Bootstrap-created element with class "modal-backdrop"
// is erroneously not removed.
$('#g-dialog-container').on('hidden.bs.modal', _.bind(this.destroyModel, this));
}
confirmCallback: _.bind(this.destroyModel, this)
});
},

Expand Down
16 changes: 2 additions & 14 deletions web_external/Studies/StudyView.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,7 @@ const StudyView = View.extend({
confirm({
text: `<h4>Permanently remove <b>"${_.escape(user.name())}"</b> from study?</h4>`,
escapedHtml: true,
confirmCallback: () => {
// Ensure dialog is hidden before continuing. Otherwise,
// when destroy() displays its modal alert dialog,
// the Bootstrap-created element with class "modal-backdrop"
// is erroneously not removed.
$('#g-dialog-container').on('hidden.bs.modal', _.bind(this.removeUser, this, user));
}
confirmCallback: _.bind(this.removeUser, this, user)
});
},

Expand Down Expand Up @@ -117,13 +111,7 @@ const StudyView = View.extend({
confirm({
text: `<h4>Permanently delete <b>"${_.escape(this.model.name())}"</b> study?</h4>`,
escapedHtml: true,
confirmCallback: () => {
// Ensure dialog is hidden before continuing. Otherwise,
// when destroy() displays its modal alert dialog,
// the Bootstrap-created element with class "modal-backdrop"
// is erroneously not removed.
$('#g-dialog-container').on('hidden.bs.modal', _.bind(this.destroyModel, this));
}
confirmCallback: _.bind(this.destroyModel, this)
});
},

Expand Down