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

Use short names for signature attributes in menus.

parent 61311a01
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -260,13 +260,13 @@ module JsDuck
    # (and in order they should be shown in).
    def self.signature_attributes
      return [
        :static,
        :protected,
        :deprecated,
        :required,
        :template,
        :abstract,
        :readonly,
        {:name => :static,     :short => "STA"},
        {:name => :protected,  :short => "PRO"},
        {:name => :deprecated, :short => "DEP"},
        {:name => :required,   :short => "REQ"},
        {:name => :template,   :short => "TMP"},
        {:name => :abstract,   :short => "ABS"},
        {:name => :readonly,   :short => "R O"},
      ]
    end
  end
+2 −1
Original line number Diff line number Diff line
@@ -222,7 +222,8 @@ module JsDuck
      end

      after = ""
      Class.signature_attributes.each do |attr|
      Class.signature_attributes.each do |attribute|
        attr = attribute[:name]
        after += "<strong class='#{attr} signature'>#{attr}</strong>" if m[:attributes][attr]
      end

+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ Ext.define('Docs.view.HoverMenu', {
                    var url = values.url || values.cls;
                    var label = values.label || values.cls;
                    var tags = Ext.Array.map(Docs.data.signatureAttributes, function(tag) {
                        return values.attributes[tag] ? '<span class="signature '+tag+'">'+tag+'</span>' : '';
                        return values.attributes[tag.name] ? '<span class="signature '+tag.name+'">'+(tag["short"])+'</span>' : '';
                    }).join(' ');
                    return Ext.String.format('<a href="#!/api/{0}" rel="{0}" class="docClass">{1} {2}</a>', url, label, tags);
                }