File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 2626 $scope . disableTitle = $attrs . hasOwnProperty ( 'disableTitle' ) ;
2727 $scope . disableTryIt = $attrs . hasOwnProperty ( 'disableTryIt' ) ;
2828 $scope . disableDescription = $attrs . hasOwnProperty ( 'disableDescription' ) ;
29+ $scope . descriptionLimit = $attrs . hasOwnProperty ( 'descriptionLimit' ) || 300 ;
2930 $scope . documentationCollapsed = $attrs . hasOwnProperty ( 'documentationCollapsed' ) ;
3031 $scope . proxy = $window . RAML . Settings . proxy ;
3132 $scope . readResourceTraits = readResourceTraits ;
Original file line number Diff line number Diff line change 66
77 < h1 ng-if ="!disableTitle " class ="raml-console-title "> {{raml.title}}</ h1 >
88
9- < div ng-if ="!disableDescription " markdown ="raml.description "> </ div >
9+
10+ < div ng-if ="!disableDescription " ng-init ="actualSize = descriptionLimit " >
11+ < div markdown ="raml.description | limitTo : actualSize "> </ div >
12+ < span >
13+ < a ng-click ="actualSize = descriptionLimit " ng-hide ="raml.description.length > actualSize || raml.description.length < actualSize " style ="cursor: default; "> show less</ a >
14+ < a ng-click ="actualSize = raml.description.length " ng-hide ="raml.description.length == actualSize " style ="cursor: default; "> show more</ a >
15+ </ span >
16+ </ div >
1017
1118 < root-documentation > </ root-documentation >
1219
You can’t perform that action at this time.
0 commit comments