Im trying to load common names using Ui-Bootstrap Autocomplete.
When I type, I can see the List is being loaded EXACTLY the number of times that letter repeats! But its not showing the names. I can see the href tags has no value!
Im definitely missing something here. Thoughts?
Pen : https://codepen.io/vbbalaji/pen/qBRjRGm
<span class='py-2 mb-2'>Please enter your name</span>
<div class='container mb-2'>
<div class='row'>
<div class='col-3 text-right py-2 my-1'>Name</div>
<div class='col-9 vlight-blue py-2 my-1 rounded-lg text-left px-1'>
<div class='d-inline-block'>
<input type='text' style="text-transform:capitalize;"
id='custName' placeholder='Type your Name' ng-model="CustomerName" value=''
typeahead='name for name in commonNames | filter:$viewValue | limitTo:8' typeahead-show-hint="true"
class="ttInput rounded-lg">
</div>
<button class='btn btn-xxs btn-danger alignright' ng-click='ClearCustName()'>CLEAR</button>
</div>
<button class='btn btn-primary btn-xxs mt-2' id='btnUpd' ng-click="UpdateCurOrder(1)"><i class="fas fa-save px-1"></i>Save</button>
</div>
</div>
</div>
I think you have missed to include required external javascript files reference in the application or html page and same I can see in the provided codepen link.
Include the required external javascript/css reference in head tag of your main page.
For your reference replace your head tag code with below head tag (which has external references) in the codepen and it should work
<head>
<style>
.bgVideo { height: 100vh;}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-rc.2/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-rc.2/angular-sanitize.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-rc.2/angular-route.min.js"></script>
<script src="https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.6.0.js"></script>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
</head>
Related
Summarize the problem
I read react-bootstrap 5 documentation but didn't see any problem with adding css and how to make it background-color
Describe what you’ve tried
i try is <Accordion.Header bsPrefix={{background: '#d0f1f7'}}>Accordion Item #1</Accordion.Header>
insted of <Accordion.Header bsPrefix={{background: '#d0f1f7'}}>Accordion Item #1</Accordion.Header>
Use this on CSS file
.accordion-button {
background-color: #d0f1f7 !important;
}
.accordion-button:focus {
box-shadow: none;
}
.accordion-button:not(.collapsed) {
color: #212529;
}
Here it is:
HTML:
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<div class="accordion accordion-flush" id="accordionFlushExample">
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingOne">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseOne" aria-expanded="false" aria-controls="flush-collapseOne">
Accordion Item #1
</button>
</h2>
<div id="flush-collapseOne" class="accordion-collapse collapse" aria-labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the first item's accordion body.</div>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingTwo">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseTwo" aria-expanded="false" aria-controls="flush-collapseTwo">
Accordion Item #2
</button>
</h2>
<div id="flush-collapseTwo" class="accordion-collapse collapse" aria-labelledby="flush-headingTwo" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the second item's accordion body. Let's imagine this being filled with some actual content.</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingThree">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseThree" aria-expanded="false" aria-controls="flush-collapseThree">
Accordion Item #3
</button>
</h2>
<div id="flush-collapseThree" class="accordion-collapse collapse" aria-labelledby="flush-headingThree" data-bs-parent="#accordionFlushExample">
<div style='background-color:"red" class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the third item's accordion body. Nothing more exciting happening here in terms of content, but just filling up the space to make it look, at least at first glance, a bit more representative of how this would look in a real-world application.</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
CSS :
.accordion-item{background-color:#777777 !important;border:1px solid
rgba(0,0,0,.125)!important}
https://jsfiddle.net/h27ck6rp/2/
I have an angularjs webpage with bootstrap. I'm trying to use bootstrap cards. I selected bootstrap card-columns class but i got a problem. In adding fourth one, sequance will change to card-colums: 2 but its default card-colums: 3.
At JSFiddle https://jsfiddle.net/fdbwyoc7
angular.module("app", []).controller("bdCtrl", function($scope) {
$scope.cards = [{}];
$scope.appendCard = function() {
$scope.cards.push({});
};
});
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.js"></script>
<body ng-app="app" ng-controller="bdCtrl">
<button class="btn btn-warning" ng-click="appendCard()">Add new</button>
<br>
<div class="container-fluid">
<div class="card-columns" style="column-count: 3;">
<div class="card" ng-repeat="rd in cards">
<img class="card-img-top" src="https://www.direnc.net//3d-printer-prusa-i-3-demonte-3d-printer-eitleri-china-19324-99-O.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
</div>
</body>
We have a content type called product which has a custom "input" button that allows you to "add to cart". So I have this:
<input type="submit" value="Buy Now $'.$content['field_price'][0]['#markup'].'" alt="Buy Now $'.$content['field_price'][0]['#markup'].'" />
The problem is that the price field is inside an input field, and therefore not displayed, so I would have to show the price some other way to include it within the product page.
The sample that I have shows the price on the page, but I don't want to show the price, because it's already shown in my input field. So this won't work:
<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">Kenmore White 17" Microwave</span>
<img src="kenmore-microwave-17in.jpg" alt='Kenmore 17" Microwave' />
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">$55.00</span>
<link itemprop="availability" href="http://schema.org/InStock" />In stock
</div>
</div>
The only way I see this working is I do something sneaky like this:
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price" style="displaY: none;">$55.00</span>
</div>
Would that be allowed or is that not going to solve my problem?
UPDATE
This works:
<div itemscope itemtype="http://schema.org/Product">
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price" style="displaY: none;">$55.00</span>
</div>
</div>
This doesn't:
<div itemscope itemtype="http://schema.org/Product">
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="price" itemprop="55.00" />
<meta itemprop="priceCurrency" itemprop="USD" />
</div>
</div>
You should use the meta element.
In HTML5+Microdata (as well as in HTML+RDFa) the meta element may be used in the body element, exactly for this purpose. It’s the same idea as using the link element for the availability property (like in your example).
In Microdata, it could look like this:
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="price" content="55.00" />
<meta itemprop="priceCurrency" content="USD" />
</div>
I need to upload an image in my AngularJS, NodeJS application.
I have the following element on my page for selecting an image in a form using the Bootstrap File Input plugin:
<div class="fileinput fileinput-new" data-provides="fileinput">
<div class="fileinput-new thumbnail">
<img src="http://www.placehold.it/512x512/EFEFEF/AAAAAA&text=NO+IMAGE" alt="" class="img-responsive" />
</div>
<div class="fileinput-preview fileinput-exists thumbnail">
</div>
<div>
<span class="btn default btn-file">
<span class="fileinput-new">Select image </span>
<span class="fileinput-exists">Change </span>
<input type="file" name="..." >
</span>
Remove
</div>
</div>
The data inside the following div gets changes once an image has been selected:
<div class="fileinput-preview fileinput-exists thumbnail">
</div>
It becomes to something like following:
<div class="fileinput-preview fileinput-exists thumbnail">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAA3=...">
</div>
I need the data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAA3=... data of the selected image for it to upload to a directory on my server using NodeJS.
Could somebody help me with an AngularJS directive to get that data?
I am new to semantic UI. I am trying to include the built in classes of semantic UI to my code. Semantic folder is containing so many built in classes.
1 . How do I find to which css file, my class is going to be associated?
2. In some of the examples, I see class names like - div class="ui large blue icon button" . In such cases how do I find these variations like blue,floated?
<html>
<head>
<link rel="stylesheet" href="../SemanticUI/semantic/packaged/css/semantic.css"/>
<link rel="stylesheet" href="../SemanticUI/semantic/packaged/css/semantic.min.css"/>
<link rel="stylesheet" href="../SemanticUI/semantic/less/elements/button.less"/>
</head>
<body>
<div class="ui labeled icon button">
Download <i class="download icon"></i>
</div>
<div class="ui icon button">
<i class="download icon"></i>
</div>
<div class="ui button">
Download
</div>
<div class="ui facebook button">
<i class="facebook icon"></i>
Facebook
</div>
</body>
</html>
Thanks,
Sabari
You need to add the css and the javascript libraries for semantic-ui.
Here try this example:
<html>
<head>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/0.12.0/css/semantic.min.css"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/semantic-ui/0.12.0/javascript/semantic.min.js"></script>
</head>
<body>
<div class="ui labeled icon button">
Download <i class="download icon"></i>
</div>
<div class="ui icon button">
<i class="download icon"></i>
</div>
<div class="ui button">
Download
</div>
<div class="ui facebook button">
<i class="facebook icon"></i>
Facebook
</div>
</body>
</html>
Here is a jsbin POC: http://jsbin.com/ubiReqa/1/
Hope it helps.
Cheers,
Praney