diff --git a/.bower.json b/.bower.json new file mode 100644 index 0000000000..fb9f4ad775 --- /dev/null +++ b/.bower.json @@ -0,0 +1,31 @@ +{ + "author": { + "name": "https://github.com/angular-ui/bootstrap/graphs/contributors" + }, + "name": "angular-bootstrap", + "keywords": [ + "angular", + "angular-ui", + "bootstrap" + ], + "license": "MIT", + "ignore": [], + "description": "Native AngularJS (Angular) directives for Bootstrap.", + "version": "0.12.1", + "main": [ + "./ui-bootstrap-tpls.js" + ], + "dependencies": { + "angular": ">=1 <1.3.0" + }, + "homepage": "https://github.com/angular-ui/bootstrap-bower", + "_release": "0.12.1", + "_resolution": { + "type": "version", + "tag": "0.12.1", + "commit": "ab14fbaaf3d592f8e76018f0666c5af6f68ebaa3" + }, + "_source": "git://github.com/angular-ui/bootstrap-bower.git", + "_target": "0.12.1", + "_originalSource": "angular-bootstrap" +} \ No newline at end of file diff --git a/bower.json b/bower.json new file mode 100644 index 0000000000..8f6991bed8 --- /dev/null +++ b/bower.json @@ -0,0 +1,19 @@ +{ + "author": { + "name": "https://github.com/angular-ui/bootstrap/graphs/contributors" + }, + "name": "angular-bootstrap", + "keywords": [ + "angular", + "angular-ui", + "bootstrap" + ], + "license": "MIT", + "ignore": [], + "description": "Native AngularJS (Angular) directives for Bootstrap.", + "version": "0.12.1", + "main": ["./ui-bootstrap-tpls.js"], + "dependencies": { + "angular": ">=1 <1.3.0" + } +} diff --git a/dist/assets/app.js b/dist/assets/app.js index 93101bdf4e..46fa1d82b9 100644 --- a/dist/assets/app.js +++ b/dist/assets/app.js @@ -1,4 +1,4 @@ -angular.module('bootstrapDemoApp', ['ui.bootstrap', 'plunker', 'ngTouch'], function($httpProvider){ +angular.module('ui.bootstrap.demo', ['ui.bootstrap', 'plunker', 'ngTouch'], function($httpProvider){ FastClick.attach(document.body); delete $httpProvider.defaults.headers.common['X-Requested-With']; }).run(['$location', function($location){ @@ -89,4 +89,4 @@ var DownloadCtrl = function($scope, $modalInstance) { $scope.cancel = function () { $modalInstance.dismiss(); }; -} +}; diff --git a/dist/assets/plunker.js b/dist/assets/plunker.js index f740f6beb4..04a35eebba 100644 --- a/dist/assets/plunker.js +++ b/dist/assets/plunker.js @@ -13,10 +13,10 @@ angular.module('plunker', []) var indexContent = function (content, version) { return '\n' + - '\n' + + '\n' + ' \n' + - ' \n' + - ' \n' + + ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + @@ -27,7 +27,7 @@ angular.module('plunker', []) }; var scriptContent = function(content) { - return "angular.module('plunker', ['ui.bootstrap']);" + "\n" + content; + return "angular.module('ui.bootstrap.demo', ['ui.bootstrap']);" + "\n" + content; }; addField('description', 'http://angular-ui.github.io/bootstrap/'); diff --git a/dist/index.html b/dist/index.html index 502b71ffb5..74efa850a8 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,5 +1,5 @@ - + @@ -8,14 +8,14 @@ - - - - + + + + - + @@ -72,7 +72,7 @@

Code on Github

@@ -80,11 +80,11 @@

-

There are 2 directives that can make a group of buttons to behave like a set of checkboxes or radio buttons.

+

There are two directives that can make a group of buttons behave like a set of checkboxes, radio buttons, or a hybrid where radio buttons can be unchecked.


- +
@@ -485,20 +486,24 @@

Radio

<label class="btn btn-primary" ng-model="checkModel.middle" btn-checkbox>Middle</label> <label class="btn btn-primary" ng-model="checkModel.right" btn-checkbox>Right</label> </div> - <h4>Radio</h4> - <pre>{{radioModel}}</pre> + <h4>Radio &amp; Uncheckable Radio</h4> + <pre>{{radioModel || 'null'}}</pre> <div class="btn-group"> <label class="btn btn-primary" ng-model="radioModel" btn-radio="'Left'">Left</label> <label class="btn btn-primary" ng-model="radioModel" btn-radio="'Middle'">Middle</label> <label class="btn btn-primary" ng-model="radioModel" btn-radio="'Right'">Right</label> </div> + <div class="btn-group"> + <label class="btn btn-success" ng-model="radioModel" btn-radio="'Left'" uncheckable>Left</label> + <label class="btn btn-success" ng-model="radioModel" btn-radio="'Middle'" uncheckable>Middle</label> + <label class="btn btn-success" ng-model="radioModel" btn-radio="'Right'" uncheckable>Right</label> + </div> </div>
-
var ButtonsCtrl = function ($scope) {
-
+                                            
angular.module('ui.bootstrap.demo').controller('ButtonsCtrl', function ($scope) {
   $scope.singleModel = 1;
 
   $scope.radioModel = 'Middle';
@@ -508,15 +513,14 @@ 

Radio

middle: true, right: false }; -};
+});
- +}); -
@@ -668,7 +672,7 @@

Collapse
- +
@@ -684,9 +688,9 @@

Collapse
-
function CollapseDemoCtrl($scope) {
+                                            
angular.module('ui.bootstrap.demo').controller('CollapseDemoCtrl', function ($scope) {
   $scope.isCollapsed = false;
-}
+});
 
@@ -694,9 +698,9 @@

Collapse

-
@@ -749,7 +753,7 @@

Popup

Datepicker Settings

-

All settings can be provided as attributes in the <datepicker> or globally configured through the datepickerConfig.

+

All settings can be provided as attributes in the datepicker or globally configured through the datepickerConfig.

  • ng-model @@ -794,7 +798,7 @@

    Datepicker Settings

  • format-day-header (Default: 'EEE') : Format of day in week header.

  • -
  • format-day-title- +

  • format-day-title (Default: 'MMMM yyyy') : Format of title when selecting day.

  • format-month-title @@ -832,6 +836,25 @@

    Popup Settings

  • datepicker-append-to-body (Default: false): Append the datepicker popup element to body, rather than inserting after datepicker-popup. For global configuration, use datepickerPopupConfig.appendToBody.

  • +
+ +

Keyboard Support

+ +

Depending on datepicker's current mode, the date may reffer either to day, month or year. Accordingly, the term view reffers either to a month, year or year range.

+ +
    +
  • Left: Move focus to the previous date. Will move to the last date of the previous view, if the current date is the first date of a view.
  • +
  • Right: Move focus to the next date. Will move to the first date of the following view, if the current date is the last date of a view.
  • +
  • Up: Move focus to the same column of the previous row. Will wrap to the appropriate row in the previous view.
  • +
  • Down: Move focus to the same column of the following row. Will wrap to the appropriate row in the following view.
  • +
  • PgUp: Move focus to the same date of the previous view. If that date does not exist, focus is placed on the last date of the month.
  • +
  • PgDn: Move focus to the same date of the following view. If that date does not exist, focus is placed on the last date of the month.
  • +
  • Home: Move to the first date of the view.
  • +
  • End: Move to the last date of the view.
  • +
  • Enter/Space: Select date.
  • +
  • Ctrl+Up: Move to an upper mode.
  • +
  • Ctrl+Down: Move to a lower mode.
  • +
  • Esc: Will close popup, and move focus to the input.
@@ -839,7 +862,7 @@

Popup Settings

- +
@@ -879,7 +902,7 @@

Popup Settings

-
var DatepickerDemoCtrl = function ($scope) {
+                                            
angular.module('ui.bootstrap.demo').controller('DatepickerDemoCtrl', function ($scope) {
   $scope.today = function() {
     $scope.dt = new Date();
   };
@@ -911,10 +934,9 @@ 

Popup Settings

startingDay: 1 }; - $scope.initDate = new Date('2016-15-20'); - $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'shortDate']; + $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate']; $scope.format = $scope.formats[0]; -}; +});
@@ -922,7 +944,7 @@

Popup Settings

- - - +}); +
-
@@ -1573,7 +1610,7 @@

