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: Part 2/2 for Mango:
Date Mon, 18 May 2015 18:21:34 GMT
Github user michellephung commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/362#discussion_r30533751
  
    --- Diff: app/addons/documents/index-results/stores.js ---
    @@ -96,17 +137,68 @@ function (FauxtonAPI, ActionTypes, HeaderActionTypes, Documents)
{
           return '';
         },
     
    -    getResults: function () {
    -      return this._collection.map(function (doc) {
    +    getMangoDocContent: function (originalDoc) {
    +      var doc = originalDoc.toJSON();
    +
    +      delete doc.ddoc;
    +      delete doc.name;
    +
    +      return this.isCollapsed(originalDoc.id) ? '' : JSON.stringify(doc, null, ' ');
    +    },
    +
    +    getMangoDoc: function (doc, index) {
    +      var selector,
    +          header;
    +
    +      if (doc.get('def') && doc.get('def').fields) {
    +
    +        header = MangoHelper.getIndexName(doc);
    +
             return {
    -          content: this.getDocContent(doc),
    -          id: this.getDocId(doc),
    -          keylabel: doc.isFromView() ? 'key' : 'id',
    +          content: this.getMangoDocContent(doc),
    +          header: header,
    +          id: doc.getId(),
    +          keylabel: '',
    --- End diff --
    
    can we take this out?


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