Skip to content

Commit

Permalink
1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleycho committed Mar 6, 2016
1 parent b5b3b1a commit d563fbe
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 58 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "MIT",
"ignore": [],
"description": "Native AngularJS (Angular) directives for Bootstrap.",
"version": "1.2.2",
"version": "1.2.3",
"main": ["./ui-bootstrap-tpls.js"],
"dependencies": {
"angular": ">=1.4.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-ui-bootstrap",
"version": "1.2.2",
"version": "1.2.3",
"description": "Bootstrap widgets for Angular",
"main": "index.js",
"homepage": "http://angular-ui.github.io/bootstrap/",
Expand Down
51 changes: 27 additions & 24 deletions ui-bootstrap-tpls.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* angular-ui-bootstrap
* http://angular-ui.github.io/bootstrap/
* Version: 1.2.2 - 2016-03-03
* Version: 1.2.3 - 2016-03-05
* License: MIT
*/angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
angular.module("ui.bootstrap.tpls", ["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]);
Expand Down Expand Up @@ -1681,7 +1681,7 @@ angular.module('ui.bootstrap.position', [])
var targetElemPos = {top: 0, left: 0, placement: ''};

if (placement[2]) {
var viewportOffset = this.viewportOffset(hostElem);
var viewportOffset = this.viewportOffset(hostElem, appendToBody);

var targetElemStyle = $window.getComputedStyle(targetElem);
var adjustedSize = {
Expand Down Expand Up @@ -2147,12 +2147,17 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
this.createDateObject = function(date, format) {
var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
model = dateParser.fromTimezone(model, ngModelOptions.timezone);
var today = new Date();
today = dateParser.fromTimezone(today, ngModelOptions.timezone);
var time = this.compare(date, today);
var dt = {
date: date,
label: dateParser.filter(date, format),
selected: model && this.compare(date, model) === 0,
disabled: this.isDisabled(date),
current: this.compare(date, new Date()) === 0,
past: time < 0,
current: time === 0,
future: time > 0,
customClass: this.customClass(date) || null
};

Expand Down Expand Up @@ -3235,7 +3240,12 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
};

this.toggle = function(open) {
return scope.isOpen = arguments.length ? !!open : !scope.isOpen;
scope.isOpen = arguments.length ? !!open : !scope.isOpen;
if (angular.isFunction(setIsOpen)) {
setIsOpen(scope, scope.isOpen);
}

return scope.isOpen;
};

// Allow other directives to watch status
Expand Down Expand Up @@ -3616,8 +3626,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])
/**
* A helper directive for the $modal service. It creates a backdrop element.
*/
.directive('uibModalBackdrop', ['$animateCss', '$injector', '$uibModalStack',
function($animateCss, $injector, $modalStack) {
.directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack',
function($animate, $injector, $modalStack) {
return {
replace: true,
templateUrl: 'uib/template/modal/backdrop.html',
Expand All @@ -3629,16 +3639,12 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])

function linkFn(scope, element, attrs) {
if (attrs.modalInClass) {
$animateCss(element, {
addClass: attrs.modalInClass
}).start();
$animate.addClass(element, attrs.modalInClass);

scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
var done = setIsAsync();
if (scope.modalOptions.animation) {
$animateCss(element, {
removeClass: attrs.modalInClass
}).start().then(done);
$animate.removeClass(element, attrs.modalInClass).then(done);
} else {
done();
}
Expand All @@ -3647,8 +3653,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])
}
}])

.directive('uibModalWindow', ['$uibModalStack', '$q', '$animate', '$animateCss', '$document',
function($modalStack, $q, $animate, $animateCss, $document) {
.directive('uibModalWindow', ['$uibModalStack', '$q', '$animateCss', '$document',
function($modalStack, $q, $animateCss, $document) {
return {
scope: {
index: '@'
Expand Down Expand Up @@ -3702,13 +3708,9 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])

scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
var done = setIsAsync();
if ($animateCss) {
$animateCss(element, {
removeClass: attrs.modalInClass
}).start().then(done);
} else {
$animate.removeClass(element, attrs.modalInClass).then(done);
}
$animateCss(element, {
removeClass: attrs.modalInClass
}).start().then(done);
});
}

Expand Down Expand Up @@ -5720,7 +5722,8 @@ angular.module('ui.bootstrap.tabs', [])
node.hasAttribute('x-uib-tab-heading') ||
node.tagName.toLowerCase() === 'uib-tab-heading' ||
node.tagName.toLowerCase() === 'data-uib-tab-heading' ||
node.tagName.toLowerCase() === 'x-uib-tab-heading'
node.tagName.toLowerCase() === 'x-uib-tab-heading' ||
node.tagName.toLowerCase() === 'uib:tab-heading'
);
}
});
Expand Down Expand Up @@ -6677,7 +6680,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
evt.stopPropagation();

resetMatches();
scope.$digest();
originalScope.$digest();
break;
case 38:
scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
Expand Down Expand Up @@ -6731,7 +6734,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {
resetMatches();
if (!$rootScope.$$phase) {
scope.$digest();
originalScope.$digest();
}
}
};
Expand Down
8 changes: 4 additions & 4 deletions ui-bootstrap-tpls.min.js

