GetSimple Support Forum
Feature Request: Add plugin's ID to table row class on Plugins page. - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Feature Requests (http://get-simple.info/forums/forumdisplay.php?fid=7)
+--- Thread: Feature Request: Add plugin's ID to table row class on Plugins page. (/showthread.php?tid=6700)



Feature Request: Add plugin's ID to table row class on Plugins page. - johnstray2001 - 2014-09-02

I develop the GetSimple Blog plugin, and one of the things it comes with is an icon in the tab is creates at the top of the admin area. I'd like to be able to add the same icon to the plugin's title in the list of plugins using a bit of CSS. To do that, I would need to know the class of the TR row where the plugins show on the 'Plugins' tab, but as this currently changes according to how many plugins are installed, this has not been easily possible. So, adding the plugin's id to the class would enable the ability to do this, and you would end up with something that looks like:
Code:
<tr id="tr-0" class="enabled gs-blog">

File Modification - plugins.php:62

Change the following:
Code:
$table .= '<tr id="tr-'.$counter.'" class="'.$trclass.'" >';

to:
Code:
$table .= '<tr id="tr-'.$counter.'" class="'.$trclass.' '.$pathName.'" >';



RE: Feature Request: Add plugin's ID to table row class on Plugins page. - shawn_a - 2014-09-03

Code:
    $('#plugins .edittable tr td:first-child b').each(function(i,elem){
        $(elem).closest('tr').addClass(elem.innerHTML.toLowerCase().replace(/ /g, '_').replace(/.php/g, ''));
    });

<tr id="tr-0" class="disabled anonymous_data"><td style="width:150px"><b>anonymous_data.php</b></td><td>
</td></tr>