Set scroll y for md-tab-body div using AngularJS matrial - html

I used angularjs material tabs here I need scroll for "md-tab-body" section, I have tried all the possibility from stack overflow but not working scroll.
<md-tabs md-enable-disconnect md-dynamic-height md-border-bottom md-selected='vm.tabIndex' id="wardName{{$index}}">
<md-tab ng-repeat="ward in vm.inpatientwards" ng-click="vm.loadWardview(ward._id)">
<md-tab-label>
<span translate id="ipwardId{{$index}}">{{ward.name}}</span>
</md-tab-label>
<md-tab-body>
<div style="margin:10px;" layout="row">
<md-grid-list flex>
<md-grid-tile ng-repeat="bed in vm.wardbeds" ng-click="vm.selectBed(bed)" id="wardBeds{{$index}}">
<md-grid-tile-header>
{{::bed.name}}
</md-grid-tile-header>
</md-grid-tile>
</md-grid-list>
</div>
</md-tab-body>
</md-tab>
</md-tabs>
The above code i used my application. I need help to set oveflow-y for body section.

You can do something like this may this help you in case if your scenario is like this:
<!-- if you have any div outside-->
<div style="height:100%">
<md-tabs md-enable-disconnect md-border-bottom md-selected='vm.tabIndex' id="wardName{{$index}}" class="helloHeight">
<md-tab ng-repeat="ward in vm.inpatientwards" ng-click="vm.loadWardview(ward._id)">
<md-tab-label>
<span translate id="ipwardId{{$index}}">{{ward.name}}</span>
</md-tab-label>
<md-tab-body>
<!-- try to inspect this div-->
<div style="margin:10px;height:100%;overflow-y: auto;" layout="row">
<md-grid-list flex>
<md-grid-tile ng-repeat="bed in vm.wardbeds" ng-click="vm.selectBed(bed)" id="wardBeds{{$index}}">
<md-grid-tile-header >
{{::bed.name}}
</md-grid-tile-header>
</md-grid-tile>
</md-grid-list>
</div>
</md-tab-body>
</md-tab>
.helloHeight{
height:100%;
}
And not sure as not tested this code.

Related

Using mat-grid-list within a mat-card to display multiple other mat-cards in a specific layout

Within an Angular project, I'm trying to replicate this.
I have a parent mat-card element which will house a mat-grid-list.
The mat-grid-list will then contain multiple (10) mat-cards which would in turn surround another mat-card (see the example image for the layout provided).
Is something like this possible and if so, what would the best approach be to do so?
Currently, with what I have, the child mat-cards (mat-card-2's in the example) are displaying in a single column.
HTML
The following is within a separate component which calls the "x" component
<mat-card-content *ngFor="let x of xs">
<div>
<app-x-synopsis [x]="x" ></app-x-synopsis>
</div>
</mat-card-content>
HTML for the "x" component
<mat-grid-list cols="6">
<mat-grid-tile id="table-grid" [colspan]="6" [rowspan]="1">
<mat-card class="x-synopsis-card">
<mat-card-header class="x-name">
<mat-card-title class="title">
{{ x.name }}
</mat-card-title>
<div style="flex-grow: 1"></div>
<button mat-icon-button>
<fa-icon [icon]="faInfoCircle"></fa-icon>
</button>
</mat-card-header>
<mat-card-content class="x-occupied" *ngIf="hasX()">
<div class="x-container" fxLayout="row wrap" fxLayoutAlign="space-around center">
<div class="ux-container" fxLayout="column">
<div class="ux-value">
{{ x.y.z }}
</div>
<div class="ux-title">
UX
</div>
</div>
<div class="abc">
{{ x.y.a }}
</div>
</div>
</mat-card-content>
<mat-card-content class="x-vacant" *ngIf="!x()">
<div class="x-container" fxLayout="row wrap" fxLayoutAlign="space-around center">
<div class="label">
VACANT
</div>
</div>
</mat-card-content>
</mat-card>
</mat-grid-tile>
</mat-grid-list>
Any help would be greatly appreciated, I am also happy to provide anymore information where possible :) Thanks.

DevExtreme popup does not have content. (content is empty)

I use DevExtreme with Vue.js
I am working on converting the Vuetify UI component to the DevExtreme UI component
I want to add a pop-up in the page, but the pop-up doesn't work normally.
A pop-up tag was created, but the content was empty inside the tag.
I tried many ways, but I couldn't find a solution. help me
This is tag state
<div data-app="true" class="v-application--is--ltr theme--light" id="app">
<div class="v-application--wrap"> ...page content... </div>
<!-- popup -->
<div>
<div class="dx-overlay dx-popup dx-widget dx-visibility-change-handler">
<div class="dx-overlay-content dx-popup-nomal" tabindex="0" style="width: 800px; height: 600px;">
<div class="dx-popup-content"></div>
</div>
</div>
</div>
</div>
This is code
<dx-popup v-model="isOpen" :visible="isOpen" :width="width" :height="height" :show-title="false" :show-close-button="false">
<div ref="dialog" class="u-dialog">
<u-layout height="*">
<u-layout ref="dialogTitle" class="u-dialog-header">
<div class="pa-0 text-right">
<v-btn depressed small icon class="mr-1" color="transparent"
v-if="isFullScreen && fullScreen"
#click="setFullScreen()"
>
<v-icon color="white">fullscreen_exit</v-icon>
</v-btn>
<v-btn depressed small icon class="mr-1" color="transparent"
v-if="!isFullScreen && fullScreen"
#click="setFullScreen()"
>
<v-icon color="white">fullscreen</v-icon>
</v-btn>
<v-btn depressed small icon class="mr-1" color="transparent" #click="closeButtonClick()">
<v-icon color="white">close</v-icon>
</v-btn>
</div>
</u-layout>
<u-layout ref="dialogContent" height="*" class="u-dialog-content">
<component ref="comp" :is="loader" :param="paramData" :code-map="popup.codeMap" #resolve="resolve" #reject="reject"/>
</u-layout>
</u-layout>
</div>
</dx-popup>

