dry out delete events
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e57286d7 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e57286d7 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e57286d7 Branch: refs/heads/master Commit: e57286d7295f58b64f158c411789c51c2b592304 Parents: af4a1b9 Author: Simon Metson <[email protected]> Authored: Sun Jan 26 19:04:57 2014 +0000 Committer: suelockwood <[email protected]> Committed: Wed Jan 29 10:34:29 2014 -0500 ---------------------------------------------------------------------- src/fauxton/app/addons/documents/views.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/e57286d7/src/fauxton/app/addons/documents/views.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js index 93fd0d4..fd7d034 100644 --- a/src/fauxton/app/addons/documents/views.js +++ b/src/fauxton/app/addons/documents/views.js @@ -40,10 +40,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum this.active_id = options.active_id; }, - events: { - "click #delete-database": "delete_database" - }, - serialize: function () { return { // TODO make this not hard coded here @@ -64,21 +60,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum this.$('.active').removeClass('active'); this.$('#'+this.active_id).addClass('active'); } - }, - - delete_database: function (event) { - event.preventDefault(); - - var result = confirm("Are you sure you want to delete this database?"); - - if (!result) { return; } - FauxtonAPI.addNotification({ - msg: "Deleting your database...", - type: "error" - }); - return this.database.destroy().done(function () { - app.router.navigate('#/_all_dbs', {trigger: true}); - }); } }); @@ -1778,7 +1759,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum this.database.destroy().then(function () { FauxtonAPI.navigate('#/_all_dbs'); FauxtonAPI.addNotification({ - msg: 'The database ' + databaseName + ' has been deleted.', + msg: 'The database <code>' + databaseName + '</code> has been deleted.', clear: true }); }).fail(function (rsp, error, msg) {
