couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowalski <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request: Update full page document editor
Date Thu, 25 Dec 2014 16:08:33 GMT
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/204#discussion_r22274212
  
    --- Diff: app/addons/documents/views-doceditor.js ---
    @@ -505,23 +428,25 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify)
{
                 keyChecked.push('_rev');
               }
     
    -          //check the changedDoc has all the required standard keys
    -          if (_.isEmpty(_.difference(keyChecked, _.keys(changedDoc)))) { return; }
    +          // check the changedDoc has all the required standard keys
    +          if (_.isEmpty(_.difference(keyChecked, _.keys(changedDoc)))) {
    +            return;
    +          }
     
               editor.setReadOnly(true);
               setTimeout(function () { editor.setReadOnly(false) ;}, 400);
    +
               // use extend so that _id stays at the top of the object with displaying the
doc
               changedDoc = _.extend({_id: model.id, _rev: model.get('_rev')}, changedDoc);
               editor.setValue(JSON.stringify(changedDoc, null, '  '));
               FauxtonAPI.addNotification({
                 type: 'error',
    -            msg: 'Cannot remove a documents Id or Revision.',
    -            clear:  true
    +            msg: 'Cannot remove a document\'s id or revision.',
    --- End diff --
    
    `msg: "Cannot remove a document's id or revision."`
    
    is easier to read and write


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