open-admin icon indicating copy to clipboard operation
open-admin copied to clipboard

show the title or label to indicate the actions.

Open Tech-Loyal opened this issue 1 year ago • 0 comments

show the title or label to indicate the actions. I solved it in the following way: Go to the route: \vendor\open-admin-org\open-admin\resources\views\grid\actions\actions.blade.php

add this there:

<script> document.querySelectorAll('.__actions__div a').forEach(action => { action.setAttribute('title', action.querySelector('.label')?.innerText.trim() || 'Action'); }); </script>

it looks like this:

<div class="__actions__div @if(!empty($showLabels))with-labels @endif">

    @foreach($default as $action)
    
        {!! $action->render() !!}
        
    @endforeach
    
    @if(!empty($custom))
    
        @if(!empty($default))
        
        <span class="row-action-divider"></span>
        
        @endif
        
        @foreach($custom as $action)
        
            {!! $action->render() !!}
            
        @endforeach
        
    @endif
    
</div>


<script>

    document.querySelectorAll('.__actions__div a').forEach(action => {
    
        action.setAttribute('title', action.querySelector('.label')?.innerText.trim() || 'Acción');
        
    });
    
</script>


@yield('child') 

Screenshot_22

Tech-Loyal avatar Nov 04 '24 19:11 Tech-Loyal