Commit d895ca6d36b86edf848d0822adcd511cbf61bda8

Authored by Igor Kulikov
1 parent 1c8d58e8

UI: IE11 fixes.

@@ -24,6 +24,8 @@ import thingsboardJsonForm from '../json-form.directive'; @@ -24,6 +24,8 @@ import thingsboardJsonForm from '../json-form.directive';
24 import thingsboardManageWidgetActions from './action/manage-widget-actions.directive'; 24 import thingsboardManageWidgetActions from './action/manage-widget-actions.directive';
25 import 'angular-ui-ace'; 25 import 'angular-ui-ace';
26 26
  27 +import './widget-config.scss';
  28 +
27 /* eslint-disable import/no-unresolved, import/default */ 29 /* eslint-disable import/no-unresolved, import/default */
28 30
29 import widgetConfigTemplate from './widget-config.tpl.html'; 31 import widgetConfigTemplate from './widget-config.tpl.html';
@@ -136,7 +138,7 @@ function WidgetConfig($compile, $templateCache, $rootScope, $translate, $timeout @@ -136,7 +138,7 @@ function WidgetConfig($compile, $templateCache, $rootScope, $translate, $timeout
136 scope.datasources = []; 138 scope.datasources = [];
137 } 139 }
138 if (config.datasources) { 140 if (config.datasources) {
139 - for (var i in config.datasources) { 141 + for (var i = 0; i < config.datasources.length; i++) {
140 scope.datasources.push({value: config.datasources[i]}); 142 scope.datasources.push({value: config.datasources[i]});
141 } 143 }
142 } 144 }
@@ -308,7 +310,7 @@ function WidgetConfig($compile, $templateCache, $rootScope, $translate, $timeout @@ -308,7 +310,7 @@ function WidgetConfig($compile, $templateCache, $rootScope, $translate, $timeout
308 config.datasources = []; 310 config.datasources = [];
309 } 311 }
310 if (scope.datasources) { 312 if (scope.datasources) {
311 - for (var i in scope.datasources) { 313 + for (var i = 0; i < scope.datasources.length; i++) {
312 config.datasources.push(scope.datasources[i].value); 314 config.datasources.push(scope.datasources[i].value);
313 } 315 }
314 } 316 }
  1 +/**
  2 + * Copyright © 2016-2017 The Thingsboard Authors
  3 + *
  4 + * Licensed under the Apache License, Version 2.0 (the "License");
  5 + * you may not use this file except in compliance with the License.
  6 + * You may obtain a copy of the License at
  7 + *
  8 + * http://www.apache.org/licenses/LICENSE-2.0
  9 + *
  10 + * Unless required by applicable law or agreed to in writing, software
  11 + * distributed under the License is distributed on an "AS IS" BASIS,
  12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + * See the License for the specific language governing permissions and
  14 + * limitations under the License.
  15 + */
  16 +.tb-widget-config {
  17 + md-tab-content.md-active > div {
  18 + height: 100%;
  19 + }
  20 + .tb-advanced-widget-config {
  21 + height: 100%;
  22 + }
  23 +}
@@ -15,7 +15,8 @@ @@ -15,7 +15,8 @@
15 limitations under the License. 15 limitations under the License.
16 16
17 --> 17 -->
18 -<md-tabs ng-class="{'tb-headless': (widgetType === types.widgetType.static.value && !displayAdvanced())}" id="tabs" md-border-bottom flex class="tb-absolute-fill" 18 +<md-tabs ng-class="{'tb-headless': (widgetType === types.widgetType.static.value && !displayAdvanced())}"
  19 + id="tabs" md-border-bottom flex class="tb-widget-config tb-absolute-fill"
19 md-selected="selectedTab"> 20 md-selected="selectedTab">
20 <md-tab label="{{ 'widget-config.data' | translate }}" 21 <md-tab label="{{ 'widget-config.data' | translate }}"
21 ng-show="widgetType !== types.widgetType.static.value"> 22 ng-show="widgetType !== types.widgetType.static.value">
@@ -273,7 +274,7 @@ @@ -273,7 +274,7 @@
273 </div> 274 </div>
274 </md-tab> 275 </md-tab>
275 <md-tab ng-if="displayAdvanced()" label="{{ 'widget-config.advanced' | translate }}"> 276 <md-tab ng-if="displayAdvanced()" label="{{ 'widget-config.advanced' | translate }}">
276 - <md-content class="md-padding" layout="column"> 277 + <md-content flex class="md-padding tb-advanced-widget-config" layout="column">
277 <ng-form flex name="ngform" 278 <ng-form flex name="ngform"
278 layout="column" 279 layout="column"
279 layout-padding> 280 layout-padding>
@@ -54,4 +54,22 @@ @@ -54,4 +54,22 @@
54 return result; 54 return result;
55 }; 55 };
56 } 56 }
  57 +
  58 + (function (arr) {
  59 + arr.forEach(function (item) {
  60 + if (item.hasOwnProperty('remove')) {
  61 + return;
  62 + }
  63 + Object.defineProperty(item, 'remove', {
  64 + configurable: true,
  65 + enumerable: true,
  66 + writable: true,
  67 + value: function remove() {
  68 + if (this.parentNode !== null)
  69 + this.parentNode.removeChild(this);
  70 + }
  71 + });
  72 + });
  73 + })([Element.prototype, CharacterData.prototype, DocumentType.prototype]); //eslint-disable-line
  74 +
57 })(); 75 })();