| Customizations (Themes / Templates) Help with customizing the themes and templates. Post your own custom themes for others to enjoy. |
 |
Bug? - styling list format |
 |
09-22-2010, 04:53 AM
|
#1
|
|
Calendar User
cepheid is offline
Join Date: Apr 2007
Posts: 39
|
Bug? - styling list format
When displaying the calendar in list format, the categories get displayed without any possible customization... the script outputs them as follows:
Code:
<td align="left" valign="top" bgcolor="#FFFDF2" class="tableTitle">EVENT TITLE <br>
<span class="tableDescr"><div><strong>CAT_NAME:</strong> CAT_VALUE</div>DESCRIPTION TEXT</span></td>
As is hopefully obvious, the categories can't be styled - the container div has no class or identifier, and since the categories are output "automatically" (using the [categories] tag in the template file), the category listing cannot be styled independently of the event description.
The popup display (e.g. mouseover popups) do allow for proper styling of the category text:
Code:
<div class="popupEventTitle s243">EVENT TITLE </div><div class="categoryDiv"><span class="categoryName">CAT_NAME:</span> <span class="categorySelection">CAT_VALUE</span></div><div class="popupEventTime">X:00 PM</div><div class="popupEventDescription">DESCRIPTION TEXT</div>
It seems like the list format should follow the same display for categories, including giving the divs/spans proper classes so they can be properly styled.
Thus, I propose the following syntax for the list format, which would allow proper styling:
Code:
<td align="left" valign="top" bgcolor="#FFFDF2" class="tableTitle"><div class="tableEventTitle">EVENT TITLE</div> <br>
<div class="tableCategoryDiv"><span class="tableCategoryName">CAT_NAME:</span> <span class="tableCategorySelection">CAT_VALUE</span></div><span class="tableDescr">DESCRIPTION TEXT</span></td>
This proposed format would make the title AND category entries properly style-able in the list format, whereas they currently are not.
Thoughts?
|
|
|
|
 |
09-22-2010, 05:54 AM
|
#2
|
|
Calendar User
cepheid is offline
Join Date: Apr 2007
Posts: 39
|
Also, a question:
Is there a way to use the event ID in the template? The template includes various parsed elements like [date], [time], [title], [category], [categories], and [descr] ... but [eid] doesn't seem to work there. Is there a way to get the individual event ID?
(To be specific, I do not want the [eid] in the description, but in the template ... I am trying to style the list mode template with onclicks that utilize the event ID - this is not doable from the description, and must be done in the template... so I'm trying to find out if [eid], or some equivalent, can work in the template.)
(Also, is there a reference for what EPC element tags can be used in the templates? I can't find it in the documentation - the docs seem to mention only the description parser, but not the template parser.)
Last edited by cepheid; 09-22-2010 at 06:03 AM.
|
|
|
|
09-22-2010, 06:44 AM
|
#3
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
For your first post, you can still achieve the desired result with a bit of crafty CSS....
.tableDescr div {
whatever you want
}
As for the placeholders, the template engine and the description parser are two different beasts. In the templates, all the placeholders that are available are used in the two default templates. The placeholders that you can use in the description can only be used in the description. There is no [eid] placeholder for the template engine.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
|
|
|
|
 |
|
 |
09-22-2010, 03:14 PM
|
#4
|
|
Calendar User
cepheid is offline
Join Date: Apr 2007
Posts: 39
|
Quote:
Originally Posted by ve9gra
For your first post, you can still achieve the desired result with a bit of crafty CSS....
.tableDescr div {
whatever you want
}
|
Unfortunately, that is not correct. That allows me to style the entire table at once, including category name, category value, and description text. I cannot individually style the category name, the category value, and the description text. In the pop-up CSS, these are individually style-able; I would hope to do the same in list form, which is simply not possible right now.
Quote:
Originally Posted by ve9gra
As for the placeholders, the template engine and the description parser are two different beasts. In the templates, all the placeholders that are available are used in the two default templates. The placeholders that you can use in the description can only be used in the description. There is no [eid] placeholder for the template engine.
|
Brian, would it possible to please add the [eid] element to the list mode templates? It would be really useful. I can see from the thread archives that I'm not the only one asking for it.
Thanks!
|
|
|
|
 |
09-22-2010, 04:48 PM
|
#5
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
Check again... What I posted will only affect the category label and selection. Not the description.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
|
|
|
|
 |
|
 |
09-22-2010, 05:35 PM
|
#6
|
|
Calendar User
cepheid is offline
Join Date: Apr 2007
Posts: 39
|
Quote:
Originally Posted by ve9gra
Check again... What I posted will only affect the category label and selection. Not the description.
|
Actually, given the HTML the way I posted it, my assertion was actually correct - the description is inside the <span class="tableDescr">, which means it gets styled along with the categories. Of course, the description can be moved outside of the <span> in the template, so that would take care of that issue...
However, there is still the primary issue which is that the category name and the category value cannot be styled independently of one another like they can in the pop-up. The [categories] element outputs both name and value, and since they're inside the same <span>, they cannot be styled independently. If I want the category name to be underlined rather than bold, for example, I cannot do that by styling .tableDescr, because that would also affect the category value, not just the name.
In the pop-up styling, the category name has a different class than the category value, which means they can be styled independently.
There is a slight workaround, which is that I could style ".tableDescr strong" ... that would affect only the category name, not the value. However, that is rather a hack and in principle not user-friendly... it would be much better if the category and value would have different classes, like they do in the pop-up, so that they can be styled independently.
Brian, would you be willing to implement such a thing?
|
|
|
|
 |
09-23-2010, 06:29 AM
|
#7
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
Once again... my CSS says ".tableDescr div {" which will affect only a <div> inside of the <span class="titleDescr">.... and what's in that div? The categories.
Try it.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
|
|
|
|
09-23-2010, 01:59 PM
|
#8
|
|
Calendar User
cepheid is offline
Join Date: Apr 2007
Posts: 39
|
Quote:
Originally Posted by ve9gra
Once again... my CSS says ".tableDescr div {" which will affect only a <div> inside of the <span class="titleDescr">.... and what's in that div? The categories.
|
Ah, I see what you did there now. Yes, you're right, that would work. Of course, it is less obvious (and hence less "user-friendly") than placing the name and value in separate, and properly named, divs... as is done for the pop-up. But you're right, it's doable the way it is.
Thanks!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:13 AM.
|