diff --git a/tailbone/newgrids/core.py b/tailbone/newgrids/core.py index ccdf1d4b..0beba6de 100644 --- a/tailbone/newgrids/core.py +++ b/tailbone/newgrids/core.py @@ -611,7 +611,7 @@ class Grid(object): """ url = action.get_url(row, i) if url: - kwargs = {'class_': action.key} + kwargs = {'class_': action.key, 'target': action.target} if action.icon: icon = HTML.tag('span', class_='ui-icon ui-icon-{}'.format(action.icon)) return tags.link_to(icon + action.label, url, **kwargs) @@ -707,11 +707,12 @@ class GridAction(object): 'actions' column when rendering the grid. """ - def __init__(self, key, label=None, url='#', icon=None): + def __init__(self, key, label=None, url='#', icon=None, target=None): self.key = key self.label = label or prettify(key) self.icon = icon self.url = url + self.target = target def get_url(self, row, i): """