Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
94663f25ea
@ -162,14 +162,12 @@ export default function AppRun($rootScope, $window, $injector, $location, $log,
|
|||||||
if (forbiddenDialog === null) {
|
if (forbiddenDialog === null) {
|
||||||
$translate(['access.access-forbidden',
|
$translate(['access.access-forbidden',
|
||||||
'access.access-forbidden-text',
|
'access.access-forbidden-text',
|
||||||
'access.access-forbidden',
|
|
||||||
'action.cancel',
|
'action.cancel',
|
||||||
'action.sign-in']).then(function (translations) {
|
'action.sign-in']).then(function (translations) {
|
||||||
if (forbiddenDialog === null) {
|
if (forbiddenDialog === null) {
|
||||||
forbiddenDialog = $mdDialog.confirm()
|
forbiddenDialog = $mdDialog.confirm()
|
||||||
.title(translations['access.access-forbidden'])
|
.title(translations['access.access-forbidden'])
|
||||||
.htmlContent(translations['access.access-forbidden-text'])
|
.htmlContent(translations['access.access-forbidden-text'])
|
||||||
.ariaLabel(translations['access.access-forbidden'])
|
|
||||||
.cancel(translations['action.cancel'])
|
.cancel(translations['action.cancel'])
|
||||||
.ok(translations['action.sign-in']);
|
.ok(translations['action.sign-in']);
|
||||||
$mdDialog.show(forbiddenDialog).then(function () {
|
$mdDialog.show(forbiddenDialog).then(function () {
|
||||||
|
|||||||
@ -328,6 +328,9 @@ function KnobController($element, $scope, $document) {
|
|||||||
var textWidth = measureTextWidth(text, fontSize);
|
var textWidth = measureTextWidth(text, fontSize);
|
||||||
while (textWidth > maxWidth) {
|
while (textWidth > maxWidth) {
|
||||||
fontSize--;
|
fontSize--;
|
||||||
|
if (fontSize < 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
textWidth = measureTextWidth(text, fontSize);
|
textWidth = measureTextWidth(text, fontSize);
|
||||||
}
|
}
|
||||||
element.css({'fontSize': fontSize+'px', 'lineHeight': fontSize+'px'});
|
element.css({'fontSize': fontSize+'px', 'lineHeight': fontSize+'px'});
|
||||||
@ -335,7 +338,7 @@ function KnobController($element, $scope, $document) {
|
|||||||
|
|
||||||
function measureTextWidth(text, fontSize) {
|
function measureTextWidth(text, fontSize) {
|
||||||
textMeasure.css({'fontSize': fontSize+'px', 'lineHeight': fontSize+'px'});
|
textMeasure.css({'fontSize': fontSize+'px', 'lineHeight': fontSize+'px'});
|
||||||
textMeasure.text(text);
|
textMeasure.html(text);
|
||||||
return textMeasure.width();
|
return textMeasure.width();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
<div class="top"></div>
|
<div class="top"></div>
|
||||||
<div class="error-container" ng-style="{'background': vm.error.length ? 'rgba(255,255,255,0.25)' : 'none'}"
|
<div class="error-container" ng-style="{'background': vm.error.length ? 'rgba(255,255,255,0.25)' : 'none'}"
|
||||||
layout="row" layout-align="center center">
|
layout="row" layout-align="center center">
|
||||||
<span class="knob-error">{{ vm.error }}</span>
|
<span class="knob-error" ng-bind-html="vm.error"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="title-container" layout="row" layout-align="center center">
|
<div class="title-container" layout="row" layout-align="center center">
|
||||||
<span class="knob-title">{{ vm.title }}</span>
|
<span class="knob-title">{{ vm.title }}</span>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user