Other

- +
@@ -1614,10 +1651,10 @@

Other

-
var PopoverDemoCtrl = function ($scope) {
+                                            
angular.module('ui.bootstrap.demo').controller('PopoverDemoCtrl', function ($scope) {
   $scope.dynamicPopover = 'Hello, World!';
   $scope.dynamicPopoverTitle = 'Title';
-};
+});
 
@@ -1625,10 +1662,10 @@

Other

-
@@ -1698,7 +1735,7 @@

Stacked

- +
@@ -1731,8 +1768,7 @@

Stacked

-
var ProgressDemoCtrl = function ($scope) {
-
+                                            
angular.module('ui.bootstrap.demo').controller('ProgressDemoCtrl', function ($scope) {
   $scope.max = 200;
 
   $scope.random = function() {
@@ -1769,7 +1805,7 @@ 

Stacked

} }; $scope.randomStacked(); -}; +});
@@ -1777,8 +1813,7 @@

Stacked

-
@@ -1881,7 +1916,7 @@

<rating>

- +
@@ -1905,7 +1940,7 @@

<rating>

-
var RatingDemoCtrl = function ($scope) {
+                                            
angular.module('ui.bootstrap.demo').controller('RatingDemoCtrl', function ($scope) {
   $scope.rate = 7;
   $scope.max = 10;
   $scope.isReadonly = false;
@@ -1922,7 +1957,7 @@ 

<rating>

{stateOn: 'glyphicon-heart'}, {stateOff: 'glyphicon-off'} ]; -}; +});
@@ -1930,7 +1965,7 @@

