question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No edit or Remove icon button

See original GitHub issue

head.php :

<link rel="stylesheet" type="text/css" href="./css/style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>        
<script src="./plugins/jquery.tabledit.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta charset="utf-8">

the table is OK but no edit or remove icon:

image

jquery code:

<script> $(document).ready(function(){ $('#editable_table').Tabledit({ url:'action.php', hideIdentifier: true, columns:{ identifier:[0, "product_id"], editable:[[6, 'product_stock']] }, restoreButton:false, onSuccess:function(data, textStatus, jqXHR) { if(data.action == 'delete') { $('#'+data.id).remove(); } } }); }); </script>

Can you please help me?

Thanks for your help

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
eureka2commented, Oct 6, 2018

Hi,

Replace “btn-default” (bootstratp 3) by “btn-secondary” (bootstratp 4) and “glyphicon” by “fa” :

			buttons: {
				edit: {
					class: 'btn btn-sm btn-secondary',
					html: '<span class="fa fa-pencil"></span>',
					action: 'edit'
				},
				delete: {
					class: 'btn btn-sm btn-secondary',
					html: '<span class="fa fa-trash"></span>',
					action: 'delete'
				},

Glyphicons icon font is dropped in bootstrap4, use font-awesome : <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">

image

0reactions
rizwanswaticommented, Jul 1, 2021

i had the same issue. you have to change this into tabledit() function section. here is how i did it:

$(‘#datatable-buttons’).on(‘draw.dt’,function(){ $(‘#datatable-buttons’).Tabledit({ url:request_url+‘getUpdate’, // method:“POST”, dataType:‘json’, columns:{ identifier : [0, ‘orders_id’], editable:[[1, ‘invoice_number’], [2, ‘mobile_number’], [3, ‘total_items’] ] // [3, ‘gender’, ‘{“1”:“Male”,“2”:“Female”}’]] },

               buttons: {
                edit: {
                    class: 'btn btn-sm btn-secondary',
                    html: '<span class="fas fa-pencil-alt"></span>',
                    action: 'edit'
                },
                delete: {
                    class: 'btn btn-sm btn-secondary',
                    html: '<span class="fas fa-trash"></span>',
                    action: 'delete'
                }
            },

               restoreButton : false,
               onSuccess : function(data, textStatus, jqXHR){
                   console.log($data);
                if(data.action == 'delete')
                {
                    $('#' + data.id).remove();
                    $('#datatable-buttons').ajax.reload();
                }
            }
        });
    });

some part maybe irrelevant for u, but it will give u an idea where to make changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove button Icons – Download for Free in PNG and SVG
Free Remove button icons in various UI design styles for web, mobile. Download static and animated Remove button vector icons for free in...
Read more >
Delete button Icons & Symbols - Flaticon
4062 delete button icons. Vector icons in SVG, PSD, PNG, EPS and ICON FONT.
Read more >
How do I remove the "edit button" display… - Apple Community
I would like to know if anyone has found a way to get rid of the edit button icon that now sits like...
Read more >
How do I remove Flutter IconButton big padding?
Simply pass an empty BoxConstrains to the constraints property and a padding of zero. IconButton( padding: EdgeInsets.zero, ...
Read more >
Use Grid Edit Buttons with Icons Only and No Text
An example on how to remove the text from the Edit buttons of a Kendo UI Grid and leave only the icons.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found