Github user benkeen commented on a diff in the pull request: https://github.com/apache/couchdb-fauxton/pull/204#discussion_r22266552 --- Diff: app/addons/documents/views-doceditor.js --- @@ -207,184 +205,95 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) { 'click button.delete': 'destroy', 'click button.duplicate': 'duplicate', 'click button.upload': 'upload', - 'click button.js-back': 'goback', - 'click button.string-edit': 'stringEditing' + 'click a.js-back': 'onClickGoBack' }, disableLoader: true, initialize: function (options) { this.database = options.database; - _.bindAll(this); - }, - goback: function () { - var lastPages = FauxtonAPI.router.lastPages; + // to allow dependency injection + this.components = _.extend({ + confirmModal: Components.ConfirmationModal, + uploadModal: Views.UploadModal, + duplicateDocModal: Views.DuplicateDocModal + }, options); - // we copy/pasted the url into the browser or came from - // creating a document with "/new" in the end of the path - if (lastPages.length < 2 || /\/new$/.test(lastPages[0])) { - FauxtonAPI.navigate(this.database.url('index') + '?limit=100'); - } else { - window.history.back(); - } + _.bindAll(this); --- End diff -- Good call! Nope.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---