We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42967
    • 143 Posts
    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.]
      Eighth day design
      Design agency with offices in Edinburgh and Brighton
      • 4172
      • 5,888 Posts
      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.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 42967
        • 143 Posts
        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.
          Eighth day design
          Design agency with offices in Edinburgh and Brighton
          • 4172
          • 5,888 Posts
          you may also need to have a field for the column

          is it a MIGXdb or a MIGX - grid?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 42967
            • 143 Posts
            MIGX - I have given the column a field, but still no luck
              Eighth day design
              Design agency with offices in Edinburgh and Brighton
              • 4172
              • 5,888 Posts
              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)

                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 42967
                • 143 Posts
                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)

                  Eighth day design
                  Design agency with offices in Edinburgh and Brighton
                  • 4172
                  • 5,888 Posts
                  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.]
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 42967
                    • 143 Posts
                    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>
                    
                      Eighth day design
                      Design agency with offices in Edinburgh and Brighton
                      • 4172
                      • 5,888 Posts
                      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('-');
                      ";
                      
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!