couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [47/47] couchdb commit: updated refs/heads/Update-Sidebar-Ui to c173e52
Date Mon, 19 May 2014 16:18:05 GMT
Bug fixes and styling


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

Branch: refs/heads/Update-Sidebar-Ui
Commit: c173e52be63e0cc93fc531bcd09d99a12c29057e
Parents: 3749438
Author: Garren Smith <garren.smith@gmail.com>
Authored: Mon May 19 18:12:44 2014 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon May 19 18:12:44 2014 +0200

----------------------------------------------------------------------
 .../addons/documents/assets/less/documents.less |  3 +-
 .../templates/add_new_ddoc_fn_dropdown.html     |  2 +-
 .../documents/templates/design_doc_menu.html    |  2 +-
 .../documents/templates/index_menu_item.html    |  2 +-
 .../app/addons/documents/templates/sidebar.html | 45 +++++---------------
 src/fauxton/app/addons/documents/views.js       |  9 ++--
 .../assets/less/bootstrap/dropdowns.less        |  4 +-
 src/fauxton/assets/less/fauxton.less            | 11 ++++-
 8 files changed, 33 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c173e52b/src/fauxton/app/addons/documents/assets/less/documents.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/assets/less/documents.less b/src/fauxton/app/addons/documents/assets/less/documents.less
