Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit ab4f077

Browse files
chalinkwalrath
authored andcommitted
docs(api): fix Dart API reference page (#2569)
Dart API reference page is blank following the merge of #2566. This minor fix adjustes to the new API filter criteria. For Dart we don’t show the statuses since none of the API entries are tagged with a status.
1 parent 3eedcff commit ab4f077

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

public/resources/js/directives/api-list.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ angularIO.directive('apiList', function () {
2828
' <div class="overlay" ng-class="{ visible: $ctrl.showTypeMenu === true }" ng-click="$ctrl.toggleMenu(\'type\')"></div>' +
2929
' </div>' +
3030
' ' +
31-
' <div class="form-select-menu">' +
31+
' <div class="form-select-menu" ng-if="!$ctrl.isForDart">' +
3232
' <button ng-repeat="status in $ctrl.statuses" ng-if="$ctrl.status === status.matches[0]" class="form-select-button" ng-click="$ctrl.toggleMenu(\'status\')"><strong>Status:</strong>{{status.title}}</button>'+
3333
' <button class="form-select-button is-default" ng-if="$ctrl.status === null" ng-click="$ctrl.toggleMenu(\'status\')"><strong>Status: All</strong></button>'+
3434
' <ul class="form-select-dropdown" ng-class="{ visible: $ctrl.showStatusMenu === true }">' +
@@ -76,7 +76,7 @@ angularIO.directive('apiList', function () {
7676
{ cssClass: 'function', title: 'Function', matches: ['function'] },
7777
{ cssClass: 'enum', title: 'Enum', matches: ['enum'] },
7878
{ cssClass: 'type-alias', title: 'Type Alias', matches: ['type-alias'] },
79-
{ cssClass: 'const', title: 'Const', matches: ['var', 'let', 'const'] }
79+
{ cssClass: 'const', title: 'Const', matches: ['const', 'var', 'let'] }
8080
];
8181

8282
// STATUSES
@@ -140,8 +140,10 @@ angularIO.directive('apiList', function () {
140140
// UPDATE VALUES IF DART API
141141
var isForDart = $attrs.lang === 'dart';
142142
if (isForDart) {
143-
$ctrl.apiTypes = $ctrl.apiTypes.filter(function (t) {
144-
return !t.cssClass.match(/^(stable|directive|decorator|interface|enum)$/);
143+
$ctrl.isForDart = true;
144+
$ctrl.statuses = [];
145+
$ctrl.types = $ctrl.types.filter(function (t) {
146+
return t.cssClass.match(/^(class|function|const)$/);
145147
});
146148
}
147149

0 commit comments

Comments
 (0)