Skip to content

Commit e3c757e

Browse files
committed
Fix Safari display issues
1 parent ae2fca0 commit e3c757e

File tree

7 files changed

+26
-2
lines changed

7 files changed

+26
-2
lines changed

dist/scripts/api-console.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,18 @@
409409
}
410410
});
411411

412+
$scope.sortMethods = function (method) {
413+
return method.method;
414+
};
415+
412416
$scope.showResource = function ($event, $index) {
413417
var $this = jQuery($event.currentTarget);
414418
var $resource = $this.closest('.raml-console-resource');
415419
var $inactiveElements = jQuery('.raml-console-tab').add('.raml-console-resource').add('li');
416420
var methodInfo = $scope.resource.methods[$index];
417421

422+
console.log($scope.resource.methods);
423+
418424
$scope.methodInfo = methodInfo;
419425
$scope.responseInfo = getResponseInfo();
420426
$scope.context = new RAML.Services.TryIt.Context($scope.raml.baseUriParameters, $scope.resource, $scope.methodInfo);
@@ -5031,7 +5037,7 @@ angular.module('ramlConsoleApp').run(['$templateCache', function($templateCache)
50315037

50325038
$templateCache.put('directives/method-list.tpl.html',
50335039
"<div class=\"raml-console-tab-list\">\n" +
5034-
" <div class=\"raml-console-tab\" ng-repeat=\"method in resource.methods\" ng-click=\"showResource($event, $index)\">\n" +
5040+
" <div class=\"raml-console-tab\" ng-repeat=\"method in resource.methods | orderBy:sortMethods\" ng-click=\"showResource($event, $index)\">\n" +
50355041
" <span class=\"raml-console-tab-label raml-console-tab-{{method.method}}\">{{method.method.toLocaleUpperCase()}}</span>\n" +
50365042
" </div>\n" +
50375043
"</div>\n"

dist/styles/api-console-dark-theme.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,12 +1421,15 @@ th {
14211421
.raml-console-tab-list {
14221422
right: 9px;
14231423
position: relative;
1424+
position: absolute;
14241425
bottom: -1px;
14251426
display: flex;
1427+
display: -webkit-flex;
14261428
flex-grow: 1;
14271429
flex-flow: row-reverse;
14281430
align-self: flex-end;
14291431
padding-left: 16px;
1432+
float: right;
14301433
}
14311434

14321435
@media only screen and (min-width: 600px) {
@@ -2574,6 +2577,7 @@ a.raml-console-resource-path-active {
25742577
.raml-console-sidebar {
25752578
width: 0;
25762579
flex-shrink: 0;
2580+
-webkit-flex-shrink: 0;
25772581
overflow: hidden;
25782582
border-bottom-right-radius: 4px;
25792583
border-left: 3px solid #12171f;

dist/styles/api-console-light-theme.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,12 +1421,15 @@ th {
14211421
.raml-console-tab-list {
14221422
right: 9px;
14231423
position: relative;
1424+
position: absolute;
14241425
bottom: -1px;
14251426
display: flex;
1427+
display: -webkit-flex;
14261428
flex-grow: 1;
14271429
flex-flow: row-reverse;
14281430
align-self: flex-end;
14291431
padding-left: 16px;
1432+
float: right;
14301433
}
14311434

14321435
@media only screen and (min-width: 600px) {
@@ -2574,6 +2577,7 @@ a.raml-console-resource-path-active {
25742577
.raml-console-sidebar {
25752578
width: 0;
25762579
flex-shrink: 0;
2580+
-webkit-flex-shrink: 0;
25772581
overflow: hidden;
25782582
border-bottom-right-radius: 4px;
25792583
border-left: 3px solid #d6d7d9;

src/app/directives/method-list.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,18 @@
8282
}
8383
});
8484

85+
$scope.sortMethods = function (method) {
86+
return method.method;
87+
};
88+
8589
$scope.showResource = function ($event, $index) {
8690
var $this = jQuery($event.currentTarget);
8791
var $resource = $this.closest('.raml-console-resource');
8892
var $inactiveElements = jQuery('.raml-console-tab').add('.raml-console-resource').add('li');
8993
var methodInfo = $scope.resource.methods[$index];
9094

95+
console.log($scope.resource.methods);
96+
9197
$scope.methodInfo = methodInfo;
9298
$scope.responseInfo = getResponseInfo();
9399
$scope.context = new RAML.Services.TryIt.Context($scope.raml.baseUriParameters, $scope.resource, $scope.methodInfo);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="raml-console-tab-list">
2-
<div class="raml-console-tab" ng-repeat="method in resource.methods" ng-click="showResource($event, $index)">
2+
<div class="raml-console-tab" ng-repeat="method in resource.methods | orderBy:sortMethods" ng-click="showResource($event, $index)">
33
<span class="raml-console-tab-label raml-console-tab-{{method.method}}">{{method.method.toLocaleUpperCase()}}</span>
44
</div>
55
</div>

src/scss/_sidebar.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.sidebar {
22
width: 0;
33
flex-shrink: 0;
4+
-webkit-flex-shrink: 0;
45

56
overflow: hidden;
67
border-bottom-right-radius: 4px;

src/scss/_tab.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@
1414
.tab-list {
1515
right: 9px;
1616
position: relative;
17+
position: absolute;
1718
bottom: -1px;
1819

1920
display: flex;
21+
display: -webkit-flex;
2022
flex-grow: 1;
2123
flex-flow: row-reverse;
2224
align-self: flex-end;
2325
padding-left: 16px;
26+
float:right;
2427

2528
@media only screen and (min-width: $medium-screen) {
2629
padding-left: 24px;

0 commit comments

Comments
 (0)