Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Joshua Messina
extending the text field of the Wall portlet
7 maggio 2012 15.26
Risposta

Joshua Messina

Punteggio: Junior Member

Messaggi: 30

Data di Iscrizione: 13 aprile 2012

Messaggi recenti

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 maggio 2012 15.42
Risposta

David H Nebinger

Community Moderator

Punteggio: Liferay Legend

Messaggi: 11795

Data di Iscrizione: 1 settembre 2006

Messaggi recenti

CSS is your friend...
Joshua Messina
RE: extending the text field of the Wall portlet
7 maggio 2012 15.53
Risposta

Joshua Messina

Punteggio: Junior Member

Messaggi: 30

Data di Iscrizione: 13 aprile 2012

Messaggi recenti

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 maggio 2012 16.21
Risposta

David H Nebinger

Community Moderator

Punteggio: Liferay Legend

Messaggi: 11795

Data di Iscrizione: 1 settembre 2006

Messaggi recenti

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 maggio 2012 17.30
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

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 maggio 2012 11.29
Risposta

Joshua Messina

Punteggio: Junior Member

Messaggi: 30

Data di Iscrizione: 13 aprile 2012

Messaggi recenti

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 maggio 2012 14.28
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

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 maggio 2012 16.52
Risposta

David H Nebinger

Community Moderator

Punteggio: Liferay Legend

Messaggi: 11795

Data di Iscrizione: 1 settembre 2006

Messaggi recenti

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 maggio 2012 17.21
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

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.