@@ -3,6 +3,17 @@ import _bootstrapTooltipWidget from "./BootstrapTooltip";
33
44export default declare ( "BootstrapTooltip.widget.BootstrapTooltipContext" , [ _bootstrapTooltipWidget ] , {
55 _contextObj : null ,
6+ _attribute : "" ,
7+
8+ postCreate : function ( ) {
9+ const attributeSplit = this . tooltipMessageAttribute . split ( "/" ) ;
10+ if ( attributeSplit . length === 1 ) {
11+ this . _attribute = this . tooltipMessageAttribute ;
12+ } else {
13+ this . _attribute = attributeSplit [ attributeSplit . length - 1 ] ;
14+ }
15+ this . _checkTrigger ( ) ;
16+ } ,
617
718 update : function ( obj , callback ) {
819 logger . debug ( this . id + ".update" ) ;
@@ -19,7 +30,7 @@ export default declare("BootstrapTooltip.widget.BootstrapTooltipContext", [_boot
1930 return ;
2031 }
2132
22- if ( this . tooltipSource === "attribute" && this . tooltipMessageAttribute ) {
33+ if ( this . tooltipSource === "attribute" && this . _attribute ) {
2334 this . setTooltipTextAttribute ( ) ;
2435 } else {
2536 if ( this . tooltipMessageString ) {
@@ -42,18 +53,18 @@ export default declare("BootstrapTooltip.widget.BootstrapTooltipContext", [_boot
4253
4354 this . subscribe ( {
4455 guid : this . _contextObj . getGuid ( ) ,
45- attr : this . tooltipMessageAttribute ,
56+ attr : this . _attribute ,
4657 callback : ( ) => this . setTooltipTextAttribute ( )
4758 } ) ;
4859 }
4960 } ,
5061
5162 setTooltipTextAttribute : function ( ) {
5263 if ( this . _contextObj ) {
53- if ( this . _contextObj . isEnum ( this . tooltipMessageAttribute ) ) {
54- this . _tooltipText = this . _contextObj . getEnumCaption ( this . tooltipMessageAttribute ) ;
64+ if ( this . _contextObj . isEnum ( this . _attribute ) ) {
65+ this . _tooltipText = this . _contextObj . getEnumCaption ( this . _attribute ) ;
5566 } else {
56- this . _tooltipText = this . _contextObj . get ( this . tooltipMessageAttribute ) ;
67+ this . _tooltipText = this . _contextObj . get ( this . _attribute ) ;
5768 }
5869 } else {
5970 this . _tooltipText = null ;
0 commit comments