Plugin Developer Discussion

Discussion for FogBugz Plugin developers

Strange behavior using Foms.SelectInput

Resulting selection come out really really wide.

Wider than actual values available.

Is there a CSS style that needs to be overridden or can the method be enhanced to specify the width?

i.e.

string projectsHtml = Forms.SelectInput(api.AddPluginPrefix("project"), projectOptions, indexValue, projectValues);

Produces a select that's way wider than any of the options. Checked html and there are no blank or empty spaces in the display options.
Martin Zardecki Send private email
Monday, June 22, 2009
 
 
Sounds like a bug.  I've created a case to look into it.
David Fullerton Send private email
Tuesday, June 23, 2009
 
 
Can you tell me where you're seeing this?  I can reproduce it with a select box in a popup and have a fix for that, but if you're seeing it somewhere else please let me know.
David Fullerton Send private email
Tuesday, June 23, 2009
 
 
It's generated inside PageDisplay method, here's the generated HTML (the <form>...</form> portion).

There are start and end calendar fields and a user and project <select> drop-downs.

Note that in the case of User <select> the widest word is "Administrator" yet on screen it's much wider.

I'd attach a screen shot if I could.

Hope this helps.

===============<HTML BELOW>=============

<form action="default.asp?pg=pgPlugin&ixPlugin=4" method="post">
            <input type="hidden" name="P4_actionToken" value="72ba0eaf74de33c21768d85cdfe427be" />
            <input type="hidden" name="P4_sAction" value="fetch" />
            <table border="0" cellspacing="0">
            <tr>
                <td nowrap>Start</td><td nowrap> <table cellspacing="0" cellpadding="0" class="dtInput"> <tr><td class="left"><input  class="dlgText wide "  id="start"  name="P4_start"  value="6/1/2009"  valueDefault="mm/dd/yyyy"  type="text"  onblur="if(this.value != '' &amp;&amp; this.value != '' &amp;&amp; this.value.toLowerCase().indexOf('None'.toLowerCase()) == -1) { cal.setDate(cal.guessDate(this.value)); this.value=CTZsDateRawFromUTC(cal.dt); }"  onclick="if(this.value=='') { this.select(); }"  onfocus="cal.bFutureOK = true; cal.bPastOK = true;"  onkeypress="if (stopFormSubmission(event)) { this.onblur.apply(this); }" /></td><td class="right"><a  href="javascript:void 0;"  onkeydown="if(isTab(event)) theMgr.hidePopup('tblTime');"  onclick="cal.bFutureOK = true; cal.bPastOK = true; cal.fTextBar = true;cal.setDate(cal.guessDate(document.getElementById('start').value));cal.show('start'); return cancel(event);" ><img src="images/icon-cal.gif" border="0" /></a></td></tr> </table> </td>
                <td nowrap>End</td><td nowrap> <table cellspacing="0" cellpadding="0" class="dtInput"> <tr><td class="left"><input  class="dlgText wide "  id="end"  name="P4_end"  value="6/30/2009"  valueDefault="mm/dd/yyyy"  type="text"  onblur="if(this.value != '' &amp;&amp; this.value != '' &amp;&amp; this.value.toLowerCase().indexOf('None'.toLowerCase()) == -1) { cal.setDate(cal.guessDate(this.value)); this.value=CTZsDateRawFromUTC(cal.dt); }"  onclick="if(this.value=='') { this.select(); }"  onfocus="cal.bFutureOK = true; cal.bPastOK = true;"  onkeypress="if (stopFormSubmission(event)) { this.onblur.apply(this); }" /></td><td class="right"><a  href="javascript:void 0;"  onkeydown="if(isTab(event)) theMgr.hidePopup('tblTime');"  onclick="cal.bFutureOK = true; cal.bPastOK = true; cal.fTextBar = true;cal.setDate(cal.guessDate(document.getElementById('end').value));cal.show('end'); return cancel(event);" ><img src="images/icon-cal.gif" border="0" /></a></td></tr> </table> </td>
                <td nowrap>User</td><td nowrap><select  name="P4_person" ><option value="0" selected="selected">All</option><option value="2">Administrator</option></select><script>DLCL();</script></td>
                <td nowrap>Project</td><td nowrap><select  name="P4_project" ><option value="0" selected="selected">All</option><option value="1">Sample Project</option><option value="2">Test Project</option></select><script>DLCL();</script></td>
                <td nowrap><input type="submit" value="Fetch"/></td>
            </tr>
            </table>
            </form>
Martin Zardecki Send private email
Wednesday, June 24, 2009
 
 
I was able to repro it with your HTML.  The bug was happening in IE because your <select> is inside a <table>, and IE renders tables differently than everyone else.
David Fullerton Send private email
Wednesday, June 24, 2009
 
 
Main reason I stuck it in a <table> is that otherwise the HTML generated by DateInputCTZ puts everything on separate lines.

Any advice on this?
Martin Zardecki Send private email
Monday, June 29, 2009
 
 
You could tweak the CSS to make them not be on separate lines, but putting it in a table is fine, and this bug should go away with the next release.
David Fullerton Send private email
Tuesday, June 30, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz