8000 edited widget modules for css efficiency by captain-nemo-10994 · Pull Request #59 · LightSys/centrallix · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

edited widget modules for css efficiency #59

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

captain-nemo-10994
Copy link

How does this look?

Copy link
Member
@gbeeley gbeeley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change needed in class naming. Thanks! :)

@@ -128,7 +133,7 @@ int htmapRender(pHtSession s, pWgtrNode map_node, int z)
name, *osrc, osrc, !*osrc, allow_select, show_select, name);

/** HTML body <DIV> element to be used by the OpenLayers map. **/
htrAddBodyItem_va(s, "<DIV ID=\"map%POSbase\">\n", id);
htrAddBodyItem_va(s, "<DIV ID=\"map%POSbase\" class=div.wmap>\n", id);
8000 Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be class="wmap".

@gbeeley gbeeley changed the title edited htdrv_map.c for css efficiency edited widget modules for css efficiency Jul 8, 2022
Copy link
Member
@gbeeley gbeeley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to other 8000 s. Learn more.

Thanks! See comments for changes needed.

@@ -48,6 +48,13 @@ static struct
}
HTDT;

int htdtSetup(pHtSession s)
{
htrAddStylesheetItem_va(s,"\t.absHidInh { OVERFLOW: hidden; POSITION:absolute; VISIBILITY:inherit;}\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure that all classes begin with the prefix for the widget in question. In this case "dt". Also, it doesn't look like this class actually gets applied to any datetime widget DIVs, but it is necessary to replace the original CSS. Multiple classes can be applied to an HTML element by separating the classes with a space, e.g. <div class="dtBtn dtAhi"></div> or similar.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do see this issue in other widgets as well, so I'll go ahead and turn the PR back over to you for updates.

Copy link
Member
@gbeeley gbeeley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting closer. :) Once the items addressed here are fixed, the next step is to test this not just with the samples/ files but also with Kardia itself. I'll want to log into your VM and use your running copy of Centrallix to test this out.

htrAddBodyItem_va(s,"<DIV ID=\"dd%POScon1\"></DIV>\n",id);
htrAddBodyItem_va(s,"<DIV ID=\"dd%POScon2\"></DIV>\n",id);
htrAddBodyItem_va(s,"<DIV ID=\"dd%POScon1\" class=\"ddCon1\"></DIV>\n",id);
htrAddBodyItem_va(s,"<DIV ID=\"dd%POScon2\" class=\"ddCon2\"></DIV>\n",id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the ddAbsHid class got left off of these.

@@ -48,6 +48,14 @@ static struct
}
HTMN;

int htmenuSetup(pHtSession s)
{
htrAddStylesheetItem_va(s,"\t.zeroLeftTop { LEFT:0px; TOP:0px; }\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure this class uses the module prefix.

// else
// htrAddBodyItem(s,"<tr><td background=\"/sys/images/white_1x1.png\"><img src=\"/sys/images/trans_1.gif\" height=\"1\" width=\"1\"></td><td>");
// }
// else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dom0NS branch of this IF statement can be deleted entirely (not just commented out). We can always go back to prior git revisions to retrieve the code if we ever need it for some reason.

@@ -343,7 +349,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z)
htrAddWgtrCtrLinkage_va(s, tabpage_obj, "htr_subel(_parentobj, \"tc%POSpane%POS\")", id, i+1);

/** Add DIV section for the tabpage. **/
htrAddBodyItem_va(s,"<div id=\"tc%POSpane%POS\" style=\"POSITION:absolute; VISIBILITY:%STR&CSSVAL; LEFT:0px; TOP:0px; WIDTH:%POSpx; Z-INDEX:%POS;\">\n",
htrAddBodyItem_va(s,"<div id=\"tc%POSpane%POS\" class=\"tcPane\" style=\"POSITION:absolute; VISIBILITY:%STR&CSSVAL; LEFT:0px; TOP:0px; WIDTH:%POSpx; Z-INDEX:%POS;\">\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a CSS rule to to with tcPane. The static inline styles can be included in that.

@@ -296,7 +302,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z)
}

/** h-2 and w-2 because w3c dom borders add to actual width **/
htrAddBodyItem_va(s,"<div id=\"tc%POSbase\" style=\"position:absolute; overflow:hidden; height:%POSpx; width:%POSpx; left:%INTpx; top:%INTpx; z-index:%POS; border-width: 1px; border-style:%STR&CSSVAL; border-color: %STR&CSSVAL; border-radius:%POSpx %POSpx %POSpx %POSpx; box-shadow: %DBLpx %DBLpx %POSpx %STR&CSSVAL;\">\n",
htrAddBodyItem_va(s,"<div id=\"tc%POSbase\" class=\"tcBase\" style=\"position:absolute; overflow:hidden; height:%POSpx; width:%POSpx; left:%INTpx; top:%INTpx; z-index:%POS; border-width: 1px; border-style:%STR&CSSVAL; border-color: %STR&CSSVAL; border-radius:%POSpx %POSpx %POSpx %POSpx; box-shadow: %DBLpx %DBLpx %POSpx %STR&CSSVAL;\">\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static inline styles can go up in the CSS rule.

Copy link
Member
@gbeeley gbeeley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple more items here. Thanks!

htrAddBodyItem_va(s,"<DIV ID=\"dd%POScon1\"></DIV>\n",id);
htrAddBodyItem_va(s,"<DIV ID=\"dd%POScon2\"></DIV>\n",id);
htrAddBodyItem_va(s,"<DIV ID=\"dd%POScon1\" class=\"ddCon1 ddAbsHid\"></DIV>\n",id);
htrAddBodyItem_va(s,"<DIV ID=\"dd%POScon2\" class=\"ddCon2 ddAbsHid\"></DIV>\n",id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a typo here - ddAbsHid vs ddHidAbs.

htrAddBodyItem_va(s,"</table></div><div id=\"mn%POShigh\"></div></body></div>", id);
else
htrAddBodyItem_va(s,"</table></div><div id=\"mn%POShigh\"></div></div>\n", id);
htrAddBodyItem_va(s,"</table></div><div id=\"mn%POShigh\" class=\"menuHigh zeroLeftTop\"></div></div>\n", id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like zeroLeftTop didn't get updated here.

Copy link
Member
@gbeeley gbeeley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good.

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

Successfully merging this pull request may close these issues.

2 participants
0