This is a space where the community of Teamwork users can ask for support, explanations,
and also vote up or down questions, answers and feature requests.
>> Back to Teamwork's site.

Hi! ;)

Would be nice if we could change the width of the form field (we would need it much larger) "which assignment" in the "timesheet - day" plugin or even in all fields where the "assignment" can be choosen ... ;)

Is there a simple way to do that? ...

Tks Patrick

asked Jan 11 at 11:17

pgat's gravatar image

pgat
875


its not about the amount of entries, its about the width of the created drop-down span. the span gets generated by javascript (onfocus="createDropDown($(this),300,400);) the value 400 (the height) gets the value from assignmentsCombo.iframe_width, but 300 is hardcoded somewhere else.

we created a workaround, that works great for us:

/commens/layout/smartCombo/partSmartCombo.js uncomment line 7:

//dropDown.css({position:"absolute",width:ifrWidth?ifrWidth:300,height : ifrHeight ? ifrHeight : 100,overflow:"auto"});

append:

dropDown.css({position:"absolute",width:"auto",height : ifrHeight ? ifrHeight : 100,overflow:"auto"});
dropDown.css({"padding-right": 15, "white-space":"nowrap" });

and we changed the values in "partWorklogDayWP.jsp" to

assignmentsCombo.maxLenght = 50;
assignmentsCombo.iframe_height=500;

btw: in my humble opinion there is no need to hardcode the width of a field, that gets filled with content you have no idea of the string-length :-)

greetings from vienna/austria

bernhard mäser125

answered Feb 13 at 10:43

Bernhard%20M%C3%A4ser's gravatar image

Bernhard Mäser
814

edited Feb 13 at 11:03

oh, and btw: the value "300" in the javascript is NOT the hardcoded value, its just the fallback :-)

(Feb 13 at 10:45) Bernhard Mäser

yeah we would need that too!

answered Jan 11 at 11:25

lukas13's gravatar image

lukas13
11

There is not a centralized point on which you can change the lenght of that field. Every form is different and the design of the page does not always allow a larger filed. To enlarge the field of the portlet worklog day open the file partWorklogDaywp.jsp (TEAMWORK_ROOT/webapps/ROOT/applications/teamwork/portal/portlet/parts) and change this line:

assignmentsCombo.maxLenght = 30;

with a higher value for example:

assignmentsCombo.maxLenght = 40;

Remember to backup the file before doing this and that every time you will upgrade you instance the file will be replaced. So save it somewhere before upgrading.

answered Jan 16 at 05:56

Silvia%20Chelazzi's gravatar image

Silvia Chelazzi ♦♦
403018

edited Jan 16 at 05:58

I'm sorry ... but this doesn't seem to work correctly ... as you can see in the screenshot - only the field is getting larger - the ajax dropdown isn't ???

Screenshot

answered Jan 26 at 06:51

pgat's gravatar image

pgat
875

edited Jan 26 at 06:57

HI Patrick, to enlarge the dropdown part you should add after this line:

assignmentsCombo.maxRowToFetch=40;

the following line:

assignmentsCombo.iframe_width=400;

Change that value according to your needs.

answered Jan 26 at 08:27

Silvia%20Chelazzi's gravatar image

Silvia Chelazzi ♦♦
403018

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×5
×2
×2

Asked: Jan 11 at 11:17

Seen: 103 times

Last updated: Feb 13 at 11:03

| Teamwork faq | about | contact us | Teamwork blog | Teamwork documentation | feedback always welcome