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

doesn't work with v1.2.9 #14

Open
quenenni opened this issue Mar 19, 2013 · 2 comments
Open

doesn't work with v1.2.9 #14

quenenni opened this issue Mar 19, 2013 · 2 comments
Assignees

Comments

@quenenni
Copy link

I have the impression that your plugin doesn't work with the last version (v1.2.9) of etherpad-lite.

It was working fine with an older version (v1.2.1).

Now, when I create a new table, all I have is:

{"payload":[[" "

(html code)
{"payload":[[

" "


No Errors found in the logs.

@quenenni
Copy link
Author

I finally found the problem behind this error.

It was simply the statis/css/dataTables.css that wasn't loaded and so these parts of the table that should be hidden were not.

I couldn't find a way to load correctly that css file to have the class hide-el & tblBreak active, so I modified the file static/js/datatables-renderer.js to add the style directly in the html code:

Quite strange as I can see in the source code of my pad the call to that css file.. Maybe because it was not loaded in the iframe.. not sure.

To fix that problem, open the file 'static/js/datatables-renderer.js':

  • Search for 'hide-el' (4 occurrences) and add style='display:none;'
htmlTbl += "<td  name='payload' class='hide-el overhead' style='display:none;'>" + preHeader + "</td>";
  • Search for tblbreak (1 occurrence where it's class='tblBreak') and add style='display:block;'
cellsWithBr += tdText[k] + "<label value='tblBreak' class='hide-el' style='display:none;'>/r/n</label><label class='tblBreak' style='display:block;'></label>";

Now the tables are correctly showed, and nearly everything is working good.

The next problem (and hopefully the last) is when you press 'return' inside a cell, it breaks the row.

The problem should comes from the function 'doReturnKey' in the file static/js/datatables.js.
My problem now is that I couldn't find a way to use the console to do some debug.
I tried with console.log / console.error / top.console.log.. nothing works..grrr

As soon as I'm able to make that @#¼@#¼ console work, I should be able to determine where the problem comes from.

@quenenni
Copy link
Author

I forgot to mention...

I removed the line with 'aceInitInnerdocbodyHead' in the file 'ep.json' and I removed the function 'exports.aceInitInnerdocbodyHead' at the beginning of the file 'static/js/datatables.js'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants