couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From garrensmith <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request: Fix missing section name if deleting...
Date Mon, 29 Sep 2014 10:06:58 GMT
Github user garrensmith commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/56#discussion_r18145830
  
    --- Diff: app/addons/config/views.js ---
    @@ -35,12 +35,18 @@ function(app, FauxtonAPI, Config, Components) {
           "keyup .js-value-input": "processKeyEvents"
         },
     
    -    deleteValue: function (event) {
    -      var result = confirm("Are you sure you want to delete this configuration value?");
    +    deleteValue: function () {
    +      var collection = this.collection,
    +          result = confirm("Are you sure you want to delete this configuration value?");
     
           if (!result) { return; }
     
    -      this.model.destroy();
    +      this.model.destroy().done(function () {
    +        collection.fetch({reset: true}).done(function () {
    +          Views.Events.trigger("rerender");
    --- End diff --
    
    @robertkowalski this is great. But could you change this from `Views.Events` to `Fauxton.Events`.
We have a global events object. Could you refactor this whole module to move to using that
instead of its own events object.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message