couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [3/4] fauxton commit: updated refs/heads/master to b9a5eae
Date Mon, 14 Jul 2014 08:39:44 GMT
Fauxton: fix scrollbar-issue - COUCHDB-2234

- Try to honor borders in calculating the width
- Adjust magic numbers to new widths of the left area
- Refactor the header/api-url section
- Removing the maximum widths of 1400px and 1500px, which caused
  vertical scrollbars to appear at 1400px (which is on top of the
  page content, some hundred pixels away from the left side on
  large screens) on a system like windows

COUCHDB-2234


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

Branch: refs/heads/master
Commit: 8b80c956ef5d450a126f0b26ef9f1053f9168223
Parents: f4c64b0
Author: Robert Kowalski <rok@kowalski.gd>
Authored: Sat May 31 15:14:32 2014 +0200
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Mon Jul 14 12:39:14 2014 +0400

----------------------------------------------------------------------
 app/addons/fauxton/resizeColumns.js           | 14 ++++++++------
 app/addons/fauxton/templates/api_bar.html     |  1 +
 app/addons/fauxton/templates/breadcrumbs.html |  2 +-
 assets/less/fauxton.less                      | 13 ++++++-------
 4 files changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/8b80c956/app/addons/fauxton/resizeColumns.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/resizeColumns.js b/app/addons/fauxton/resizeColumns.js
index c1c96c5..b3d8841 100644
--- a/app/addons/fauxton/resizeColumns.js
+++ b/app/addons/fauxton/resizeColumns.js
@@ -29,12 +29,16 @@ function(FauxtonAPI) {
 
   Resize.prototype = {
     getPrimaryNavWidth: function(){
-      var primaryNavWidth  = $('body').hasClass('closeMenu')? 64:224;
+      var primaryNavWidth  = $('body').hasClass('closeMenu') ? 64 : 220;
       return primaryNavWidth;
     },
     getPanelWidth: function(){
-      var sidebarWidth = $('#sidebar-content').length > 0 ? $('#sidebar-content').width():
0;
-      return (this.getPrimaryNavWidth() + sidebarWidth);
+      var sidebarWidth = $('#sidebar-content').length > 0 ? $('#sidebar-content').outerWidth()
: 0,
+          borders = parseInt($('#dashboard').css('border-left-width'), 10) +
+                    parseInt($('#dashboard-content').css('border-left-width'), 10) +
+                    parseInt($('#dashboard-content').css('border-right-width'), 10);
+
+      return (this.getPrimaryNavWidth() + sidebarWidth + borders);
     },
     initialize: function(){
      // $(window).off('resize');
@@ -64,12 +68,10 @@ function(FauxtonAPI) {
         smallWidthConstraint = ($('#sidebar-content').length > 0)? 470:800,
         panelWidth;
 
-        if( combinedWidth > smallWidthConstraint  && combinedWidth < 1400){
+        if (combinedWidth > smallWidthConstraint) {
           panelWidth = window.innerWidth - this.getPanelWidth();
         } else if (combinedWidth < smallWidthConstraint){
           panelWidth = smallWidthConstraint;
-        } else if(combinedWidth > 1400){
-          panelWidth = 1400;
         }
 
         $('.window-resizeable').innerWidth(panelWidth);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/8b80c956/app/addons/fauxton/templates/api_bar.html
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/templates/api_bar.html b/app/addons/fauxton/templates/api_bar.html
index 886c06e..f556220 100644
--- a/app/addons/fauxton/templates/api_bar.html
+++ b/app/addons/fauxton/templates/api_bar.html
@@ -16,6 +16,7 @@ the License.
   API URL
   <i class="fonticon-plus icon"></i>
 </button>
+<div class="clearfix"></div>
 <div class="api-navbar" style="display: none">
     <div class="input-prepend input-append">
       <span class="add-on">

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/8b80c956/app/addons/fauxton/templates/breadcrumbs.html
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/templates/breadcrumbs.html b/app/addons/fauxton/templates/breadcrumbs.html
index 18961b7..d305cee 100644
--- a/app/addons/fauxton/templates/breadcrumbs.html
+++ b/app/addons/fauxton/templates/breadcrumbs.html
@@ -12,7 +12,7 @@ License for the specific language governing permissions and limitations
under
 the License.
 -->
 
-<ul class="breadcrumb">
+<ul class="breadcrumb pull-left">
   <% _.each(_.initial(crumbs), function(crumb) { %>
     <li>
       <a href="#<%- crumb.link %>"><%- crumb.name %></a>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/8b80c956/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/assets/less/fauxton.less b/assets/less/fauxton.less
index fc92909..c32147d 100644
--- a/assets/less/fauxton.less
+++ b/assets/less/fauxton.less
@@ -530,7 +530,6 @@ table.databases {
 
 
 #dashboard {
-  max-width: 1500px;
   .box-shadow(-6px 0 rgba(0, 0, 0, 0.1));
   border-left: 1px solid #999;
   position: absolute;
@@ -547,7 +546,7 @@ table.databases {
   &.one-pane{
     min-width: 800px;
     margin-top: 0;
-    overflow: auto;
+    overflow-x: hidden;
   }
 }
 
@@ -619,8 +618,8 @@ table.databases {
 }
 
 #breadcrumbs {
-   padding: 15px 20px;
    .breadcrumb {
+    margin: 15px 20px;
     margin-bottom: 0;
     background-color: transparent;
     padding: 0;
@@ -872,12 +871,12 @@ div.spinner {
 
 #api-navbar{
   position: relative;
+  padding-right: 5px;
 }
 
 .api-url-btn {
-  position: absolute;
-  right: 15px;
-  top: -50px;
+  margin-top: 5px;
+  margin-bottom: 5px;
   .icon {
     font-size: 11px;
   }
@@ -885,7 +884,7 @@ div.spinner {
 
 .api-navbar {
   border-top: 1px solid @red;
-  padding: 20px 20px 15px;
+  padding: 20px;
   .input-append.input-prepend {
     margin-bottom: 0px;
     .add-on {


Mime
View raw message