Would it be possible to name the grid buttons and smartgrid table links? This would make it pretty easy to tweak the buttons. For example. I would like to change the Delete button to red. I can do it like this: rowBtns = grid.elements('div', _class = 'row_buttons') if rowBtns: for row in rowBtns: row[-1].update(_class = 'button btn btn-danger')
But when I am changing a table link in a smartgrid there needs to be extra code to change the table link in the grid and in any forms which are created by it. It could be something like this: delBtns = grid.elements('a', _name = deleteBtn) if delBtns: for delBtn.update(_class = 'button btn btn-danger') and then whenever this button is being used by the grid / forms etc it will appear correctly. Also highlighting a specific button becomes easier. Select TR by id and button by name. names for the table links could be: if multi_links: name = [tablename]_[fieldname] + 'Btn' else: name = [tablename] + 'Btn' the other grid button names, I think, should hold roughly with the function argument names that control them. 'createBtn', 'detailsBtn', 'editBtn' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.