Roo/bootstrap/Component.js
authorleon <leon@roojs.com>
Tue, 27 Sep 2022 04:12:31 +0000 (12:12 +0800)
committerleon <leon@roojs.com>
Tue, 27 Sep 2022 04:12:31 +0000 (12:12 +0800)
Roo/bootstrap/Component.js

index 3279787..5a5fc3e 100644 (file)
@@ -19,6 +19,7 @@ Roo.bootstrap = Roo.bootstrap || {};
  * @cfg {string} dataId cutomer id
  * @cfg {string} name Specifies name attribute
  * @cfg {string} tooltip  Text for the tooltip
+ * @cfg {string} tooltipClass Class for the tooltip element
  * @cfg {string} container_method method to fetch parents container element (used by NavHeaderbar -  getHeaderChildContainer)
  * @cfg {string|object} visibilityEl (el|parent) What element to use for visibility (@see getVisibilityEl())
  
@@ -59,6 +60,8 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
     autoCreate : false,
     
     tooltip : null,
+
+    tooltipClass : null,
     /**
      * Initialize Events for the element
      */
@@ -135,6 +138,10 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         if (this.tooltip) {
             this.tooltipEl().attr('tooltip', this.tooltip);
         }
+
+        if (this.tooltipClass) {
+            this.tooltipEl().attr('tooltipClass', this.tooltipClass);
+        }
         
         if(this.tabIndex !== undefined){
             this.el.dom.setAttribute('tabIndex', this.tabIndex);