PDA

View Full Version : Spry eye


RainForest
01-04-2012, 06:56 PM
Hello,

I use DW CS3. Once in a while I design a new page where I insert a series of Spry collapsible panels. When inserting, I generally choose that they are closed by default, but the display is open. When working with the collapsible panels, there's usually an eye in the right corner of the title tab - the eye is open or closed depending on whether the collapsible information is visible or not.

For some reason, today's project is behaving strangely, and I'm not able to reliably see the eye, nor to control whether the collapsible information can be hidden.

Where is this control, and why is it not acting in a consistent manner?

RainForest
01-04-2012, 09:31 PM
Additional info:

I have identified a definite connection between creating a link in the content portion of the panel and the eye disappearing.

As long as I just put info in the content area, the eye remains. As soon as I make a link from a line of content, the eye goes away, and with it my ability to close the panel. It doesn't matter whether I choose the top line of content, or a line in the middle.

I have compared the code on the page that is giving me trouble with a page that is working correctly, and see no discrepancies between the two.

When I preview the page in my browser, the panels are all open and unable to close.

DWcourse
01-05-2012, 12:00 AM
can you post a working and non-working page online somewhere?

RainForest
01-05-2012, 03:07 PM
working:
http://www.cityofdepoebay.org/pages/minutes/minutes_archive/council/cc_minutes_archive_index.html

not working:
http://www.cityofdepoebay.org/pages/agendas/agendas_archive/council/cc_agendas_archive_index.html

gentleone
01-05-2012, 03:52 PM
In code view almost at the bottom of the page you have a piece of javascript where you define which panels should be closed on page load.
On the 'working' page all the panels are set to close... hence the option {contentIsOpen:false}

<script type="text/javascript">
<!--
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("council_2002", {contentIsOpen:false});
var CollapsiblePanel2 = new Spry.Widget.CollapsiblePanel("council_2003", {contentIsOpen:false});
var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("council_2004", {contentIsOpen:false});
var CollapsiblePanel4 = new Spry.Widget.CollapsiblePanel("council_2005", {contentIsOpen:false});
var CollapsiblePanel5 = new Spry.Widget.CollapsiblePanel("council_2006", {contentIsOpen:false});
var CollapsiblePanel6 = new Spry.Widget.CollapsiblePanel("council_2007", {contentIsOpen:false});
var CollapsiblePanel7 = new Spry.Widget.CollapsiblePanel("council_2008", {contentIsOpen:false});
var CollapsiblePanel8 = new Spry.Widget.CollapsiblePanel("council_2009", {contentIsOpen:false});
var CollapsiblePanel9 = new Spry.Widget.CollapsiblePanel("council_2010", {contentIsOpen:false});
var CollapsiblePanel10 = new Spry.Widget.CollapsiblePanel("council_2011", {contentIsOpen:false});
//-->
</script>
On your 'not working' page you only have 2007 and 2008 set to close

<script type="text/javascript">
<!--
var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("council_2004");
var CollapsiblePanel4 = new Spry.Widget.CollapsiblePanel("council_2005");
var CollapsiblePanel5 = new Spry.Widget.CollapsiblePanel("council_2006");
var CollapsiblePanel6 = new Spry.Widget.CollapsiblePanel("council_2007", {contentIsOpen:false});
var CollapsiblePanel7 = new Spry.Widget.CollapsiblePanel("council_2008", {contentIsOpen:false});
var CollapsiblePanel8 = new Spry.Widget.CollapsiblePanel("council_2009");
//-->
</script>

RainForest
01-05-2012, 04:22 PM
Great! Problem ID'd!

Now: the working page was created just last week, and I used the identical process to create the non-working page yesterday (e.g.: from the layout tab I selected Spry Collapsible Panel).

Why are the two pages not behaving the same, and what can I do to have the code behave properly without having to edit the code directly? And why do they (apparently) work until I create a link? I toyed around with that over and over and over yesterday, and could reliably reproduce the error.

Also, after editing the code on the non-working page, the design view is still incorrect (no eye appears to allow me to close the panels)

RainForest
01-05-2012, 06:39 PM
When inserting, I generally choose that they are closed by default, but the display is open.
I didn't mention that something unusual is happening at this step. After naming the panel, when I click on the down arrow next to the Collapsible Panel Properties Default State, the background info in the Properties area changes, eliminating my ability to change the Display or the panel name!

However, if I insert a new collapsible panel, immediately go into the source code after choosing "Default State: Closed" and add the missing part (". {contentIsOpen:false}"), and /then/ edit the panel, the eye remains when I create data links!?!

What the heck is going on?

RainForest
01-05-2012, 06:53 PM
I managed to get an error! Does this help?

gentleone
01-05-2012, 07:26 PM
What the heck is going on?
Sorry... I hardly use Design View, so I can't help you with Design View issues. Perhaps someone else can help you out with that.

RainForest
01-05-2012, 10:19 PM
I have found a workaround.

Something still isn't right about the way DW is behaving, but if I do all the steps in a backwards order (choosing the properties last instead of first), the finished product displays correctly in a live document (even though design view still isn't displaying correctly).

And I guess that's all that matters.

Thanks to those who responded.

gentleone
01-05-2012, 11:45 PM
the finished product displays correctly in a live document (even though design view still isn't displaying correctly).

And I guess that's all that matters
Yes, the browser is all that matters... that's where you develop for. Design view is just for quick reference. If you want to do really crazy & cool web stuff, then you'll notice that design view sucks big time.

RainForest
01-12-2012, 07:39 PM
I figured out what was causing the design view issue, and thought I'd pass it along for anyone who cares.

When I named the Spry collapsible panels on the pages that were giving me trouble, the naming configuration I used included an "a-" at the beginning of the name. When I switched to a different naming configuration, the issue went away.

I think perhaps DW was looking at the "a-" part of the panel name as an anchor! That's the only thing I can think of...