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

Commit 3272960

Browse files
Foxandxsswesleycho
authored andcommitted
chore: add tooltip/popover classes by hand
Closes #4557
1 parent 22f1a4b commit 3272960

File tree

9 files changed

+50
-23
lines changed

9 files changed

+50
-23
lines changed

Diff for: src/datepicker/docs/demo.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ <h4>Popup</h4>
4848
<button type="button" class="btn btn-sm btn-info" ng-click="today()">Today</button>
4949
<button type="button" class="btn btn-sm btn-default" ng-click="dt = '2009-08-24'">2009-08-24</button>
5050
<button type="button" class="btn btn-sm btn-danger" ng-click="clear()">Clear</button>
51-
<button type="button" class="btn btn-sm btn-default" ng-click="toggleMin()" tooltip="After today restriction">Min date</button>
52-
</div>
51+
<button type="button" class="btn btn-sm btn-default" ng-click="toggleMin()" uib-tooltip="After today restriction">Min date</button>
52+
</div>

Diff for: src/popover/popover.js

+21-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])
1010
replace: true,
1111
scope: { title: '@', contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
1212
originScope: '&' },
13-
templateUrl: 'template/popover/popover-template.html'
13+
templateUrl: 'template/popover/popover-template.html',
14+
link: function(scope, element) {
15+
element.addClass('popover');
16+
}
1417
};
1518
})
1619

@@ -24,7 +27,10 @@ angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])
2427
return {
2528
replace: true,
2629
scope: { contentExp: '&', title: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
27-
templateUrl: 'template/popover/popover-html.html'
30+
templateUrl: 'template/popover/popover-html.html',
31+
link: function(scope, element) {
32+
element.addClass('popover');
33+
}
2834
};
2935
})
3036

@@ -38,7 +44,10 @@ angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])
3844
return {
3945
replace: true,
4046
scope: { title: '@', content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
41-
templateUrl: 'template/popover/popover.html'
47+
templateUrl: 'template/popover/popover.html',
48+
link: function(scope, element) {
49+
element.addClass('popover');
50+
}
4251
};
4352
})
4453

@@ -58,10 +67,12 @@ angular.module('ui.bootstrap.popover')
5867
scope: { title: '@', contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
5968
originScope: '&' },
6069
templateUrl: 'template/popover/popover-template.html',
61-
link: function() {
70+
link: function(scope, element) {
6271
if (!$popoverSuppressWarning) {
6372
$log.warn('popover-template-popup is now deprecated. Use uib-popover-template-popup instead.');
6473
}
74+
75+
element.addClass('popover');
6576
}
6677
};
6778
}])
@@ -77,10 +88,12 @@ angular.module('ui.bootstrap.popover')
7788
replace: true,
7889
scope: { contentExp: '&', title: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
7990
templateUrl: 'template/popover/popover-html.html',
80-
link: function() {
91+
link: function(scope, element) {
8192
if (!$popoverSuppressWarning) {
8293
$log.warn('popover-html-popup is now deprecated. Use uib-popover-html-popup instead.');
8394
}
95+
96+
element.addClass('popover');
8497
}
8598
};
8699
}])
@@ -96,10 +109,12 @@ angular.module('ui.bootstrap.popover')
96109
replace: true,
97110
scope: { title: '@', content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
98111
templateUrl: 'template/popover/popover.html',
99-
link: function() {
112+
link: function(scope, element) {
100113
if (!$popoverSuppressWarning) {
101114
$log.warn('popover-popup is now deprecated. Use uib-popover-popup instead.');
102115
}
116+
117+
element.addClass('popover');
103118
}
104119
};
105120
}])

Diff for: src/tooltip/tooltip.js

+21-6
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,10 @@ function ($animate , $sce , $compile , $templateRequest) {
593593
return {
594594
replace: true,
595595
scope: { content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
596-
templateUrl: 'template/tooltip/tooltip-popup.html'
596+
templateUrl: 'template/tooltip/tooltip-popup.html',
597+
link: function(scope, element) {
598+
element.addClass('tooltip');
599+
}
597600
};
598601
})
599602

