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

Commit

Permalink
feat(datepickerPopup): remove replace usage
Browse files Browse the repository at this point in the history
- Remove `replace: true` usage

BREAKING CHANGE: Due to the nature of `replace: true`, this has a slight structural HTML change in the popup as a result - see documentation examples for the change in action.

Closes #5993
  • Loading branch information
wesleycho committed Jun 13, 2016
1 parent 387c6e7 commit a47bced
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/datepickerPopup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $

.directive('uibDatepickerPopupWrap', function() {
return {
replace: true,
restrict: 'A',
transclude: true,
templateUrl: function(element, attrs) {
return attrs.templateUrl || 'uib/template/datepickerPopup/popup.html';
Expand Down
2 changes: 1 addition & 1 deletion src/datepickerPopup/test/popup.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ describe('datepicker popup', function() {
$compile(elm)($rootScope);
$rootScope.$digest();

expect(elm.children().eq(1).html()).toBe('baz');
expect(elm.children().eq(1).html()).toBe('<div>baz</div>');
});
});

Expand Down
22 changes: 10 additions & 12 deletions template/datepickerPopup/popup.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<div>
<ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">
<li ng-transclude></li>
<li ng-if="showButtonBar" class="uib-button-bar">
<span class="btn-group pull-left">
<button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select('today', $event)" ng-disabled="isDisabled('today')">{{ getText('current') }}</button>
<button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText('clear') }}</button>
</span>
<button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText('close') }}</button>
</li>
</ul>
</div>
<ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">
<li ng-transclude></li>
<li ng-if="showButtonBar" class="uib-button-bar">
<span class="btn-group pull-left">
<button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select('today', $event)" ng-disabled="isDisabled('today')">{{ getText('current') }}</button>
<button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText('clear') }}</button>
</span>
<button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText('close') }}</button>
</li>
</ul>

0 comments on commit a47bced

Please sign in to comment.