jQuery - Mootols issue when calling var editor = new $.fn.dataTable.Editor( {

jQuery - Mootols issue when calling var editor = new $.fn.dataTable.Editor( {

jose_luisjose_luis Posts: 3Questions: 0Answers: 0
edited August 2012 in General
Hello,
I'm having issues with Datatables' Editor files when integrating in an enviroment that uses Mootols as well as jQuery.

I've found that if I remove the code starting at : "var editor = new $.fn.dataTable.Editor( { ... }); ", datatables framework is able to get the data from the database and display the gathered data, except that I miss the functionality expeccted from such removed code.

Any advice on how I can avoid that conflict?

tnx

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Have you tried using just `jQuery` rather than the `$` alias?

    [code]
    var editor = new jQuery.fn.dataTable.Editor( { ... });
    [/code]

    Allan
  • jose_luisjose_luis Posts: 3Questions: 0Answers: 0
    Hi Allan,
    Yes, I tried that before reporting it here, but I get the same error.

    Not sure if this helps, the error I'm getting in FireBug looks like:

    "
    TypeError: $ is undefined
    document.id('wrapper').setStyle('width', width);
    ...
    "

    And it refers to: mootools-core.js (line 514)
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Can you give us a link to the page so wee can see what is happening please?

    Allan
  • jose_luisjose_luis Posts: 3Questions: 0Answers: 0
    Sure,
    Try http://a4enterprise.com/pfm/index.php?option=com_pfm

    The Datatable file I'm working on is: table.inc_gross_income_items.js, if I remove the instantiation of var editor ... and its references on "aButtons" then no error is thrown in FireBug.
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Ah! I see. I think that this issue is also that which is reported here: http://datatables.net/forums/discussion/11488/inline-form-commands-example-is-not-working#Item_2 .

    There is unfortunately an issue with Editor 1.2.0 whereby if TableTools is not also included on the page then a Javascript error occurs. Editor 1.2.1 will resolve this issue and will be released next week. Until then, a workaround is to include TableTools on the page.

    Regards,
    Allan
This discussion has been closed.