NPM run build command throws an error on an html file - html

I have an application developed on anglarJS. when I run the command:
npm run build -- -prod
I get the follwing error
ERROR in ng:///home/directoryling/appname-play.component.html (173,41): The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
the HTML code referred to is as follows:
<div fxFlex="50" fxLayoutAlign="center center">
<h4><span class="value">{{incomeM}}</span>$</h4>
</div>
line 173 is </div>, the last line in the code sample.
The part of the TS code where incomeM is assigned is:
this.incomeM = this.householdControlService.getMonthlyIncome();
and getMonthlyIncome() is a function that returns a number.
My question is is it normal for npm to throw such an error here, especially since there is no arithmetic operation in the HTML code. And the variable incomeM is set as a number. And if you have any suggestions on what I can do, or what I need to investigate.
Note I tried removing the handlebar from incomeM:
<div fxFlex="50" fxLayoutAlign="center center">
<h4><span class="value">incomeM</span>$</h4>
</div>
the idea being lets 's just print "incomeM" instead of the variable incomeM. However, I still get the same error, except this time it is for the previous element I am using in the HTML file.
here is the full HTML file for your reference:
import { Component } from '#angular/core';
import { MdDialog } from '#angular/material';
import { DragulaService } from 'ng2-dragula/ng2-dragula';
import { Utilities } from '../utilities';
import { Household, SystemParameters, PowerUsage } from '../../models';
import { AfterSimulationService } from '../services/household/after-simulation.service';
import { HouseholdControlService } from '../services/household/household-control.service';
import { HouseSettingService } from '../services/household/house-setting.service';
import { PaymentService, PaymentType } from '../services/household/payment.service';
import { SimulationControlService } from '../services/household/simulation-control.service';
import { SystemParametersService } from '../services/household/system-parameters.service';
import { AlertDialogComponent } from '../shared/dialog/alert-dialog.component';
import { ConfirmationDialogComponent } from '../shared/dialog/confirmation-dialog.component';
import { PaymentDialogComponent } from '../shared/dialog/payment-dialog.component';
#Component({
selector: 'household-play',
templateUrl: './household-play.component.html',
styleUrls: ['./household-play.component.css']
})
export class HouseholdPlayComponent {
initialTime = 0;
elapsedTime = 0;
currentPower = '0.00';
totalEnergy = '0.00';
cost = '0.00';
maxPower = '0.00';
communityCashBox = '0.00';
happinessScore = 1;
household: Household = new Household();
systemParameters: SystemParameters = new SystemParameters();
readyCount = 0;
//initialize income to -1 for debugging purposes.
incomeM = 0;
totalpaid = 0;
isPrepaid = false;
balance = '0.00';
depositAmount = 0;
sellingMode = false;
roomSetting = [[], [], [], []];
powerUsage: PowerUsage;
constructor(
private afterSimulationService: AfterSimulationService,
private dragulaService: DragulaService,
private householdControlService: HouseholdControlService,
private houseSettingService: HouseSettingService,
private paymentService: PaymentService,
private simulationControlService: SimulationControlService,
private systemParametersService: SystemParametersService,
private dialog: MdDialog
) {
dragulaService.setOptions('room-bag', {
revertOnSpill: true
});
dragulaService.drop.subscribe(value => {
houseSettingService.handleRoomOverflow(this.roomNumberByName(value[2].id), this.roomNumberByName(value[3].id))
});
this.roomSetting = houseSettingService.roomSetting;
householdControlService.observable().subscribe(() => {
this.household = householdControlService.household;
});
//store income value for each houshold.
systemParametersService.observable().subscribe(() => {
this.systemParameters = systemParametersService.systemParameters;
this.initialTime = this.systemParameters.simulationStartTime;
this.incomeM = this.householdControlService.getMonthlyIncome();
console.log(typeof(this.incomeM));
this.communityCashBox = this.systemParameters.communityCashBox.toFixed(2);
});
simulationControlService.observable().subscribe(code => {
this.readyCount = simulationControlService.householdReadyCount;
this.elapsedTime = simulationControlService.currentTime
this.maxPower = simulationControlService.maxPower.toFixed(2);
this.totalEnergy = simulationControlService.totalEnergy.toFixed(2);
if (paymentService.paymentType === PaymentType.FLAT_RATE) {
this.cost = (householdControlService.household.flatRateTariff * Math.ceil(this.elapsedTime / (86400*3))).toFixed(2);
}
else {
this.cost = (simulationControlService.totalEnergy * systemParametersService.systemParameters.tariff).toFixed(2);
}
//this.householdControlService.setTotalCostIncurred(parseInt(this.cost));
this.happinessScore = simulationControlService.happinessScore;
this.powerUsage = simulationControlService.powerUsage;
if (simulationControlService.isGameOver) {
dialog.open(AlertDialogComponent, {
disableClose: true,
data: {
title: 'Game Over',
content: 'Please restart the game.'
}
}).afterClosed().subscribe(result => {
window.location.href = '/';
});
}
this.currentPower = this.simulationControlService.isShutdown? '0.00': houseSettingService.getPower().toFixed(2);
if (code === -1) {
this.openAlertDialog('30 Days Simulation Complete.')
paymentService.repay();
}
});
paymentService.observable().subscribe(bill => {
this.isPrepaid = paymentService.paymentType === PaymentType.PREPAID;
this.balance = (paymentService.balance * (simulationControlService.isSimulating? 1: 10)).toFixed(2);
this.currentPower = this.simulationControlService.isShutdown? '0.00': houseSettingService.getPower().toFixed(2);
if (bill === 0) {
return;
}
this.openPaymentDialog(bill);
})
afterSimulationService.observable().subscribe(message => {
if (message === 0) {
return;
}
this.currentPower = this.houseSettingService.getPower().toFixed(2);
if (message instanceof Array) {
this.openAlertDialog(message[0], true);
}
else {
this.openAlertDialog(message);
}
});
}
deposit(amount: number) {
if (amount < 0) {
return;
}
if (!this.simulationControlService.isSimulating) {
return;
}
this.paymentService.deposit(amount);
}
openPaymentDialog(bill) {
this.dialog.open(PaymentDialogComponent, {
disableClose: true,
data: {
current: bill.current,
remain: bill.remain
}
}).afterClosed().subscribe(amount => {
if (amount > this.householdControlService.household.cashBox) {
this.openPaymentDialog(bill);
this.openAlertDialog('Not enough cash.');
return;
}
if (amount < 0) {
this.openAlertDialog('Invalid amount.');
return;
}
this.paymentService.payHouseholdBill(amount);
this.totalpaid += amount;
});
}
openAlertDialog(message, income=false) {
const dialogRef = this.dialog.open(AlertDialogComponent, {
disableClose: true,
data: {
title: message,
content: ''
}
});
if (!income) {
return;
}
dialogRef.afterClosed().subscribe(() => {
this.householdControlService.receiveMonthlyIncome();
this.openAlertDialog('Income Received.');
});
}
private roomNumberByName(name: string): number {
switch(name) {
case 'room0':
return 0;
case 'room1':
return 1;
case 'room2':
return 2;
case 'room3':
return 3;
default:
return 0;
}
}
applianceOnClick(room, index) {
if (this.sellingMode) {
this.sellAppliance(room, index);
}
else {
this.switchAppliance(room, index);
}
}
switchAppliance(room, index) {
this.roomSetting[room][index].on = !this.roomSetting[room][index].on;
this.houseSettingService.setRoomSetting();
this.currentPower = this.houseSettingService.getPower().toFixed(2);
}
sellAppliance(room, index) {
this.dialog.open(ConfirmationDialogComponent, {
disableClose: true,
data: {
title: 'SELL PRODUCT',
content: `You\'re about to sell this product for $${this.houseSettingService.checkSellPrice(room, index)}, are you sure you want to do this?`,
image: this.roomSetting[room][index].image
}
}).afterClosed().subscribe(result => {
if (result) {
this.houseSettingService.sellAppliance(room, index);
this.currentPower = this.houseSettingService.getPower().toFixed(2);
}
});
}
ready() {
this.householdControlService.ready();
}
}
.page {
width: 100vw;
height: 100vh;
background: linear-gradient(180deg, #2E476A, #BFEFFD);
padding: 15px;
min-width: 1024px;
min-height: 768px;
}
.paddingset {
padding: 15px;
}
.household-name {
padding-left: 15px;
color: aliceblue;
margin: 0;
}
/*
.room {
background-image: url(../../assets/images/household-room.svg);
background-size: 100%;
background-position: center;
background-repeat: no-repeat;
margin: 15px;
}
*/
.sell-switch {
background-color: #005E68;
color: aliceblue;
border-top: 30px solid #005E68;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
}
.room-cell-top-left {
background-image: url(../../assets/images/wood-texture.png);
border-top: 10px solid #005E68;
border-left: 10px solid #005E68;
border-bottom: 5px solid #037E8C;
border-right: 5px solid #037E8C;
}
.room-cell-top-right {
background-image: url(../../assets/images/wood-texture.png);
border-top: 10px solid #005E68;
border-right: 10px solid #005E68;
border-bottom: 5px solid #037E8C;
border-left: 5px solid #005E68;
}
.room-cell-bottom-left {
background-image: url(../../assets/images/wood-texture.png);
border-bottom-left-radius: 30px;
border-top: 5px solid #005E68;
border-right: 5px solid #037E8C;
border-bottom: 10px solid #005E68;
border-left: 10px solid #005E68;
}
.room-cell-bottom-right {
background-image: url(../../assets/images/wood-texture.png);
border-bottom-right-radius: 30px;
border-top: 5px solid #005E68;
border-left: 5px solid #005E68;
border-bottom: 10px solid #005E68;
border-right: 10px solid #005E68;
}
.ready, .power-usage, .overview {
background-color: lightgray;
margin: 15px;
border-radius: 10px;
}
.ready-status {
margin: 0;
}
.ready-btn {
background-color: #037E8C;
color: white;
border-radius: 5px;
}
.value {
width: 100px;
margin: 0px 10px;
font-weight: 700;
}
.section-title {
margin: 0;
margin-left: 5px;
}
.overview .stats {
border: 1px solid white;
border-radius: 5px;
margin: 2px;
}
.system-report-btn {
background-color: #037E8C;
width: 50px;
border-radius: 30px;
margin-top: -10px;
}
.system-report-btn img {
height: 95%;
}
.stats-img {
width: 65%;
max-height: 50px;
}
.ready-status, .overview-title {
margin: 0;
}
.overview-title {
color: dimgray;
}
.deposit-btn {
background-color: firebrick;
color: white;
border-radius: 30px;
width: 50px;
}
.deposit-input {
width: 50px;
}
.deposit-confirm {
background-color: #037E8C;
color: aliceblue;
border: 0px;
}
.sidenav {
width: 100vw;
height: 100vh;
border: 1px solid rgba(0, 0, 0, 0.5);
}
.sidenav-btn {
display: flex;
height: 100%;
align-items: center;
justify-content: center;
}
.sidenav-btn img {
height: 80%;
margin-top: 7px;
}
.sidenav-content {
width: 45%;
padding: 20px;
background-color: lightgray;
}
<md-sidenav-container fxFlexFill class="sidenav">
<md-sidenav #sidenav align="end" class="sidenav-content">
<appliance-store></appliance-store>
</md-sidenav>
<div fxLayout="row" fxFlexFill class="page-background">
<div fxLayout="column" fxFlexFill fxFlex="55">
<div fxLayout="row" fxFlex="10" class="paddingset">
<h1 fxFlex="60" class="household-name">{{household.name}}</h1>
<div fxFlex="40" class="sidenav-btn" fxLayoutAlign="end center">
<button md-fab (click)="sidenav.open()">
<img src="../../assets/images/cart-icon.svg">
</button>
</div>
</div>
<div fxLayout="row" fxFlex="25" class="paddingset">
<img fxFlex="95" fxFlexAlign="end" src="../../assets/images/household-house.svg">
<happiness-score fxFlex="5"s [score]="happinessScore"></happiness-score>
</div>
<div fxLayout="column" fxFlexFill fxFlex="65" class="paddingset rooms">
<div fxLayout="row" fxFlex="5" fxLayoutAlign="end end" class="sell-switch">
<div fxFlex="20" fxFlexFill fxLayoutAlign="center end">
<md-slide-toggle labelPosition="before" fxLayoutAlign="end center" class="toggle-switch" color="accent" [(ngModel)]="sellingMode">sell mode</md-slide-toggle>
</div>
</div>
<div fxLayout="row" fxFlex>
<div fxLayout="row" fxFlex fxLayoutWrap class="room-cell-top-left" id="room0" [dragula]='"room-bag"' [dragulaModel]="roomSetting[0]">
<appliance-item fxFlex=33 *ngFor="let item of roomSetting[0]; let i = index;" [item]="item" [selling]="sellingMode" (click)="applianceOnClick(0, i)"></appliance-item>
</div>
<div fxLayout="row" fxFlex fxLayoutWrap class="room-cell-top-right" id="room1" [dragula]='"room-bag"' [dragulaModel]="roomSetting[1]">
<appliance-item fxFlex=33 *ngFor="let item of roomSetting[1]; let i = index;" [item]="item" [selling]="sellingMode" (click)="applianceOnClick(1, i)"></appliance-item>
</div>
</div>
<div fxLayout="row" fxFlex>
<div fxLayout="row" fxFlex fxLayoutWrap class="room-cell-bottom-left" id="room2" [dragula]='"room-bag"' [dragulaModel]="roomSetting[2]">
<appliance-item fxFlex=33 *ngFor="let item of roomSetting[2]; let i = index;" [item]="item" [selling]="sellingMode" (click)="applianceOnClick(2, i)"></appliance-item>
</div>
<div fxLayout="row" fxFlex fxLayoutWrap class="room-cell-bottom-right" id="room3" [dragula]='"room-bag"' [dragulaModel]="roomSetting[3]">
<appliance-item fxFlex=33 *ngFor="let item of roomSetting[3]; let i = index;" [item]="item" [selling]="sellingMode" (click)="applianceOnClick(3, i)"></appliance-item>
</div>
</div>
</div>
</div>
<div fxLayout="column" fxFlexFill fxFlex="45">
<div fxLayout="row" fxFlex="15" class="paddingset ready">
<div fxFlex="25">
<analog-clock [initTime]="initialTime" [elapsedTime]="elapsedTime"></analog-clock>
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="40" fxLayoutAlign="center center">
<h4 class="ready-status"><span class="value">{{readyCount}}</span> of <span class="value">{{systemParameters.numberOfHouseholds}}</span> users <span class="value">is</span> ready</h4>
</div>
<div fxFlex="60" fxLayoutAlign="center end">
<button md-raised-button class="ready-btn" (click)="ready()">I'm Ready!</button>
</div>
</div>
</div>
<div fxFlex class="paddingset power-usage">
<h3 class="section-title">Load Profile</h3>
<combo-chart [powerUsage]="powerUsage" [currentTime]="initialTime+elapsedTime"></combo-chart>
</div>
<div fxLayout="column" fxFlex class="paddingset overview">
<div fxLayout="row" fxFlex="5vh">
<h3 fxFlex="60" class="section-title">Household Overview</h3>
<div fxFlex="40" fxLayoutAlign="end center">
</div>
</div>
<div *ngIf="isPrepaid" fxLayout="row" fxFlex="4vh" class="deposit" fxLayoutAlign="space-between">
<div fxFlexOffset="25" fxFlex="22" fxLayoutAlign="space-between">
<button class="deposit-btn" (click)="deposit(5)">5</button>
<button class="deposit-btn" (click)="deposit(10)">10</button>
</div>
<div fxLayoutAlign="space-around">
<input type="number" class="deposit-input" [(ngModel)]="depositAmount" />
<button class="deposit-confirm" (click)="deposit(depositAmount)">Deposit</button>
</div>
<span class="value" fxFlexAlign="center">$ {{balance}}</span>
</div>
<div fxLayout="row" fxFlex="1 1 auto">
<div fxLayout="row" fxFlex="50" class="stats">
<div fxFlex="25" fxLayoutAlign="center center">
<img class="stats-img" src="../../assets/images/cashbox-icon.svg">
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="50" fxLayoutAlign="center center">
<h4 class="overview-title">Cash Box</h4>
</div>
<div fxFlex="50" fxLayoutAlign="center center">
<h4>$<span class="value">{{household.cashBox.toFixed(2)}}</span></h4>
</div>
</div>
</div>
<div fxLayout="row" fxFlex="50" class="stats">
<div fxFlex="25" fxLayoutAlign="center center">
<img class="stats-img" src="../../assets/images/communityfund-icon.svg">
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="50" fxLayoutAlign="center center">
<h4 class="overview-title">Community fund</h4>
</div>
<div fxFlex="50" fxLayoutAlign="center center">
<h4>$<span class="value">{{communityCashBox}}</span></h4>
</div>
</div>
</div>
</div>
<div fxLayout="row" fxFlex="1 1 auto">
<div fxLayout="row" fxFlex="50" class="stats">
<div fxFlex="25" fxLayoutAlign="center center">
<img class="stats-img" src="../../assets/images/energyuse-icon.svg">
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="50" fxLayoutAlign="center center">
<h4 class="overview-title">Energy Use</h4>
</div>
<div fxFlex="50" fxLayoutAlign="center center">
<h4><span class="value">{{totalEnergy}}</span>kWh</h4>
</div>
</div>
</div>
<div fxLayout="row" fxFlex="50" class="stats">
<div fxFlex="25" fxLayoutAlign="center center">
<img class="stats-img" src="../../assets/images/cost-icon.svg">
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="50" fxLayoutAlign="center center">
<h4 class="overview-title">Total Cost</h4>
</div>
<div fxFlex="50" fxLayoutAlign="center center">
<h4>$<span class="value">{{cost}}</span></h4>
</div>
</div>
</div>
</div>
<div fxLayout="row" fxFlex="1 1 auto">
<div fxLayout="row" fxFlex="50" class="stats">
<div fxFlex="25" fxLayoutAlign="center center">
<img class="stats-img" src="../../assets/images/currentpower-icon.svg">
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="50" fxLayoutAlign="center center">
<h4 class="overview-title">Current Power</h4>
</div>
<div fxFlex="50" fxLayoutAlign="center center">
<h4><span class="value">{{currentPower}}</span>kW</h4>
</div>
</div>
</div>
<div fxLayout="row" fxFlex="50" class="stats">
<div fxFlex="25" fxLayoutAlign="center center">
<img class="stats-img" src="../../assets/images/maxpower-icon.svg">
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="50" fxLayoutAlign="center center">
<h4 class="overview-title">Max Power</h4>
</div>
<div fxFlex="50" fxLayoutAlign="center center">
<h4><span class="value">{{maxPower}}</span>kW</h4>
</div>
</div>
</div>
</div>
<div fxLayout="row" fxFlex="1 1 auto">
<div fxLayout="row" fxFlex="50" class="stats">
<div fxFlex="25" fxLayoutAlign="center center">
<img class="stats-img" src="../../assets/images/cashbox-icon.svg">
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="50" fxLayoutAlign="center center">
<h4 class="overview-title">Income</h4>
</div>
<div fxFlex="50" fxLayoutAlign="center center">
<h4><span class="value">{{incomeM}}</span>$</h4>
</div>
</div>
</div>
<div fxLayout="row" fxFlex="50" class="stats">
<div fxFlex="25" fxLayoutAlign="center center">
<img class="stats-img" src="../../assets/images/cashbox-icon.svg">
</div>
<div fxLayout="column" fxFlex>
<div fxFlex="50" fxLayoutAlign="center center">
<h4 class="overview-title">Outstanding Bill</h4>
</div>
<div fxFlex="50" fxLayoutAlign="center center">
<h4><span class="value">{{(cost-totalpaid).toFixed(2)}}</span>$</h4>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

Instead initializing incomeM = 0 make it incomeM: any;

Related

Line between divs

I want to draw a line between div, but can't figure out how to make <hr> take the length of the main div
Maybe there is some other solution?
I use react and semantic ui comments
create comment block:
const CommentWithReply: FunctionComponent<ICommentProps> = ({ author, createdAt, text, replies }) => (
<div className={styles.comment}>
<BasicComment createdAt={createdAt} text={text} author={author} />
<hr className={styles.hr}></hr>
<div className="comments">
{replies.map(e => (
<CommentWithReply
replies={e.comments}
author={e.author}
createdAt={e.createdAt}
text={e.text}
/>
))}
</div>
</div>
);
Basic comment
const BasicComment: FunctionComponent<IBasicCommentProps> = ({ createdAt, text, author }) => (
<div className={styles.commentInfo}>
<div className={styles.commentAuthor}>
<a href="/" className="avatar">
<img alt="avatar" src="https://i.imgur.com/LaWyPZF.png" />
</a>
<a href="/" className="author">
{author.lastName}
{' '}
{author.lastName}
</a>
<DividerSvg />
<div className="metadata">
<span className="date">{ moment(createdAt).fromNow() }</span>
</div>
</div>
<div className="content">
<div className="text">
{ text }
</div>
<div className="actions">
<DarkBorderButton className={styles.btnReplay} content="Reply" />
</div>
</div>
</div>
);
styles.scss
.comment {
margin-top: 1.25em;
border: 2px solid red;
box-sizing: border-box;
border-radius: 10px;
&:only-child {
&:last-child {
.hr {
visibility: visible;
display: flex;
width: 100%;
}
border: none;
}
}
&:last-child {
margin-bottom: -2em;
.hr {
display: none;
}
&:last-child {
}
}
}
main:
const CommentsFeed: FunctionComponent<ICommentProps> = ({ comments }) => (
<div className={styles.main}>
<p className={styles.commentCounter}> Discussion (58) </p>
<form className="ui reply form">
<div className="field">
<textarea placeholder="Add to the discussion..." />
</div>
<DarkBorderButton className={styles.buttonSend} content="Send" />
</form>
<div className="ui comments">
<div className="comment">
{comments.map(comment => (
<CommentWithReply
createdAt={comment.createdAt}
text={comment.text}
author={comment.author}
replies={comment.comments}
/>
))}
</div>
</div>
</div>
);

Adding iron-resize to elements within a vaadin-split-layout element

I am using a vaadin-split-layout element to split the screen vertically.
I have the following as part of the style for my application.
.flex-horizontal {
#apply(--layout-horizontal);
}
.flex-vertical {
#apply(--layout-vertical);
}
.flexchild {
#apply(--layout-flex);
}
The following is the vaadin-split-layout. The easymetahub-d3-graph supports the IronResizeableBehavior. I need the elements with the id of thetop and d3graphcontainer to rrespond to the iron resize behavior so the the easymetahub-d3-graph responds to the iron resize in the vaadin-split-layout.
<vaadin-split-layout orientation="vertical">
<div id="thetop" class="card flexchild">
<vaadin-horizontal-layout>
<div class="flex-vertical" style="margin-top: 20px; margin-bottom: 70px;">
<paper-icon-button class="command" id="changeButton" title="Save changes" icon="save" disabled$="[[!changelog.length]]" on-tap="openSaveChanges"></paper-icon-button>
<paper-icon-button class="command" title="Harvest Data" src="images/app-icon-32.png" on-tap="openHarvestData"></paper-icon-button>
<paper-icon-button class="command" title="Monitor Harvests" icon="watch-later" on-tap="openMonitorHarvest"></paper-icon-button>
<div class="flexchild"></div>
<div class="rootnode">Root</div>
<div class="dependentnode">Dependent</div>
<div class="referencenode">Reference</div>
<div class="unassignednode">Unassigned</div>
</div>
<div id="d3graphcontainer" style="width: 100%; height: 50vh; min-height: 300px;">
<easymetahub-d3-graph graph="[[result]]" selected-node="{{entitydetail}}" selected-link="{{selectedLink}}" changelog="{{changelog}}" class="flex-vertical"></easymetahub-d3-graph>
</div>
</vaadin-horizontal-layout>
</div>
<iron-pages id="ip" selected="0">
<no-detail></no-detail>
<entity-display entitydetail="{{entitydetail}}" changelog="{{changelog}}"></entity-display>
<link-detail linkdetail="{{selectedLink}}"></link-detail>
</iron-pages>
</vaadin-split-layout>
What am I missing?
I found a solution. I put a vaadin-split-layout within the top part of the split.
<vaadin-split-layout orientation="vertical" style="height: 100%;">
<vaadin-split-layout orientation="horizontal" style="height: 50%; min-height: 100px;">
<iron-resize-div id="sidebar" class="flex-vertical"v style="min-width: 85px; max-width: 85px;">
<paper-icon-button style="width: 85px;" class="command" id="changeButton" title="Save changes" icon="save" disabled$="[[!changelog.length]]" on-tap="openSaveChanges"></paper-icon-button>
<paper-icon-button style="width: 85px;" class="command" title="Harvest Data" src="images/app-icon-32.png" on-tap="openHarvestData"></paper-icon-button>
<paper-icon-button style="width: 85px;" class="command" title="Monitor Harvests" icon="watch-later" on-tap="openMonitorHarvest"></paper-icon-button>
<div style="width: 85px;" class="flexchild"></div>
<div class="rootnode" style="width: 85px;">Root</div>
<div class="dependentnode" style="width: 85px;">Dependent</div>
<div class="referencenode" style="width: 85px;">Reference</div>
<div class="unassignednode" style="width: 85px;">Unassigned</div>
</iron-resize-div>
<easymetahub-d3-graph graph="[[result]]" selected-node="{{entitydetail}}" selected-link="{{selectedLink}}" changelog="{{changelog}}" class="flex-vertical"></easymetahub-d3-graph>
</vaadin-split-layout>
With the following as the iron-resize-div
"use strict";
import {html, PolymerElement} from '#polymer/polymer/polymer-element.js';
import {mixinBehaviors} from '#polymer/polymer/lib/legacy/class.js';
import {IronResizableBehavior} from '#polymer/iron-resizable-behavior/iron-resizable-behavior.js';
/**
* #customElement
* #polymer
*/
class IronResizeDiv extends mixinBehaviors([IronResizableBehavior], PolymerElement) {
static get template() {
return html`
<style>
:host {
display: block;
height: 100%;
width: 100%;
}
.general {
width: 98%;
height: 98%;
}
</style>
<div class="general">
<slot></slot>
</div>
`;
}
static get properties() {
return {
};
}
connectedCallback() {
super.connectedCallback();
this.addEventListener('iron-resize', this.onIronResize.bind(this));
}
onIronResize() {
this.width = this.offsetWidth;
this.height = this.offsetHeight;
this.notifyResize();
}
}
window.customElements.define('iron-resize-div', IronResizeDiv);
The content within the top of the vertical split now works like I want it to.

binding the data from component in HTML page : Angular 6

I'm new to angular 6 so please. I have my component.ts where i'm having my response. Now I want to bind data based on filter value in my HTML page. That is when the user clicks on the Owner Name. Now I want to display the owner name on the top right corner of my HTML page. How can I achieve that?
Here is how my HTML page looks like.
My component.ts page looks like this:
import { CampaignService } from './../../../services/campaign.service';
import { Component, OnInit, Input } from '#angular/core';
#Component({
selector: 'home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
constructor(private campaignService : CampaignService) { }
Time :any;
campaigns :any;
filter;
show:boolean = false ;
ngOnInit(){
setInterval(() => {
this.Time = Date.now()
}, 1000);
this.campaignService.CampaignsInfo()
.subscribe(response=>{
this.show = false;
this.campaigns = response;
});
}
filterByOwnr(val){
if(val != null)
{
this.show=true;
}
else
{
this.show=false;
}
this.filter = val;
}
}
and my HTML page looks like this:
<campaign-header></campaign-header>
<div class="container-fluid date-time sticky-top">
<div class="container">
<div class="d-flex justify-content-end" style="margin-top: -16px;">
<span id="date_time"><i class="zmdi zmdi-calendar-check zmdi-hc-fw"></i> {{Time | date}} <i class="zmdi zmdi-time zmdi-hc-fw"></i> {{ Time | date:'mediumTime' }} </span>
</div>
</div>
</div>
<br>
<!-- content -->
<div class="container">
<h3>Campaigns</h3>
<div class="clearfix"></div>
<div class="row">
<div class="col-sm-12">
<div class="card campaign border-top wrap mt-4">
<br>
<div class="card-body table-responsive">
<table class="table table-hover mb-0 ">
<thead>
<tr>
<th class="border-top-0">CAMPAIGN </th>
<th class="border-top-0">STATUS</th>
<th class="border-top-0">DIALED</th>
<th class="border-top-0">OWNERS</th>
<th class="border-top-0"> <span class="invisible">Action</span></th>
<th></th>
<!-- <button mat-button color="primary" routerLink="/campaign-details">CampaignDetails</button> -->
</tr>
</thead>
<tbody>
<tr *ngFor="let campaign of campaigns?.result | filter : 'OWNERS' : filter;">
<td style="max-width:280px">
<p>{{campaign.CampaignName}}</p>
<small>{{campaign.DepartmentName}}</small>
</td>
<td>
<small class="text-info">Active</small>
</td>
<td>
<p>{{campaign.Dialed}} / <small>1500000</small></p>
<div class="progress mt-2 w-75">
<div class="progress-bar bg-info" role="progressbar" style="width: 90%;" aria-valuenow="90" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
<td>
<span class="badge badge-pill badge-secondary cursor" (click)="filterByOwnr(campaign.CampaignName)"> {{ campaign.CampaignName }} </span>
<a (click)="filterByOwnr()" *ngIf=show style="position: relative; left: -16px; top: -1px; color: #fff; font-size: 8px; border: 1px solid #fff; border-radius: 15px; font-weight: bold; cursor: pointer; "><i class="zmdi zmdi-close zmdi-hc-fw"></i> </a>
</td>
<td class="ml-0 pl-0">
<a [routerLink]="['/campaign-details' , campaign.Id]" [queryParams]="{ CampaignName : campaign.CampaignName , SubCampaign : campaign.SubCampaign, DepartmentName : campaign.DepartmentName }"><img src="../../assets/Images/next.png" class="next" /></a>
<a (click)="filterByOwnr()" *ngIf=show class="close_icon"><i class="zmdi zmdi-close zmdi-hc-fw"></i> </a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<br>
</div>
import { CampaignService } from './../../../services/campaign.service';
import { Component, OnInit, Input } from '#angular/core';
#Component({
selector: 'home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
constructor(private campaignService : CampaignService) { }
Time :any;
campaigns :any;
filter;
show:boolean = false ;
selectedOwner:string;
ngOnInit(){
setInterval(() => {
this.Time = Date.now()
}, 1000);
this.campaignService.CampaignsInfo()
.subscribe(response=>{
this.show = false;
this.campaigns = response;
});
}
filterByOwnr(val){
if(val != null)
{
this.selectedOwner = val;
this.show=true;
}
else
{
this.show=false;
}
this.filter = val;
}
}
<campaign-header></campaign-header>
<div class="container-fluid date-time sticky-top">
<div class="container">
<div class="d-flex justify-content-end" style="margin-top: -16px;">
<span id="date_time"><i class="zmdi zmdi-calendar-check zmdi-hc-fw"></i> {{Time | date}} <i class="zmdi zmdi-time zmdi-hc-fw"></i> {{ Time | date:'mediumTime' }} </span>
</div>
</div>
</div>
<br>
<!-- content -->
<div class="container">
<h3>Campaigns</h3>
<div class="clearfix"></div>
<div class="row">
<div class="col-sm-12">
<div class="card campaign border-top wrap mt-4">
<br>
<div class="card-body table-responsive">
<span class="badge badge-pill badge-secondary" *ngIf="selectedOwner && show"> {{selectedOwner}} </span> <a (click)="filterByOwnr()" *ngIf=show style="position: relative; left: -16px; top: -1px; color: #fff; font-size: 8px; border: 1px solid #fff; border-radius: 15px; font-weight: bold; cursor: pointer; "><i class="zmdi zmdi-close zmdi-hc-fw"></i> </a>{{selectedOwner}}</span>
<table class="table table-hover mb-0 ">
<thead>
<tr>
<th class="border-top-0">CAMPAIGN </th>
<th class="border-top-0">STATUS</th>
<th class="border-top-0">DIALED</th>
<th class="border-top-0">OWNERS</th>
<th class="border-top-0"> <span class="invisible">Action</span></th>
<th></th>
<!-- <button mat-button color="primary" routerLink="/campaign-details">CampaignDetails</button> -->
</tr>
</thead>
<tbody>
<tr *ngFor="let campaign of campaigns?.result | filter : 'OWNERS' : filter;">
<td style="max-width:280px">
<p>{{campaign.CampaignName}}</p>
<small>{{campaign.DepartmentName}}</small>
</td>
<td>
<small class="text-info">Active</small>
</td>
<td>
<p>{{campaign.Dialed}} / <small>1500000</small></p>
<div class="progress mt-2 w-75">
<div class="progress-bar bg-info" role="progressbar" style="width: 90%;" aria-valuenow="90" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
<td>
<span class="badge badge-pill badge-secondary cursor" (click)="filterByOwnr(campaign.CampaignName)"> {{ campaign.CampaignName }} </span>
<a (click)="filterByOwnr()" *ngIf=show style="position: relative; left: -16px; top: -1px; color: #fff; font-size: 8px; border: 1px solid #fff; border-radius: 15px; font-weight: bold; cursor: pointer; "><i class="zmdi zmdi-close zmdi-hc-fw"></i> </a>
</td>
<td class="ml-0 pl-0">
<a [routerLink]="['/campaign-details' , campaign.Id]" [queryParams]="{ CampaignName : campaign.CampaignName , SubCampaign : campaign.SubCampaign, DepartmentName : campaign.DepartmentName }"><img src="../../assets/Images/next.png" class="next" /></a>
<a (click)="filterByOwnr()" *ngIf=show class="close_icon"><i class="zmdi zmdi-close zmdi-hc-fw"></i> </a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<br>
</div>
Here I am assuming you can only filter on one owner at a time, from the code that is what it looks like. If you can filter on multiple you would obviously have to store the selected in an array. Also not sure where you would be clearing the owner, but wherever you do that you then also would want to clear the selected owner string or array.
Initialize a class property which hold the selected owner name
public selectedOwnerName: string = '';
Make the owner's section as
<td>
<span class="badge badge-pill badge-secondary cursor" (click)="selectedOwnerName = campaign?.CampaignName"> {{ campaign?.CampaignName }}
<a *ngIf="selectedOwnerName == campaign?.CampaignName" style="position: relative; left: -16px; top: -1px; color: #fff; font-size: 8px; border: 1px solid #fff; border-radius: 15px; font-weight: bold; cursor: pointer; "><i class="zmdi zmdi-close zmdi-hc-fw"></i> </a>
</span>
</td>
No need to use a filterByOwnr() method to set values, you can set the value to the class property directly on the click. Use the class property {{selectedOwnerName}} (find the appropriate place to place this elem) in your HTML to display the selected owner.
As far as displaying anchor is concerned, you can use a check in the anchor tag to see if the selectedOwnerName matches with the owner name in the current for block.
Update
If you want to reset the list on click of anchor then you might want to stop the event propagation so that the event doesn't bubble up to span again.
<td>
<span class="badge badge-pill badge-secondary cursor" (click)="selectedOwnerName = campaign?.CampaignName"> {{ campaign?.CampaignName }} </span>
<a *ngIf="selectedOwnerName == campaign?.CampaignName" (click)="selectedOwnerName=""; $event.stopPropagation()" style="position: relative; left: -16px; top: -1px; color: #fff; font-size: 8px; border: 1px solid #fff; border-radius: 15px; font-weight: bold; cursor: pointer; "><i class="zmdi zmdi-close zmdi-hc-fw"></i> </a>
</td>

