You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2014/07/29 17:14:02 UTC
[2/2] fauxton commit: updated refs/heads/secondary-indexes to 2474d73
Adding Views, testing header stuff, fixing layout issues
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/2474d733
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/2474d733
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/2474d733
Branch: refs/heads/secondary-indexes
Commit: 2474d7335fee36b16b9cddf2cf53c8e2b0569346
Parents: f1cbc26
Author: deathbearbrown <de...@gmail.com>
Authored: Tue Jul 29 09:12:34 2014 -0400
Committer: deathbearbrown <de...@gmail.com>
Committed: Tue Jul 29 11:13:54 2014 -0400
----------------------------------------------------------------------
app/addons/documents/resources.js | 138 ----------------
app/addons/documents/routes.js | 23 +--
.../documents/templates/header_alldocs.html | 35 ++++
.../documents/templates/header_doc_edit.html | 33 ++++
app/addons/documents/views.js | 69 ++++++++
app/addons/indexes/resources.js | 161 +++++++++++++++++++
app/addons/indexes/routes-core.js | 14 +-
app/addons/indexes/routes-list.js | 14 +-
app/addons/indexes/routes-show.js | 15 +-
app/addons/indexes/routes-viewindexes.js | 4 +-
app/addons/indexes/templates/index_editor.html | 18 ---
app/addons/indexes/templates/index_header.html | 28 ++++
app/addons/indexes/templates/list_editor.html | 18 +++
.../indexes/templates/new_placeholder.html | 16 --
.../indexes/templates/preview_screen.html | 16 ++
app/addons/indexes/templates/show_editor.html | 18 +++
app/addons/indexes/views.js | 14 +-
app/templates/layouts/two_pane.html | 8 +-
18 files changed, 420 insertions(+), 222 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/resources.js b/app/addons/documents/resources.js
index 5fc6aa0..d953dd1 100644
--- a/app/addons/documents/resources.js
+++ b/app/addons/documents/resources.js
@@ -493,144 +493,6 @@ function(app, FauxtonAPI, PagingCollection) {
}
});
- Documents.IndexCollection = PagingCollection.extend({
- model: Documents.ViewRow,
- documentation: function(){
- return "docs";
- },
- initialize: function(_models, options) {
- this.database = options.database;
- this.params = _.extend({limit: 20, reduce: false}, options.params);
-
- this.idxType = "_view";
- this.view = options.view;
- this.design = options.design.replace('_design/','');
- this.perPageLimit = options.perPageLimit || 20;
-
- if (!this.params.limit) {
- this.params.limit = this.perPageLimit;
- }
- },
-
- urlRef: function(context, params) {
- var query = "";
-
- if (params) {
- if (!_.isEmpty(params)) {
- query = "?" + $.param(params);
- } else {
- query = '';
- }
- } else if (this.params) {
- var parsedParam = Documents.QueryParams.stringify(this.params);
- query = "?" + $.param(parsedParam);
- }
-
- var startOfUrl = app.host;
- if (context === 'app') {
- startOfUrl = 'database';
- } else if (context === "apiurl"){
- startOfUrl = window.location.origin;
- }
- var design = app.utils.safeURLName(this.design),
- view = app.utils.safeURLName(this.view);
-
- var url = [startOfUrl, this.database.safeID(), "_design", design, this.idxType, view];
- return url.join("/") + query;
- },
-
- url: function () {
- return this.urlRef.apply(this, arguments);
- },
-
- totalRows: function() {
- if (this.params.reduce) { return "unknown_reduce";}
-
- return this.viewMeta.total_rows || "unknown";
- },
-
- updateSeq: function() {
- return this.viewMeta.update_seq || false;
- },
-
- simple: function () {
- var docs = this.map(function (item) {
- return {
- _id: item.id,
- key: item.get('key'),
- value: item.get('value')
- };
- });
-
- return new Documents.IndexCollection(docs, {
- database: this.database,
- params: this.params,
- view: this.view,
- design: this.design
- });
- },
-
- parse: function(resp) {
- var rows = resp.rows;
- this.endTime = new Date().getTime();
- this.requestDuration = (this.endTime - this.startTime);
-
- return PagingCollection.prototype.parse.apply(this, arguments);
- },
-
- buildAllDocs: function(){
- this.fetch();
- },
-
- // We implement our own fetch to store the starttime so we that
- // we can get the request duration
- fetch: function () {
- this.startTime = new Date().getTime();
- return PagingCollection.prototype.fetch.call(this);
- },
-
- allDocs: function(){
- return this.models;
- },
-
- // This is taken from futon.browse.js $.timeString
- requestDurationInString: function () {
- var ms, sec, min, h, timeString, milliseconds = this.requestDuration;
-
- sec = Math.floor(milliseconds / 1000.0);
- min = Math.floor(sec / 60.0);
- sec = (sec % 60.0).toString();
- if (sec.length < 2) {
- sec = "0" + sec;
- }
-
- h = (Math.floor(min / 60.0)).toString();
- if (h.length < 2) {
- h = "0" + h;
- }
-
- min = (min % 60.0).toString();
- if (min.length < 2) {
- min = "0" + min;
- }
-
- timeString = h + ":" + min + ":" + sec;
-
- ms = (milliseconds % 1000.0).toString();
- while (ms.length < 3) {
- ms = "0" + ms;
- }
- timeString += "." + ms;
-
- return timeString;
- }
-
- });
-
-
-
-
-
return Documents;
});
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/documents/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes.js b/app/addons/documents/routes.js
index 449e50e..823fda4 100644
--- a/app/addons/documents/routes.js
+++ b/app/addons/documents/routes.js
@@ -172,6 +172,7 @@ function(app, FauxtonAPI, Documents, Changes, DocEditor, Databases, Resources) {
database: this.data.database
}));
},
+
designDocMetadata: function(database, ddoc){
this.toolsView && this.toolsView.remove();
this.viewEditor && this.viewEditor.remove();
@@ -298,28 +299,6 @@ function(app, FauxtonAPI, Documents, Changes, DocEditor, Databases, Resources) {
collection = this.data.database.allDocs;
collection.paging.pageSize = pageSize;
- } else {
- collection = this.data.indexedDocs = new Documents.IndexCollection(null, {
- database: this.data.database,
- design: ddoc,
- view: view,
- params: docParams,
- paging: {
- pageSize: pageSize
- }
- });
-
- if (!this.documentsView) {
- this.documentsView = this.createViewDocumentsView({
- designDoc: ddoc,
- docParams: docParams,
- urlParams: urlParams,
- database: this.data.database,
- indexedDocs: this.indexedDocs,
- designDocs: this.data.designDocs,
- view: view
- });
- }
}
this.documentsView.setCollection(collection);
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/documents/templates/header_alldocs.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/header_alldocs.html b/app/addons/documents/templates/header_alldocs.html
new file mode 100644
index 0000000..61eb2d8
--- /dev/null
+++ b/app/addons/documents/templates/header_alldocs.html
@@ -0,0 +1,35 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<div class="header-left">
+<!--back arrow-->
+
+<!--title with dropdown DB search-->
+
+
+<!-- Menu gear-->
+
+</div>
+
+
+<div class="header-right">
+ <!-- Select all -->
+
+ <!-- search (jump to doc)-->
+
+ <!-- Query Options-->
+
+
+ <!--right margin for api bar-->
+</div>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/documents/templates/header_doc_edit.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/header_doc_edit.html b/app/addons/documents/templates/header_doc_edit.html
new file mode 100644
index 0000000..fbc213f
--- /dev/null
+++ b/app/addons/documents/templates/header_doc_edit.html
@@ -0,0 +1,33 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<div class="header-left">
+<!--back arrow-->
+
+<!--title with dropdown DB search-->
+
+<!-- Menu gear-->
+</div>
+
+
+<div class="header-right">
+<!-- Select button-->
+<!-- ? button-->
+<!-- ? button-->
+<!-- ? button-->
+<!-- ? button-->
+<!-- json button-->
+<!-- trash button-->
+<!-- cancel button-->
+</div>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index b68df87..ff25d32 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -38,6 +38,75 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
});
}
+ //Header for alldocs with search, back, Menu, Query options, select etc
+ Views.AllDocsHeader = FauxtonAPI.View.extend({
+ template: "addons/documents/templates/header_alldocs",
+ events: {
+ 'select .selectAllDocs': 'selectAllDocs'
+ },
+ initialize: function(options){
+
+ },
+ selectAllDocs: function(){
+ //trigger event to select all in other view
+ },
+ afterRender:function(){
+ //insert DB search dropdown
+
+ //insert top create level dropdown with gear icon
+
+ //search docs
+
+ //insert queryoptions
+
+ }
+ });
+
+
+ //header that shows up when a doc is selected
+ // when a Doc is selected, trigger a routeEvent to render this
+ // the routeEvent will determine which header to show (??)
+ Views.DocEditHeader = FauxtonAPI.View.extend({
+ template: "addons/documents/templates/header_doc_edit",
+ events: {
+ 'select .selectAllDocs': 'selectAllDocs'
+ },
+ initialize: function(options){
+
+ },
+ selectAllDocs: function(){
+ //trigger event to select all in other view
+ },
+ afterRender:function(){
+ //insert DB search dropdown
+
+ //insert top create level dropdown with gear icon
+ }
+ });
+
+ Views.DocsHeader = FauxtonAPI.View.extend({
+ template: "addons/documents/templates/header_selecteddoc",
+ events: {
+ 'select .selectAllDocs': 'selectAllDocs'
+ },
+ initialize: function(options){
+
+ },
+ selectAllDocs: function(){
+ //trigger event to select all in other view
+ },
+ afterRender:function(){
+ //insert DB search dropdown
+
+ //insert top create level dropdown with gear icon
+
+ //search docs
+
+ //insert queryoptions
+
+ }
+ });
+
Views.DeleteDBModal = Components.ModalView.extend({
template: "addons/documents/templates/delete_database_modal",
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/resources.js b/app/addons/indexes/resources.js
index 629170c..626d984 100644
--- a/app/addons/indexes/resources.js
+++ b/app/addons/indexes/resources.js
@@ -18,6 +18,32 @@ define([
function(app, FauxtonAPI, PagingCollection) {
var Resources = {};
+
+ Resources.QueryParams = (function () {
+ var _eachParams = function (params, action) {
+ // clone to avoid in-place modification
+ var result = _.clone(params);
+
+ _.each(['startkey', 'endkey', 'key'], function (key) {
+ if (_.has(result, key)) {
+ result[key] = action(result[key]);
+ }
+ });
+
+ return result;
+ };
+
+ return {
+ parse: function (params) {
+ return _eachParams(params, JSON.parse);
+ },
+
+ stringify: function (params) {
+ return _eachParams(params, JSON.stringify);
+ }
+ };
+ })();
+
Resources.ViewRow = FauxtonAPI.Model.extend({
// this is a hack so that backbone.collections doesn't group
// these by id and reduce the number of items returned.
@@ -120,5 +146,140 @@ function(app, FauxtonAPI, PagingCollection) {
}
});
+
+ Resources.IndexCollection = PagingCollection.extend({
+ model: Resources.ViewRow,
+ documentation: function(){
+ return "docs";
+ },
+ initialize: function(_models, options) {
+ this.database = options.database;
+ this.params = _.extend({limit: 20, reduce: false}, options.params);
+
+ this.idxType = "_view";
+ this.view = options.view;
+ this.design = options.design.replace('_design/','');
+ this.perPageLimit = options.perPageLimit || 20;
+
+ if (!this.params.limit) {
+ this.params.limit = this.perPageLimit;
+ }
+ },
+
+ urlRef: function(context, params) {
+ var query = "";
+
+ if (params) {
+ if (!_.isEmpty(params)) {
+ query = "?" + $.param(params);
+ } else {
+ query = '';
+ }
+ } else if (this.params) {
+ var parsedParam = Resources.QueryParams.stringify(this.params);
+ query = "?" + $.param(parsedParam);
+ }
+
+ var startOfUrl = app.host;
+ if (context === 'app') {
+ startOfUrl = 'database';
+ } else if (context === "apiurl"){
+ startOfUrl = window.location.origin;
+ }
+ var design = app.utils.safeURLName(this.design),
+ view = app.utils.safeURLName(this.view);
+
+ var url = [startOfUrl, this.database.safeID(), "_design", design, this.idxType, view];
+ return url.join("/") + query;
+ },
+
+ url: function () {
+ return this.urlRef.apply(this, arguments);
+ },
+
+ totalRows: function() {
+ if (this.params.reduce) { return "unknown_reduce";}
+
+ return this.viewMeta.total_rows || "unknown";
+ },
+
+ updateSeq: function() {
+ return this.viewMeta.update_seq || false;
+ },
+
+ simple: function () {
+ var docs = this.map(function (item) {
+ return {
+ _id: item.id,
+ key: item.get('key'),
+ value: item.get('value')
+ };
+ });
+
+ return new Resources.IndexCollection(docs, {
+ database: this.database,
+ params: this.params,
+ view: this.view,
+ design: this.design
+ });
+ },
+
+ parse: function(resp) {
+ var rows = resp.rows;
+ this.endTime = new Date().getTime();
+ this.requestDuration = (this.endTime - this.startTime);
+
+ return PagingCollection.prototype.parse.apply(this, arguments);
+ },
+
+ buildAllDocs: function(){
+ this.fetch();
+ },
+
+ // We implement our own fetch to store the starttime so we that
+ // we can get the request duration
+ fetch: function () {
+ this.startTime = new Date().getTime();
+ return PagingCollection.prototype.fetch.call(this);
+ },
+
+ allDocs: function(){
+ return this.models;
+ },
+
+ // This is taken from futon.browse.js $.timeString
+ requestDurationInString: function () {
+ var ms, sec, min, h, timeString, milliseconds = this.requestDuration;
+
+ sec = Math.floor(milliseconds / 1000.0);
+ min = Math.floor(sec / 60.0);
+ sec = (sec % 60.0).toString();
+ if (sec.length < 2) {
+ sec = "0" + sec;
+ }
+
+ h = (Math.floor(min / 60.0)).toString();
+ if (h.length < 2) {
+ h = "0" + h;
+ }
+
+ min = (min % 60.0).toString();
+ if (min.length < 2) {
+ min = "0" + min;
+ }
+
+ timeString = h + ":" + min + ":" + sec;
+
+ ms = (milliseconds % 1000.0).toString();
+ while (ms.length < 3) {
+ ms = "0" + ms;
+ }
+ timeString += "." + ms;
+
+ return timeString;
+ }
+
+ });
+
return Resources;
});
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/routes-core.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes-core.js b/app/addons/indexes/routes-core.js
index 653140b..af7b525 100644
--- a/app/addons/indexes/routes-core.js
+++ b/app/addons/indexes/routes-core.js
@@ -22,24 +22,16 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) {
var CoreIndexRouteObj = FauxtonAPI.RouteObject.extend({
layout: "two_pane",
- apiUrl: function() {
- return [this.doc.url("apiurl"), this.doc.documentation()];
- },
+
initialize: function (route, masterLayout, options) {
this.databaseName = options[0];
- this.setView("#breadcrumbs", new Views.EditorPlaceholder({}));
+ //this is a test
+ this.setView("#breadcrumbs", new Views.IndexHeader({}));
this.data = {
database: new Databases.Model({id:this.databaseName})
};
- this.docID = options[1]||'new';
-
- this.doc = new Documents.DDoc({
- _id: this.docID
- }, {
- database: this.data.database
- });
this.data.designDocs = new Documents.AllDocs(null, {
database: this.data.database,
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/routes-list.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes-list.js b/app/addons/indexes/routes-list.js
index 5ef430b..7729ec2 100644
--- a/app/addons/indexes/routes-list.js
+++ b/app/addons/indexes/routes-list.js
@@ -30,10 +30,16 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources, RouteCore) {
"database/:database/new_list": "newListsEditor",
"database/:database/new_list/:designDoc": "newListsEditor"
},
+
+ apiUrl: function() {
+ //TODO: Hook up proper API urls
+ return '';
+ },
+
newListsEditor: function(){
- this.setView("#left-content", new Views.EditorPlaceholder({}));
+ this.setView("#left-content", new Views.ListEditor({}));
- this.setView("#right-content", new Views.NewIndexPlaceholder({}));
+ this.setView("#right-content", new Views.PreviewScreen({}));
this.crumbs = function () {
return [
{"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
@@ -41,9 +47,9 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources, RouteCore) {
};
},
tempFn: function(databaseName, ddoc, fn){
- this.setView("#left-content", new Views.EditorPlaceholder({}));
+ this.setView("#left-content", new Views.ListEditor({}));
- this.setView("#right-content", new Views.NewIndexPlaceholder({}));
+ this.setView("#right-content", new Views.PreviewScreen({}));
this.crumbs = function () {
return [
{"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/routes-show.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes-show.js b/app/addons/indexes/routes-show.js
index 56af33e..1677634 100644
--- a/app/addons/indexes/routes-show.js
+++ b/app/addons/indexes/routes-show.js
@@ -30,20 +30,27 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources, RouteCore) {
"database/:database/new_show": "newShowEditor",
"database/:database/new_show/:designDoc": "newShowEditor"
},
+
newShowEditor: function(){
- this.setView("#left-content", new Views.EditorPlaceholder({}));
+ this.setView("#left-content", new Views.ShowEditor({}));
- this.setView("#right-content", new Views.NewIndexPlaceholder({}));
+ this.setView("#right-content", new Views.PreviewScreen({}));
this.crumbs = function () {
return [
{"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
];
};
},
+
+ apiUrl: function() {
+ //TODO: Hook up proper API urls
+ return '';
+ },
+
tempFn: function(databaseName, ddoc, fn){
- this.setView("#left-content", new Views.EditorPlaceholder({}));
+ this.setView("#left-content", new Views.ShowEditor({}));
- this.setView("#right-content", new Views.NewIndexPlaceholder({}));
+ this.setView("#right-content", new Views.PreviewScreen({}));
this.crumbs = function () {
return [
{"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/routes-viewindexes.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes-viewindexes.js b/app/addons/indexes/routes-viewindexes.js
index 6e24b53..77b9587 100644
--- a/app/addons/indexes/routes-viewindexes.js
+++ b/app/addons/indexes/routes-viewindexes.js
@@ -34,7 +34,7 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources, RouteCore) {
newViewEditor: function (database, designDoc) {
var params = app.getParams();
- this.setView("#right-content", new Views.NewIndexPlaceholder({}));
+ this.setView("#right-content", new Views.PreviewScreen({}));
this.viewEditor = this.setView("#left-content", new Views.ViewEditor({
currentddoc: "_design/"+designDoc || "",
@@ -59,7 +59,7 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources, RouteCore) {
view = view.replace(/\?.*$/,'');
- this.data.indexedDocs = new Documents.IndexCollection(null, {
+ this.data.indexedDocs = new Resources.IndexCollection(null, {
database: this.data.database,
design: decodeDdoc,
view: view,
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/templates/index_editor.html
----------------------------------------------------------------------
diff --git a/app/addons/indexes/templates/index_editor.html b/app/addons/indexes/templates/index_editor.html
deleted file mode 100644
index 8644909..0000000
--- a/app/addons/indexes/templates/index_editor.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!--
-Licensed under the Apache License, Version 2.0 (the "License"); you may not
-use this file except in compliance with the License. You may obtain a copy of
-the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations under
-the License.
--->
-
-<form>
- <label> A FORM</label>
-
-</form>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/templates/index_header.html
----------------------------------------------------------------------
diff --git a/app/addons/indexes/templates/index_header.html b/app/addons/indexes/templates/index_header.html
new file mode 100644
index 0000000..ac8ac56
--- /dev/null
+++ b/app/addons/indexes/templates/index_header.html
@@ -0,0 +1,28 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<div class="header-left">
+<!--back arrow-->
+
+<!--title-->
+
+<!-- Menu gear-->
+
+</div>
+
+
+<div class="header-right">
+ <!-- Query Options-->
+ <!--right margin for api bar-->
+</div>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/templates/list_editor.html
----------------------------------------------------------------------
diff --git a/app/addons/indexes/templates/list_editor.html b/app/addons/indexes/templates/list_editor.html
new file mode 100644
index 0000000..8644909
--- /dev/null
+++ b/app/addons/indexes/templates/list_editor.html
@@ -0,0 +1,18 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<form>
+ <label> A FORM</label>
+
+</form>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/templates/new_placeholder.html
----------------------------------------------------------------------
diff --git a/app/addons/indexes/templates/new_placeholder.html b/app/addons/indexes/templates/new_placeholder.html
deleted file mode 100644
index 1fcf6d9..0000000
--- a/app/addons/indexes/templates/new_placeholder.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!--
-Licensed under the Apache License, Version 2.0 (the "License"); you may not
-use this file except in compliance with the License. You may obtain a copy of
-the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations under
-the License.
--->
-
-<h3>No Index Created Yet!</h3>
-<p> Run <a href="#/preview" class="btn btn-success save"> Preview</a> To query result</p>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/templates/preview_screen.html
----------------------------------------------------------------------
diff --git a/app/addons/indexes/templates/preview_screen.html b/app/addons/indexes/templates/preview_screen.html
new file mode 100644
index 0000000..1fcf6d9
--- /dev/null
+++ b/app/addons/indexes/templates/preview_screen.html
@@ -0,0 +1,16 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<h3>No Index Created Yet!</h3>
+<p> Run <a href="#/preview" class="btn btn-success save"> Preview</a> To query result</p>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/templates/show_editor.html
----------------------------------------------------------------------
diff --git a/app/addons/indexes/templates/show_editor.html b/app/addons/indexes/templates/show_editor.html
new file mode 100644
index 0000000..8644909
--- /dev/null
+++ b/app/addons/indexes/templates/show_editor.html
@@ -0,0 +1,18 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<form>
+ <label> A FORM</label>
+
+</form>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/addons/indexes/views.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/views.js b/app/addons/indexes/views.js
index 109e76d..433b054 100644
--- a/app/addons/indexes/views.js
+++ b/app/addons/indexes/views.js
@@ -34,13 +34,21 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
var Views = {};
+ Views.IndexHeader = FauxtonAPI.View.extend({
+ template: "addons/indexes/templates/index_header"
+ });
+
Views.NewIndexPlaceholder = FauxtonAPI.View.extend({
- template: "addons/indexes/templates/new_placeholder",
+ template: "addons/indexes/templates/preview_screen",
className: "watermark-logo"
});
- Views.EditorPlaceholder = FauxtonAPI.View.extend({
- template: "addons/indexes/templates/index_editor",
+ Views.ShowEditor = FauxtonAPI.View.extend({
+ template: "addons/indexes/templates/show_editor",
+ });
+
+ Views.ListEditor = FauxtonAPI.View.extend({
+ template: "addons/indexes/templates/list_editor",
});
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2474d733/app/templates/layouts/two_pane.html
----------------------------------------------------------------------
diff --git a/app/templates/layouts/two_pane.html b/app/templates/layouts/two_pane.html
index f9ad35c..f6b958a 100644
--- a/app/templates/layouts/two_pane.html
+++ b/app/templates/layouts/two_pane.html
@@ -12,17 +12,17 @@ License for the specific language governing permissions and limitations under
the License.
-->
-
<div id="primary-navbar"></div>
-<div id="dashboard" class="container-fluid two-pane">
+<div id="dashboard" class="container-fluid">
+
<header class="fixed-header">
<div id="breadcrumbs"></div>
<div id="api-navbar"></div>
</header>
- <div class="row-fluid content-area">
+ <div class="content-area">
<div id="left-content" class="span6"></div>
<div id="right-content" class="span6"></div>
+
</div>
</div>
-