Skip to content

Commit 9fd07d1

Browse files
committed
Style fixes
1 parent be3e7b3 commit 9fd07d1

File tree

6 files changed

+8137
-7
lines changed

6 files changed

+8137
-7
lines changed

dist/scripts/api-console.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@
12341234
}
12351235
};
12361236
})
1237-
.controller('RamlConsoleController',
1237+
.controller('RamlConsoleController',
12381238
['$attrs', '$scope', '$rootScope', '$timeout', '$window', function RamlConsoleController(
12391239
$attrs, $scope, $rootScope, $timeout, $window
12401240
) {
@@ -1246,6 +1246,7 @@
12461246
$scope.disableTitle = $attrs.hasOwnProperty('disableTitle');
12471247
$scope.disableTryIt = $attrs.hasOwnProperty('disableTryIt');
12481248
$scope.disableDescription = $attrs.hasOwnProperty('disableDescription');
1249+
$scope.descriptionLimit = $attrs.hasOwnProperty('descriptionLimit') || 50;
12491250
$scope.documentationCollapsed = $attrs.hasOwnProperty('documentationCollapsed');
12501251
$scope.proxy = $window.RAML.Settings.proxy;
12511252
$scope.readResourceTraits = readResourceTraits;
@@ -7155,7 +7156,14 @@ angular.module('ramlConsoleApp').run(['$templateCache', function($templateCache)
71557156
"\n" +
71567157
" <h1 ng-if=\"!disableTitle\" class=\"raml-console-title\">{{raml.title}}</h1>\n" +
71577158
"\n" +
7158-
" <div ng-if=\"!disableDescription\" markdown=\"raml.description\"></div>\n" +
7159+
"\n" +
7160+
" <div ng-if=\"!disableDescription\" ng-init=\"actualSize = descriptionLimit\" >\n" +
7161+
" <div class=\"raml-console-root-description\" markdown=\"raml.description | limitTo : actualSize\"></div>\n" +
7162+
" <span>\n" +
7163+
" <a class=\"raml-console-show-more-less\" ng-click=\"actualSize = descriptionLimit\" ng-hide=\"raml.description.length > actualSize || raml.description.length < actualSize\">show less</a>\n" +
7164+
" <a class=\"raml-console-show-more-less\" ng-click=\"actualSize = raml.description.length\" ng-hide=\"raml.description.length == actualSize\">show more</a>\n" +
7165+
" </span>\n" +
7166+
" </div>\n" +
71597167
"\n" +
71607168
" <root-documentation></root-documentation>\n" +
71617169
"\n" +

0 commit comments

Comments
 (0)