edited widget modules for css efficiency#59
edited widget modules for css efficiency#59captain-nemo-10994 wants to merge 9 commits intomasterfrom
Conversation
gbeeley
left a comment
There was a problem hiding this comment.
Change needed in class naming. Thanks! :)
centrallix/htmlgen/htdrv_map.c
Outdated
|
|
||
| /** 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); |
…anges are both welcome and desired.
gbeeley
left a comment
There was a problem hiding this comment.
Thanks! See comments for changes needed.
centrallix/htmlgen/htdrv_datetime.c
Outdated
|
|
||
| int htdtSetup(pHtSession s) | ||
| { | ||
| htrAddStylesheetItem_va(s,"\t.absHidInh { OVERFLOW: hidden; POSITION:absolute; VISIBILITY:inherit;}\n"); |
There was a problem hiding this comment.
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.
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.
gbeeley
left a comment
There was a problem hiding this comment.
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.
It looks like the ddAbsHid class got left off of these.
centrallix/htmlgen/htdrv_menu.c
Outdated
|
|
||
| int htmenuSetup(pHtSession s) | ||
| { | ||
| htrAddStylesheetItem_va(s,"\t.zeroLeftTop { LEFT:0px; TOP:0px; }\n"); |
There was a problem hiding this comment.
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.
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
|
|
||
| /** 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.
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
|
|
||
| /** 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.
Static inline styles can go up in the CSS rule.
gbeeley
left a comment
There was a problem hiding this comment.
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.
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.
Looks like zeroLeftTop didn't get updated here.
How does this look?