Lines 94-102
export default {
Link Here
|
94 |
this.actions["-1"].forEach(action => { |
94 |
this.actions["-1"].forEach(action => { |
95 |
if (typeof action === "object") { |
95 |
if (typeof action === "object") { |
96 |
let action_name = Object.keys(action)[0] |
96 |
let action_name = Object.keys(action)[0] |
97 |
content.push( |
97 |
let should_display = true |
98 |
`<a class="${action_name} btn btn-default btn-xs" role="button"><i class="${action[action_name].icon}"></i> ${action[action_name].text}</a>` |
98 |
|
99 |
) |
99 |
if ( |
|
|
100 |
typeof action[action_name] |
101 |
.should_display === "function" |
102 |
) { |
103 |
should_display = |
104 |
action[action_name].should_display(row) |
105 |
} |
106 |
|
107 |
if (should_display) { |
108 |
content.push( |
109 |
`<a class="${action_name} btn btn-default btn-xs" role="button"><i class="${action[action_name].icon}"></i> ${action[action_name].text}</a>` |
110 |
) |
111 |
} |
100 |
} else if (action == "edit") { |
112 |
} else if (action == "edit") { |
101 |
content.push( |
113 |
content.push( |
102 |
'<a class="edit btn btn-default btn-xs" role="button"><i class="fa fa-pencil"></i> ' + |
114 |
'<a class="edit btn btn-default btn-xs" role="button"><i class="fa fa-pencil"></i> ' + |
103 |
- |
|
|