Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable js createlement in render function #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 7, 2016

  1. enable js createlement in reder function

    this change allows to make this ( cthe click event in particular)
    
     {
                  title: "accès bureau de prescription",
                  render: function (data, type, row, meta)
                  {
                      return $('<div/>', {
                          text: "Presc. V5",
                          class: 'ouvrirPrescV5'                      
                      })
                    .click(function () {  lancerBureau(row); })[0];
                  }
              },
    
    
    beacause i think that in a full javascript data use of datatable  it's not logical to work with selector like this:
      .on('click', 'tbody .ouvrirPrescV5', function () {
    
             var dt = monTableau.row($(this).parents('tr')).data();
             lancerBureau(dt);
          });
    
    //the idea is to full manage the contenent of the cell including events
    // if you have another way to do such, this change is useless but as i see the innerHTML
    icepower03 committed Jan 7, 2016
    Configuration menu
    Copy the full SHA
    0e15f85 View commit details
    Browse the repository at this point in the history