Hi,
What is the purpose of the columnbuttons and contextmenus options in the migx Configurator? I can't find anything about them.
thanks.
g
[ed. note: Bruno17 last edited this post 13 years, 6 months ago.]
with contextmenus you can add menuitems to the popup which opens on right-click a row.
Its also possible to define your own custom-contextmenu-items.
columnbuttons does the same, but adds them as buttons into one column.
The column needs to have the renderRowActions - renderer.
Its also possible to render individual buttons into individual columns by using
new columns with the renderChunk - renderer.
You will need just to copy the generated button-code of the renderRowActions - renderer into your chunk.
thanks Bruno, this is what I thought, but I can not get either of them to do anything. I have checked the contextmenues options I want, but only the default are shown.
And the column buttons also do not show.
My button row is blank.
you may also need to have a field for the column
is it a MIGXdb or a MIGX - grid?
MIGX - I have given the column a field, but still no luck
column-buttons should now also work in a MIGX - grid:
https://github.com/Bruno17/MIGX/commit/4eec857f511640782936b557654ff3cba3b4277d
mods included in 2.4.2 beta1 from github
use the remove_migx - button for removing from MIGX - grid
make sure you have a column with the field: MIGX_id !!! - this can be hidden from the grid (show_in_grid: no)
Hi Bruno,
Many thanks for making these changes so fast. I have installed the latest beta, and while it is working, the buttons have no text and the ID is displayed (setting show in grid to no, removes the buttons)
If you want to hide the MIGX_id - column, use one of the other columns to render the buttons into them.
Can't say why there's no Text on your buttons.
On mine, there are.
whats the generated source-code of your buttons?
should be something like that:
<ul class="actions">
<li><a class="controlBtn update this.update" href="#">Edit</a></li>
<li><a class="controlBtn remove this.remove" href="#">Remove</a></li>
</ul>
[ed. note: Bruno17 last edited this post 13 years, 6 months ago.]
thanks for the tip, I just created a new column for the buttons and hid the column with the migx_id in it.
I have this:
<ul class="actions">
<li><a href="#" class="controlBtn update this.update"></a></li>
<li><a href="#" class="controlBtn remove this.remove"></a></li>
</ul>
does it show the translations when you change this parts in
https://github.com/Bruno17/MIGX/blob/4eec857f511640782936b557654ff3cba3b4277d/core/components/migx/configs/grid/grid.config.inc.php
$gridcontextmenus['remove_migx']['code']="
m.push({
className : 'remove',
text: '[[%migx.remove]]',
handler: 'this.remove'
});
";
$gridcontextmenus['update']['code']="
m.push({
className : 'update',
text: '[[%migx.edit]]',
handler: 'this.update'
});
m.push('-');
";