Chat UI in ionic 3

I have tried to create a chat UI. I’m having the trouble with the placement of chat bubbles. It is as
This is my HTML code
<ion-list no-lines class="msgbubble" *ngFor="let msg of messages">
<div class="innermsg left" *ngIf="userId != msg.id">
{{ msg.reply }}
</div>
<div class="innermsg right" *ngIf="userId == msg.id">
{{ msg.reply }}
</div>
</ion-list>
This is my scss code
.innermsg {
display: inline-block;
padding: 5px 10px;
margin: 5px;
font-weight: 500;
font-size: 16px;
border-radius: 15px;
margin-bottom: 5px;
}
.innermsg.left {
float: left;
background-color: #F1F0F0;
color: black;
}
.innermsg.right {
float: right;
//margin-right: 10%;
background-color: #0084FF;
color: white;
}
.msgbubble {
margin-bottom: 10px;
}
Can someone help me in displaying chat bubbles on after the another, but not in the same line as shown in above picture.
The HTML structure needs to change a bit, each chat bubble needs to take up a line and only the contents inside the line must have the formatting you have.
Like this:
<ion-list no-lines class="msgbubble" >
<ion-item *ngFor="let msg of messages">
<span [ngClass]="userId == msg.id ? 'innermsg right':'innermsg left'">{{ msg.reply }}</span>
</ion-item>
</ion-list>
Check the implementation here
Use flexbox, flex-direction: column, and give each person differing align-self values.
In Angular I think the syntax for the element would be:
<div [ngClass]="userId === msg.id ? 'me' : 'you'">{{msg.reply}}</div>
Here's an example with static elements:
.chat {
font-family: sans-serif;
display: flex;
flex-direction: column;
}
.message {
border-radius: 5px;
margin: 0.2em 0;
padding: 0.5em;
max-width: 50%;
}
.me {
align-self: flex-start;
background-color: blue;
color: white;
}
.you {
align-self: flex-end;
background-color: green;
color: white;
}
<div class="chat">
<div class="message me">Hello</div>
<div class="message you">Hello</div>
<div class="message me">How are you?</div>
<div class="message you">I'm fine</div>
<div class="message you">How about you?</div>
<div class="message me">I'm doing so amazingly you wouldn't believe all the things that are happening right now it would take up at least 50% of the width of the page to discuss all the things that I want to tell you.</div>
</div>
Here is my code for my chat app that I've been working on. You may be able to have some use from it.
<ion-list>
<div text-right *ngFor="let message of messages; let i = index; let first = first;">
<div *ngIf = "message.from == this.user">
<span *ngIf = "i==0" >
<ion-label stacked> {{message?.from}} </ion-label>
<p text-right> {{message?.msg}}</p>
</span>
<span *ngIf = "i>0 && message.from == messages[i-1].from" >
<p text-right> {{message?.msg}}</p>
</span>
<span *ngIf = "i>0 && message.from != messages[i-1].from" >
<ion-label stacked> {{message?.from}} </ion-label>
<p text-right> {{message?.msg}}</p>
</span>
</div>
<div *ngIf = "message.from != this.user">
<span *ngIf = "i==0" >
<ion-label stacked text-left> {{message?.from}} </ion-label>
<p text-left> {{message?.msg}}</p>
</span>
<span *ngIf = "i>0 && message.from == messages[i-1].from" >
<p text-left> {{message?.msg}}</p>
</span>
<span *ngIf = "i>0 && message.from != messages[i-1].from" >
<ion-label stacked text-left> {{message?.from}} </ion-label>
<p text-left> {{message?.msg}}</p>
</span>
</div>
</div>
</ion-list>

