From 4cb39ba0f4258e6b7bad457935bc3bcc197608e6 Mon Sep 17 00:00:00 2001 From: llj Date: Tue, 21 Apr 2015 14:20:18 +0800 Subject: [PATCH] [group] remove confirm for 'lib unshare' --- static/scripts/app/views/group-repo.js | 31 ++++++++------------------ 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/static/scripts/app/views/group-repo.js b/static/scripts/app/views/group-repo.js index 38af18f3fc..e4b5f3ff2b 100644 --- a/static/scripts/app/views/group-repo.js +++ b/static/scripts/app/views/group-repo.js @@ -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, '' + Common.HTMLescape(this.model.get('name')) + ''), - 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); + } + }); }, });