Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Joshua Messina
extending the text field of the Wall portlet
7 de mayo de 2012 15:26
Respuesta

Joshua Messina

Ranking: Junior Member

Mensajes: 30

Fecha de incorporación: 13 de abril de 2012

Mensajes recientes

I created a profile page for users of my site. On the page there is a wall portlet which takes up about 35% of the screen width. However, the text field is only a fraction of that size. It is possible to click in the lower right corner and drag it to make it larger, but this is temporary. As soon as the page is reloaded it goes back to its default size. Is there anyway to stretch the text box to fill the maximum space permanently?
David H Nebinger
RE: extending the text field of the Wall portlet
7 de mayo de 2012 15:42
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 4496

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

CSS is your friend...
Joshua Messina
RE: extending the text field of the Wall portlet
7 de mayo de 2012 15:53
Respuesta

Joshua Messina

Ranking: Junior Member

Mensajes: 30

Fecha de incorporación: 13 de abril de 2012

Mensajes recientes

I agree with that statement, but that doesn't answer my question. I was looking for more of a step-by-step sort of explanation, not a vague idea of the proper technology to use.
David H Nebinger
RE: extending the text field of the Wall portlet
7 de mayo de 2012 16:21
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 4496

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

Okay, view the source to see what kind of CSS path you have to define to hit the element.

Go to the portlet's Look and Feel page, click on the Advanced Styling tab, click the "Add a CSS rule for just this portlet" and add the CSS path to get to the element and put in "width: 80px" or whatever you want to use.
Hitoshi Ozawa
RE: extending the text field of the Wall portlet
7 de mayo de 2012 17:30
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 8000

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

Edit the following file
liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\social-networking-portlet\wall\view_wall.jspf

line #42
add "cssClass="wallCSS"

<liferay-ui:input-field model="<%= WallEntry.class %>" bean="<%= null %>" field="comments" cssClass="wallCSS" />

In your portlet's "Options" -> "Look and Feel" -> "Advanced Styling" -> "Add a CSS rule for just this portlet"
Insert width:1200px;

example:
#portlet_3_WAR_socialnetworkingportlet .wallCSS{
width:50px;
}
Joshua Messina
RE: extending the text field of the Wall portlet
8 de mayo de 2012 11:29
Respuesta

Joshua Messina

Ranking: Junior Member

Mensajes: 30

Fecha de incorporación: 13 de abril de 2012

Mensajes recientes

Thank you, that worked exactly as I wanted it to. Is there anyway to disable the resize function of the text box?
Hitoshi Ozawa
RE: extending the text field of the Wall portlet
8 de mayo de 2012 14:28
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 8000

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

Is there anyway to disable the resize function of the text box?


The size is being set to the default value. It's possible to specify the default by setting display-height and display-width in the portal-model-hints.xml. I think it was the comment field that's being used in the text field.
David H Nebinger
RE: extending the text field of the Wall portlet
8 de mayo de 2012 16:52
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 4496

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

Joshua Messina:
Thank you, that worked exactly as I wanted it to. Is there anyway to disable the resize function of the text box?


That is typically a function of your browser (i.e. chrome supports this on pretty much every textarea it consumes).
Hitoshi Ozawa
RE: extending the text field of the Wall portlet
8 de mayo de 2012 17:21
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 8000

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

David, you're right. I've misread the question. My reply was on a way to change the default size of all the text area.