Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0FACB11B53 for ; Thu, 31 Jul 2014 14:44:53 +0000 (UTC) Received: (qmail 35058 invoked by uid 500); 31 Jul 2014 14:44:53 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 35007 invoked by uid 500); 31 Jul 2014 14:44:52 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 34998 invoked by uid 99); 31 Jul 2014 14:44:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2014 14:44:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9AB599BBB84; Thu, 31 Jul 2014 14:44:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: deathbear@apache.org To: commits@couchdb.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: fauxton commit: updated refs/heads/secondary-indexes to 9e7d86c Date: Thu, 31 Jul 2014 14:44:52 +0000 (UTC) Repository: couchdb-fauxton Updated Branches: refs/heads/secondary-indexes 1bee9c28b -> 9e7d86c60 resize stuff And more refactor stuff Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/9e7d86c6 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/9e7d86c6 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/9e7d86c6 Branch: refs/heads/secondary-indexes Commit: 9e7d86c60b28f153c0de4fb617537a3740561cca Parents: 1bee9c2 Author: deathbearbrown Authored: Wed Jul 30 15:40:11 2014 -0400 Committer: deathbearbrown Committed: Thu Jul 31 10:44:46 2014 -0400 ---------------------------------------------------------------------- app/addons/documents/routes.js | 44 ++++++------------- .../documents/templates/index_row_docular.html | 35 --------------- app/addons/documents/views.js | 22 ---------- app/addons/fauxton/resizeColumns.js | 7 +++ app/addons/indexes/routes-core.js | 45 +++++++++++++++----- .../indexes/templates/index_row_docular.html | 35 +++++++++++++++ app/addons/indexes/views.js | 26 +++++++++++ assets/less/templates.less | 2 +- 8 files changed, 115 insertions(+), 101 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9e7d86c6/app/addons/documents/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/routes.js b/app/addons/documents/routes.js index 823fda4..31a266d 100644 --- a/app/addons/documents/routes.js +++ b/app/addons/documents/routes.js @@ -141,7 +141,7 @@ function(app, FauxtonAPI, Documents, Changes, DocEditor, Databases, Resources) { events: { "route:updateAllDocs": "updateAllDocsFromView", - "route:updatePreviewDocs": "updateAllDocsFromPreview", + // "route:updatePreviewDocs": "updateAllDocsFromPreview", "route:reloadDesignDocs": "reloadDesignDocs", "route:paginate": "paginate", "route:perPageChange": "perPageChange" @@ -268,18 +268,18 @@ function(app, FauxtonAPI, Documents, Changes, DocEditor, Databases, Resources) { }; }, - createViewDocumentsView: function (options) { + // createViewDocumentsView: function (options) { - return this.setView("#dashboard-lower-content", new Documents.Views.AllDocsList({ - database: options.database, - collection: options.indexedDocs, - nestedView: Documents.Views.Row, - viewList: true, - ddocInfo: this.ddocInfo(options.designDoc, options.designDocs, options.view), - docParams: options.docParams, - params: options.urlParams - })); - }, + // return this.setView("#dashboard-lower-content", new Documents.Views.AllDocsList({ + // database: options.database, + // collection: options.indexedDocs, + // nestedView: Documents.Views.Row, + // viewList: true, + // ddocInfo: this.ddocInfo(options.designDoc, options.designDocs, options.view), + // docParams: options.docParams, + // params: options.urlParams + // })); + // }, updateAllDocsFromView: function (event) { var view = event.view, @@ -308,26 +308,6 @@ function(app, FauxtonAPI, Documents, Changes, DocEditor, Databases, Resources) { this.apiUrl = [collection.urlRef("apiurl", urlParams), "docs"]; }, - updateAllDocsFromPreview: function (event) { - var view = event.view, - rows = event.rows, - ddoc = event.ddoc; - - this.data.indexedDocs = new Documents.PouchIndexCollection(null, { - database: this.data.database, - design: ddoc, - view: view, - rows: rows - }); - - this.documentsView = this.setView("#dashboard-lower-content", new Documents.Views.AllDocsList({ - database: this.data.database, - collection: this.data.indexedDocs, - nestedView: Documents.Views.Row, - viewList: true - })); - }, - perPageChange: function (perPage) { // We need to restore the collection parameters to the defaults (1st page) // and update the page size http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9e7d86c6/app/addons/documents/templates/index_row_docular.html ---------------------------------------------------------------------- diff --git a/app/addons/documents/templates/index_row_docular.html b/app/addons/documents/templates/index_row_docular.html deleted file mode 100644 index 2e9d88a..0000000 --- a/app/addons/documents/templates/index_row_docular.html +++ /dev/null @@ -1,35 +0,0 @@ - -<% if (doc.isEditable()) { %> - -<% } %> - -
-

_id "<%=docID%>"

-
- - <% if (doc.isEditable()) { %> - - <% } %> - - -
-
-
-
<%- doc.prettyJSON() %>
- - - -
- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9e7d86c6/app/addons/documents/views.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js index e7456f9..8bde439 100644 --- a/app/addons/documents/views.js +++ b/app/addons/documents/views.js @@ -217,28 +217,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions, } }); - Views.Row = FauxtonAPI.View.extend({ - template: "addons/documents/templates/index_row_docular", - tagName: "tr", - - events: { - "click button.delete": "destroy" - }, - - destroy: function (event) { - event.preventDefault(); - - window.alert('Cannot delete a document generated from a view.'); - }, - - serialize: function() { - return { - docID: this.model.get('id'), - doc: this.model, - url: this.model.url('app') - }; - } - }); Views.AllDocsNumber = FauxtonAPI.View.extend({ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9e7d86c6/app/addons/fauxton/resizeColumns.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/resizeColumns.js b/app/addons/fauxton/resizeColumns.js index 9d5c1cf..0da3f45 100644 --- a/app/addons/fauxton/resizeColumns.js +++ b/app/addons/fauxton/resizeColumns.js @@ -100,6 +100,13 @@ function(FauxtonAPI) { if (this.options.onResizeHandler){ this.options.onResizeHandler(); } else { + /* + Just so we all are aware: + This entire file and the html of the layouts is bonkers + crazy. I hate what horrible things happened in this file. + It will change soon with a layout overhaul. + */ + var panelWidth = this.getPanelWidth(); this.setPosition(panelWidth); $('.window-resizeable').innerWidth(panelWidth); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9e7d86c6/app/addons/indexes/routes-core.js ---------------------------------------------------------------------- diff --git a/app/addons/indexes/routes-core.js b/app/addons/indexes/routes-core.js index 3cf28b4..338d2a3 100644 --- a/app/addons/indexes/routes-core.js +++ b/app/addons/indexes/routes-core.js @@ -44,19 +44,10 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) { }); }, - createViewDocumentsView: function (options) { - return this.setView("#right-content", new Documents.Views.AllDocsList({ - database: options.database, - collection: options.indexedDocs, - nestedView: Documents.Views.Row, - viewList: true, - ddocInfo: this.ddocInfo(options.designDoc, options.designDocs, options.view), - docParams: options.docParams, - params: options.urlParams - })); + events: { + "route:updatePreviewDocs": "updateAllDocsFromPreview", }, - ddocInfo: function (designDoc, designDocs, view) { return { id: "_design/" + designDoc, @@ -98,6 +89,38 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) { establish: function () { return this.data.designDocs.fetch({reset: true}); + }, + + createViewDocumentsView: function (options) { + return this.setView("#right-content", new Documents.Views.AllDocsList({ + database: options.database, + collection: options.indexedDocs, + nestedView: Views.Row, + viewList: true, + ddocInfo: this.ddocInfo(options.designDoc, options.designDocs, options.view), + docParams: options.docParams, + params: options.urlParams + })); + }, + + updateAllDocsFromPreview: function (event) { + var view = event.view, + rows = event.rows, + ddoc = event.ddoc; + + this.data.indexedDocs = new Documents.PouchIndexCollection(null, { + database: this.data.database, + design: ddoc, + view: view, + rows: rows + }); + + this.documentsView = this.setView("#right-content", new Documents.Views.AllDocsList({ + database: this.data.database, + collection: this.data.indexedDocs, + nestedView: Views.Row, + viewList: true + })); } }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9e7d86c6/app/addons/indexes/templates/index_row_docular.html ---------------------------------------------------------------------- diff --git a/app/addons/indexes/templates/index_row_docular.html b/app/addons/indexes/templates/index_row_docular.html new file mode 100644 index 0000000..2e9d88a --- /dev/null +++ b/app/addons/indexes/templates/index_row_docular.html @@ -0,0 +1,35 @@ + +<% if (doc.isEditable()) { %> + +<% } %> + +
+

_id "<%=docID%>"

+
+ + <% if (doc.isEditable()) { %> + + <% } %> + + +
+
+
+
<%- doc.prettyJSON() %>
+ + + +
+ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9e7d86c6/app/addons/indexes/views.js ---------------------------------------------------------------------- diff --git a/app/addons/indexes/views.js b/app/addons/indexes/views.js index 029cdbb..daded84 100644 --- a/app/addons/indexes/views.js +++ b/app/addons/indexes/views.js @@ -52,6 +52,32 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, }); + + Views.Row = FauxtonAPI.View.extend({ + template: "addons/indexes/templates/index_row_docular", + tagName: "tr", + + events: { + "click button.delete": "destroy" + }, + + destroy: function (event) { + event.preventDefault(); + + window.alert('Cannot delete a document generated from a view.'); + }, + + serialize: function() { + return { + docID: this.model.get('id'), + doc: this.model, + url: this.model.url('app') + }; + } + }); + + + Views.ViewEditor = FauxtonAPI.View.extend({ template: "addons/indexes/templates/view_editor", builtinReduces: ['_sum', '_count', '_stats'], http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9e7d86c6/assets/less/templates.less ---------------------------------------------------------------------- diff --git a/assets/less/templates.less b/assets/less/templates.less index 8862f2d..63c0027 100644 --- a/assets/less/templates.less +++ b/assets/less/templates.less @@ -477,7 +477,6 @@ #left-content, #right-content{ .two-pane &{ - border-right: 1px solid #999; padding: 0px; bottom: 0px; top: 60px; @@ -499,6 +498,7 @@ } #right-content{ .two-pane &{ + border-left: 1px solid #999; .box-shadow(-6px 0 rgba(0, 0, 0, 0.1)); } }