Commit 08e380b2 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Use shorter member type names in toolbar buttons.

Add additional :toolbar_title setting to @member_type config.
Use it to assign shorter toolbar titles to the member types that
otherwise have a bit too long titles.
parent c9c80479
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ module JsDuck::Tag
        :name => :cfg,
        :category => :property_like,
        :title => "Config options",
        :toolbar_title => "Configs",
        :position => MEMBER_POS_CFG,
      }
    end
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ module JsDuck::Tag
        :name => :css_var,
        :category => :property_like,
        :title => "CSS Variables",
        :toolbar_title => "CSS Vars",
        :position => MEMBER_POS_CSS_VAR,
      }
    end
+4 −1
Original line number Diff line number Diff line
@@ -46,13 +46,16 @@ module JsDuck::Tag
    #         :name => :event,
    #         :category => :method_like,
    #         :title => "Events",
    #         :toolbar_title => "Events", // optional
    #         :position => MEMBER_POS_EVENT,
    #     }
    #
    # The category must be either :property_like or :method_like.
    #
    # Position defines the ordering of member section in final HTML
    # output.  Title is shown at the top of each such section.
    # output.  Title is shown at the top of each such section and also
    # as a label on Docs app toolbar button unless :toolbar_title is
    # specified.
    attr_reader :member_type

    MEMBER_POS_CFG = 1
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ Ext.define('Docs.view.cls.Toolbar', {
            });
            if (members.length > 0) {
                var btn = this.createMemberButton({
                    text: type.title,
                    text: type.toolbar_title || type.title,
                    type: type.name,
                    members: members
                });