Skip to content

Commit ea0845f

Browse files
Chris GrossChris Gross
Chris Gross
authored and
Chris Gross
committed
1.2 - fix to not use scope() and move to angular 1.5 and uibModal
1 parent 6de8bdf commit ea0845f

28 files changed

+30576
-14628
lines changed

angular-prompt.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h4 class="modal-title">{{options.title}}</h4>
99
{{options.message}}
1010
</p>
1111

12-
<form id="cgPromptForm" name="cgPromptForm" ng-if="options.input" ng-submit="submit()">
12+
<form id="cgPromptForm" name="form.cgPromptForm" ng-if="options.input" ng-submit="submit()">
1313
<div class="form-group" ng-class="{'has-error':cgPromptForm.$invalid && changed}">
1414
<label for="cgPromptInput">{{options.label}}</label>
1515
<input id="cgPromptInput" type="text" class="form-control" placeholder="{{options.label}}" ng-model="input.name" required ng-change="changed=true" ng-if="!options.values || options.values.length === 0"/ autofocus="autofocus">

angular-prompt.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
angular.module('cgPrompt',['ui.bootstrap']);
22

3-
angular.module('cgPrompt').factory('prompt',['$modal','$q',function($modal,$q){
3+
angular.module('cgPrompt').factory('prompt',['$uibModal','$q',function($uibModal,$q){
44

55
var prompt = function(options){
66

@@ -29,12 +29,12 @@ angular.module('cgPrompt').factory('prompt',['$modal','$q',function($modal,$q){
2929

3030
var defer = $q.defer();
3131

32-
$modal.open({
32+
$uibModal.open({
3333
templateUrl:'angular-prompt.html',
3434
controller: 'cgPromptCtrl',
3535
resolve: {
36-
options:function(){
37-
return options;
36+
options:function(){
37+
return options;
3838
}
3939
}
4040
}).result.then(function(result){
@@ -60,12 +60,14 @@ angular.module('cgPrompt').controller('cgPromptCtrl',['$scope','options','$timeo
6060

6161
$scope.options = options;
6262

63+
$scope.form = {};
64+
6365
$scope.buttonClicked = function(button){
6466
if (button.cancel){
6567
$scope.$dismiss();
6668
return;
6769
}
68-
if (options.input && angular.element(document.querySelector('#cgPromptForm')).scope().cgPromptForm.$invalid){
70+
if (options.input && $scope.form.cgPromptForm.$invalid){
6971
$scope.changed = true;
7072
return;
7173
}
@@ -95,7 +97,7 @@ angular.module('cgPrompt').controller('cgPromptCtrl',['$scope','options','$timeo
9597
}
9698
}
9799
},100);
98-
100+
99101

100102
}]);
101103

bower.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "angular-prompt",
33
"description": "Angular service to easily display prompt and confirmation modals.",
4-
"version": "1.1.1",
4+
"version": "1.2.0",
55
"main": [
66
"dist/angular-prompt.js"
77
],
88
"dependencies": {
9-
"angular": "~1.2.16",
10-
"angular-bootstrap": "~0.12.0"
9+
"angular": "~1.5",
10+
"angular-bootstrap": "~1.3"
1111
},
1212
"ignore": [
1313
"**/.*",

bower_components/angular-bootstrap/.bower.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
"license": "MIT",
1212
"ignore": [],
1313
"description": "Native AngularJS (Angular) directives for Bootstrap.",
14-
"version": "0.12.1",
14+
"version": "1.3.2",
1515
"main": [
1616
"./ui-bootstrap-tpls.js"
1717
],
1818
"dependencies": {
19-
"angular": ">=1 <1.3.0"
19+
"angular": ">=1.4.0"
2020
},
2121
"homepage": "https://github.com/angular-ui/bootstrap-bower",
22-
"_release": "0.12.1",
22+
"_release": "1.3.2",
2323
"_resolution": {
2424
"type": "version",
25-
"tag": "0.12.1",
26-
"commit": "ab14fbaaf3d592f8e76018f0666c5af6f68ebaa3"
25+
"tag": "1.3.2",
26+
"commit": "77da362b0b86c0a86762b56d64aaec107889f31a"
2727
},
28-
"_source": "git://github.com/angular-ui/bootstrap-bower.git",
29-
"_target": "~0.12.0",
28+
"_source": "https://github.com/angular-ui/bootstrap-bower.git",
29+
"_target": "~1.3",
3030
"_originalSource": "angular-bootstrap"
3131
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bower.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
### UI Bootstrap - [AngularJS](http://angularjs.org/) directives specific to [Bootstrap](http://getbootstrap.com)
2+
3+
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4+
[![Build Status](https://secure.travis-ci.org/angular-ui/bootstrap.svg)](http://travis-ci.org/angular-ui/bootstrap)
5+
[![devDependency Status](https://david-dm.org/angular-ui/bootstrap/dev-status.svg?branch=master)](https://david-dm.org/angular-ui/bootstrap#info=devDependencies)
6+
7+
### Quick links
8+
- [Demo](#demo)
9+
- [Installation](#installation)
10+
- [NPM](#install-with-npm)
11+
- [Bower](#install-with-bower)
12+
- [NuGet](#install-with-nuget)
13+
- [Custom](#custom-build)
14+
- [Manual](#manual-download)
15+
- [Support](#support)
16+
- [FAQ](#faq)
17+
- [Supported browsers](#supported-browsers)
18+
- [Need help?](#need-help)
19+
- [Found a bug?](#found-a-bug)
20+
- [Contributing to the project](#contributing-to-the-project)
21+
- [Development, meeting minutes, roadmap and more.](#development-meeting-minutes-roadmap-and-more)
22+
23+
24+
# Demo
25+
26+
Do you want to see directives in action? Visit http://angular-ui.github.io/bootstrap/!
27+
28+
# Installation
29+
30+
Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required.
31+
Note: Since version 0.13.0, UI Bootstrap depends on [ngAnimate](https://docs.angularjs.org/api/ngAnimate) for transitions and animations, such as the accordion, carousel, etc. Include `ngAnimate` in the module dependencies for your app in order to enable animation.
32+
33+
#### Install with NPM
34+
35+
```sh
36+
$ npm install angular-ui-bootstrap
37+
```
38+
39+
This will install AngularJS and Bootstrap NPM packages.
40+
41+
#### Install with Bower
42+
```sh
43+
$ bower install angular-bootstrap
44+
```
45+
46+
Note: do not install 'angular-ui-bootstrap'. A separate repository - [bootstrap-bower](https://github.com/angular-ui/bootstrap-bower) - hosts the compiled javascript file and bower.json.
47+
48+
#### Install with NuGet
49+
To install AngularJS UI Bootstrap, run the following command in the Package Manager Console
50+
51+
```sh
52+
PM> Install-Package Angular.UI.Bootstrap
53+
```
54+
55+
#### Custom build
56+
57+
Head over to http://angular-ui.github.io/bootstrap/ and hit the *Custom build* button to create your own custom UI Bootstrap build, just the way you like it.
58+
59+
#### Manual download
60+
61+
After downloading dependencies (or better yet, referencing them from your favorite CDN) you need to download build version of this project. All the files and their purposes are described here:
62+
https://github.com/angular-ui/bootstrap/tree/gh-pages#build-files
63+
Don't worry, if you are not sure which file to take, opt for `ui-bootstrap-tpls-[version].min.js`.
64+
65+
### Adding dependency to your project
66+
67+
When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the `ui.bootstrap` AngularJS module:
68+
69+
```js
70+
angular.module('myModule', ['ui.bootstrap']);
71+
```
72+
73+
If you're a Browserify or Webpack user, you can do:
74+
75+
```js
76+
var uibs = require('angular-ui-bootstrap');
77+
78+
angular.module('myModule', [uibs]);
79+
```
80+
81+
# Support
82+
83+
## FAQ
84+
85+
https://github.com/angular-ui/bootstrap/wiki/FAQ
86+
87+
## Supported browsers
88+
89+
Directives from this repository are automatically tested with the following browsers:
90+
* Chrome (stable and canary channel)
91+
* Firefox
92+
* IE 9 and 10
93+
* Opera
94+
* Safari
95+
96+
Modern mobile browsers should work without problems.
97+
98+
99+
## Need help?
100+
Need help using UI Bootstrap?
101+
102+
* Live help in the IRC (`#angularjs` channel at the `freenode` network). Use this [webchat](https://webchat.freenode.net/) or your own IRC client.
103+
* Ask a question in [StackOverflow](http://stackoverflow.com/) under the [angular-ui-bootstrap](http://stackoverflow.com/questions/tagged/angular-ui-bootstrap) tag.
104+
105+
**Please do not create new issues in this repository to ask questions about using UI Bootstrap**
106+
107+
## Found a bug?
108+
Please take a look at [CONTRIBUTING.md](CONTRIBUTING.md#you-think-youve-found-a-bug) and submit your issue [here](https://github.com/angular-ui/bootstrap/issues/new).
109+
110+
111+
----
112+
113+
114+
# Contributing to the project
115+
116+
We are always looking for the quality contributions! Please check the [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution guidelines.
117+
118+
# Development, meeting minutes, roadmap and more.
119+
120+
Head over to the [Wiki](https://github.com/angular-ui/bootstrap/wiki) for notes on development for UI Bootstrap, meeting minutes from the UI Bootstrap team, roadmap plans, project philosophy and more.

bower_components/angular-bootstrap/bower.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"license": "MIT",
1212
"ignore": [],
1313
"description": "Native AngularJS (Angular) directives for Bootstrap.",
14-
"version": "0.12.1",
14+
"version": "1.3.2",
1515
"main": ["./ui-bootstrap-tpls.js"],
1616
"dependencies": {
17-
"angular": ">=1 <1.3.0"
18-
}
17+
"angular": ">=1.4.0"
18+
}
1919
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require('./ui-bootstrap-tpls');
2+
module.exports = 'ui.bootstrap';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "angular-ui-bootstrap",
3+
"version": "1.3.2",
4+
"description": "Bootstrap widgets for Angular",
5+
"main": "index.js",
6+
"homepage": "http://angular-ui.github.io/bootstrap/",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/angular-ui/bootstrap.git"
10+
},
11+
"keywords": [
12+
"angular",
13+
"bootstrap",
14+
"angular-ui",
15+
"components",
16+
"client-side"
17+
],
18+
"author": "https://github.com/angular-ui/bootstrap/graphs/contributors",
19+
"peerDependencies": {
20+
"angular": ">= 1.4.0-beta.0 || >= 1.5.0-beta.0"
21+
},
22+
"license": "MIT"
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/* Include this file in your html if you are using the CSP mode. */
2+
3+
.ng-animate.item:not(.left):not(.right) {
4+
-webkit-transition: 0s ease-in-out left;
5+
transition: 0s ease-in-out left
6+
}
7+
.uib-datepicker .uib-title {
8+
width: 100%;
9+
}
10+
11+
.uib-day button, .uib-month button, .uib-year button {
12+
min-width: 100%;
13+
}
14+
15+
.uib-left, .uib-right {
16+
width: 100%
17+
}
18+
19+
.uib-position-measure {
20+
display: block !important;
21+
visibility: hidden !important;
22+
position: absolute !important;
23+
top: -9999px !important;
24+
left: -9999px !important;
25+
}
26+
27+
.uib-position-scrollbar-measure {
28+
position: absolute !important;
29+
top: -9999px !important;
30+
width: 50px !important;
31+
height: 50px !important;
32+
overflow: scroll !important;
33+
}
34+
35+
.uib-position-body-scrollbar-measure {
36+
overflow: scroll !important;
37+
}
38+
.uib-datepicker-popup.dropdown-menu {
39+
display: block;
40+
float: none;
41+
margin: 0;
42+
}
43+
44+
.uib-button-bar {
45+
padding: 10px 9px 2px;
46+
}
47+
48+
[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,
49+
[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,
50+
[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,
51+
[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,
52+
[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,
53+
[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,
54+
[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,
55+
[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,
56+
[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,
57+
[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,
58+
[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,
59+
[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,
60+
[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,
61+
[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,
62+
[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,
63+
[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,
64+
[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,
65+
[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,
66+
[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,
67+
[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,
68+
[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,
69+
[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,
70+
[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,
71+
[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,
72+
[uib-popover-popup].popover.top-left > .arrow,
73+
[uib-popover-popup].popover.top-right > .arrow,
74+
[uib-popover-popup].popover.bottom-left > .arrow,
75+
[uib-popover-popup].popover.bottom-right > .arrow,
76+
[uib-popover-popup].popover.left-top > .arrow,
77+
[uib-popover-popup].popover.left-bottom > .arrow,
78+
[uib-popover-popup].popover.right-top > .arrow,
79+
[uib-popover-popup].popover.right-bottom > .arrow,
80+
[uib-popover-html-popup].popover.top-left > .arrow,
81+
[uib-popover-html-popup].popover.top-right > .arrow,
82+
[uib-popover-html-popup].popover.bottom-left > .arrow,
83+
[uib-popover-html-popup].popover.bottom-right > .arrow,
84+
[uib-popover-html-popup].popover.left-top > .arrow,
85+
[uib-popover-html-popup].popover.left-bottom > .arrow,
86+
[uib-popover-html-popup].popover.right-top > .arrow,
87+
[uib-popover-html-popup].popover.right-bottom > .arrow,
88+
[uib-popover-template-popup].popover.top-left > .arrow,
89+
[uib-popover-template-popup].popover.top-right > .arrow,
90+
[uib-popover-template-popup].popover.bottom-left > .arrow,
91+
[uib-popover-template-popup].popover.bottom-right > .arrow,
92+
[uib-popover-template-popup].popover.left-top > .arrow,
93+
[uib-popover-template-popup].popover.left-bottom > .arrow,
94+
[uib-popover-template-popup].popover.right-top > .arrow,
95+
[uib-popover-template-popup].popover.right-bottom > .arrow {
96+
top: auto;
97+
bottom: auto;
98+
left: auto;
99+
right: auto;
100+
margin: 0;
101+
}
102+
103+
[uib-popover-popup].popover,
104+
[uib-popover-html-popup].popover,
105+
[uib-popover-template-popup].popover {
106+
display: block !important;
107+
}
108+
109+
.uib-time input {
110+
width: 50px;
111+
}
112+
113+
[uib-typeahead-popup].dropdown-menu {
114+
display: block;
115+
}

0 commit comments

Comments
 (0)