couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [2/2] fauxton commit: updated refs/heads/master to 2c9723a
Date Wed, 13 May 2015 09:09:44 GMT
Revert "DatabasePagination now supports passing custom URL prefix"

This reverts commit 860a808b49a1c536ee265a09ec573ace666630a6.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/2c9723af
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/2c9723af
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/2c9723af

Branch: refs/heads/master
Commit: 2c9723af8cdafe414cefe7d4aa4493c306c9a8cf
Parents: 7f2c414
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Wed May 13 10:48:56 2015 +0200
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Wed May 13 10:48:56 2015 +0200

----------------------------------------------------------------------
 app/addons/databases/components.react.jsx           |  9 +--------
 app/addons/databases/tests/componentsSpec.react.jsx | 15 ---------------
 2 files changed, 1 insertion(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2c9723af/app/addons/databases/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/databases/components.react.jsx b/app/addons/databases/components.react.jsx
index a40c74b..0bf290c 100644
--- a/app/addons/databases/components.react.jsx
+++ b/app/addons/databases/components.react.jsx
@@ -269,11 +269,6 @@ define([
   });
 
   var DatabasePagination = React.createClass({
-    getDefaultProps: function () {
-      return {
-        linkPath: '_all_dbs'
-      };
-    },
 
     getStoreState: function () {
       return {
@@ -301,12 +296,10 @@ define([
     render: function () {
       var page = this.state.page;
       var total = this.props.total || this.state.databaseNames.length;
-      var urlPrefix = '#/' + this.props.linkPath + '?page=';
-
       return (
         <footer className="all-db-footer pagination-footer">
           <div id="database-pagination">
-            <ComponentsReact.Pagination page={page} total={total} urlPrefix={urlPrefix}
/>
+            <ComponentsReact.Pagination page={page} total={total} urlPrefix="#/_all_dbs?page="
/>
           </div>
         </footer>
       );

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2c9723af/app/addons/databases/tests/componentsSpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/componentsSpec.react.jsx b/app/addons/databases/tests/componentsSpec.react.jsx
index cebb194..5a790a4 100644
--- a/app/addons/databases/tests/componentsSpec.react.jsx
+++ b/app/addons/databases/tests/componentsSpec.react.jsx
@@ -186,20 +186,5 @@ define([
 
   });
 
-  describe('DatabasePagination', function () {
-    it ('uses custom URL prefix on the navigation if passed through props', function () {
-      var container = document.createElement('div');
-      var pagination = TestUtils.renderIntoDocument(<Views.DatabasePagination linkPath="_custom_path"
/>, container);
-
-      var links = $(pagination.getDOMNode()).find("a");
-      assert.equal(links.length, 3, "pagination contains links");
-
-      links.each(function () {
-        assert.include(this.href, '_custom_path', 'link contains custom path');
-      });
-    });
-
-  });
-
 });
 


Mime
View raw message