1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 13:50:07 +00:00

[grp lib] bugfix & improvement

This commit is contained in:
llj
2015-04-22 15:01:07 +08:00
committed by Daniel Pan
parent 4cb39ba0f4
commit ed4447150d
3 changed files with 14 additions and 7 deletions

View File

@@ -44,13 +44,21 @@ define([
},
unshare: function() {
var lib_name = this.model.get('name');
this.model.destroy({
wait: true,
success: function(model, rep) {
Common.feedback(gettext('Success'), 'success', Common.SUCCESS_TIMOUT);
success: function() {
var msg = gettext('Successfully unshared {placeholder}').replace('{placeholder}', '<span class="op-target">' + Common.HTMLescape(lib_name) + '</span>');
Common.feedback(msg, 'success', Common.SUCCESS_TIMOUT);
},
error: function() {
Common.feedback(gettext('Error'), 'error', Common.ERROR_TIMEOUT);
error: function(model, response) {
var err;
if (response.responseText) {
err = $.parseJSON(response.responseText).error_msg;
} else {
err = gettext("Failed. Please check the network.");
}
Common.feedback(err, 'error');
}
});
},