mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
[group] remove confirm for 'lib unshare'
This commit is contained in:
@@ -44,28 +44,15 @@ define([
|
|||||||
},
|
},
|
||||||
|
|
||||||
unshare: function() {
|
unshare: function() {
|
||||||
var that = this;
|
this.model.destroy({
|
||||||
var yesCallback = function() {
|
wait: true,
|
||||||
Common.closeModal();
|
success: function(model, rep) {
|
||||||
Common.feedback(gettext('Loading...'), 'info', Common.INFO_TIMEOUT); // TODO: what if there is still response after 10 secs ?
|
Common.feedback(gettext('Success'), 'success', Common.SUCCESS_TIMOUT);
|
||||||
// send delete request and wait response
|
},
|
||||||
that.model.destroy({
|
error: function() {
|
||||||
wait: true,
|
Common.feedback(gettext('Error'), 'error', Common.ERROR_TIMEOUT);
|
||||||
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
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user