index 8b0ba2e..0df0601 100644
--- a/src/fauxton/app/addons/documents/assets/less/documents.less
+++ b/src/fauxton/app/addons/documents/assets/less/documents.less
@@ -171,8 +171,9 @@ button.beautify {
         padding-left: 55px;
         font-size: 14px;
         &:hover {
+          background-color: #af2d24;
+          color: #fff;
           text-decoration: none;
-          color: #af2d24;
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c173e52b/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html b/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
index 77323a9..16b3ba0 100644
--- a/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
+++ b/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
@@ -25,7 +25,7 @@ the License.
 	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_show/<%=ddocSafe%>">Show
Function</a><li>
 	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_list/<%=ddocSafe%>">List
function</a><li> -->
 	  <% _.each(extensionLinks, function(link) { %>
-			<li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/<%=link.url%>/<%=ddocSafe%>"><%=link.title%></a><li>
+			<li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/<%=link.url%>/<%=ddocSafe%>"><%-
link.title %></a><li>
     <%});%>
 	</ul>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c173e52b/src/fauxton/app/addons/documents/templates/design_doc_menu.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/templates/design_doc_menu.html b/src/fauxton/app/addons/documents/templates/design_doc_menu.html
index c5bd392..3724d01 100644
--- a/src/fauxton/app/addons/documents/templates/design_doc_menu.html
+++ b/src/fauxton/app/addons/documents/templates/design_doc_menu.html
@@ -18,7 +18,7 @@ the License.
 	<div class="new-button"></div>
 	<ul class="accordion-body collapse" id="<%= ddoc_clean %>">
 		<li>
-			<a id="<%= ddoc_clean %>_metadata" href="#database/<%= database_encoded %>/_design/<%=
ddoc_encoded %>/metadata" class="toggle-view">
+			<a id="<%= ddoc_clean %>_metadata" href="#/database/<%- database_encoded %>/_design/<%-
ddoc_encoded %>/metadata" class="toggle-view">
 			  Design Doc Metadata
 			</a>
 		</li>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c173e52b/src/fauxton/app/addons/documents/templates/index_menu_item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/templates/index_menu_item.html b/src/fauxton/app/addons/documents/templates/index_menu_item.html
index 455f491..747dc4f 100644
--- a/src/fauxton/app/addons/documents/templates/index_menu_item.html
+++ b/src/fauxton/app/addons/documents/templates/index_menu_item.html
@@ -12,6 +12,6 @@ License for the specific language governing permissions and limitations
under
 the License.
 -->
 
-<a id="<%= removeSpecialCharacters(ddoc) %>_<%= removeSpecialCharacters(index)
%>" href="#database/<%= safeURL(database) %>/_design/<%= safeURL(ddoc)%>/_<%=type%>/<%=
safeURL(index) %>" class="toggle-view">
+<a id="<%- removeSpecialCharacters(ddoc) %>_<%- removeSpecialCharacters(index)
%>" href="#/database/<%- safeURL(database) %>/_design/<%= safeURL(ddoc)%>/_<%=type%>/<%=
safeURL(index) %>" class="toggle-view">
   <%= index %>
 </a>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c173e52b/src/fauxton/app/addons/documents/templates/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/templates/sidebar.html b/src/fauxton/app/addons/documents/templates/sidebar.html
index 74c8605..8961606 100644
--- a/src/fauxton/app/addons/documents/templates/sidebar.html
+++ b/src/fauxton/app/addons/documents/templates/sidebar.html
@@ -11,40 +11,15 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
-<!--   <header class="row-fluid">
-    <div class="span12">
 
-      <div class="btn-group">
-        <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">
-          Create New
-          <span class="caret"></span>
-        </button>
-        <ul class="dropdown-menu">
-          <!-- dropdown menu links -->
-<!--           <li>
-          <a id="doc" href="#<%= database.url('app') %>/new">Document</a>
-          </li>
-          <li>
-          <a href="#<%= database.url('app') %>/new_view">Secondary Index</a>
-           <% _.each(newLinks, function (item) { %>
-           <a href="#<%= database.url('app') %>/<%=item.url%>"> <%=
item.name %></a>
-           <% }); %>
-          </li>
-        </ul>
-      </div>
-        <button id="delete-database" class="btn pull-right"><i class="icon-trash"></i>
Database</button>
-    </div>
-  </header> -->
+<ul class="nav nav-list">
+  <li><a id="permissions" href="<%= permissions_url %>">Permissions</a><li>
+  <li><a id="changes" href="<%= changes_url %>">Changes</a><li>
+  <% _.each(docLinks, function (link) { %>
+  <li><a href="<%= database_url + '/' + link.url %>"><%= link.title
%></a></li>
+  <% }); %>
+  <li class="active"><a id="all-docs" href="#<%= database.url('index') %>"
class="toggle-view"> All Documents</a></li>
+  <li><a id="design-docs" href='#<%= database.url("index") %>?startkey="_design"&endkey="_e"'
 class="toggle-view"> All Design Docs</a></li>
+</ul>
 
-
-    <ul class="nav nav-list">
-      <li><a id="permissions" href="<%= permissions_url %>">Permissions</a><li>
-      <li><a id="changes" href="<%= changes_url %>">Changes</a><li>
-      <% _.each(docLinks, function (link) { %>
-        <li><a href="<%= database_url + '/' + link.url %>"><%= link.title
%></a></li>
-      <% }); %>
-      <li class="active"><a id="all-docs" href="#<%= database.url('index') %>"
class="toggle-view"> All documents</a></li>
-      <li><a id="design-docs" href='#<%= database.url("index") %>?startkey="_design"&endkey="_e"'
 class="toggle-view"> All design docs</a></li>
-    </ul>
-
-  <div id="delete-db-modal"> </div>
+<div id="delete-db-modal"> </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c173e52b/src/fauxton/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js
index 61acdc4..0a3bc0a 100644
--- a/src/fauxton/app/addons/documents/views.js
+++ b/src/fauxton/app/addons/documents/views.js
@@ -363,11 +363,12 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       this.database = options.database;
       this.selected = !! options.selected;
       this.selector = options.selector;
+      this.ddocType = options.ddocType || this.selector;
     },
 
     serialize: function() {
       return {
-        type:  this.selector,
+        type:  this.ddocType,
         index: this.index,
         ddoc: this.ddoc,
         database: this.database,
@@ -1881,6 +1882,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
         new Views.DeleteDBModal({database: this.database})
       );
 
+      console.log('tl', this.collection);
       this.collection.each(function(design) {
         if (design.has('doc')){
           this.insertView(new Views.DdocSidenav({
@@ -1935,13 +1937,14 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       event.preventDefault();
       alert("no");
     },
-    buildIndexList: function(collection, selector){
+    buildIndexList: function(collection, selector, ddocType){
       var design = this.model.id.replace(/^_design\//,"");
       _.each(_.keys(collection[selector]), function(key){
         this.insertView(".accordion-body", new Views.IndexItem({
           selector: selector,
           ddoc: design,
           index: key,
+          ddocType: ddocType,
           database: this.model.collection.database.id
         }));
       }, this);
@@ -1964,7 +1967,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       var sidebarListTypes = FauxtonAPI.getExtensions('sidebar:list');
           if (ddocDocs){
             //Views
-            this.buildIndexList(ddocDocs, "views");
+            this.buildIndexList(ddocDocs, "views", "view");
             //lists
             // this.buildIndexList(ddocDocs, "lists");
             // //show

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c173e52b/src/fauxton/assets/less/bootstrap/dropdowns.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/dropdowns.less b/src/fauxton/assets/less/bootstrap/dropdowns.less
index 5b3ca77..f510b17 100644
--- a/src/fauxton/assets/less/bootstrap/dropdowns.less
+++ b/src/fauxton/assets/less/bootstrap/dropdowns.less
@@ -115,8 +115,8 @@
 .dropdown-submenu:hover > a,
 .dropdown-submenu:focus > a {
   text-decoration: none;
-  color: @dropdownLinkColorHover;
-  #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover,
5%));
+  color: #fff;
+  //#gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover,
5%));
 }
 
 // Active state

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c173e52b/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index d9a76ff..4bcf9c6 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -694,10 +694,15 @@ table.databases {
     .divider {
       border: none;
     }
-    li.active a {
+    > li > a:hover,
+    > li > a:focus{
       background-color: @darkRed;
       color: #fff;
     }
+
+    li.active a {
+      color: @darkRed;
+    }
     > li > a{
       padding: 10px 13px 10px 30px;
       border-bottom: 1px solid #d3d7db;
@@ -706,6 +711,10 @@ table.databases {
       a {
         color: #d9d9d9;
       }
+
+      &:hover a {
+        color: #fff;
+      }
     }
     a{
       display: block;


Mime
View raw message