Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit a2afd59

Browse files
2 parents ca1d13a + e5a1e88 commit a2afd59

File tree

8 files changed

+23
-12
lines changed

8 files changed

+23
-12
lines changed

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"url": "https://github.com/angular-ui/bootstrap.git"
1010
},
1111
"devDependencies": {
12-
"angular": "^1.3.15",
13-
"angular-mocks": "^1.3.15",
12+
"angular": "<=1.3.x",
13+
"angular-mocks": "<=1.3.x",
1414
"grunt": "^0.4.5",
1515
"grunt-contrib-concat": "^0.5.1",
1616
"grunt-contrib-copy": "^0.8.0",

Diff for: src/carousel/docs/demo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ angular.module('ui.bootstrap.demo').controller('CarouselDemoCtrl', function ($sc
44
$scope.addSlide = function() {
55
var newWidth = 600 + slides.length + 1;
66
slides.push({
7-
image: 'http://placekitten.com/' + newWidth + '/300',
7+
image: '//placekitten.com/' + newWidth + '/300',
88
text: ['More','Extra','Lots of','Surplus'][slides.length % 4] + ' ' +
99
['Cats', 'Kittys', 'Felines', 'Cutes'][slides.length % 4]
1010
});

Diff for: src/datepicker/datepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
558558
if ( key === 'datepickerMode' ) {
559559
var setAttribute = getAttribute.assign;
560560
scope.$watch('watchData.' + key, function(value, oldvalue) {
561-
if ( value !== oldvalue ) {
561+
if ( angular.isFunction(setAttribute) && value !== oldvalue ) {
562562
setAttribute(scope.$parent, value);
563563
}
564564
});

Diff for: src/dropdown/docs/readme.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ By default the dropdown will automatically close if any of its elements is click
1010

1111
* `always` - (Default) automatically closes the dropdown when any of its elements is clicked.
1212
* `outsideClick` - closes the dropdown automatically only when the user clicks any element outside the dropdown.
13-
* `disabled` - disables the auto close. You can then control the open/close status of the dropdown manually, by using `is-open`. Please notice that the dropdown will still close if the toggle is clicked, the `esc` key is pressed or another dropdown is open.
14-
13+
* `disabled` - disables the auto close. You can then control the open/close status of the dropdown manually, by using `is-open`. Please notice that the dropdown will still close if the toggle is clicked, the `esc` key is pressed or another dropdown is open. The dropdown will no longer close on `$locationChangeSuccess` events.

Diff for: src/dropdown/dropdown.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
144144
});
145145

146146
$scope.$on('$locationChangeSuccess', function() {
147-
scope.isOpen = false;
147+
if (scope.getAutoClose() !== 'disabled') {
148+
scope.isOpen = false;
149+
}
148150
});
149151

150152
$scope.$on('$destroy', function() {

Diff for: src/dropdown/test/dropdown.spec.js

+10
Original file line numberDiff line numberDiff line change
@@ -432,5 +432,15 @@ describe('dropdownToggle', function() {
432432
expect(elm1.hasClass(dropdownConfig.openClass)).toBe(false);
433433
expect(elm2.hasClass(dropdownConfig.openClass)).toBe(true);
434434
});
435+
436+
it('should not close on $locationChangeSuccess if auto-close="disabled"', function () {
437+
var elm1 = dropdown('disabled');
438+
expect(elm1.hasClass(dropdownConfig.openClass)).toBe(false);
439+
clickDropdownToggle(elm1);
440+
expect(elm1.hasClass(dropdownConfig.openClass)).toBe(true);
441+
$rootScope.$broadcast('$locationChangeSuccess');
442+
$rootScope.$digest();
443+
expect(elm1.hasClass(dropdownConfig.openClass)).toBe(true);
444+
});
435445
});
436446
});

Diff for: src/tooltip/docs/readme.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ There are three versions of the tooltip: `tooltip`, `tooltip-template`, and
77
- `tooltip` takes text only and will escape any HTML provided.
88
- `tooltip-template` takes text that specifies the location of a template to
99
use for the tooltip.
10-
- `tooltip-html-unsafe` takes
11-
whatever HTML is provided and displays it in a tooltip; it's called "unsafe"
12-
because the HTML is not sanitized. *The user is responsible for ensuring the
10+
- `tooltip-html` takes
11+
whatever HTML is provided and displays it in a tooltip; *The user is responsible for ensuring the
1312
content is safe to put into the DOM!*
13+
- `tooltip-html-unsafe` -- deprecated in favour of `tooltip-html`
1414

1515
The tooltip directives provide several optional attributes to control how they
1616
will display:

Diff for: src/typeahead/docs/demo.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)