Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Spry preference problem

New Here ,
Apr 08, 2008 Apr 08, 2008
I setup a Spry container on this site's home page ( http://www.profitpt.com/index.asp) to organize several different services. The container allows the user to switch between different static content pieces. The Spry is based on on of the Adobe "Aquo" demo site features. When the page loads, it open with the first static content sections (Infrastructure Planning). However the tab is displaying the light blue shading, rather than the darker blue that should be displayed when the user selects a category.

I'm sure there is a setting to change this, buit I can't seem to find it.

Any help would be appreciated. http://www.profitpt.com/index.asp
TOPICS
Extensions
887
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 09, 2008 Apr 09, 2008
Hi:
Try this trick:
You will find that the TR tag wrapping your first tab looks like this:
<tr class="eventrow" spry:hover="rowHover" spry:select="rowSelected">

Try changing it to:
<tr class="eventrow rowSelected" spry:hover="rowHover"
spry:select="rowSelected">

HTH

Andres Cayon
Spain Adobe Dreamweaver User Group
http://www.dwug.es
----------------------


"aquo.com" <webforumsuser@macromedia.com> escribió en el mensaje de noticias
news:fth6en$bls$1@forums.macromedia.com...
>I setup a Spry container on this site's home page
> ( http://www.profitpt.com/index.asp) to organize several different
> services. The
> container allows the user to switch between different static content
> pieces.
> The Spry is based on on of the Adobe "Aquo" demo site features. When the
> page
> loads, it open with the first static content sections (Infrastructure
> Planning). However the tab is displaying the light blue shading, rather
> than
> the darker blue that should be displayed when the user selects a category.
>
> I'm sure there is a setting to change this, buit I can't seem to find it.
>
> Any help would be appreciated. http://www.profitpt.com/index.asp
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 09, 2008 Apr 09, 2008
Andres, thanks for your suggestion. Unfortauntely, this solution does not work because the code is using a repeat function. When I changed the code to reflect your recommendation, ALL of the tabs changed to the "select" color.

The actual code for this container looks like this:

<div id="content1" spry:region="dsEvents">
<table id="events">
<tr>
<th id="eventheader">Supply chain Services</th>
</tr>
<tr class="eventrow" spry:repeat="dsEvents" spry:hover="rowHover" spry:select="rowSelected" spry:setrow="dsEvents">
<td><span class="eventname"><img src="images/spacer.gif" width="30" height="20" border="0" />{name}</span><br /> </td>
</tr>
</table>
</div>

Any other ideas?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 09, 2008 Apr 09, 2008
Oh I see: You are populating it using ASP code...

Then, why not something a control variable?
I'm not an ASP coder, but you should get the point:

<% dim isFirstRow=true %>
<% begin loop %>
<tr class="eventrow<% If isfirstRow==true Then %> rowSelected<% End If;
isFirstRow=false %>" spry:repeat="dsEvents" spry:hover="rowHover"
spry:select="rowSelected" spry:setrow="dsEvents">
<% end loop %>

That is: We set a control variable to true and when the condition matches
for the first time (first row) we set it to false and the class won't be
added to the following rows

Hope it makes sense
--
Andres Cayon
Spain Adobe Dreamweaver User Group
http://www.dwug.es
----------------------


"aquo.com" <webforumsuser@macromedia.com> escribió en el mensaje de noticias
news:ftj3u5$ip1$1@forums.macromedia.com...
> Andres, thanks for your suggestion. Unfortauntely, this solution does not
> work
> because the code is using a repeat function. When I changed the code to
> reflect
> your recommendation, ALL of the tabs changed to the "select" color.
>
> The actual code for this container looks like this:
>
> <div id="content1" spry:region="dsEvents">
> <table id="events">
> <tr>
> <th id="eventheader">Supply chain Services</th>
> </tr>
> <tr class="eventrow" spry:repeat="dsEvents" spry:hover="rowHover"
> spry:select="rowSelected" spry:setrow="dsEvents">
> <td><span class="eventname"><img src="images/spacer.gif" width="30"
> height="20" border="0" />{name}</span><br /> </td>
> </tr>
> </table>
> </div>
>
> Any other ideas?
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 09, 2008 Apr 09, 2008
No, actually I am not using ASP to populate the page. This is Spry.

Help?!?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 09, 2008 Apr 09, 2008
LATEST
Then, the best idea would be using some spry conditions:

-if the current row {ds_RowNumber} equals the currently selected rowID
{ds_CurrentRowID}, display a selected tr; if it doesn't, display a normal tr

-When the dataset loads {ds_CurrentRowID} is 0 by default, so
{ds_RowNumber}=={ds_CurrentRowID} is true for the first row (0==0)

So, this code should work

<div id="content1" spry:region="dsEvents">
<table id="events">
...
<!-- repeat elements inside the tbody-->
<tbody spry:repeatchildren="dsEvents">

<!-- condition: display this tr with a spry:selected attribute if
{ds_RowNumber}== {ds_CurrentRowID} -->
<tr spry:if="{ds_RowNumber}== {ds_CurrentRowID}" class="eventrow"
spry:hover="rowHover" spry:select="rowSelected" spry:setrow="dsEvents"
spry:selected="selected">
<td>{name}</td>
</tr>

<!-- condition: display this tr without a spry:selected attribute if
{ds_RowNumber}!= {ds_CurrentRowID} -->
<tr spry:if="{ds_RowNumber}!= {ds_CurrentRowID}" class="eventrow"
spry:hover="rowHover" spry:select="rowSelected" spry:setrow="dsEvents">
<td>{name}</td>
</tr>

</tbody>
</table>
</div>


It's a bit hard to explain, but if you look at the code you will see it's
not that difficult

HTH
--
Andres Cayon
Spain Adobe Dreamweaver User Group
http://www.dwug.es
----------------------


"aquo.com" <webforumsuser@macromedia.com> escribió en el mensaje de noticias
news:ftjgtf$3du$1@forums.macromedia.com...
> No, actually I am not using ASP to populate the page. This is Spry.
>
> Help?!?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines