couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [1/2] fauxton commit: updated refs/heads/master to 79d5f32
Date Mon, 30 Mar 2015 11:49:48 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 5306f98d3 -> 79d5f320a


docs: cleanup old views

remove a lot of old cold that we don't need any more after we
refactored the all-docs-list

PR: #338
PR-URL: https://github.com/apache/couchdb-fauxton/pull/338
Reviewed-By: garren smith <garren.smith@gmail.com>


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

Branch: refs/heads/master
Commit: 5a10f1ca67347709d5654c4f5f775c63c8866e26
Parents: 5306f98
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Fri Mar 27 10:28:59 2015 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Mon Mar 30 13:49:58 2015 +0200

----------------------------------------------------------------------
 app/addons/documents/shared-resources.js        | 16 +-----
 .../documents/templates/all_docs_item.html      | 43 ----------------
 .../documents/templates/all_docs_layout.html    | 16 ------
 .../documents/templates/all_docs_list.html      | 25 ---------
 .../documents/templates/index_row_tabular.html  | 25 ---------
 app/addons/documents/views.js                   | 54 --------------------
 6 files changed, 1 insertion(+), 178 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5a10f1ca/app/addons/documents/shared-resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-resources.js b/app/addons/documents/shared-resources.js
index 06306cf..04098c0 100644
--- a/app/addons/documents/shared-resources.js
+++ b/app/addons/documents/shared-resources.js
@@ -57,10 +57,6 @@ define([
       return this.id && this.id.match(/^_design\//) ? "design doc" : "doc";
     },
 
-    isEditable: function () {
-      return this.docType() != "reduction";
-    },
-
     isFromView: function () {
       return !this.id;
     },
@@ -88,10 +84,6 @@ define([
       return views && _.keys(views).length > 0;
     },
 
-    hasAttachments: function () {
-      return !!this.get('_attachments');
-    },
-
     getDdocView: function (view) {
       if (!this.isDdoc() || !this.hasViews()) {
         return false;
@@ -117,7 +109,7 @@ define([
       } else {
         delete tempView.reduce;
       }
-      tempView.map  = map;
+      tempView.map = map;
 
       views[view] = tempView;
       this.set({views: views});
@@ -144,12 +136,6 @@ define([
       return this;
     },
 
-    viewHasReduce: function (viewName) {
-      var view = this.getDdocView(viewName);
-
-      return view && view.reduce;
-    },
-
     // Need this to work around backbone router thinking _design/foo
     // is a separate route. Alternatively, maybe these should be
     // treated separately. For instance, we could default into the

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5a10f1ca/app/addons/documents/templates/all_docs_item.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/all_docs_item.html b/app/addons/documents/templates/all_docs_item.html
deleted file mode 100644
index f8151b8..0000000
--- a/app/addons/documents/templates/all_docs_item.html
+++ /dev/null
@@ -1,43 +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.
-*/%>
-
-<div class="custom-inputs">
-  <div class="checkbox inline">
-    <input id="checkbox-<%- docIdentifier %>" <%- checked ? 'checked="checked"'
: '' %> type="checkbox" class="js-row-select">
-    <label class="label-checkbox-doclist" for="checkbox-<%- docIdentifier %>"></label>
-  </div>
-</div>
-<div class="doc-item">
-  <header>
-    <span class="header-keylabel"><%- doc.isFromView() ? 'key' : 'id' %></span>
<span class="header-doc-id">"<%- docIdentifier %>"</span>
-    <% if (!doc.isReducedShown()) { %>
-      <div class="doc-edit-symbol pull-right">
-        <% if (doc.isFromView()) { %>
-          <a href="#<%- doc.url('app') %>">
-        <% } else {  %>
-          <a href="#<%- doc.url('web-index')%>">
-        <% } %>
-            <i class="fonticon-pencil"></i>
-        </a>
-      </div>
-    <% } %>
-
-    <div class="doc-item-extension-icons pull-right"></div>
-
-  </header>
-  <div class="doc-data">
-    <pre class="prettyprint"><%- doc.prettyJSON() %></pre>
-  </div>
-</div>
-<div class="clearfix"></div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5a10f1ca/app/addons/documents/templates/all_docs_layout.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/all_docs_layout.html b/app/addons/documents/templates/all_docs_layout.html
deleted file mode 100644
index 8db91ed..0000000
--- a/app/addons/documents/templates/all_docs_layout.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.
--->
-<div class="tab-content">
-  <div class="tab-pane" id="query"></div>
-</div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5a10f1ca/app/addons/documents/templates/all_docs_list.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/all_docs_list.html b/app/addons/documents/templates/all_docs_list.html
deleted file mode 100644
index 2e10e6e..0000000
--- a/app/addons/documents/templates/all_docs_list.html
+++ /dev/null
@@ -1,25 +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.
-*/%>
-
-<div class="view">
-  <div id="doc-list"></div>
-
-  <% if (endOfResults) { %>
-  <div class="end-of-results text-center well">
-    <p class="muted">
-      End of results
-    </p>
-    </div>
-  <% } %>
-</div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5a10f1ca/app/addons/documents/templates/index_row_tabular.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/index_row_tabular.html b/app/addons/documents/templates/index_row_tabular.html
deleted file mode 100644
index f5f68fa..0000000
--- a/app/addons/documents/templates/index_row_tabular.html
+++ /dev/null
@@ -1,25 +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.
--->
-
-<td class="select"><input type="checkbox"></td>
-<td>
-  <div>
-    <pre class="prettyprint"><%- JSON.stringify(doc.get("key")) %></pre>
-  </div>
-</td>
-<td>
-  <div>
-    <pre class="prettyprint"><%- JSON.stringify(doc.get("value")) %></pre>
-  </div>
-</td>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5a10f1ca/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index dcd607d..f5c30bc 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -215,60 +215,6 @@ function (app, FauxtonAPI, Components, Documents,
     }
   });
 
-  Views.Document = FauxtonAPI.View.extend({
-    template: "addons/documents/templates/all_docs_item",
-
-    className: function () {
-      var classNames = 'all-docs-item doc-row';
-
-      if (this.checked) {
-        classNames = classNames + ' js-to-delete';
-      }
-
-      return classNames;
-    },
-
-    initialize: function (options) {
-      this.checked = options.checked;
-    },
-
-    events: {
-      "dblclick .doc-item": "edit"
-    },
-
-    attributes: function () {
-      return {
-        "data-id": this.model.id
-      };
-    },
-
-    serialize: function () {
-      return {
-        docIdentifier: this.model.isReducedShown() ? this.model.get('key') : this.model.get('_id'),
-        doc: this.model,
-        checked: this.checked
-      };
-    },
-
-    beforeRender: function () {
-      var extensions = FauxtonAPI.getExtensions('DocList:icons');
-      _.each(extensions, function (View) {
-        this.insertView('.doc-item-extension-icons', new View({ doc: this.model }));
-      }, this);
-    },
-
-    establish: function () {
-      return [this.model.fetch()];
-    },
-
-    edit: function (event) {
-      event.preventDefault();
-      if (!this.model.isReducedShown()) {
-        FauxtonAPI.navigate(this.model.url('app'));
-      }
-    }
-  });
-
   Views.JumpToDoc = FauxtonAPI.View.extend({
     template: "addons/documents/templates/jumpdoc",
 


Mime
View raw message