Skip to content

Commit

Permalink
Add title tooltip to Add buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
doekenorg committed Nov 27, 2024
1 parent 6c0818f commit a908e50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions assets/js/admin-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -2071,9 +2071,10 @@
tooltipClass: 'gravityview-item-picker-tooltip top'
} )
// add title attribute so the tooltip can continue to work (jquery ui bug?)
.attr( "title", "" ).on( 'mouseout focusout', function ( e ) {
e.stopImmediatePropagation();
} )
.attr( 'title', function() {
return $( this ).attr( 'title' ) || $( this ).data( 'title' ) || '';
} )
.on( 'mouseout focusout', e => e.stopImmediatePropagation() )
.on( 'click', function ( e, data ) {
// add title attribute so the tooltip can continue to work (jquery ui bug?)
$( this ).attr( "title", "" );
Expand Down
1 change: 1 addition & 0 deletions includes/class-admin-views.php
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,7 @@ function render_active_areas( $template_id, $type, $zone, $rows, $values ) {
</div>
<div class="gv-droppable-area-action">
<a href="#" class="gv-add-field button button-link button-hero" title=""
data-title="<?php echo esc_attr( $button_label ); ?>"
data-templateid="<?php echo esc_attr( $template_id ); ?>"
data-objecttype="<?php echo esc_attr( $type ); ?>"
data-areaid="<?php echo esc_attr( $zone . '_' . $area['areaid'] ); ?>"
Expand Down

0 comments on commit a908e50

Please sign in to comment.