Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb/pull/221#discussion_r12773458
  
    --- Diff: src/fauxton/app/addons/documents/views.js ---
    @@ -562,6 +563,59 @@ function(app, FauxtonAPI, Components, Documents, 
Databases, pouchdb,
           this.params = options.params || {};
           this.expandDocs = true;
           this.perPageDefault = this.docParams.limit || 20;
    +
    +      this.bulkDeleteDocsCollection = options.bulkDeleteDocsCollection;
    +      this.bulkDeleteDocsCollection.fetch({reset: true});
    +    },
    +
    +    removeDocuments: function (ids) {
    +      _.each(ids, function (id) {
    +        this.removeDocument(id);
    +      }, this);
    +    },
    +
    +    removeDocument: function (id) {
    +      this.rows[id].$el.fadeOut(function () {
    +        $(this).remove();
    +      });
    +    },
    +
    +    showError: function (ids) {
    +      if (ids) {
    +        showError('Failed to destroy: ' + ids.join(', '));
    +        return;
    +      }
    +
    +      showError('Failed to destroy your doc!');
    +    },
    +
    +    toggleDocument: function (event) {
    +      this.toggleTrash();
    +
    +      var docId = this.$(event.target).closest('tr').attr('data-id'),
    +          db = this.database.get('id'),
    +          rev = this.collection.get(docId).get('_rev'),
    +          data = {_id: docId, _rev: rev, _deleted: true};
    +
    +      if (this.$(event.target).is(':checked')) {
    +        this.bulkDeleteDocsCollection.add(new 
Documents.BulkDeleteDoc(data));
    --- End diff --
    
    thank you!


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to