Large diffs are not rendered by default.

51 changes: 27 additions & 24 deletions ui-bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* angular-ui-bootstrap
* http://angular-ui.github.io/bootstrap/
* Version: 1.2.2 - 2016-03-03
* Version: 1.2.3 - 2016-03-05
* License: MIT
*/angular.module("ui.bootstrap", ["ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
angular.module('ui.bootstrap.collapse', [])
Expand Down Expand Up @@ -1680,7 +1680,7 @@ angular.module('ui.bootstrap.position', [])
var targetElemPos = {top: 0, left: 0, placement: ''};

if (placement[2]) {
var viewportOffset = this.viewportOffset(hostElem);
var viewportOffset = this.viewportOffset(hostElem, appendToBody);

var targetElemStyle = $window.getComputedStyle(targetElem);
var adjustedSize = {
Expand Down Expand Up @@ -2146,12 +2146,17 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
this.createDateObject = function(date, format) {
var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
model = dateParser.fromTimezone(model, ngModelOptions.timezone);
var today = new Date();
today = dateParser.fromTimezone(today, ngModelOptions.timezone);
var time = this.compare(date, today);
var dt = {
date: date,
label: dateParser.filter(date, format),
selected: model && this.compare(date, model) === 0,
disabled: this.isDisabled(date),
current: this.compare(date, new Date()) === 0,
past: time < 0,
current: time === 0,
future: time > 0,
customClass: this.customClass(date) || null
};

Expand Down Expand Up @@ -3234,7 +3239,12 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
};

this.toggle = function(open) {
return scope.isOpen = arguments.length ? !!open : !scope.isOpen;
scope.isOpen = arguments.length ? !!open : !scope.isOpen;
if (angular.isFunction(setIsOpen)) {
setIsOpen(scope, scope.isOpen);
}

return scope.isOpen;
};

// Allow other directives to watch status
Expand Down Expand Up @@ -3615,8 +3625,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])
/**
* A helper directive for the $modal service. It creates a backdrop element.
*/
.directive('uibModalBackdrop', ['$animateCss', '$injector', '$uibModalStack',
function($animateCss, $injector, $modalStack) {
.directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack',
function($animate, $injector, $modalStack) {
return {
replace: true,
templateUrl: 'uib/template/modal/backdrop.html',
Expand All @@ -3628,16 +3638,12 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])

function linkFn(scope, element, attrs) {
if (attrs.modalInClass) {
$animateCss(element, {
addClass: attrs.modalInClass
}).start();
$animate.addClass(element, attrs.modalInClass);

scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
var done = setIsAsync();
if (scope.modalOptions.animation) {
$animateCss(element, {
removeClass: attrs.modalInClass
}).start().then(done);
$animate.removeClass(element, attrs.modalInClass).then(done);
} else {
done();
}
Expand All @@ -3646,8 +3652,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])
}
}])

.directive('uibModalWindow', ['$uibModalStack', '$q', '$animate', '$animateCss', '$document',
function($modalStack, $q, $animate, $animateCss, $document) {
.directive('uibModalWindow', ['$uibModalStack', '$q', '$animateCss', '$document',
function($modalStack, $q, $animateCss, $document) {
return {
scope: {
index: '@'
Expand Down Expand Up @@ -3701,13 +3707,9 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])

scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
var done = setIsAsync();
if ($animateCss) {
$animateCss(element, {
removeClass: attrs.modalInClass
}).start().then(done);
} else {
$animate.removeClass(element, attrs.modalInClass).then(done);
}
$animateCss(element, {
removeClass: attrs.modalInClass
}).start().then(done);
});
}

Expand Down Expand Up @@ -5719,7 +5721,8 @@ angular.module('ui.bootstrap.tabs', [])
node.hasAttribute('x-uib-tab-heading') ||
node.tagName.toLowerCase() === 'uib-tab-heading' ||
node.tagName.toLowerCase() === 'data-uib-tab-heading' ||
node.tagName.toLowerCase() === 'x-uib-tab-heading'
node.tagName.toLowerCase() === 'x-uib-tab-heading' ||
node.tagName.toLowerCase() === 'uib:tab-heading'
);
}
});
Expand Down Expand Up @@ -6676,7 +6679,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
evt.stopPropagation();

resetMatches();
scope.$digest();
originalScope.$digest();
break;
case 38:
scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
Expand Down Expand Up @@ -6730,7 +6733,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {
resetMatches();
if (!$rootScope.$$phase) {
scope.$digest();
originalScope.$digest();
}
}
};
Expand Down
8 changes: 4 additions & 4 deletions ui-bootstrap.min.js

Large diffs are not rendered by default.

0 comments on commit d563fbe

Please sign in to comment.