forked from angular-ui/ui-select
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
drop.js
to separate dropdown from the input.
This allows the dropdown to flow outside of the area it's 'contained' within. (For example, modals and scrollable content areas.) Related issues: angular-ui#308, angular-ui#234, angular-ui#206, angular-ui#41... And more! :-D Please do not merge this commit in its current state. :-)
- Loading branch information
Alexander Harding
committed
Jan 16, 2015
1 parent
93434e1
commit 3c36a54
Showing
5 changed files
with
116 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" ng-app="demo"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>AngularJS ui-select</title> | ||
|
||
<!-- | ||
IE8 support, see AngularJS Internet Explorer Compatibility http://docs.angularjs.org/guide/ie | ||
For Firefox 3.6, you will also need to include jQuery and ECMAScript 5 shim | ||
--> | ||
<!--[if lt IE 9]> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.js"></script> | ||
<script src="http://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.2.0/es5-shim.js"></script> | ||
<script> | ||
document.createElement('ui-select'); | ||
document.createElement('ui-select-match'); | ||
document.createElement('ui-select-choices'); | ||
</script> | ||
<![endif]--> | ||
|
||
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.js"></script> | ||
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular-sanitize.js"></script> | ||
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.css"> | ||
|
||
<!-- ui-select files --> | ||
<script src="../dist/select.js"></script> | ||
<link rel="stylesheet" href="../dist/select.css"> | ||
|
||
<script src="demo.js"></script> | ||
|
||
<!-- Select2 theme --> | ||
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.css"> | ||
|
||
<!-- | ||
Selectize theme | ||
Less versions are available at https://github.com/brianreavis/selectize.js/tree/master/dist/less | ||
--> | ||
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.8.5/css/selectize.default.css"> | ||
<!-- <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.8.5/css/selectize.bootstrap2.css"> --> | ||
<!-- <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.8.5/css/selectize.bootstrap3.css"> --> | ||
|
||
<style> | ||
body { | ||
padding: 15px; | ||
} | ||
|
||
.select2 > .select2-choice.ui-select-match { | ||
/* Because of the inclusion of Bootstrap */ | ||
height: 29px; | ||
} | ||
|
||
.selectize-control > .selectize-dropdown { | ||
top: 36px; | ||
} | ||
|
||
.container { | ||
height: 200px; | ||
overflow: hidden; | ||
border: 1px solid red; | ||
background-color: #fefefe; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body ng-controller="DemoCtrl"> | ||
<script src="demo.js"></script> | ||
|
||
<button class="btn btn-default btn-xs" ng-click="enable()">Enable ui-select</button> | ||
<button class="btn btn-default btn-xs" ng-click="disable()">Disable ui-select</button> | ||
<button class="btn btn-default btn-xs" ng-click="clear()">Clear ng-model</button> | ||
|
||
<div class='container'> | ||
<h3>Select2 theme</h3> | ||
<p>Selected: {{person.selected}}</p> | ||
<ui-select ng-model="person.selected" theme="select2" ng-disabled="disabled" style="min-width: 300px;"> | ||
<ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.name}}</ui-select-match> | ||
<ui-select-choices repeat="person in people | propsFilter: {name: $select.search, age: $select.search}"> | ||
<div ng-bind-html="person.name | highlight: $select.search"></div> | ||
<small> | ||
email: {{person.email}} | ||
age: <span ng-bind-html="''+person.age | highlight: $select.search"></span> | ||
</small> | ||
</ui-select-choices> | ||
</ui-select> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters