Commit baba1fa2 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Adding class first-child to member divs.

The calculation of first-child seems way too complex, but at least
it works.  Should be encapsulated somewhere.
parent 59c512c5
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -58,8 +58,9 @@ Ext.define('Docs.OverviewPanel', {

        this.callParent(arguments);

        this.firstChildCounters = {};
        var cfgTemplate = new Ext.XTemplate(
            '<div class="member f ni">',
            '<div class="member {[this.firstChild(values)]}">',
                '<a href="Ext.Action.html#config-disabled" rel="config-disabled" class="expand more">',
                    '<span>&nbsp;</span>',
                '</a>',
@@ -76,7 +77,17 @@ Ext.define('Docs.OverviewPanel', {
                '<div class="description">',
                    '{doc}',
                '</div>',
            '</div>'
            '</div>',
            {
                firstChild: Ext.bind(function(cfg) {
                    var cs = this.firstChildCounters;
                    cs[cfg.tagname] = cs[cfg.tagname] ? cs[cfg.tagname]+1 : 1;
                    if (cs[cfg.tagname] === 1) {
                        return "first-child";
                    }
                    return "";
                }, this)
            }
        );

        this.tpl = new Ext.XTemplate(
@@ -128,6 +139,7 @@ Ext.define('Docs.OverviewPanel', {
      });
      this.addDocked(this.toolbar);

      this.firstChildCounters = {};
      this.update(this.tpl.apply(docClass));
    }
});
+1 −1
Original line number Diff line number Diff line
@@ -603,7 +603,7 @@ pre, code, kbd, samp, tt {
          margin: 0; } } }
    a {
      text-decoration: none; }
    .member.f {
    .member.first-child {
      border-width: 1px; }
    .member {
      position: relative;