couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject fauxton commit: updated refs/heads/secondary-indexes to 9e7d86c
Date Thu, 31 Jul 2014 14:44:52 GMT
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 <deathbearbrown@gmail.com>
Authored: Wed Jul 30 15:40:11 2014 -0400
Committer: deathbearbrown <deathbearbrown@gmail.com>
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 @@
-<!--
-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.
--->
-<% if (doc.isEditable()) { %>
-  <td class="select"><input type="checkbox"></td>
-<% } %>
-<td>
-  <header>
-    <p>_id <span>"<%=docID%>"</span></p>
-    <div class="doc-menu">
-      <a href="#<%= url %>" class="doc-menu-item icon fonticon-pencil"></a>
-      <% if (doc.isEditable()) { %>
-        <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i
class="icon icon-trash"></i></button>
-      <% } %>
-
-      <span class="doc-menu-item icon fonticon-drop-down-dots"></span>
-    </div>
-  </header>
-  <div>
-    <pre class="prettyprint"><%- doc.prettyJSON() %></pre>
-
-
-
-  </div>
-</td>

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 @@
+<!--
+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.
+-->
+<% if (doc.isEditable()) { %>
+  <td class="select"><input type="checkbox"></td>
+<% } %>
+<td>
+  <header>
+    <p>_id <span>"<%=docID%>"</span></p>
+    <div class="doc-menu">
+      <a href="#<%= url %>" class="doc-menu-item icon fonticon-pencil"></a>
+      <% if (doc.isEditable()) { %>
+        <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i
class="icon icon-trash"></i></button>
+      <% } %>
+
+      <span class="doc-menu-item icon fonticon-drop-down-dots"></span>
+    </div>
+  </header>
+  <div>
+    <pre class="prettyprint"><%- doc.prettyJSON() %></pre>
+
+
+
+  </div>
+</td>

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));
   }
 }


Mime
View raw message