couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michellephung <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request: Allow editing documents from view
Date Fri, 12 Dec 2014 19:34:11 GMT
Github user michellephung commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/192#discussion_r21767491
  
    --- Diff: app/addons/documents/views-index.js ---
    @@ -454,7 +444,11 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
QueryOption
         },
     
         afterRender: function() {
    -      if (this.params && !this.newView && hasRenderedOnce) {
    +
    --- End diff --
    
    This was a prickly issue,
    
    I pushed a special branch to see what's happening with the afterRender being called twice
    https://github.com/michellephung/couchdb-fauxton/tree/editingFromView-special-afterRender
    
    > Special commit [DoNoMerge] …
    This is a special commit which shows afterRender is being called twice
    in some instances.  
    
    >1. Click on a view, (in the sidebar)
    2. Click edit one of the documents shown
    3. Click ‘Back’
    4. Look at console to see
    
    in  150698d, I've done the initial work to allow editing documents from a view
    in the next commit, 93f54d0, i've undid some my work, to show it being called twice.
    
    I've added a console.log() to show when it's being called in the code, so you see whats
going on.
    
    We were using a work around before, but I changed the code so it just checks if the search/query
options show up, and renders it if its not there 


---
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