How does Meteor.js decide the order in which components are rendered? - meteor

I have the following code in Meteor.js written by someone else
<div>
<div> {{> yield region='tickets'}} </div>
<div> {{> yield region='ticketView'}} </div>
<div> {{> yield region='analytics'}} </div>
</div>
It works fine but I have an issue with the order in which those components are rendered. When that page is opened, the 'analytics' clearly loads/renders first, then once that is done the rest of it renders. I would like it to load/render in the order that the components are called.
Attaching template files to take a look at
region='tickets' ====> ticketsList (This should always load first)
region='ticketView' ====> ticket_view
region='analytics' ====> analytics
<template name="ticketsList">
<div id="tickets-list" class="tickets-list">
<div class="btn-group btn-group-justified">
<div class="btn-group btn-group-lg">
<button class="btn btn-primary {{unresolvedActive}}" id="unresolved">
Unresolved
<span class="label label-pill label-danger label-as-badge">{{ unresolvedTicketsCount }}</span>
</button>
</div>
<div class="btn-group btn-group-lg">
<button class="btn btn-primary {{resolvedActive}}" id="resolved">
Resolved
</button>
</div>
</div>
<div class="row m-t-sm">
<div class="col-xs-3">
{{> broadcast}}
</div>
<div class="col-xs-3" style="margin-left: 12px;">
<button class="btn btn-info" type="button" id="create-shift-report" style="
background-color: #278006;
border-color: #278006;
border-radius: 25px;
">
<span class="glyphicon glyphicon-plus" aria-hidden="true"
style="background-color: #278006; color: white"></span>
<i class="fa fa-folder-open fa-lg" aria-hidden="true"></i>
</button>
</div>
<div class="col-xs-5" style="float:right">
<button class="btn btn-info" type="button" id="create-ticket" style="
float: right !important;
background-color: #56cf1b;
border-color: #56cf1b;
border-radius: 25px;
">
<span class="glyphicon glyphicon-plus" aria-hidden="true"
style="background-color: #56cf1b; color: white"></span>
Create Ticket
</button>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-12" style="padding: 0px">
<div class="wrapper">
<input type="text" placeholder="Search ..." class="searchInput" id="searchQuery" name="search" />
<button type="submit" class="searchButton search-button">
{{#if isSearch}}
<i class="fa fa-times clearbutton" aria-hidden="true"></i>
{{/if}}
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
{{#if isSearch}}
<div class="row m-t-sm">
<div class="col-sm-12">
<div class="wrapper">
<i>
<h4>Search Results</h4>
</i>
</div>
</div>
</div>
{{/if}}
<div class="row m-t-sm">
<div class="col-sm-12">
<div class="wrapper">
<span style="font-style: italic;">Filter by department: </span>
<select class="ticket-department-filter" id="departmentFilter">
<option>All</option>
{{#each tags}}
<option value={{this.id}}>{{this.name}}</option>
{{/each}}
</select>
</div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-12">
<div class="wrapper">
<span style="font-style: italic;">Filter by source: </span>
<select class="ticket-department-filter" id="sourceFilter">
<option>All</option>
{{#each sourceFilter}}
<option>{{this}}</option>
{{/each}}
</select>
</div>
</div>
</div>
<div class="tickets scrollbar m-t-sm">
{{#if tickets.length}} {{#each tickets}} {{> ticketItem}} {{/each}} {{#if
showLoading}}
{{> LoadingNew }}
{{else}} {{#if noMore}}
<div class="alert alert-warning m-t-sm" style="text-align: center; vertical-align: middle; padding: 5px">
No more tickets available!
</div>
{{else}}
<div class="m-t-sm" style="text-align: center">
<button id="show-more" class="btn btn-primary"
style="width: 100px; background-color: #337ab7; border-color: #2e6da4">
Show More
</button>
</div>
{{/if}} {{/if}} {{else}} {{#if showLoading}} {{> LoadingNew }} {{else}}
<hr />
<h2 class="text-center" style="font-size: 14px">
<i>No outstanding tickets</i>
</h2>
<hr />
{{/if}} {{/if}}
</div>
</div>
{{> shiftReportModal}}
<div id="new-ticket-modal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" style="background-color: #83ccff">
<button type="button" class="close" data-dismiss="modal">
×
</button>
<h4 class="modal-title" style="text-align: center; color: #ffffff">
Create a New Ticket
</h4>
</div>
<form class="form-horizontal" id="create-ticket-form">
<div class="modal-body">
<div class="form-group">
<div class="col-sm-3"><label for="source">* Source</label></div>
<div class="col-sm-9">
<label class="radio-inline">
<input type="radio" name="source" id="call" value="call" />
Call
</label>
<label class="radio-inline">
<input type="radio" name="source" id="inPerson" value="in-person" />
In-Person
</label>
<label class="radio-inline">
<input type="radio" name="source" id="email" value="email" />
Email
</label>
<label class="radio-inline">
<input type="radio" name="source" id="dnd" value="dnd" />
DND
</label>
<label class="radio-inline">
<input type="radio" name="source" id="shift-report" value="shift-report" />
Shift Report
</label>
</div>
<div class="col-sm-3"></div>
<div class="col-sm-9">
<label class="radio-inline">
<input type="radio" name="source" id="soft-check-in" value="soft-check-in" />
Soft check-in
</label>
<label class="radio-inline">
<input type="radio" name="source" id="amenity" value="amenity" />
Amenity
</label>
<label class="radio-inline">
<input type="radio" name="source" id="request" value="request" />
Request
</label>
<label class="radio-inline">
<input type="radio" name="source" id="repair" value="repair" />
Repair
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3" for="guestName">Guest Name</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="guestName" name="guestName" />
</div>
<label for="autoFill">OR Auto-Fill </label>
<select id="autoFill" name="autofill">
<option value="-1">Select Guest</option>
{{#each pastGuests}}
<option value="{{ #index }}">
{{ receiverName }} ({{ roomNumber }})
</option>
{{/each}}
</select>
</div>
<div class="form-group">
<label class="col-sm-3" for="roomNumber">* Room #</label>
<div class="col-sm-9">
<input type="text" class="form-control" required id="roomNumber" name="roomNumber" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3" for="reservationNumber">Reservation #</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="reservationNumber" name="reservationNumber" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3" for="email">Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="emailAddress" name="emailAddress" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3" for="phoneNumber">Phone #</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="phoneNumber" name="phoneNumber" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3" for="notes">* Notes:</label>
<div class="col-sm-9">
<textarea type="text" class="form-control" required id="notes" name="notes" rows="3"></textarea>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="submit">Save</button>
<button type="button" class="btn btn-default" data-dismiss="modal">
Close
</button>
</div>
</form>
</div>
</div>
</div>
</template>
<template name="ticketView">
<div>
{{> ticketItemView}}
</div>
<div id="tickets-list" class="tickets-list ">
<div class="btn-group btn-group-justified">
{{#if oleryTabs}}
<div class="btn-group btn-group-lg">
<button class="btn1 email-btn {{resolvedActive}} {{#if noEmail}}simptip-position-top{{/if}}"
id="respondTab" style="background: #41e1eb;">
Respond
</button>
</div>
{{else}}
<div class="btn-group btn-group-lg">
<button class="btn1 email-btn {{resolvedActive}} {{#if noEmail}}simptip-position-top{{/if}}"
id="emailtab" disabled="{{noEmail}}"
data-tooltip="{{#if noEmail}}In-app communication unavailable for Custom Ticket{{/if}}">
Email
{{#unless noEmail}}<label class="counts">({{emailcount}})</label>{{/unless}}
</button>
</div>
<div class="btn-group btn-group-lg">
<button class="btn1 sms-btn {{resolvedActive}} {{#if noPhone}}simptip-position-top{{/if}}"
id="smstab" disabled="{{noPhone}}"
data-tooltip="{{#if noPhone}}In-app communication unavailable for Custom Ticket{{/if}}">
SMS
{{#unless noPhone}}<label class="counts">({{smscount}})</label>{{/unless}}
</button>
</div>
{{/if}}
<div class="btn-group btn-group-lg">
<button class="btn1 staff-btn {{unresolvedActive}}" id="staffnotestab">Notes
<label class="counts">({{staffcount}})</label>
</button>
</div>
</div>
</div>
<div id="show" style="display: none;">
<div class="comments">
{{> commentsList}}
</div>
<div class="comment-form">
{{> commentSubmit}}
</div>
</div>
<div id="show2" style="display: none;">
<div class="comments">
{{> sendEmailList}}
</div>
{{#unless noEmail}}
<div class="comment-form">
{{> sendemail}}
</div>
{{/unless}}
</div>
<div id="show3" style="display: none;">
<div class="comments">
{{> sendSmsList}}
</div>
{{#unless noPhone}}
<div class="comment-form">
{{#if isPhoneNumberExists}}
{{> sendsms}}
{{/if}}
{{> closesms}}
</div>
{{/unless}}
</div>
<div id="show4" style="display: none;">
<div class="comments">
<div class="panel panel-danger resolution-history" style="border-color: #41E1EB;">
<div class="panel-heading" style="background: #41e1eb; border-color: #41E1EB;">
<p>Respond directly on the review site.</p>
</div>
<div class="panel-body" style="max-height: none; border-color: #41E1EB;">
<p>
You can respond to this review using the link below. It will take you to the site's admin portal where you
can post a reply.
</p>
{{#if oleryIframe}}
<iframe src="{{oleryTabs.respond_url}}" style="width: 100%; height: 450px;"></iframe>
{{else}}
<a href="{{oleryTabs.respond_url}}" target="_blank">
{{oleryTabs.respond_url}}
</a>
{{/if}}
</div>
</div>
</div>
</div>
</template>
<template name="analytics">
<div class="panel panel-success analytics scrollbar ">
<div class="panel-heading">
<h2>Statistics</h2>
</div>
<div class="">
{{#if mobile}}
<div id="statistics-dashboard" style="border: 1px solid white">
<div class="row">
<button class="btn btn-primary {{overallActive}} col-xs-3" id="overall" style="border: 1px solid white; font-size: 8px; padding: 10px 0; text-align: center;">
{{#if smallMobile}}
<img src="/Overall_icon.png" style="height: 12px; width: 12px;">
{{else}}
<img src="/Overall_icon.png" style="height: 20px; width: 20px;">
{{/if}}
Overall
</button>
<button class="btn btn-primary {{teamActive}} col-xs-3" id="team" style="border: 1px solid white; font-size: 8px; padding: 10px 0; text-align: center;">
{{#if smallMobile}}
<img src="/Team_icon.png" style="height: 12px; width: 12px;">
{{else}}
<img src="/Team_icon.png" style="height: 20px; width: 20px;">
{{/if}}
Team
</button>
<button class="btn btn-primary {{resolutionActive}} col-xs-3" id="resolution" style="border: 1px solid white; font-size: 8px; padding: 10px 0; text-align: center;">
{{#if smallMobile}}
<img src="/Resolution_icon.png" style="height: 12px; width: 12px; padding: 0; margin: 0;">
{{else}}
<img src="/Resolution_icon.png" style="height: 20px; width: 20px;">
{{/if}}
Resolve
</button>
<button class="btn btn-primary {{shiftActive}} col-xs-3" id="shift" style="border: 1px solid white; font-size: 8px; padding: 10px 0; text-align: center;">
{{#if smallMobile}}
<img src="/Shifts_icon.png" style="height: 12px; width: 12px; padding: 0; margin: 0;">
{{else}}
<img src="/Shifts_icon.png" style="height: 20px; width: 20px;">
{{/if}}
Shift
</button>
</div>
</div>
{{else}}
<div id="statistics-dashboard">
<div class="btn-group btn-group-justified">
<div class="btn-group">
<button class="btn btn-primary {{overallActive}} col-md-3 col-xs-12" id="overall"
style="width: 100%; padding-left: 5px; border: 1px solid white; border-left: none; font-size: 12px; font-style: italic;">
<img src="/Overall_icon.png" style="height:20px; width: 20px;">
Overall
</button>
</div>
<div class="btn-group">
<button class="btn btn-primary {{teamActive}} col-md-3 col-xs-12" id="team"
style="width:90%; padding-left: 5px; border: 1px solid white; font-size: 12px; font-style: italic;">
<img src="/Team_icon.png" style="height: 20px; width: 20px;">
Team
</button>
</div>
<div class="btn-group">
<button class="btn btn-primary {{resolutionActive}} col-md-3 col-xs-12" id="resolution"
style="width: 125%; padding-left: 5px; margin-left: -10px; border: 1px solid white; font-size: 12px; font-style: italic;">
<img src="/Resolution_icon.png" style="height:20px; width:20px;">
Resolution
</button>
</div>
<div class="btn-group">
<button class="btn btn-primary {{shiftActive}} col-md-3 col-xs-12" id="shift"
style="width: 90%; padding-left: 5px; margin-left: 10px; border: 1px solid white; border-right: none; font-size: 12px; font-style: italic;">
<img src="/Shifts_icon.png" style="height:20px; width:20px;">
Shift
</button>
</div>
</div>
</div>
{{/if}}
</div>
{{#if overallActive}}
<div class="panel-body">
<div id="total-tickets">
{{> totalTickets}}
</div>
<div id="active-staff">
{{> activeStaff}}
</div>
</div>
{{/if}}
{{#if resolutionActive}}
<div class="panel-body">
<div id="tickets-graph">
{{> ticketsGraph}}
</div>
</div>
{{/if}}
{{#if shiftActive}}
<div class="panel-body">
{{> shiftStatistics }}
</div>
{{/if}}
{{#if teamActive}}
<div class="panel-body">
<div id="comment-stats">
{{> commentStats}}
</div>
<div id="department-stats">
{{> departmentStats}}
</div>
</div>
{{/if}}
</div>
</template>
Let me know if there is anything else I can provide to help! Can add the JS files if necessary. Any help would be much appreciated!

Related

Angular style not apply in forms

I am new for angular .I wrote below code and I expect below style format with my code but i can't achieve using my below code can some one help me to solve my issue.
home.component.html
<div class="card">
<form [formGroup]="userForm">
<div class="mt-5 box">
<div class="form-row">
<div class="col-md-12">
<div class="form-group mt-4">
<label>Type</label>
</div>
<div class="form-row" style="margin-top:-10px">
<div class="col">
<input type="text" formControlName="type" class="form-control" placeholder="Type">
</div>
</div>
</div>
<div class="col-md-12">
<div class="form-group mt-4">
<label>Session</label>
</div>
<div class="form-row" style="margin-top:-10px">
<div class="col">
<input type="text" formControlName="session" class="form-control" placeholder="Session">
</div>
</div>
</div>
<div class="form-row mt-4">
<div class="col-md-6">
<button type="button" class="btn btn-primary" (click)="addItem()">Add</button>&nbsp
</div>
<div class="col-md-6">
<button type="button" class="btn btn-primary" (click)="reset()">Reset</button>
</div>
</div>
</div>
</div>
</form>
<div class="col-md-8 mt-4 mb-4">
<table class="table table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of listData">
<td><span>{{item.type}}</span></td>
<td><span>{{item.session}}</span></td>
<td><button type="button" class="btn btn-primary" (click)="removeItems(item)">Remove</button></td>
</tr>
</tbody>
</table>
</div>
</div>
home.component.css
.box{
width: 50%;
border: 1px solid rgb(145, 138, 138);
border-radius: 25px;
padding: 0px 20px 20px 20px;
margin-left: 400px;
}
My Result
Expected
angular.json

Add button inside an Input Tag

I have created a login form. I want to show a text/button that says "FORGOT?" on the right side of the password field.
For reference you guys can open this site and click on login : https://www.adda247.com/
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<form>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<button class="form-control btn btn-info " style="background:#4568B2;height:40px">
<i class="fa fa-facebook"></i> Continue with Facebook
</button>
</div>
<br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12">
<button class="form-control btn btn-default" style="height:40px;border:2px solid black">
<i class="fa fa-google"></i> Continue with Google
</button>
</div>
<br><br><br>
<div class="col-md-5 col-sm-5 col-xs-5" ></div>
<div class="col-md-2 col-sm-2 col-xs-2" align="center"><b>OR</b></div>
<div class="col-md-5 col-sm-5 col-xs-5"></div><br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12">
<input type="text" name="name" class="form-control" style="height:40px;" placeholder="Email">
</div>
<br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12 form-group has-feedback">
<input type="text" name="pass" class="form-control" style="height:40px;" placeholder="Password">
<p class="form-control-feedback">Forgot?</p>
</div>
<br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12">
<button name="login" class="btn btn-warning form-control" style="height:40px;font-size:20px">Login</button>
</div>
<br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12">
<p align="center" style="font-size:16px">Don't Have an Account?
<span >SIgn Up</span>
</p>
</div>
</div>
</form>
Hope you can help me !
If I understood the question correct this is the solution?
You just have to manipulate the display arguments in your css
<div class="container">
<div class="col-md-12 col-sm-12 col-xs-12">
<button class="form-control btn btn-default" style="height:40px;border:2px solid black">
<i class="fa fa-google"></i> Continue with Google
</button>
</div>
<br><br><br>
<div class="col-md-5 col-sm-5 col-xs-5" ></div>
<div class="col-md-2 col-sm-2 col-xs-2"><b>OR</b></div>
<div class="col-md-5 col-sm-5 col-xs-5"></div><br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12">
<input type="text" name="name" class="form-control" style="height:40px;" placeholder="Email">
</div>
<br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12 form-group has-feedback">
<input type="text" name="pass" class="form-control" style="height:40px; width: 90%; display: inline-block" placeholder="Password">
<a class="form-control-feedback" style="display:inline-block; width:5%" href="#">Forgot?</a>
</div>
<br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12">
<button name="login" class="btn btn-warning form-control" style="height:40px;font-size:20px">Login</button>
</div>
<br><br><br>
<div class="col-md-12 col-sm-12 col-xs-12">
<p style="font-size:16px">Don't Have an Account?
<span >SIgn Up</span>
</p>
</div>
</div>
Add padding on password field padding-right: 80px
Set the password field container to position: relative then set "FORGOT?" hint to position: absolute and right: 1em (so that it's fixed to its righ) then design it as you want using CSS or bootstrap classes (you'll still need a bit of pure CSS, I used the same padding and height as the input in this example).
To avoid overlapping issues, I set a white background on the "FORGOT?" hint so any overlapping text is not shown (you could add it through the bg-white class as well) but you could set a padding-right on your <input> that equals the width of the "FORGOT?" hint.
.form-group.has-feedback {
position: relative;
}
.form-control-feedback {
position: absolute;
display: inline-block;
top: 1px;
right: 1em;
background: #fff;
bottom: 0;
margin: 0;
height: calc(1.5em + .75rem + 2px);
padding: .375rem .75rem;
border-radius: 3px;
}
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<form>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 mb-4">
<button class="form-control btn btn-info " style="background:#4568B2;height:40px">
<i class="fa fa-facebook"></i> Continue with Facebook
</button>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 mb-4">
<button class="form-control btn btn-default" style="height:40px;border:2px solid black">
<i class="fa fa-google"></i> Continue with Google
</button>
</div>
<div class="col-md-5 col-sm-5 col-xs-5 mb-4" ></div>
<div class="col-md-2 col-sm-2 col-xs-2 mb-4" align="center"><b>OR</b></div>
<div class="col-md-5 col-sm-5 col-xs-5 mb-4"></div>
<div class="col-md-12 col-sm-12 col-xs-12 mb-4">
<input type="text" name="name" class="form-control" style="height:40px;" placeholder="Email">
</div>
<div class="col-md-12 col-sm-12 col-xs-12 form-group has-feedback mb-4">
<input type="text" name="pass" class="form-control" style="height:40px;" placeholder="Password">
<p class="form-control-feedback">FORGOT?</p>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 mb-4">
<button name="login" class="btn btn-warning form-control" style="height:40px;font-size:20px">Login</button>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 mb-4">
<p align="center" style="font-size:16px">Don't Have an Account?
<span >SIgn Up</span>
</p>
</div>
</div>
</form>
I suggest you to not use <br> elements to create spaces between your items, bootstrap has classes for that (such has .mb-4 for example).
I have used the position relative and absolute method to move the button inside the input box.
Remove br and use mt- and mb- values to get spacing in bootstrap 4.
.form-group.has-feedback {
position: relative;
}
.form-control-feedback {
position: absolute;
top: 0;
right: 15px;
padding: 6px 8px 9px 8px;
display: inline-block;
}
.form-group.has-feedback .form-control {
padding: 0 70px 0 0;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<form>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 mb-3">
<button class="form-control btn btn-info " style="background:#4568B2;height:40px">
<i class="fa fa-facebook"></i> Continue with Facebook
</button>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 mb-3">
<button class="form-control btn btn-default" style="height:40px;border:2px solid black">
<i class="fa fa-google"></i> Continue with Google
</button>
</div>
<div class="col-md-5 col-sm-5 col-xs-5"></div>
<div class="col-md-2 col-sm-2 col-xs-2" align="center"><b>OR</b></div>
<div class="col-md-5 col-sm-5 col-xs-5"></div>
<div class="col-md-12 col-sm-12 col-xs-12 my-3">
<input type="text" name="name" class="form-control" style="height:40px;" placeholder="Email">
</div>
<div class="col-md-12 col-sm-12 col-xs-12 form-group has-feedback">
<input type="text" name="pass" class="form-control" style="height:40px;" placeholder="Password">
<p class="form-control-feedback">Forgot?</p>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 mb-3">
<button name="login" class="btn btn-warning form-control" style="height:40px;font-size:20px">Login</button>
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
<p align="center" style="font-size:16px">Don't Have an Account?
<span>SIgn Up</span>
</p>
</div>
</div>
</form>

Print scrollable boootstrap modal

I have one modal in my new web application ,I want to print the modal content,the modal is scrollable.Now i can only print the content that is viewable.What are the corrections that i should make in my style.css.
index.html
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog ">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 ALIGN="center" class="modal-title">MR FINANCE</h4>
</div>
<div class="modal-body" >
<div class="row">
<div class="col-xs-6">
<div class="form-group">
Name:<input type="text" ng-model="cstmrname" class="form-control" placeholder="Jane Doe" >
</div>
<div class="form-group">
Phone:<input type="number"ng-model="cstmrphone" class="form-control" placeholder="8086502009">
</div>
</div>
<div class="col-xs-6 ">
<div class="text-right">
<p ><STRONG >GLID:{{(GLID.GLID-0)+1}}</STRONG></p>
{{date | date:'MM-dd-yyyy'}}<br/>
{{place}}
</div>
<div class="form-group">
Address: <textarea type="text" class="form-control" ng-model="cstmradress" rows="2"></textarea>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-xs-12">
<h4 align="center">
Ornaments
</h4>
<form class="form-inline form-group">
<fieldset data-ng-repeat="choice in choices">
<div class="col-xs-3">
<div class="form-group">
<select class="form-control" id="optioin1" ng-model="choice.option1" >
<option value="Ring" >Ring</option>
<option value="Earings" >Earings</option>
<option value="Chains">Chains</option>
<option value="Necklaces">Necklaces</option>
<option value="Bangles">Bangles</option>
</select>
</div>{{choice.option1}}
</div>
<div class="col-xs-4">
<div class="input-group">
<input type="number" step="0.01" ng-model="choice.weight" class="form-control" placeholder="Weight" aria-describedby="basic-addon2">
<span class="input-group-addon" id="basic-addon2">gm</span>
</div>
</div>
<div class="col-xs-4 pull-right">
<button class="btn btn-default" ng-show="$last" ng-click="removeChoice() "><span class="glyphicon glyphicon-minus" aria-hidden="true"></span></button>
<button class="btn btn-default" ng-show="$last" ng-click="addNewChoice()"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
</div>
</fieldset>
</form>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<p class="text-left"> Total Numbers:{{ choices.length}}</p>
</div>
<div class="col-xs-6"><p>Total Weight: {{total(number)}}gm</p>
</div>
</div>
<hr>
<form align="center" class="form-inline">
PledgeAmt:
<div class="input-group">
<input type="number" ng-model="pledgeamt" class="form-control" placeholder="{{(total()*2050)-3000}}-{{total()*2050}}" >
<span class="input-group-addon" id="basic-addon2">RS</span>
</div>
</form>
<hr>
<div class="row">
<h5 align="center"> Interest</h5>
<div class="col-xs-6">
<p> 1-3Month:{{ intrst[0].INTR1}}%({{(pledgeamt/100)*1}}RS/day)</p>
</div>
<div class="col-xs-6">
<p > 3-12Month:{{ intrst[0].INTR2}}%({{(pledgeamt/100)*2}}RS/day)</p>
</div>
</div>
<tr ng-repeat="ornament in data">
<td>{{ornament.GLID}}</td>
<td>{{ornament.WEIGHT}}</td>
<td>{{ornament.TOTGRAM}}</td>
</tr>
<div class="modal-footer">
<button type="button" ng-click="insertvalue()" class="btn btn-default" >Submit</button>
<button type="button" class="btn btn-default" onclick="js:window.print()">print modal content</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
style.css
.printable { display: none; }
#media print
{ .modal-footer,
.non-printable { display: none; }
.printable1 {
width: auto;
height: auto;
overflow: visible !important; }
}
You implementation of your css is the right approach but you will need to make whatever the class that currently has the scroll, visible when you print out the document.
If you wanted the css to be changed but not the html:
#media print {
/* if modal-body is your scrollable class */
.modal-body {
width: auto;
height: auto;
overflow: visible !important;
}
}
Code pen link

Multiple Bootstrap modals on the same page

I am working on http://steam-to-rent.ch/mietdampfanlagen.html. As you can see I am using Bootstrap collapse and when you click on the "Anfrage" button it's displaying a Bootstrap's Modal. The problem is that when you click on the second "modal button" (Anfrage) and then you close that modal the background overlay color remains and I can't interact with the page. How can I solve it?
This is the code
<button type="button" class="btn btn-primary special"
style="background: #fadf3e; border: 2px solid #000; color: #000; margin-bottom: 20px; margin-top: -10px; width: 100%;"
data-toggle="modal"
data-target=".bs-example-modal-sm">Anfrage</button>
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<h4 style="color: #000;">Mietdampfanlage 21 kg/h 10 bar</h3>
<div class="col-sm-12 form">
<form class="form-modal" role="form" method="post" action="index.php">
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-12">
<input type="text" class="form-control" id="name" name="name" placeholder="Vorname, Name" value="">
</div>
</div>
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-12 ">
<input type="text" class="form-control" id="name" name="firma" placeholder="Firma" value="">
</div>
</div>
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-12 ">
<input type="email" class="form-control" id="email" name="email" placeholder="E-Mail" value="">
</div>
</div>
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-12">
<input type="text" class="form-control" id="name" name="telefon" placeholder="Telefon" value="">
</div>
</div>
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-12">
<input type="text" class="form-control" id="name" name="zeit" placeholder="Zeitraum" value="">
</div>
</div>
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-12">
<textarea class="form-control" rows="4" name="message" placeholder="Nachricht"></textarea>
</div>
</div>
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-12">
<input id="submit" name="submit" type="submit" value="Send" class="btn btn-primary">
</div>
</div>
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-10 col-sm-offset-2">
<! Will be used to display an alert to the user>
</div>
</div>
</form></div>
</div>
</div>
</div>
Edit:
<button id="modal_1" type="button" class="btn btn-primary special" style="background: #fadf3e; border: 2px solid #000; color: #000; margin-bottom: 20px; margin-top: -10px; width: 100%;" data-toggle="modal" data-target=".bs-example-modal-sm">Anfrage</button>
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="row">
<div class="col-sm-12 form">
<div class="modal-header">
<h4 style="color: #000;">Mietdampfanlage 21 kg/h 10 bar</h4>
</div>
<form class="form-modal" role="form" method="post" action="index.php">
<div class="col-sm-12">
<div class="form-group">
<input type="text" class="form-control" id="name" name="name" placeholder="Vorname, Name" value="">
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<input type="text" class="form-control" id="name" name="firma" placeholder="Firma" value="">
</div>
</div>
<div class="col-sm-12 ">
<div class="form-group">
<input type="email" class="form-control" id="email" name="email" placeholder="E-Mail" value="">
</div>
</div>
<div class="col-sm-12 ">
<div class="form-group">
<input type="text" class="form-control" id="name" name="telefon" placeholder="Telefon" value="">
</div>
</div>
<div class="col-sm-12 ">
<div class="form-group">
<input type="text" class="form-control" id="name" name="zeit" placeholder="Zeitraum" value="">
</div>
</div>
<div class="col-sm-12 ">
<div class="form-group">
<textarea class="form-control" rows="4" name="message" placeholder="Nachricht"></textarea>
</div>
</div>
<div class="col-sm-12 ">
<div class="form-group">
<input id="submit" name="submit" type="submit" value="Send" class="btn btn-primary">
</div>
</div>
<div class="form-group" style="margin-bottom: 15px !important;">
<div class="col-sm-10 col-sm-offset-2">
<! Will be used to display an alert to the user>
</div>
</div>
</form></div>
</div>
</div>
</div>
</div>
data-backdrop="static"
data-keyboard="false"
first look and see if there is data-backdrop="Static" anywhere. That would do it. Also make sure data-keyboard is NOT false just to make sure you can interact.
Last I want you to look at the the ID's on the buttons and modals. make sure they are all different. I dont see an ID on this modal here so I would suggest something like
id="modal_1"
on the button AND the modal. Make sure it matches

Embed a search form in Bootstrap 3 panel heading

I'm attempting to embed a search form at the right side of a panel heading:
<div class="panel-heading">
<h3 class="panel-title">Results <span class="badge">6</span></h3>
<form class="form-inline pull-right" role="search" method="get" action="/tbl">
<div class="form-group">
<input type="text" name="criteria" class="form-control" value="<%= params[:criteria] if params[:criteria] %>" placeholder="<%= params[:criteria]? params[:criteria] : 'Enter search criteria (e.g. FOOBAR_%)' %>">
<div class="input-group-btn">
<button class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>
Unfortunately, I'm having alignment issues:
In Safari (8.0.3):
In Firefox (35.0.1):
Is there a way to do this, preferably without custom CSS?
JSFiddle
Almost, see this fiddle
I put the heading and search box into col divs, but id have to add a little padding to he title to get it to line up with the search box
CSS:
.padFix{
padding-top:8px;
}
HTML:
<div class="panel-heading ">
<div class="row">
<div class="col-sm-6">
<h3 class="panel-title padFix">Results <span class="badge">6</span></h3></div>
<div class="col-sm-6">
<form role="search" method="get" action="/tbl">
<div class="input-group">
<input type="text" name="criteria" class="form-control" value="<%= params[:criteria] if params[:criteria] %>" placeholder="<%= params[:criteria]? params[:criteria] : 'Enter search criteria (e.g. FOOBAR_%)' %>">
<div class="input-group-btn">
<button class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>
</div>
</div>
Here am sharing my answer, this might be useful
JS Fiddle
Here is the code
HTML
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h4 class="panel-title pull-left" style="padding-top: 7.5px;">
Header
</h4>
<div class="btn-group pull-right">
<input type="text" class="custom_input">
<button class="btn btn-success pull-right" style="height: 30px;">
Search
</button>
</div>
</div>
<div class="panel-body">
Content Body
</div>
<div class="panel-footer">
Content Footer
</div>
</div>
</div>
</div>
CSS
.custom_input {
padding: 4px 5px;
border: 1px solid #d3e0e9;
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
border-right: none;
height: 30px;
}
thank You :-)

Resources