UI: IE11 fixes.
This commit is contained in:
parent
1c8d58e854
commit
d895ca6d36
@ -24,6 +24,8 @@ import thingsboardJsonForm from '../json-form.directive';
|
|||||||
import thingsboardManageWidgetActions from './action/manage-widget-actions.directive';
|
import thingsboardManageWidgetActions from './action/manage-widget-actions.directive';
|
||||||
import 'angular-ui-ace';
|
import 'angular-ui-ace';
|
||||||
|
|
||||||
|
import './widget-config.scss';
|
||||||
|
|
||||||
/* eslint-disable import/no-unresolved, import/default */
|
/* eslint-disable import/no-unresolved, import/default */
|
||||||
|
|
||||||
import widgetConfigTemplate from './widget-config.tpl.html';
|
import widgetConfigTemplate from './widget-config.tpl.html';
|
||||||
@ -136,7 +138,7 @@ function WidgetConfig($compile, $templateCache, $rootScope, $translate, $timeout
|
|||||||
scope.datasources = [];
|
scope.datasources = [];
|
||||||
}
|
}
|
||||||
if (config.datasources) {
|
if (config.datasources) {
|
||||||
for (var i in config.datasources) {
|
for (var i = 0; i < config.datasources.length; i++) {
|
||||||
scope.datasources.push({value: config.datasources[i]});
|
scope.datasources.push({value: config.datasources[i]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -308,7 +310,7 @@ function WidgetConfig($compile, $templateCache, $rootScope, $translate, $timeout
|
|||||||
config.datasources = [];
|
config.datasources = [];
|
||||||
}
|
}
|
||||||
if (scope.datasources) {
|
if (scope.datasources) {
|
||||||
for (var i in scope.datasources) {
|
for (var i = 0; i < scope.datasources.length; i++) {
|
||||||
config.datasources.push(scope.datasources[i].value);
|
config.datasources.push(scope.datasources[i].value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
23
ui/src/app/components/widget/widget-config.scss
Normal file
23
ui/src/app/components/widget/widget-config.scss
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Copyright © 2016-2017 The Thingsboard Authors
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
.tb-widget-config {
|
||||||
|
md-tab-content.md-active > div {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.tb-advanced-widget-config {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -15,7 +15,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<md-tabs ng-class="{'tb-headless': (widgetType === types.widgetType.static.value && !displayAdvanced())}" id="tabs" md-border-bottom flex class="tb-absolute-fill"
|
<md-tabs ng-class="{'tb-headless': (widgetType === types.widgetType.static.value && !displayAdvanced())}"
|
||||||
|
id="tabs" md-border-bottom flex class="tb-widget-config tb-absolute-fill"
|
||||||
md-selected="selectedTab">
|
md-selected="selectedTab">
|
||||||
<md-tab label="{{ 'widget-config.data' | translate }}"
|
<md-tab label="{{ 'widget-config.data' | translate }}"
|
||||||
ng-show="widgetType !== types.widgetType.static.value">
|
ng-show="widgetType !== types.widgetType.static.value">
|
||||||
@ -273,7 +274,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<md-tab ng-if="displayAdvanced()" label="{{ 'widget-config.advanced' | translate }}">
|
<md-tab ng-if="displayAdvanced()" label="{{ 'widget-config.advanced' | translate }}">
|
||||||
<md-content class="md-padding" layout="column">
|
<md-content flex class="md-padding tb-advanced-widget-config" layout="column">
|
||||||
<ng-form flex name="ngform"
|
<ng-form flex name="ngform"
|
||||||
layout="column"
|
layout="column"
|
||||||
layout-padding>
|
layout-padding>
|
||||||
|
|||||||
@ -54,4 +54,22 @@
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(function (arr) {
|
||||||
|
arr.forEach(function (item) {
|
||||||
|
if (item.hasOwnProperty('remove')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Object.defineProperty(item, 'remove', {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
value: function remove() {
|
||||||
|
if (this.parentNode !== null)
|
||||||
|
this.parentNode.removeChild(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]); //eslint-disable-line
|
||||||
|
|
||||||
})();
|
})();
|
||||||
Loading…
x
Reference in New Issue
Block a user