Skip to content

Commit

Permalink
1.2 - fix to not use scope() and move to angular 1.5 and uibModal
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gross authored and Chris Gross committed May 12, 2016
1 parent 6de8bdf commit ea0845f
Show file tree
Hide file tree
Showing 28 changed files with 30,576 additions and 14,628 deletions.
2 changes: 1 addition & 1 deletion angular-prompt.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h4 class="modal-title">{{options.title}}</h4>
{{options.message}}
</p>

<form id="cgPromptForm" name="cgPromptForm" ng-if="options.input" ng-submit="submit()">
<form id="cgPromptForm" name="form.cgPromptForm" ng-if="options.input" ng-submit="submit()">
<div class="form-group" ng-class="{'has-error':cgPromptForm.$invalid && changed}">
<label for="cgPromptInput">{{options.label}}</label>
<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">
Expand Down
14 changes: 8 additions & 6 deletions angular-prompt.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular.module('cgPrompt',['ui.bootstrap']);

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

var prompt = function(options){

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

var defer = $q.defer();

$modal.open({
$uibModal.open({
templateUrl:'angular-prompt.html',
controller: 'cgPromptCtrl',
resolve: {
options:function(){
return options;
options:function(){
return options;
}
}
}).result.then(function(result){
Expand All @@ -60,12 +60,14 @@ angular.module('cgPrompt').controller('cgPromptCtrl',['$scope','options','$timeo

$scope.options = options;

$scope.form = {};

$scope.buttonClicked = function(button){
if (button.cancel){
$scope.$dismiss();
return;
}
if (options.input && angular.element(document.querySelector('#cgPromptForm')).scope().cgPromptForm.$invalid){
if (options.input && $scope.form.cgPromptForm.$invalid){
$scope.changed = true;
return;
}
Expand Down Expand Up @@ -95,7 +97,7 @@ angular.module('cgPrompt').controller('cgPromptCtrl',['$scope','options','$timeo
}
}
},100);


}]);

6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "angular-prompt",
"description": "Angular service to easily display prompt and confirmation modals.",
"version": "1.1.1",
"version": "1.2.0",
"main": [
"dist/angular-prompt.js"
],
"dependencies": {
"angular": "~1.2.16",
"angular-bootstrap": "~0.12.0"
"angular": "~1.5",
"angular-bootstrap": "~1.3"
},
"ignore": [
"**/.*",
Expand Down
14 changes: 7 additions & 7 deletions bower_components/angular-bootstrap/.bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
"license": "MIT",
"ignore": [],
"description": "Native AngularJS (Angular) directives for Bootstrap.",
"version": "0.12.1",
"version": "1.3.2",
"main": [
"./ui-bootstrap-tpls.js"
],
"dependencies": {
"angular": ">=1 <1.3.0"
"angular": ">=1.4.0"
},
"homepage": "https://github.com/angular-ui/bootstrap-bower",
"_release": "0.12.1",
"_release": "1.3.2",
"_resolution": {
"type": "version",
"tag": "0.12.1",
"commit": "ab14fbaaf3d592f8e76018f0666c5af6f68ebaa3"
"tag": "1.3.2",
"commit": "77da362b0b86c0a86762b56d64aaec107889f31a"
},
"_source": "git://github.com/angular-ui/bootstrap-bower.git",
"_target": "~0.12.0",
"_source": "https://github.com/angular-ui/bootstrap-bower.git",
"_target": "~1.3",
"_originalSource": "angular-bootstrap"
}
1 change: 1 addition & 0 deletions bower_components/angular-bootstrap/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
1 change: 1 addition & 0 deletions bower_components/angular-bootstrap/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bower.json
120 changes: 120 additions & 0 deletions bower_components/angular-bootstrap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
### UI Bootstrap - [AngularJS](http://angularjs.org/) directives specific to [Bootstrap](http://getbootstrap.com)

[![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)
[![Build Status](https://secure.travis-ci.org/angular-ui/bootstrap.svg)](http://travis-ci.org/angular-ui/bootstrap)
[![devDependency Status](https://david-dm.org/angular-ui/bootstrap/dev-status.svg?branch=master)](https://david-dm.org/angular-ui/bootstrap#info=devDependencies)

### Quick links
- [Demo](#demo)
- [Installation](#installation)
- [NPM](#install-with-npm)
- [Bower](#install-with-bower)
- [NuGet](#install-with-nuget)
- [Custom](#custom-build)
- [Manual](#manual-download)
- [Support](#support)
- [FAQ](#faq)
- [Supported browsers](#supported-browsers)
- [Need help?](#need-help)
- [Found a bug?](#found-a-bug)
- [Contributing to the project](#contributing-to-the-project)
- [Development, meeting minutes, roadmap and more.](#development-meeting-minutes-roadmap-and-more)


# Demo

Do you want to see directives in action? Visit http://angular-ui.github.io/bootstrap/!

# Installation

Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required.
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.

#### Install with NPM

```sh
$ npm install angular-ui-bootstrap
```

This will install AngularJS and Bootstrap NPM packages.

#### Install with Bower
```sh
$ bower install angular-bootstrap
```

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.

#### Install with NuGet
To install AngularJS UI Bootstrap, run the following command in the Package Manager Console

```sh
PM> Install-Package Angular.UI.Bootstrap
```

#### Custom build

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.

#### Manual download

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:
https://github.com/angular-ui/bootstrap/tree/gh-pages#build-files
Don't worry, if you are not sure which file to take, opt for `ui-bootstrap-tpls-[version].min.js`.

### Adding dependency to your project

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:

```js
angular.module('myModule', ['ui.bootstrap']);
```

If you're a Browserify or Webpack user, you can do:

```js
var uibs = require('angular-ui-bootstrap');

angular.module('myModule', [uibs]);
```

# Support

## FAQ

https://github.com/angular-ui/bootstrap/wiki/FAQ

## Supported browsers

Directives from this repository are automatically tested with the following browsers:
* Chrome (stable and canary channel)
* Firefox
* IE 9 and 10
* Opera
* Safari

Modern mobile browsers should work without problems.


## Need help?
Need help using UI Bootstrap?

* Live help in the IRC (`#angularjs` channel at the `freenode` network). Use this [webchat](https://webchat.freenode.net/) or your own IRC client.
* Ask a question in [StackOverflow](http://stackoverflow.com/) under the [angular-ui-bootstrap](http://stackoverflow.com/questions/tagged/angular-ui-bootstrap) tag.

**Please do not create new issues in this repository to ask questions about using UI Bootstrap**

## Found a bug?
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).


----


# Contributing to the project

We are always looking for the quality contributions! Please check the [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution guidelines.

# Development, meeting minutes, roadmap and more.

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.
6 changes: 3 additions & 3 deletions bower_components/angular-bootstrap/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"license": "MIT",
"ignore": [],
"description": "Native AngularJS (Angular) directives for Bootstrap.",
"version": "0.12.1",
"version": "1.3.2",
"main": ["./ui-bootstrap-tpls.js"],
"dependencies": {
"angular": ">=1 <1.3.0"
}
"angular": ">=1.4.0"
}
}
2 changes: 2 additions & 0 deletions bower_components/angular-bootstrap/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('./ui-bootstrap-tpls');
module.exports = 'ui.bootstrap';
23 changes: 23 additions & 0 deletions bower_components/angular-bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "angular-ui-bootstrap",
"version": "1.3.2",
"description": "Bootstrap widgets for Angular",
"main": "index.js",
"homepage": "http://angular-ui.github.io/bootstrap/",
"repository": {
"type": "git",
"url": "https://github.com/angular-ui/bootstrap.git"
},
"keywords": [
"angular",
"bootstrap",
"angular-ui",
"components",
"client-side"
],
"author": "https://github.com/angular-ui/bootstrap/graphs/contributors",
"peerDependencies": {
"angular": ">= 1.4.0-beta.0 || >= 1.5.0-beta.0"
},
"license": "MIT"
}
115 changes: 115 additions & 0 deletions bower_components/angular-bootstrap/ui-bootstrap-csp.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/* Include this file in your html if you are using the CSP mode. */

.ng-animate.item:not(.left):not(.right) {
-webkit-transition: 0s ease-in-out left;
transition: 0s ease-in-out left
}
.uib-datepicker .uib-title {
width: 100%;
}

.uib-day button, .uib-month button, .uib-year button {
min-width: 100%;
}

.uib-left, .uib-right {
width: 100%
}

.uib-position-measure {
display: block !important;
visibility: hidden !important;
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}

.uib-position-scrollbar-measure {
position: absolute !important;
top: -9999px !important;
width: 50px !important;
height: 50px !important;
overflow: scroll !important;
}

.uib-position-body-scrollbar-measure {
overflow: scroll !important;
}
.uib-datepicker-popup.dropdown-menu {
display: block;
float: none;
margin: 0;
}

.uib-button-bar {
padding: 10px 9px 2px;
}

[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,
[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,
[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,
[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,
[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,
[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,
[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,
[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,
[uib-popover-popup].popover.top-left > .arrow,
[uib-popover-popup].popover.top-right > .arrow,
[uib-popover-popup].popover.bottom-left > .arrow,
[uib-popover-popup].popover.bottom-right > .arrow,
[uib-popover-popup].popover.left-top > .arrow,
[uib-popover-popup].popover.left-bottom > .arrow,
[uib-popover-popup].popover.right-top > .arrow,
[uib-popover-popup].popover.right-bottom > .arrow,
[uib-popover-html-popup].popover.top-left > .arrow,
[uib-popover-html-popup].popover.top-right > .arrow,
[uib-popover-html-popup].popover.bottom-left > .arrow,
[uib-popover-html-popup].popover.bottom-right > .arrow,
[uib-popover-html-popup].popover.left-top > .arrow,
[uib-popover-html-popup].popover.left-bottom > .arrow,
[uib-popover-html-popup].popover.right-top > .arrow,
[uib-popover-html-popup].popover.right-bottom > .arrow,
[uib-popover-template-popup].popover.top-left > .arrow,
[uib-popover-template-popup].popover.top-right > .arrow,
[uib-popover-template-popup].popover.bottom-left > .arrow,
[uib-popover-template-popup].popover.bottom-right > .arrow,
[uib-popover-template-popup].popover.left-top > .arrow,
[uib-popover-template-popup].popover.left-bottom > .arrow,
[uib-popover-template-popup].popover.right-top > .arrow,
[uib-popover-template-popup].popover.right-bottom > .arrow {
top: auto;
bottom: auto;
left: auto;
right: auto;
margin: 0;
}

[uib-popover-popup].popover,
[uib-popover-html-popup].popover,
[uib-popover-template-popup].popover {
display: block !important;
}

.uib-time input {
width: 50px;
}

[uib-typeahead-popup].dropdown-menu {
display: block;
}
Loading

0 comments on commit ea0845f

Please sign in to comment.