@@ -606,7 +609,10 @@ function ($animate , $sce , $compile , $templateRequest) {
606609
replace: true,
607610
scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
608611
originScope: '&' },
609-
templateUrl: 'template/tooltip/tooltip-template-popup.html'
612+
templateUrl: 'template/tooltip/tooltip-template-popup.html',
613+
link: function(scope, element) {
614+
element.addClass('tooltip');
615+
}
610616
};
611617
})
612618

@@ -620,7 +626,10 @@ function ($animate , $sce , $compile , $templateRequest) {
620626
return {
621627
replace: true,
622628
scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
623-
templateUrl: 'template/tooltip/tooltip-html-popup.html'
629+
templateUrl: 'template/tooltip/tooltip-html-popup.html',
630+
link: function(scope, element) {
631+
element.addClass('tooltip');
632+
}
624633
};
625634
})
626635

@@ -746,10 +755,12 @@ function ($animate , $sce , $compile , $templateRequest, $log, $tooltipSu
746755
replace: true,
747756
scope: { content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
748757
templateUrl: 'template/tooltip/tooltip-popup.html',
749-
link: function() {
758+
link: function(scope, element) {
750759
if (!$tooltipSuppressWarning) {
751760
$log.warn('tooltip-popup is now deprecated. Use uib-tooltip-popup instead.');
752761
}
762+
763+
element.addClass('tooltip');
753764
}
754765
};
755766
}])
@@ -764,10 +775,12 @@ function ($animate , $sce , $compile , $templateRequest, $log, $tooltipSu
764775
scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
765776
originScope: '&' },
766777
templateUrl: 'template/tooltip/tooltip-template-popup.html',
767-
link: function() {
778+
link: function(scope, element) {
768779
if (!$tooltipSuppressWarning) {
769780
$log.warn('tooltip-template-popup is now deprecated. Use uib-tooltip-template-popup instead.');
770781
}
782+
783+
element.addClass('tooltip');
771784
}
772785
};
773786
}])
@@ -783,10 +796,12 @@ function ($animate , $sce , $compile , $templateRequest, $log, $tooltipSu
783796
replace: true,
784797
scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
785798
templateUrl: 'template/tooltip/tooltip-html-popup.html',
786-
link: function() {
799+
link: function(scope, element) {
787800
if (!$tooltipSuppressWarning) {
788801
$log.warn('tooltip-html-popup is now deprecated. Use uib-tooltip-html-popup instead.');
789802
}
803+
804+
element.addClass('tooltip');
790805
}
791806
};
792807
}])

Diff for: template/popover/popover-html.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<div class="popover"
2-
tooltip-animation-class="fade"
1+
<div tooltip-animation-class="fade"
32
uib-tooltip-classes
43
ng-class="{ in: isOpen() }">
54
<div class="arrow"></div>

Diff for: template/popover/popover-template.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<div class="popover"
2-
tooltip-animation-class="fade"
1+
<div tooltip-animation-class="fade"
32
uib-tooltip-classes
43
ng-class="{ in: isOpen() }">
54
<div class="arrow"></div>

Diff for: template/popover/popover.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<div class="popover"
2-
tooltip-animation-class="fade"
1+
<div tooltip-animation-class="fade"
32
uib-tooltip-classes
43
ng-class="{ in: isOpen() }">
54
<div class="arrow"></div>

Diff for: template/tooltip/tooltip-html-popup.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="tooltip"
1+
<div
22
tooltip-animation-class="fade"
33
uib-tooltip-classes
44
ng-class="{ in: isOpen() }">

Diff for: template/tooltip/tooltip-popup.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="tooltip"
1+
<div
22
tooltip-animation-class="fade"
33
uib-tooltip-classes
44
ng-class="{ in: isOpen() }">

Diff for: template/tooltip/tooltip-template-popup.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="tooltip"
1+
<div
22
tooltip-animation-class="fade"
33
uib-tooltip-classes
44
ng-class="{ in: isOpen() }">

0 commit comments

Comments
 (0)