Commit 7e33ce96 authored by Nick Poulden's avatar Nick Poulden
Browse files

Highlight protected members in hover menu

parent a47ccd4a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -46,10 +46,11 @@ Ext.define('Docs.view.HoverMenu', {
                columnHeight: this.columnHeight,
                showCloseButtons: this.showCloseButtons,
                renderLink: function(values) {
                    var url = values.url || values.cls;
                    var label = values.label || values.cls;
                    var stat = values['static'] ? '<span class="static">static</span>' : "";
                    return Ext.String.format('<a href="#!/api/{0}" rel="{0}" class="docClass">{1} {2}</a>', url, label, stat);
                    var url = values.url || values.cls,
                        label = values.label || values.cls,
                        stat = values['static'] ? '<span class="static">static</span>' : "",
                        prot = values['protected'] ? '<span class="protected">protected</span>' : "";
                    return Ext.String.format('<a href="#!/api/{0}" rel="{0}" class="docClass">{1} {2} {3}</a>', url, label, stat, prot);
                }
            }
        );
+2 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ Ext.define('Docs.view.cls.Toolbar', {
    // creates store tha holds link records
    createStore: function(records) {
        var store = Ext.create('Ext.data.Store', {
            fields: ['id', 'cls', 'url', 'label', 'inherited', 'static']
            fields: ['id', 'cls', 'url', 'label', 'inherited', 'static', 'protected']
        });
        store.add(records);
        return store;
@@ -181,6 +181,7 @@ Ext.define('Docs.view.cls.Toolbar', {
            url: member ? cls+"-"+member.tagname+"-"+member.name : cls,
            label: member ? ((member.name === "constructor") ? cls : member.name) : cls,
            inherited: member ? member.owner !== cls : false,
            'protected': member ? member['protected'] : false,
            'static': member ? member['static'] : false
        };
    },
+4 −1
Original line number Diff line number Diff line
@@ -715,6 +715,7 @@ a {
      top: 3px;
      &:hover {
        @include opacity(1); } }
    span.protected,
    span.static {
      font-size: 0.6em;
      text-transform: uppercase;
@@ -722,7 +723,9 @@ a {
      padding: 0 0.5em;
      @include border-radius(2px);
      color: white;
      background: $docs-text-color; } } }
      background: $docs-text-color; }
    span.protected {
      background-color: #aaa; } } }

.inline-example-cmp {
  margin-bottom: 10px;