how to Center icon in rows using ui element

how can i center this edit icon even when one address string is longer than the other?
This is the column I'm having this problem
<el-table-column
prop="address"
label="Address">
<template slot-scope="scope">
{{scope.row.address}}
<el-button
type="primary"
icon="el-icon-edit"
circle
size="mini"
style="margin-left: 55px"
#click="open(scope.$index, scope.row)"
></el-button>
</template>
</el-table-column>
Here is the complete code:
https://jsfiddle.net/xhbzpvas/
<div style="display: flex">
<address style="flex-grow: 1"/>
<icon/>
</div>

how to css md-tab label in angularjs

Markup :
md-tab label="Current ({{ctrl.ongoing_assignments.length}})"
Required Output :
Current (1) <===== i want the number will be in red background with round shape like notification in facebook
If you want this styling to apply to only this element you can do:
In a css file:
.reference{
background-color: red;
}
Your html:
md-tab class="reference" label="Current ({{ctrl.ongoing_assignments.length}})"
If you want this styling to apply to all the md-tab labels you can do:
md-tab {
background-color: red;
}
From your question i dont know this solution is a step in success or not, but see if its helpful then i can make modifications to achieve the desired result.
Currently, 2 tabs are shown:
- first one is a normal tab, and - second one changes background color on being active.
angular.module('MyApp', ['ngMaterial'])
.controller('AppCtrl', function ($scope, $mdSidenav) {
$scope.ButtonText = "Test Button";
$scope.buttonClick = function() {
alert("First Angular Material App");
};
});
.other-div md-tabs .md-tab.md-active .md-ripple-container {
color: rgb(248,187,208);
background: red;
z-index: -1;
}
.other-div md-tabs .md-tab.md-active {
color: green;
}
<html ng-app="MyApp">
<head>
<title>First App Angular Material</title>
<link rel="stylesheet" href="https://cdn.rawgit.com/angular/bower-material/v0.10.0/angular-material.css" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.min.js"></script>
<script src="https://cdn.rawgit.com/angular/bower-material/v0.10.0/angular-material.js"></script>
</head>
<body>
<div ng-controller="AppCtrl">
<md-tabs md-selected="1" md-stretch-tabs="auto" md-align="bottom" md-dynamic-height md-border-bottom md-center-tab md-swipe-content>
<md-tab label="tab1">
<md-tab-body>
<h1>Welcome to first tab</h1>
<md-tab-body>
</md-tab>
<md-tab label="tab2">
<md-tab-body>
<h1>Welcome to Second tab</h1>
<md-tab-body>
</md-tab>
<md-tab label="tab3">
<md-tab-body>
<h1>Welcome to Third tab</h1>
<md-tab-body>
</md-tab>
</md-tabs>
</div>
<div ng-controller="AppCtrl" class='other-div'>
<md-tabs md-selected="1" md-stretch-tabs="auto" md-align="bottom" md-dynamic-height md-border-bottom md-center-tab md-swipe-content>
<md-tab label="tab1">
<md-tab-body>
<h1>Welcome to first tab</h1>
<md-tab-body>
</md-tab>
<md-tab label="tab2">
<md-tab-body>
<h1>Welcome to Second tab</h1>
<md-tab-body>
</md-tab>
<md-tab label="tab3">
<md-tab-body>
<h1>Welcome to Third tab</h1>
<md-tab-body>
</md-tab>
</md-tabs>
</div>
</body>
</html>

Icons don't display in polymer 2

I'm trying to use components like paper-rating, font awesome icons but they don't display anything in the page. I see that the tag is recoginsed but nothing is visible on the page. Below is a sample use of star-rating. Nethier the rating nor the map icon work
<section>
<template is="dom-if" if={{tests}}>
<template is="dom-repeat" items={{tests}}>
<a my-data="test" href="assessment/{{item.testId}}">
<paper-card class ="header" heading="{{item.assessmentTopic}}" image=""elevation="1" animated-shadow="false">
<iron-icon icon="maps:directions-bus"></iron-icon>
<div class="card-content" id="{{item.testId}}">
<img style="width : 75px; margin : 2px;" src="https://image.shutterstock.com/z/stock-vector-blackboard-inscribed-with-scientific-formulas-and-calculations-in-physics-and-mathematics-538136431.jpg" />
<div style="display: inline-block; margin-left: 10;">
<div class="small">
{{item.createdBy}}
</div>
<div class="small">
{{item.testId}}
</div>
<div>
<star-rating rating="4"></star-rating>
</div>
</div>
</div>
</paper-card>
</a>
</template>
</template>
</section>
So, I was able to solve this by updating iron-meta to version 2.0.0 in the bower.json and running bower update.