-
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
Open
captain-nemo-10994
wants to merge
9
commits into
master
Choose a base branch
from
css-efficiency-redo
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
350e59c
edited htdrv_map.c for css efficiency
1a07317
fixed a typo
d89838a
The roughest draft of the CSS Efficiency Redo. Recommendations for ch…
26ef763
Removed unneccessary file
12f9449
Tweaked map widget
b1dcaf8
Renamed and applied CSS classes
ea9d9ae
Changes requested for PR
93e90b5
Changes requested for PR (part 2)
2907a7b
Fixed dropdown borders and datetime font color
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,14 @@ static struct { | |
| int idcnt; | ||
| } HTDD; | ||
|
|
||
|
|
||
| int htddSetup(pHtSession s) | ||
| { | ||
| htrAddStylesheetItem_va(s,"\t.hidAbs { OVERFLOW:hidden; POSITION:absolute; }\n:"); | ||
| htrAddStylesheetItem_va(s,"\t.ddBtn { VISIBILITY:inherit; cursor:default; border:1px outset #e0e0e0;}\n"); | ||
| htrAddStylesheetItem_va(s,"\t.ddCon1 { VISIBILITY:inherit; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n"); | ||
| htrAddStylesheetItem_va(s,"\t.ddCon2 { VISIBILITY:hidden; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n"); | ||
| return 0; | ||
| } | ||
| /* | ||
| htddRender - generate the HTML code for the page. | ||
| */ | ||
|
|
@@ -138,9 +145,9 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { | |
| strtcpy(name,ptr,sizeof(name)); | ||
|
|
||
| /** Ok, write the style header items. **/ | ||
| htrAddStylesheetItem_va(s,"\t#dd%POSbtn { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; HEIGHT:%POSpx; WIDTH:%POSpx; Z-INDEX:%POS; cursor:default; background-color: %STR&CSSVAL; border:1px outset #e0e0e0;}\n",id,x,y,h,w,z,bgstr); | ||
| htrAddStylesheetItem_va(s,"\t#dd%POScon1 { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:inherit; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,h-2,z+1); | ||
| htrAddStylesheetItem_va(s,"\t#dd%POScon2 { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:hidden; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,h-2,z+1); | ||
| htrAddStylesheetItem_va(s,"\t#dd%POSbtn { LEFT:%INTpx; TOP:%INTpx; HEIGHT:%POSpx; WIDTH:%POSpx; Z-INDEX:%POS; background-color: %STR&CSSVAL;}\n",id,x,y,h,w,z,bgstr); | ||
| htrAddStylesheetItem_va(s,"\t#dd%POScon1 { HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,h-2,z+1); | ||
| htrAddStylesheetItem_va(s,"\t#dd%POScon2 { HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,h-2,z+1); | ||
|
|
||
| htrAddScriptGlobal(s, "dd_current", "null", 0); | ||
| htrAddScriptGlobal(s, "dd_lastkey", "null", 0); | ||
|
|
@@ -190,7 +197,7 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { | |
| htrAddScriptInit_va(s," dd_init({layer:wgtrGetNodeRef(ns,\"%STR&SYM\"), c1:htr_subel(wgtrGetNodeRef(ns,\"%STR&SYM\"), \"dd%POScon1\"), c2:htr_subel(wgtrGetNodeRef(ns,\"%STR&SYM\"), \"dd%POScon2\"), background:'%STR&JSSTR', highlight:'%STR&JSSTR', fieldname:'%STR&JSSTR', numDisplay:%INT, mode:%INT, sql:'%STR&JSSTR', width:%INT, height:%INT, form:'%STR&JSSTR', osrc:'%STR&JSSTR', qms:%INT, ivs:%INT, popup_width:%INT});\n", name, name, id, name, id, bgstr, hilight, fieldname, num_disp, mode, sql?sql:"", w, h, form, osrc, query_multiselect, invalid_select_default, pop_w); | ||
|
|
||
| /** HTML body <DIV> element for the layers. **/ | ||
| htrAddBodyItem_va(s,"<DIV ID=\"dd%POSbtn\">\n" | ||
| htrAddBodyItem_va(s,"<DIV ID=\"dd%POSbtn\" class=\"ddBtn hidAbs\">\n" | ||
| "<IMG SRC=\"/sys/images/ico15b.gif\" style=\"float:right;\">\n", id); | ||
| /*htrAddBodyItem_va(s,"<TABLE width=%POS cellspacing=0 cellpadding=0 border=0>\n",w); | ||
| htrAddBodyItem(s, " <TR><TD><IMG SRC=/sys/images/white_1x1.png></TD>\n"); | ||
|
|
@@ -203,8 +210,8 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { | |
| htrAddBodyItem_va(s," <TD><IMG SRC=/sys/images/dkgrey_1x1.png height=1 width=%POS></TD>\n",w-2); | ||
| htrAddBodyItem(s, " <TD><IMG SRC=/sys/images/dkgrey_1x1.png></TD></TR>\n"); | ||
| htrAddBodyItem(s, "</TABLE>\n");*/ | ||
| 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); | ||
|
||
| htrAddBodyItem(s, "</DIV>\n"); | ||
|
|
||
| /* Read and initialize the dropdown items */ | ||
|
|
@@ -376,6 +383,7 @@ int htddInitialize() { | |
| strcpy(drv->Name,"DHTML Drop Down Widget Driver"); | ||
| strcpy(drv->WidgetName,"dropdown"); | ||
| drv->Render = htddRender; | ||
| drv->Setup = htddSetup; | ||
| xaAddItem(&(drv->PseudoTypes), "dropdownitem"); | ||
|
|
||
| /** Register events **/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.