1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

[group] remove confirm for 'lib unshare'

This commit is contained in:
llj
2015-04-21 14:20:18 +08:00
committed by Daniel Pan
parent fdb23d9ca2
commit 4cb39ba0f4

View File

@@ -44,28 +44,15 @@ define([
},
unshare: function() {
var that = this;
var yesCallback = function() {
Common.closeModal();
Common.feedback(gettext('Loading...'), 'info', Common.INFO_TIMEOUT); // TODO: what if there is still response after 10 secs ?
// send delete request and wait response
that.model.destroy({
wait: true,
success: function(model, rep) {
Common.feedback(gettext('Success'), 'success', Common.SUCCESS_TIMOUT);
},
error: function() {
Common.feedback(gettext('Error'), 'error', Common.ERROR_TIMEOUT);
}
});
};
Common.showConfirm(
gettext('Unshare Library'),
gettext('Are you sure you want to unshare {placeholder} ?')
.replace(/\{placeholder\}/g, '<span class="op-target">' + Common.HTMLescape(this.model.get('name')) + '</span>'),
yesCallback
);
this.model.destroy({
wait: true,
success: function(model, rep) {
Common.feedback(gettext('Success'), 'success', Common.SUCCESS_TIMOUT);
},
error: function() {
Common.feedback(gettext('Error'), 'error', Common.ERROR_TIMEOUT);
}
});
},
});