Removing Small White Space Under Footer

I've been searching around for a solution to the small sliver of white space which has appeared below my footer but nothing seems to work. I've tried manipulating margin-bottom and padding-bottom to no avail.
The website with the footer is located here: website
The footer in question has a class name of "footerWrapper" and i hope that using the browser DOM editor will give you a better picture of the situation then if i just posted incomplete code. I have tried for a long time to fix this and any suggestions are greatly appreciated.
EDIT: Added code below (I PHP 'included' alot of code, including my footer which created weird formatting. Could this be my problem?)
<body class="body1">
<div class="borderLine"></div>
<div class="banner"></div>
<div class="mainContent1">
<div class="header1">
<div class="headerContainer">
<div class="headerPanelOuter">
<div class="headerPanel">
<p class="panelWelcome">Welcome,
log in or sign up! </p>
<div class="panelButton" id="logInBut">
<span>log in</span>
</div>
<form name="LogOutForm" id="LogOutForm" method="post" action="/app/newstuff.php" style="z-index: 5;">
<div class="panelButton" style="top: 34px;" onclick="SubmitLogOutForm()">
<span>log out</span>
</div>
<input name="LogOutState" type="hidden" value="1">
</form>
<div class="panelButton" onclick="location.href='signup.php';" style="top: 64px;">
<span>sign up</span>
</div>
<div class="panelButton" onclick="location.href='useraccount.php';" style="left: 4px; width: 90px;">
<span>my account</span>
</div>
</div>
</div>
<img class="KELogo" src="/../../images/PRLogo(header).png" alt="Logo">
<img class="KETitleLogo" src="/../../images/KENameLogo(header32).png" alt="People\'s Robotics">
<div id="blackBackg" style="display: none;"></div>
<div id="LogInBox" style="display: none;">
<p id="logEscape" onclick="">x</p>
<p id="logInTitle">Log In</p>
<div id="linediv2"></div>
<form name="logInForm" id="logInForm" method="post" action="/app/newstuff.php" style="z-index: 5;">
<span id="emailField">E-mail:</span>
<br><input id="logEmail" type="text" style="height: 28px;" name="logEmail" value="" onfocus="inputFocus(this)" onblur="inputBlur(this)"> <br><br>
<span id="passField">Password:</span> <br>
<input id="logPass" type="password" style="height: 28px;" name="logPass" value="" onfocus="inputFocus(this)" onblur="inputBlur(this)"> <br><br>
<input id="logSubmit" type="submit" name="logSubmit" value="Log In">
</form>
</div>
<ul class="navList1">
<li><a id="B0" href="/app/newstuff.php" style="background-color: rgb(30, 96, 217); color: rgb(249, 249, 249);">New Stuff</a></li>
<li><a id="B1" href="/app/products.php">Products</a></li>
<li><a id="B2" href="/app/projects.php">Projects</a></li>
<li><a id="B3" href="/app/faq.php">FAQ</a></li>
<li><a id="B4" href="/app/cart.php">My Cart</a></li>
</ul>
</div>
</div>
<div class="content1">
<div id="NSDiv1">
<div id="NSContentContainer">
<section class="slider">
<div class="flexslider">
<ul class="slides">
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 1; display: block; z-index: 2;" class="flex-active-slide" data-thumb-alt="">
<img src="/images/sh3.jpg" alt="1" draggable="false">
</li>
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1;" data-thumb-alt="">
<img class="lazy" data-src="/images/sh1.jpg" alt="2" draggable="false" src="/images/sh1.jpg">
</li>
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1;" data-thumb-alt="">
<img class="lazy" data-src="/images/sh2.jpg" alt="3" draggable="false">
</li>
</ul>
<ol class="flex-control-nav flex-control-paging"><li>1</li><li>2</li><li>3</li></ol><ul class="flex-direction-nav"><li class="flex-nav-prev"><a class="flex-prev" href="#">Previous</a></li><li class="flex-nav-next"><a class="flex-next" href="#">Next</a></li></ul></div>
</section>
</div>
<div id="NSContentContainer" style=" top: 45px; left: 13px; width: 525px; height: 250px;z-index: 6;">
</div>
</div>
<!-------------------- DIV2----------------- -->
<div id="NSDiv2">
<div id="NSContentContainer" style="height: 250px;">
</div>
<div id="NSContentContainer" style=" top: 45px; left: 13px; width: 525px; height: 400px; ">
<section class="slider">
<div class="flexslider">
<ul class="slides">
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 1; display: block; z-index: 2;" class="flex-active-slide" data-thumb-alt="">
<img src="/images/sh2.jpg" alt="1" draggable="false">
</li>
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1;" data-thumb-alt="">
<img class="lazy" data-src="/images/sh3.jpg" alt="2" draggable="false" src="/images/sh3.jpg">
</li>
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1;" data-thumb-alt="">
<img class="lazy" data-src="/images/sh1.jpg" alt="3" draggable="false">
</li>
</ul>
<ol class="flex-control-nav flex-control-paging"><li>1</li><li>2</li><li>3</li></ol><ul class="flex-direction-nav"><li class="flex-nav-prev"><a class="flex-prev" href="#">Previous</a></li><li class="flex-nav-next"><a class="flex-next" href="#">Next</a></li></ul></div>
</section>
</div>
</div>
</div>
</div>
<div class="footerWrapper">
<div class="footerInnerContainer">
<div id="footerSection1">
<img id="smlFB" src="/../../images/trans.png" alt="logo">
<img id="smlTW" src="/../../images/trans.png" alt="logo">
<img id="smlIN" src="/../../images/trans.png" alt="logo">
<img id="smlYT" src="/../../images/trans.png" alt="logo">
<div id="fsm1">
</div><div id="fsm2">
</div><div id="fsm3">
</div>
</div><div id="footerSection2">
<!-- <img src="/../../images/mysterychest1.jpg" alt="0" style="position: absolute; left: 25px; top: 13px;">
<img src="/../../images/mysterychest(top2).png" alt="0" style="position: absolute; left: 25px; top: 4px;">-->
<!-- <span style="position: absolute; top: 175px; left: 100px; font-size: 16px;">Hobbiests serving Hobbiests</span>-->
</div><div id="footerSection3">
<form>
<span>Something to say?</span>
<textarea rows="5" cols="30" name="userMessage"> </textarea>
<span>Topic:</span>
<select>
<option>Bug report</option>
<option>Suggestions</option>
<option>Other</option>
</select>
<span>Email Address:</span>
<input type="text" name="UserEmail">
<input type="submit" value="Submit">
</form>
</div>
</div>
</div>
<link rel="stylesheet" href="/../FlexSlider/flexslider.css" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="/../FlexSlider/jquery.flexslider-min.js"></script>
<script>
$(window).load(function () {
$('.flexslider').flexslider({
touch: true,
slideshow: true,
controlNav: true,
directionNav : true,
slideshowSpeed: 6000,
animationSpeed: 600,
initDelay: 0,
pauseOnAction: true,
start: function(slider) { // fires when the slider loads the first slide
var slide_count = slider.count - 1;
$('.slides').on('click', function () {
$(this).siblings('.flex-direction-nav').children('li').children('a.flex-next').trigger('click');
});
$(slider)
.find('img.lazy:eq(0)')
.each(function() {
var src = $(this).attr('data-src');
$(this).attr('src', src).removeProp('data-src');
});
},
before: function (slider) { // fires asynchronously with each slider animation
var slides = slider.slides,
index = slider.animatingTo,
$slide = $(slides[index]),
$img = $slide.find('img[data-src]'),
current = index,
nxt_slide = current + 1,
prev_slide = current - 1;
$slide
.parent()
.find('img.lazy:eq(' + current + '), img.lazy:eq(' + prev_slide + '), img.lazy:eq(' + nxt_slide + ')')
.each(function () {
var src = $(this).attr('data-src');
$(this).attr('src', src).removeProp('data-src');
});
},
// default setting
after: function(slider) {
/* auto-restart player if paused after action */
if (!slider.playing) {
slider.play();
}
}
});
});
</script>
<script>
function checkUrl(url) {
switch (url) {
case "":
return 1;
break;
case "newstuff.php": //REMOVE THIS AFTER
return 1;
break;
case "products.php":
return 2;
break;
case "projects.php":
return 3;
break;
case "faq.php":
return 4;
break;
case "cart.php":
return 5;
break;
}
}
$(document).ready(function () {
var array = window.location.pathname.split('/');
var lastsegment = array[array.length - 1];
$("ul.navList1 > li:nth-child(" + checkUrl(lastsegment) + ") > a").css({ "background-color": "#1E60D9", "color": "#f9f9f9" });
$("#logInBut").click(function () {
$("#LogInBox").fadeIn(1000);
$("#blackBackg").fadeIn(1000);
});
$("#blackBackg").click(function () {
$("#LogInBox").fadeOut(1000);
$("#blackBackg").fadeOut(1000);
});
$("#logEscape").click(function () {
$("#LogInBox").fadeOut(1000);
$("#blackBackg").fadeOut(1000);
});
$(".panelButton").mouseenter(function () {
$("span", this).css("color", "#f9f9f9");
$(this).css("background-color", "transparent");
});
$(".panelButton").mouseleave(function () {
$("span", this).css("color", "#222423");
$(this).css("background-color", "#f9f9f9");
});
$("ul.navList1 > li").mouseenter(function () {
$("a", this).css({ "background-color": "#1B4DA9", "color": "#f9f9f9" }); //#1B4DA9 , #001E56
});
$("ul.navList1 > li").mouseleave(function () {
$("a", this).css({ "background-color": "transparent", "color": "#1e1e1e" });
var array = window.location.pathname.split('/');
var lastsegment = array[array.length - 1];
$("ul.navList1 > li:nth-child(" + checkUrl(lastsegment) + ") > a").css({ "background-color": "#1E60D9", "color": "#f9f9f9" });
});
});
function navButtonHighlight() {
var url = window.location.pathname;
if (url == "/Template.php") {
document.getElementById("LogOutForm")
}
}
function SubmitLogOutForm() {
document.getElementById("LogOutForm").submit();
}
</script>
</body>
Well this is because of overflow, you need to use overflow:hidden in your css like this
.footerWrapper {
overflow:hidden;
}
It'll be all fine
Working Fine.
.footerInnerContainer{
display:block;
}
The above answers didn't work for me, but this did. Hope it helps somebody out.
.footerWrapper {
position: absolute;
bottom: -5px;
}