Showing
8 changed files
with
23 additions
and
14 deletions
@@ -35,12 +35,12 @@ | @@ -35,12 +35,12 @@ | ||
35 | "angular-sanitize": "1.5.8", | 35 | "angular-sanitize": "1.5.8", |
36 | "angular-storage": "0.0.15", | 36 | "angular-storage": "0.0.15", |
37 | "angular-touch": "1.5.8", | 37 | "angular-touch": "1.5.8", |
38 | - "angular-translate": "^2.12.1", | ||
39 | - "angular-translate-handler-log": "^2.12.1", | ||
40 | - "angular-translate-interpolation-messageformat": "^2.12.1", | ||
41 | - "angular-translate-loader-static-files": "^2.12.1", | ||
42 | - "angular-translate-storage-cookie": "^2.12.1", | ||
43 | - "angular-translate-storage-local": "^2.12.1", | 38 | + "angular-translate": "2.13.1", |
39 | + "angular-translate-handler-log": "2.13.1", | ||
40 | + "angular-translate-interpolation-messageformat": "2.13.1", | ||
41 | + "angular-translate-loader-static-files": "2.13.1", | ||
42 | + "angular-translate-storage-cookie": "2.13.1", | ||
43 | + "angular-translate-storage-local": "2.13.1", | ||
44 | "angular-ui-ace": "^0.2.3", | 44 | "angular-ui-ace": "^0.2.3", |
45 | "angular-ui-router": "^0.3.1", | 45 | "angular-ui-router": "^0.3.1", |
46 | "angular-websocket": "^2.0.1", | 46 | "angular-websocket": "^2.0.1", |
@@ -66,6 +66,12 @@ function Timewindow($compile, $templateCache, $filter, $mdPanel, $document, $mdM | @@ -66,6 +66,12 @@ function Timewindow($compile, $templateCache, $filter, $mdPanel, $document, $mdM | ||
66 | 66 | ||
67 | scope.aggregation = angular.isDefined(attrs.aggregation); | 67 | scope.aggregation = angular.isDefined(attrs.aggregation); |
68 | 68 | ||
69 | + scope.isToolbar = angular.isDefined(attrs.isToolbar); | ||
70 | + | ||
71 | + scope.hideLabel = function() { | ||
72 | + return scope.isToolbar && !$mdMedia('gt-sm'); | ||
73 | + } | ||
74 | + | ||
69 | var translationPending = false; | 75 | var translationPending = false; |
70 | 76 | ||
71 | $translate.onReady(function() { | 77 | $translate.onReady(function() { |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | </md-tooltip> | 22 | </md-tooltip> |
23 | <ng-md-icon aria-label="{{ 'timewindow.date-range' | translate }}" icon="query_builder"></ng-md-icon> | 23 | <ng-md-icon aria-label="{{ 'timewindow.date-range' | translate }}" icon="query_builder"></ng-md-icon> |
24 | </md-button> | 24 | </md-button> |
25 | - <span ng-click="openEditMode($event)"> | 25 | + <span ng-hide="hideLabel()" ng-click="openEditMode($event)"> |
26 | <md-tooltip md-direction="{{tooltipDirection}}"> | 26 | <md-tooltip md-direction="{{tooltipDirection}}"> |
27 | {{ 'timewindow.edit' | translate }} | 27 | {{ 'timewindow.edit' | translate }} |
28 | </md-tooltip> | 28 | </md-tooltip> |
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | </md-tooltip> | 23 | </md-tooltip> |
24 | <md-icon aria-label="{{ 'dashboard.select-devices' | translate }}" class="material-icons">devices_other</md-icon> | 24 | <md-icon aria-label="{{ 'dashboard.select-devices' | translate }}" class="material-icons">devices_other</md-icon> |
25 | </md-button> | 25 | </md-button> |
26 | - <span ng-click="openEditMode($event)"> | 26 | + <span hide-xs hide-sm ng-click="openEditMode($event)"> |
27 | <md-tooltip md-direction="{{tooltipDirection}}"> | 27 | <md-tooltip md-direction="{{tooltipDirection}}"> |
28 | {{ 'dashboard.select-devices' | translate }} | 28 | {{ 'dashboard.select-devices' | translate }} |
29 | </md-tooltip> | 29 | </md-tooltip> |
@@ -27,7 +27,7 @@ import aliasesDeviceSelectPanelTemplate from './aliases-device-select-panel.tpl. | @@ -27,7 +27,7 @@ import aliasesDeviceSelectPanelTemplate from './aliases-device-select-panel.tpl. | ||
27 | 27 | ||
28 | /* eslint-disable angular/angularelement */ | 28 | /* eslint-disable angular/angularelement */ |
29 | /*@ngInject*/ | 29 | /*@ngInject*/ |
30 | -export default function AliasesDeviceSelectDirective($compile, $templateCache, types, $mdPanel, $document, $translate) { | 30 | +export default function AliasesDeviceSelectDirective($compile, $templateCache, $mdMedia, types, $mdPanel, $document, $translate) { |
31 | 31 | ||
32 | var linker = function (scope, element, attrs, ngModelCtrl) { | 32 | var linker = function (scope, element, attrs, ngModelCtrl) { |
33 | 33 | ||
@@ -51,7 +51,7 @@ export default function AliasesDeviceSelectDirective($compile, $templateCache, t | @@ -51,7 +51,7 @@ export default function AliasesDeviceSelectDirective($compile, $templateCache, t | ||
51 | return; | 51 | return; |
52 | } | 52 | } |
53 | var position; | 53 | var position; |
54 | - var panelHeight = 250; | 54 | + var panelHeight = $mdMedia('min-height: 350px') ? 250 : 150; |
55 | var panelWidth = 300; | 55 | var panelWidth = 300; |
56 | var offset = element[0].getBoundingClientRect(); | 56 | var offset = element[0].getBoundingClientRect(); |
57 | var bottomY = offset.bottom - $(window).scrollTop(); //eslint-disable-line | 57 | var bottomY = offset.bottom - $(window).scrollTop(); //eslint-disable-line |
@@ -64,7 +64,7 @@ export default function AliasesDeviceSelectDirective($compile, $templateCache, t | @@ -64,7 +64,7 @@ export default function AliasesDeviceSelectDirective($compile, $templateCache, t | ||
64 | yPosition = $mdPanel.yPosition.BELOW; | 64 | yPosition = $mdPanel.yPosition.BELOW; |
65 | } | 65 | } |
66 | if (leftX + panelWidth > $( window ).width()) { //eslint-disable-line | 66 | if (leftX + panelWidth > $( window ).width()) { //eslint-disable-line |
67 | - xPosition = $mdPanel.xPosition.ALIGN_END; | 67 | + xPosition = $mdPanel.xPosition.CENTER; |
68 | } else { | 68 | } else { |
69 | xPosition = $mdPanel.xPosition.ALIGN_START; | 69 | xPosition = $mdPanel.xPosition.ALIGN_START; |
70 | } | 70 | } |
@@ -21,7 +21,10 @@ | @@ -21,7 +21,10 @@ | ||
21 | } | 21 | } |
22 | 22 | ||
23 | .tb-aliases-device-select-panel { | 23 | .tb-aliases-device-select-panel { |
24 | - max-height: 250px; | 24 | + max-height: 150px; |
25 | + @media (min-height: 350px) { | ||
26 | + max-height: 250px; | ||
27 | + } | ||
25 | min-width: 300px; | 28 | min-width: 300px; |
26 | background: white; | 29 | background: white; |
27 | border-radius: 4px; | 30 | border-radius: 4px; |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | </md-button> | 49 | </md-button> |
50 | <tb-user-menu ng-show="forceFullscreen" display-user-info="true"> | 50 | <tb-user-menu ng-show="forceFullscreen" display-user-info="true"> |
51 | </tb-user-menu> | 51 | </tb-user-menu> |
52 | - <tb-timewindow direction="left" tooltip-direction="bottom" aggregation ng-model="vm.dashboardConfiguration.timewindow"> | 52 | + <tb-timewindow is-toolbar direction="left" tooltip-direction="bottom" aggregation ng-model="vm.dashboardConfiguration.timewindow"> |
53 | </tb-timewindow> | 53 | </tb-timewindow> |
54 | <tb-aliases-device-select ng-show="!vm.isEdit" | 54 | <tb-aliases-device-select ng-show="!vm.isEdit" |
55 | tooltip-direction="bottom" | 55 | tooltip-direction="bottom" |
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | <div flex layout="column" tabIndex="-1" role="main"> | 41 | <div flex layout="column" tabIndex="-1" role="main"> |
42 | <md-toolbar class="md-whiteframe-z1 tb-primary-toolbar" ng-class="{'md-hue-1': vm.displaySearchMode()}"> | 42 | <md-toolbar class="md-whiteframe-z1 tb-primary-toolbar" ng-class="{'md-hue-1': vm.displaySearchMode()}"> |
43 | <div layout="row" flex class="md-toolbar-tools"> | 43 | <div layout="row" flex class="md-toolbar-tools"> |
44 | - <md-button id="main" hide-gt-sm | 44 | + <md-button id="main" hide-gt-sm ng-show="!forceFullscreen" |
45 | class="md-icon-button" ng-click="vm.openSidenav()" aria-label="{{ 'home.menu' | translate }}" ng-class="{'tb-invisible': vm.displaySearchMode()}"> | 45 | class="md-icon-button" ng-click="vm.openSidenav()" aria-label="{{ 'home.menu' | translate }}" ng-class="{'tb-invisible': vm.displaySearchMode()}"> |
46 | <md-icon aria-label="{{ 'home.menu' | translate }}" class="material-icons">menu</md-icon> | 46 | <md-icon aria-label="{{ 'home.menu' | translate }}" class="material-icons">menu</md-icon> |
47 | </md-button> | 47 | </md-button> |