Commit 9c3dfb6a authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Add text labels for Stats and Tests tabs.

Adjusted styles to allow for text labels - I currently don't have
suitable icons at hand.
parent ed7c36a8
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -42,7 +42,13 @@ Ext.define('Docs.view.Tabs', {
            '<tpl for=".">',
                '<div class="doctab overview {cls}{active}">',
                    '<div class="l"></div>',
                    '<div class="m"><a class="tabUrl" href="{href}">&nbsp;</a></div>',
                    '<div class="m">',
                        '<tpl if="text">',
                            '<a class="tabUrl ov-tab-text" href="{href}">{text}</a>',
                        '<tpl else>',
                            '<a class="tabUrl ov-tab" href="{href}">&nbsp;</a>',
                        '</tpl>',
                    '</div>',
                    '<div class="r"></div>',
                '</div>',
            '</tpl>',
@@ -61,7 +67,7 @@ Ext.define('Docs.view.Tabs', {
                '<div class="l"></div>',
                '<div class="m">',
                    '<span class="icn {iconCls}">&nbsp;</span>',
                    '<a class="tabUrl" href="{href}">{text}</a>',
                    '<a class="tabUrl main-tab" href="{href}">{text}</a>',
                '</div>',
            '<div class="r"><a class="close" href="#">&nbsp;</a></div>',
            '</div>'
@@ -259,7 +265,7 @@ Ext.define('Docs.view.Tabs', {
            this.swapLastTabWith(url);
        }

        Ext.Array.each(Ext.query('.doctab a[class=tabUrl]'), function(d) {
        Ext.Array.each(Ext.query('.doctab a.tabUrl'), function(d) {
            Ext.get(d).up('.doctab').removeCls(['active', 'highlight']);
        });

+1 −1
Original line number Diff line number Diff line
@@ -139,6 +139,6 @@ Ext.define('Docs.view.stats.Index', {
     */
    getTab: function() {
        var enabled = (Docs.data.stats || []).length > 0;
        return enabled ? {cls: 'stats', href: '#!/stats', tooltip: 'Statistics'} : false;
        return enabled ? {cls: 'stats', href: '#!/stats', tooltip: 'Statistics', text: 'Stats'} : false;
    }
});
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ Ext.define('Docs.view.tests.Index', {
     * @return {Object}
     */
    getTab: function() {
        return Docs.data.tests ? {cls: 'tests', href: '#!/tests', tooltip: 'Tests'} : false;
        return Docs.data.tests ? {cls: 'tests', href: '#!/tests', tooltip: 'Tests', text: "Tests"} : false;
    },

    /**
+9 −7
Original line number Diff line number Diff line
@@ -46,8 +46,7 @@
      font-family: $docs-font;
      font-weight: bold;
      font-size: 11px;
      span,
      a {
      span, a {
        padding-bottom: 5px;
        line-height: 16px;
        display: block;
@@ -55,10 +54,15 @@
        white-space: nowrap;
        overflow: hidden;
        float: left; }
      a.tabUrl {
        padding: 0 14px 0 17px;
        width: 140px;
      a.ov-tab {
        overflow: hidden;
        padding: 0 14px 0 17px; }
      a.ov-tab-text {
        overflow: hidden; }
      a.main-tab {
        overflow: hidden;
        padding: 0 14px 0 17px;
        width: 140px; }
      span.icn {
        display: block;
        position: absolute;
@@ -99,8 +103,6 @@
      z-index: 5; } }
  .doctab.overview .m {
    z-index: 6; }
  .doctab.overview .m a.tabUrl{
    width: auto !important; }
  .doctab.index .m a {
    background: url(../images/tabs.png) no-repeat 1px 1px;
    padding-left: 16px; padding-right: 12px; padding-bottom: 20px; }