Invenzzia »

IMPORTANT ANNOUNCEMENT

Due to the uncertain status of the Flyspray project, lack of new releases and moving the code repository to Github, we decided to shutdown this issue tracker by the end of January 2011. From that date, the bugs should be reported directly in Github project repositories.

List of repositories:

Open Power Template 2.x family

PLEASE PROVIDE THE TEMPLATES AND/OR PHP CODE IN THE TASK DESCRIPTION (Not URL-s to them). THAT ALLOWS US TO REPRODUCE THE PROBLEM! OTHERWISE WE ARE NOT ABLE TO HELP YOU!

Remember to hide all the security-related pieces of code from the task description, like passwords, server paths etc. for your own safety. Once we close the task, we cannot edit it anymore!
Tasklist

FS#122 - An issue with opt:attribute

Attached to Project: Open Power Template
Opened by Damian Nowak (Nowaker) - Sunday, 13 September 2009, 13:53 GMT-8
Last edited by Zyx (Zyx) - Monday, 14 September 2009, 01:49 GMT-8
Task Type Bug Report
Category Instructions
Status Closed
Assigned To Zyx (Zyx)
Operating System OS-independent
Severity Low
Priority Normal
Reported Version 2.0.1
Due in Version 2.0.2
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

<opt:attribute name="class" value="lay_center_small" opt:if="$show.right" />x
<opt:attribute name="class" value="lay_center_big" opt:if="! $show.right" />

Shouldn't this product class="lay_center_small" or class="lay_center_big"? Now it omits one of them.
This task depends upon

Closed by  Zyx (Zyx)
Monday, 14 September 2009, 01:49 GMT-8
Reason for closing:  Fixed
Additional comments about closing:  Fixed in rev. 230
Comment by Zyx (Zyx) - Sunday, 13 September 2009, 23:23 GMT-8
The problem is quite complicated. For explicitely defined tag names, OPT adds a half-optimization, half-validation. It ensures that the user does not try to add the same attribute twice. This would work in a typical case:

~~~~
<opt:attribute str:name="class" value="lay_center_small" />
<opt:attribute str:name="class" value="lay_center_big" />
~~~~

However, here we are extra opf:if conditions that should be also taken into account. Currently, this lock is applicated and OPT simply overwrites the previous definition of class attribute. This could be done by introducing <opt:value> tag that could be put into <opt:attribute>...
Comment by Damian Nowak (Nowaker) - Tuesday, 15 September 2009, 18:39 GMT-8
Could you please give an example of this? I don't see the opt:value element in the documentation.

Loading...