Page 1 of 1

PostPosted: Wed Jul 04, 2007 8:40 am
by Markus

Hello DF users, hi Steve,


I have a question on the use of CSS-Styles within DF. I read this one http://framework.weblite.ca/forum/dataface-users/134/#1 but could not find a stylesheet called ploneCustom.css. Is it meant to copy the plone.css rename it ploneCustom.css and make the changes there or should I have an imported ploneCustom.css like Joseph James Frantz suggests and use it in addition to the standard plone.css?

Also I was wondering that there are some styles (like id- and class-selectors) in the DF-Templates which I could not find in plone.css. Is this a mistake?


Are there other Stylesheets DF uses for the output of its templates? I think plone.css is the only one, isn't it? So whichj is the best way to make changes or add some custom styles to my app?

Kind regards

Markus




PostPosted: Wed Jul 04, 2007 2:10 pm
by shannah
Hi Markus,

I believe that Joseph Franz's suggestion of creating a ploneCustom.css stylesheet is just a way of keeping his styles separate from the dataface styles.

If you want to put in your own styles, I suggest, creating a separate stylesheet and then including is using the custom_stylesheets slot.

e.g. You could create a file named styles.css in your application's directory with all of your styles.
then in your application delegate class you implement :

function block__custom_stylesheets(){
echo '';
}

Alternatively you could use Joseph Franz's method where you import your custom stylesheet at the end of plone.css.

i.e. you add the following to the end of plone.css:

@import "ploneCustom.css"

Then you create another file named "ploneCustom.css" with the styles that you want to have. Since ploneCustom.css comes after the styles in plone.css, your styles will override the default styles.

here are some styles (like id- and class-selectors) in the DF-Templates which I could not find in plone.css

This is not a mistake. The templates are created so as to be manipulatable by css. This means trying to place as many css selectors and ids as possible so that you can build your own stylesheets to stylize these elements. They may or may not have styles already applied to them.

Best regards
Steve

PostPosted: Fri Jul 06, 2007 3:38 am
by Markus

Hi Steve,


thank you for your informations on CSS. I feel quite well informed now on this topic.


Best regards

Markus



Re: Question on CSS-Styles in general

PostPosted: Mon May 02, 2011 9:44 am
by randy1as
can't figure out what goes where

did this to %%08^08F^08FE976E%%Dataface_Main_Template.html.php (in templates folder of application)
around line30
<!-- Stylesheets go here -->td.intervention_close {
background-color: #FFE6E6 !important;
}

added the following to ApplicationDelegate.php in conf folder

class tables_Lifeeqpt_Life {
function css__tableRowClass(&$record){
if ( !$record->val(10)){
return 'intervention_close';
}

trying to figure out slots - custom_stylesheet

trying to change colour for all values 10 - Help.
else return '';
}

Re: Question on CSS-Styles in general

PostPosted: Mon May 02, 2011 10:08 am
by shannah
First off, you don't want to make any changes to any files in the templates_c directory. These are compiled PHP files that will be automatically deleted and replaced when changes are made to the original files.

If you want to add your own styles there are many ways to do it. One such way is described at
http://xataface.com/documentation/how-t ... avascripts

Re: Question on CSS-Styles in general

PostPosted: Mon May 02, 2011 6:06 pm
by randy1as
shannah wrote:First off, you don't want to make any changes to any files in the templates_c directory. These are compiled PHP files that will be automatically deleted and replaced when changes are made to the original files.

If you want to add your own styles there are many ways to do it. One such way is described at
http://xataface.com/documentation/how-t ... avascripts


Thanks for the reply
went through the posts found two methods custom_stylesheet block - not worked
second through plone.css
by inserting
td.intervention_close {
background-color: #FFE6E6 !important;
}

and following in ApplicationDelegate.php in conf folder

class tables_lifeeqpt_Name {
function css__tableRowClass(&$record){
if ( !$record->val('ANAESTHESIA UNIT ABSORBERS')){

return 'intervention_close';
}

else return "intervention_close '';
}
}

still not working - the last else return "intervention_close ''; to check if working - nothing happens. Help will be gratefully welcome

Re: Question on CSS-Styles in general

PostPosted: Tue May 03, 2011 10:52 am
by shannah
if ( !$record->val('ANAESTHESIA UNIT ABSORBERS')){


One thing is Xataface doesn't like spaces in column names.

Re: Question on CSS-Styles in general

PostPosted: Tue May 03, 2011 4:50 pm
by randy1as
shannah wrote:
if ( !$record->val('ANAESTHESIA UNIT ABSORBERS')){


One thing is Xataface doesn't like spaces in column names.

Am I barking up the wrong tree? - thought val('ANAESTHESIA UNIT ABSORBERS') was the contents of the name field in table called lifeeqpt.
What I want is to highlight all occurrences of ANAESTHESIA UNIT ABSORBERS in the list view. will work on it. Thanks.