TACTIC Open Source
Converted TableLayoutWdg to use <div> elements - Printable Version

+- TACTIC Open Source (http://forum.southpawtech.com)
+-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3)
+--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4)
+--- Thread: Converted TableLayoutWdg to use <div> elements (/showthread.php?tid=231)

Pages: 1 2 3 4 5 6


Converted TableLayoutWdg to use <div> elements - remkonoteboom - 07-19-2021

Hello everyone,

I just create a pull request that takes the TableLayoutWdg and converts it to use <div> elements instead <table>

This has been a long time coming.  Using the <table> elements has been a nightmare and caused all sorts of weird sizing issues.

However, the change is pretty drastic as it converts all <table>, <tr>, <td> tags to <div> elements.  The classes and structure are the same so if you happened to have any code that search elements using class names, then everything should still work fine.  If they specifically looked for the table elements, then you may need to update the code.

I have not merged the pull request in the hopes that some of you could try it out first since it's a pretty big change..  Most of it working quite well, however, I have seen some instances where  if you reorder columns, resize and then press refresh, it can mess up a bit.  A quick resize on one of the columns fixes the issue.  I will look into that sometime, but I think the table behaves way better and more predictably now.

Let me know if there are any big issues that would prevent this from being merged into the main branch.


RE: Converted TableLayoutWdg to use <div> elements - listy - 07-19-2021

New tables feels so much better!
But there is issues of course:
1. close, then open groupping will cause table to be crushed...
2. Resizing rows when hiddenrow element exanded going crazy strange


RE: Converted TableLayoutWdg to use <div> elements - Diego - 07-19-2021

I'll test the new TableLayoutWdg too, tomorrow morning.


RE: Converted TableLayoutWdg to use <div> elements - remkonoteboom - 07-19-2021

I put two more commits which improved the hidden row resizing and fixed the opening and closing of group elements.


RE: Converted TableLayoutWdg to use <div> elements - listy - 07-20-2021

Ok, tested latest fixes.
One more bug:
Changing something on row with TaskElementWdg is not making row GREEN, so it thinks nothing is changed.

Notes bug:
Click on create note, add it, then click on note again, try to add new note not working

When i refresh table sometimes getting this:
[attachment=146]

Why every cell of the table contatins this:

Code:
spt_bvr_list="[{"type": "load", "update": {"search_key": "dolly3d/assets?project=dolly3d&code=ASSETS00163", "column": "name", "interval": 4}, "cbjs_action": "\nvar id = bvr.src_el.getAttribute(\"id\");\nvar update = {};\nupdate[id] = bvr.update;\nbvr.src_el.spt_update = update;\n"}]"

Doesn't this can't be instantiated somehow?

And also i want to add custom option for cell to be centered width: 100%;


RE: Converted TableLayoutWdg to use <div> elements - remkonoteboom - 07-20-2021

"Changing something on row with TaskElementWdg is not making row GREEN, so it thinks nothing is changed."

This is fixed. In the same pull request.


RE: Converted TableLayoutWdg to use <div> elements - remkonoteboom - 07-20-2021

"hanging something on row with TaskElementWdg is not making row GREEN, so it thinks nothing is changed."

Can anyone with a bit of color sense suggest a better color than the "green" we have for rows with changes?


RE: Converted TableLayoutWdg to use <div> elements - Nachogor - 07-21-2021

Excuse my ignorance once again. But I can see

Commits on Jul 20, 2021
Fixed changes on task element widget not updating row color
TACTIC committed 7 hours ago

in github website, but when I fetch from my desktop app my last item in history is

Merge pull request #1672 from diegocortassa/DC-Patch106

What should I do to pull this commit? Or it wasn't commited yet and I should download it from Remko's until it's merged?

Thanks!
Nacho


RE: Converted TableLayoutWdg to use <div> elements - remkonoteboom - 07-21-2021

The commits are in a pull request.

https://github.com/Southpaw-TACTIC/TACTIC/pull/1673

The changes are still in my fork of the main repository. I don't want to merge the pull request because some of the underlying changes are quite large.

This page describes how you can test it:

https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

You could also clone my branch. Others may have different methods.


RE: Converted TableLayoutWdg to use <div> elements - listy - 07-21-2021

width: 100%; works fine for the cells, but i can't get table titles to be centered