<rating>

-
@@ -2043,7 +2078,7 @@

<tab>

- +
@@ -2092,7 +2127,7 @@

<tab>

-
var TabsDemoCtrl = function ($scope) {
+                                            
angular.module('ui.bootstrap.demo').controller('TabsDemoCtrl', function ($scope) {
   $scope.tabs = [
     { title:'Dynamic Title 1', content:'Dynamic content 1' },
     { title:'Dynamic Title 2', content:'Dynamic content 2', disabled: true }
@@ -2103,7 +2138,7 @@ 

<tab>

alert('You\'ve selected the alert tab!'); }); }; -}; +});
@@ -2111,7 +2146,7 @@

<tab>

-
@@ -2195,7 +2230,7 @@

Settings

- +
@@ -2229,7 +2264,7 @@

Settings

-
var TimepickerDemoCtrl = function ($scope) {
+                                            
angular.module('ui.bootstrap.demo').controller('TimepickerDemoCtrl', function ($scope) {
   $scope.mytime = new Date();
 
   $scope.hstep = 1;
@@ -2259,7 +2294,7 @@ 

Settings

$scope.clear = function() { $scope.mytime = null; }; -}; +});
@@ -2267,7 +2302,7 @@

Settings

-
@@ -2411,7 +2446,7 @@

Tooltip
- +
@@ -2456,11 +2491,11 @@

Tooltip
-
var TooltipDemoCtrl = function ($scope) {
+                                            
angular.module('ui.bootstrap.demo').controller('TooltipDemoCtrl', function ($scope) {
   $scope.dynamicTooltip = 'Hello, World!';
   $scope.dynamicTooltipText = 'dynamic';
   $scope.htmlTooltip = 'I\'ve been made <b>bold</b>!';
-};
+});
 
@@ -2468,11 +2503,11 @@

Tooltip

-
@@ -2545,7 +2580,7 @@

Custom templates for results

  • typeahead-min-length (Defaults: 1) : Minimal no of characters that needs to be entered before typeahead kicks-in

  • -
  • typeahead-on-select +

  • typeahead-on-select($item, $model, $label) (Defaults: null) : A callback executed when a match is selected

  • typeahead-template-url @@ -2561,7 +2596,7 @@

    Custom templates for results

    - +
    @@ -2592,7 +2627,7 @@

    Custom templates for results

    -
    function TypeaheadCtrl($scope, $http) {
    +                                            
    angular.module('ui.bootstrap.demo').controller('TypeaheadCtrl', function($scope, $http) {
     
       $scope.selected = undefined;
       $scope.states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];
    @@ -2603,24 +2638,22 @@ 

    Custom templates for results

    address: val, sensor: false } - }).then(function(res){ - var addresses = []; - angular.forEach(res.data.results, function(item){ - addresses.push(item.formatted_address); + }).then(function(response){ + return response.data.results.map(function(item){ + return item.formatted_address; }); - return addresses; }); }; $scope.statesWithFlags = [{'name':'Alabama','flag':'5/5c/Flag_of_Alabama.svg/45px-Flag_of_Alabama.svg.png'},{'name':'Alaska','flag':'e/e6/Flag_of_Alaska.svg/43px-Flag_of_Alaska.svg.png'},{'name':'Arizona','flag':'9/9d/Flag_of_Arizona.svg/45px-Flag_of_Arizona.svg.png'},{'name':'Arkansas','flag':'9/9d/Flag_of_Arkansas.svg/45px-Flag_of_Arkansas.svg.png'},{'name':'California','flag':'0/01/Flag_of_California.svg/45px-Flag_of_California.svg.png'},{'name':'Colorado','flag':'4/46/Flag_of_Colorado.svg/45px-Flag_of_Colorado.svg.png'},{'name':'Connecticut','flag':'9/96/Flag_of_Connecticut.svg/39px-Flag_of_Connecticut.svg.png'},{'name':'Delaware','flag':'c/c6/Flag_of_Delaware.svg/45px-Flag_of_Delaware.svg.png'},{'name':'Florida','flag':'f/f7/Flag_of_Florida.svg/45px-Flag_of_Florida.svg.png'},{'name':'Georgia','flag':'5/54/Flag_of_Georgia_%28U.S._state%29.svg/46px-Flag_of_Georgia_%28U.S._state%29.svg.png'},{'name':'Hawaii','flag':'e/ef/Flag_of_Hawaii.svg/46px-Flag_of_Hawaii.svg.png'},{'name':'Idaho','flag':'a/a4/Flag_of_Idaho.svg/38px-Flag_of_Idaho.svg.png'},{'name':'Illinois','flag':'0/01/Flag_of_Illinois.svg/46px-Flag_of_Illinois.svg.png'},{'name':'Indiana','flag':'a/ac/Flag_of_Indiana.svg/45px-Flag_of_Indiana.svg.png'},{'name':'Iowa','flag':'a/aa/Flag_of_Iowa.svg/44px-Flag_of_Iowa.svg.png'},{'name':'Kansas','flag':'d/da/Flag_of_Kansas.svg/46px-Flag_of_Kansas.svg.png'},{'name':'Kentucky','flag':'8/8d/Flag_of_Kentucky.svg/46px-Flag_of_Kentucky.svg.png'},{'name':'Louisiana','flag':'e/e0/Flag_of_Louisiana.svg/46px-Flag_of_Louisiana.svg.png'},{'name':'Maine','flag':'3/35/Flag_of_Maine.svg/45px-Flag_of_Maine.svg.png'},{'name':'Maryland','flag':'a/a0/Flag_of_Maryland.svg/45px-Flag_of_Maryland.svg.png'},{'name':'Massachusetts','flag':'f/f2/Flag_of_Massachusetts.svg/46px-Flag_of_Massachusetts.svg.png'},{'name':'Michigan','flag':'b/b5/Flag_of_Michigan.svg/45px-Flag_of_Michigan.svg.png'},{'name':'Minnesota','flag':'b/b9/Flag_of_Minnesota.svg/46px-Flag_of_Minnesota.svg.png'},{'name':'Mississippi','flag':'4/42/Flag_of_Mississippi.svg/45px-Flag_of_Mississippi.svg.png'},{'name':'Missouri','flag':'5/5a/Flag_of_Missouri.svg/46px-Flag_of_Missouri.svg.png'},{'name':'Montana','flag':'c/cb/Flag_of_Montana.svg/45px-Flag_of_Montana.svg.png'},{'name':'Nebraska','flag':'4/4d/Flag_of_Nebraska.svg/46px-Flag_of_Nebraska.svg.png'},{'name':'Nevada','flag':'f/f1/Flag_of_Nevada.svg/45px-Flag_of_Nevada.svg.png'},{'name':'New Hampshire','flag':'2/28/Flag_of_New_Hampshire.svg/45px-Flag_of_New_Hampshire.svg.png'},{'name':'New Jersey','flag':'9/92/Flag_of_New_Jersey.svg/45px-Flag_of_New_Jersey.svg.png'},{'name':'New Mexico','flag':'c/c3/Flag_of_New_Mexico.svg/45px-Flag_of_New_Mexico.svg.png'},{'name':'New York','flag':'1/1a/Flag_of_New_York.svg/46px-Flag_of_New_York.svg.png'},{'name':'North Carolina','flag':'b/bb/Flag_of_North_Carolina.svg/45px-Flag_of_North_Carolina.svg.png'},{'name':'North Dakota','flag':'e/ee/Flag_of_North_Dakota.svg/38px-Flag_of_North_Dakota.svg.png'},{'name':'Ohio','flag':'4/4c/Flag_of_Ohio.svg/46px-Flag_of_Ohio.svg.png'},{'name':'Oklahoma','flag':'6/6e/Flag_of_Oklahoma.svg/45px-Flag_of_Oklahoma.svg.png'},{'name':'Oregon','flag':'b/b9/Flag_of_Oregon.svg/46px-Flag_of_Oregon.svg.png'},{'name':'Pennsylvania','flag':'f/f7/Flag_of_Pennsylvania.svg/45px-Flag_of_Pennsylvania.svg.png'},{'name':'Rhode Island','flag':'f/f3/Flag_of_Rhode_Island.svg/32px-Flag_of_Rhode_Island.svg.png'},{'name':'South Carolina','flag':'6/69/Flag_of_South_Carolina.svg/45px-Flag_of_South_Carolina.svg.png'},{'name':'South Dakota','flag':'1/1a/Flag_of_South_Dakota.svg/46px-Flag_of_South_Dakota.svg.png'},{'name':'Tennessee','flag':'9/9e/Flag_of_Tennessee.svg/46px-Flag_of_Tennessee.svg.png'},{'name':'Texas','flag':'f/f7/Flag_of_Texas.svg/45px-Flag_of_Texas.svg.png'},{'name':'Utah','flag':'f/f6/Flag_of_Utah.svg/45px-Flag_of_Utah.svg.png'},{'name':'Vermont','flag':'4/49/Flag_of_Vermont.svg/46px-Flag_of_Vermont.svg.png'},{'name':'Virginia','flag':'4/47/Flag_of_Virginia.svg/44px-Flag_of_Virginia.svg.png'},{'name':'Washington','flag':'5/54/Flag_of_Washington.svg/46px-Flag_of_Washington.svg.png'},{'name':'West Virginia','flag':'2/22/Flag_of_West_Virginia.svg/46px-Flag_of_West_Virginia.svg.png'},{'name':'Wisconsin','flag':'2/22/Flag_of_Wisconsin.svg/45px-Flag_of_Wisconsin.svg.png'},{'name':'Wyoming','flag':'b/bc/Flag_of_Wyoming.svg/43px-Flag_of_Wyoming.svg.png'}]; -}
    +});
  • - +}); @@ -2694,7 +2725,7 @@

    Custom templates for results