@@ -76,7 +76,6 @@ ClassView.prototype.openClassDoc = function (className, nameSpace) {
7676/**
7777 * Returns array of signs to render or empry array.
7878 *
79- * @private
8079 * @param classMetaData
8180 */
8281ClassView . prototype . getClassSigns = function ( classMetaData ) {
@@ -85,11 +84,11 @@ ClassView.prototype.getClassSigns = function (classMetaData) {
8584
8685 if ( classMetaData [ "classType" ] ) signs . push ( {
8786 icon : lib . image . greenPill ,
88- text : classMetaData [ "classType" ] ,
87+ text : lib . capitalize ( classMetaData [ "classType" ] ) ,
8988 textStyle : "fill:rgb(130,0,255)"
9089 } ) ;
9190 if ( classMetaData [ "ABSTRACT" ] ) signs . push ( {
92- icon : lib . image . iceCube ,
91+ icon : lib . image . crystalBall ,
9392 text : "Abstract" ,
9493 textStyle : "fill:rgb(130,0,255)"
9594 } ) ;
@@ -115,6 +114,29 @@ ClassView.prototype.getClassSigns = function (classMetaData) {
115114
116115} ;
117116
117+ /**
118+ * Returns array of icons according to method metadata.
119+ *
120+ * @param method
121+ */
122+ ClassView . prototype . getMethodIcons = function ( method ) {
123+
124+ var icons = [ ] ;
125+
126+ icons . push ( { src : lib . image [ method [ "private" ] ? "minus" : "plus" ] } ) ;
127+ if ( method [ "abstract" ] ) icons . push ( { src : lib . image . crystalBall } ) ;
128+ if ( method [ "clientMethod" ] ) icons . push ( { src : lib . image . user } ) ;
129+ if ( method [ "final" ] ) icons . push ( { src : lib . image . blueFlag } ) ;
130+ if ( method [ "notInheritable" ] ) icons . push ( { src : lib . image . redFlag } ) ;
131+ if ( method [ "sqlProc" ] ) icons . push ( { src : lib . image . table } ) ;
132+ if ( method [ "webMethod" ] ) icons . push ( { src : lib . image . earth } ) ;
133+ if ( method [ "zenMethod" ] ) icons . push ( { src : lib . image . zed } ) ;
134+ if ( method [ "readOnly" ] ) icons . push ( { src : lib . image . eye } ) ;
135+
136+ return icons ;
137+
138+ } ;
139+
118140/**
119141 * @param {string } name
120142 * @param classMetaData
@@ -150,8 +172,8 @@ ClassView.prototype.createClassInstance = function (name, classMetaData) {
150172 var arr = [ ] , n ;
151173 for ( n in ps ) {
152174 arr . push ( {
153- text : ( ps [ n ] [ "private " ] ? "- " : "+ " ) + n
154- + ( ps [ n ] [ "type" ] ? ": " + ps [ n ] [ "type" ] : "" )
175+ text : n + ( ps [ n ] [ "type " ] ? ": " + ps [ n ] [ "type" ] : "" ) ,
176+ icons : self . getMethodIcons ( ps [ n ] )
155177 } ) ;
156178 }
157179 return arr ;
@@ -160,14 +182,14 @@ ClassView.prototype.createClassInstance = function (name, classMetaData) {
160182 var arr = [ ] , n ;
161183 for ( n in met ) {
162184 arr . push ( {
163- text : ( met [ n ] [ "private" ] ? "- " : "+ " ) + n
164- + ( met [ n ] [ "returns" ] ? ": " + met [ n ] [ "returns" ] : "" ) ,
185+ text : n + ( met [ n ] [ "returns" ] ? ": " + met [ n ] [ "returns" ] : "" ) ,
165186 styles : ( function ( t ) {
166- return t ? { } : { textDecoration : "underline" }
187+ return t ? { textDecoration : "underline" } : { }
167188 } ) ( met [ n ] [ "classMethod" ] ) ,
168189 clickHandler : ( function ( n ) {
169190 return function ( ) { self . showMethodCode ( name , n ) ; }
170- } ) ( n )
191+ } ) ( n ) ,
192+ icons : self . getMethodIcons ( met [ n ] )
171193 } ) ;
172194 }
173195 return arr ;
0 commit comments