You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 17-09-2013 14:56:21

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

[RESOLVED] Bug with margin of sidebar while opening sidepanel

Hi another bug with margin and sidebars after already resolved one.

Now I found bug which can be seen in all browsers.
Go here and click tile on the left side of page and see the problem.
Problem disappears after reloading whole page (F5).

I use solution from previous problem in my current code but problem occurs also with this solution.
Problem occurs also in newest clean version V4b2 (I checked it in #!/sidebars URL).

This problem also causes error in accordion plugin which can be seen on my website (extra -> image is added).

Any suggestions?

Thomas - could you tell us where all content of pages/sidepanels is loaded dynamically (in which file(s)) so I can help you and try to find solution by myself?

Last edited by chrismaliszewski (28-09-2013 14:01:38)

Offline

#2 23-09-2013 18:49:54

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: [RESOLVED] Bug with margin of sidebar while opening sidepanel

Can you try setting the width of the sidebar in the panel to 0?

Offline

#3 26-09-2013 14:29:28

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

Re: [RESOLVED] Bug with margin of sidebar while opening sidepanel

Doesn't help both in my website and and V4b2 without any changes but adding sidepanel opening into one of tiles in Sidebars site sidebar. The only change is that "See the source..." displays right after your change.

Did this change helped you Thomas?

I didn't have time to see where the problem is - next week I'll look into it.

But it can be seen that problem is in setting margin/padding left of whole content to width of sidebar after opening sidepanel. To see it change make this scenario:
-in sidebar.php in sidebar some_info in any tile add "url"=>"external:panels/example.php",
-set width of sidebar some_info size to 0 and see that after opening sidepanel there is no changes in margin/padding left while with any other width >0 there is.

Offline

#4 27-09-2013 22:20:56

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: [RESOLVED] Bug with margin of sidebar while opening sidepanel

Is full_height set to false? (and width to 0?)

Offline

#5 28-09-2013 12:29:44

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

Re: [RESOLVED] Bug with margin of sidebar while opening sidepanel

Ok, now I see what you meant by "width" - there wasn't "width" property in any example of sidebar so I assumed you meant "size".

After your advice I set both width to 0 and full_height to false and found out that "width" is not necessary and the problem is one more time with full_height. When it's set to false everything works fine.

But still it's only workaround this problem.

Last edited by chrismaliszewski (28-09-2013 12:31:31)

Offline

#6 28-09-2013 13:52:45

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

Re: [RESOLVED] Bug with margin of sidebar while opening sidepanel

Problem solved.

Cause of problem: if sidebar and sidepanel contains tiles, after opening sidepanel properties of div from sidebar were overwritten by tiles from sidepanel. It was because both were put in div of same class name -> "sidebar".

Solution:
Changes in inc/sidebar.php:

  • In line 37 to div class names add new name of class which is

    sidebar-<?php echo $name;?>
  • In lines 66,68,73,75 changes both .sidebar-left & .sidebar-right to

    .sidebar-".$name."

It helped me but still these changes require tests if they don't destroy other things. But at least we know that is the problem now smile.

Cheers.

PS. Thomas, if above solution works well maybe it should be included in next update? wink

Last edited by chrismaliszewski (28-09-2013 15:17:08)

Offline

#7 28-09-2013 16:42:55

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: [RESOLVED] Bug with margin of sidebar while opening sidepanel

Yea indeed, good fix

Offline

Board footer

Powered by FluxBB