-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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! :)
centrallix/htmlgen/htdrv_map.c
Outdated
@@ -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); |
There was a problem hiding this comment.
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"
.
…anges are both welcome and desired.
There was a problem hiding this 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.
centrallix/htmlgen/htdrv_datetime.c
Outdated
@@ -48,6 +48,13 @@ static struct | |||
} | |||
HTDT; | |||
|
|||
int htdtSetup(pHtSession s) | |||
{ | |||
htrAddStylesheetItem_va(s,"\t.absHidInh { OVERFLOW: hidden; POSITION:absolute; VISIBILITY:inherit;}\n"); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
centrallix/htmlgen/htdrv_dropdown.c
Outdated
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); |
There was a problem hiding this comment.
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.
centrallix/htmlgen/htdrv_menu.c
Outdated
@@ -48,6 +48,14 @@ static struct | |||
} | |||
HTMN; | |||
|
|||
int htmenuSetup(pHtSession s) | |||
{ | |||
htrAddStylesheetItem_va(s,"\t.zeroLeftTop { LEFT:0px; TOP:0px; }\n"); |
There was a problem hiding this comment.
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.
centrallix/htmlgen/htdrv_menu.c
Outdated
// 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 |
There was a problem hiding this comment.
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.
centrallix/htmlgen/htdrv_tab.c
Outdated
@@ -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", |
There was a problem hiding this comment.
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.
centrallix/htmlgen/htdrv_tab.c
Outdated
@@ -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", |
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
centrallix/htmlgen/htdrv_dropdown.c
Outdated
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); |
There was a problem hiding this comment.
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.
centrallix/htmlgen/htdrv_menu.c
Outdated
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good.
How does this look?