couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject fauxton commit: updated refs/heads/master to 434e8f9
Date Tue, 24 Jan 2017 08:00:51 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master a6f775d43 -> 434e8f9ab


make the query options in the header optional


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

Branch: refs/heads/master
Commit: 434e8f9abb4387554713e95f6aab697ddacd439d
Parents: a6f775d
Author: Garren Smith <garren.smith@gmail.com>
Authored: Tue Jan 24 08:59:16 2017 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Tue Jan 24 08:59:16 2017 +0200

----------------------------------------------------------------------
 app/addons/documents/components/header-docs-right.jsx |  8 ++++++--
 app/addons/documents/layouts.js                       | 13 +++++++++++--
 2 files changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/434e8f9a/app/addons/documents/components/header-docs-right.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/components/header-docs-right.jsx b/app/addons/documents/components/header-docs-right.jsx
index da14ef8..115ae1f 100644
--- a/app/addons/documents/components/header-docs-right.jsx
+++ b/app/addons/documents/components/header-docs-right.jsx
@@ -17,7 +17,7 @@ import Actions from './actions';
 
 const { QueryOptionsController } = QueryOptions;
 
-const RightAllDocsHeader = ({database}) =>
+const RightAllDocsHeader = ({database, hideQueryOptions}) =>
   <div className="header-right right-db-header flex-layout flex-row">
 
     <div className="faux-header__searchboxwrapper">
@@ -26,11 +26,15 @@ const RightAllDocsHeader = ({database}) =>
       </div>
     </div>
 
-    <QueryOptionsController />
+    {hideQueryOptions ? '' : <QueryOptionsController />}
   </div>;
 
 RightAllDocsHeader.propTypes = {
   database: React.PropTypes.object.isRequired
 };
 
+RightAllDocsHeader.defaultProps = {
+  hideQueryOptions: false
+};
+
 export default RightAllDocsHeader;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/434e8f9a/app/addons/documents/layouts.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/layouts.js b/app/addons/documents/layouts.js
index 229595f..442b782 100644
--- a/app/addons/documents/layouts.js
+++ b/app/addons/documents/layouts.js
@@ -23,7 +23,16 @@ import IndexEditorComponents from "./index-editor/components.react";
 import DesignDocInfoComponents from './designdocinfo/components.react';
 import RightAllDocsHeader from './components/header-docs-right';
 
-export const TabsSidebarHeader = ({hideHeaderBar, database, dbName, dropDownLinks, showIncludeAllDocs,
docURL, endpoint}) => {
+export const TabsSidebarHeader = ({
+  hideQueryOptions,
+  hideHeaderBar,
+  database,
+  dbName,
+  dropDownLinks,
+  showIncludeAllDocs,
+  docURL,
+  endpoint
+}) => {
   return (
     <header className="two-panel-header">
       <div className="flex-layout flex-row">
@@ -38,7 +47,7 @@ export const TabsSidebarHeader = ({hideHeaderBar, database, dbName, dropDownLink
               {hideHeaderBar ? null : <ReactHeader.BulkDocumentHeaderController showIncludeAllDocs={showIncludeAllDocs}
/>}
           </div>
           <div id="right-header" className="flex-fill">
-            <RightAllDocsHeader database={database} />
+            <RightAllDocsHeader hideQueryOptions={hideQueryOptions} database={database}
/>
           </div>
           <ApiBarWrapper docURL={docURL} endpoint={endpoint} />
           <div id="notification-center-btn" className="flex-fill">


Mime
View raw message