code: function trashOrUntrashPages(cb) {
            const ids = tree.map(p => p._id);
            return self.apos.docs.db.update({ _id: { $in: ids } }, action, {
              multi: true
            }, (err, res) => {
              cb(err);
            });
          }
docs: flag pages appropiately as trash or not