CouchDB
  1. CouchDB
  2. COUCHDB-200

Source Tab of documents of futon should be editable.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: Futon
    • Labels:
      None

      Description

      I changed the futon code to provide an editable source view for documents. changes are both saved and synced to the "fields" tab, a cookie is set to restore the last active tab.

      In addition, browse.js contained a comment that two methods should be module private, so I changed the code to wrap everything in an anonymous closure to enable private module variables.

      1. couchdb-200.patch
        5 kB
        Paul Joseph Davis
      2. couchdb-200-SH.patch
        5 kB
        Sven Helmberger
      3. couchdb-srcedit.patch
        5 kB
        Dan Walters
      4. futon-srcedit.patch
        9 kB
        Sven Helmberger

        Activity

        Hide
        Dan Walters added a comment -

        Patch against the current trunk that makes the source view editable, using the same inline edit functionality as the tabular view.

        Show
        Dan Walters added a comment - Patch against the current trunk that makes the source view editable, using the same inline edit functionality as the tabular view.
        Hide
        Sven Helmberger added a comment -

        The new patch looks very good and seems to be less intrusive than mine.

        The only thing missing from it in my view would be the option to have the source view as primary document view/being activated on entering a document.

        Show
        Sven Helmberger added a comment - The new patch looks very good and seems to be less intrusive than mine. The only thing missing from it in my view would be the option to have the source view as primary document view/being activated on entering a document.
        Hide
        Paul Joseph Davis added a comment -

        I rebased Dan's patch against trunk. I was very much uncertain on where the if(noReload) clause in the last hunk should go. There's a new conditonal where it was and I wasn't certain if this should go in or out of that.

        Other than that, it works for me. I'm willing to commit it if someone will verifies it works for them as well.

        Show
        Paul Joseph Davis added a comment - I rebased Dan's patch against trunk. I was very much uncertain on where the if(noReload) clause in the last hunk should go. There's a new conditonal where it was and I wasn't certain if this should go in or out of that. Other than that, it works for me. I'm willing to commit it if someone will verifies it works for them as well.
        Hide
        Sven Helmberger added a comment -

        The patch works for me except for a wrong error message in case of an JSON error on the source tab.

        changed the comparison from

        if (msg == "parseJSON")

        to

        if (msg == "parseJSON" || msg == "JSON.parse")

        like below and it worked perfectly.

        Show
        Sven Helmberger added a comment - The patch works for me except for a wrong error message in case of an JSON error on the source tab. changed the comparison from if (msg == "parseJSON") to if (msg == "parseJSON" || msg == "JSON.parse") like below and it worked perfectly.
        Hide
        Sven Helmberger added a comment -

        changed patch for better error messages

        Show
        Sven Helmberger added a comment - changed patch for better error messages
        Hide
        Paul Joseph Davis added a comment -

        Applied as of r817793

        Show
        Paul Joseph Davis added a comment - Applied as of r817793

          People

          • Assignee:
            Paul Joseph Davis
            Reporter:
            Sven Helmberger
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development