NetTalk Central

Author Topic: XP-Taskpanel menu not displaying all items in FireFox  (Read 8032 times)

Johan de Klerk

  • Full Member
  • ***
  • Posts: 217
  • Johan de Klerk
    • View Profile
    • Designer Software
XP-Taskpanel menu not displaying all items in FireFox
« on: March 08, 2009, 06:57:14 AM »
Hi Bruce,

I have a lot of menu items, more than 30.

In IE it displays everything correctly up to the vey last one.

In FF it only displays a few of them.
The last lot are all missing and you can't scroll down to them.

Using CW 6.3-9058
NetTalk PR33
XP-TaskPanel as Menu Style

Regards

Johan de Klerk
Clarion 10, NT 11.57

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #1 on: March 08, 2009, 09:41:39 PM »
Looks like a CSS issue. I've put it on the list.
In the meantime I recommend using smaller Icons Johan.

Cheers
Bruce

Johan de Klerk

  • Full Member
  • ***
  • Posts: 217
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #2 on: March 27, 2009, 10:59:14 PM »
Hi Bruce,

I have made my icons smaller but the amount of menu items are still to much for FireFox to display all of them.

Any news on a fix for this problem?

Regards

Johan de Klerk
Clarion 10, NT 11.57

Johan de Klerk

  • Full Member
  • ***
  • Posts: 217
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #3 on: April 23, 2009, 06:51:36 AM »
Hi Bruce,

Any news on a fix for this problem?
Do you think this will be fixed in PR35?

Regards

Johan de Klerk
Clarion 10, NT 11.57

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #4 on: April 23, 2009, 10:46:59 PM »
Hi Johan,

You actually have control over this at the moment, and in the "most correct" way.

The height of the XP Task Panel is determined by the .dhtmlgoodies_xpPane style. (The default is 660px).
So the correct approach to alter the height is to
a) create a style which sets the height to whatever you like and then
b) set the menu to use this style.

To make things a bit easier I've also added a template setting. This is less preferable because it requires a program recompile, but it is easier to set. This change is _not_ in PR35 though but will be in 4.32.
(If you need it in a hurry ask and I'll send it to you.)

But I recommend the "style" approach. It's very important to get the hang of custom styles.

Cheers
Bruce

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #5 on: April 24, 2009, 05:22:11 AM »
Hi Johan,

I have a modified version using a custom CSS file that allows the XP Panel to be whatever height it needs (CSS 100%). It also requires a little bit of code to be added to the menu procedures to get around a few things.

I've also tested in IE6&7, FF2&3, Safari and Chrome.

This is how i do it:

Add into your custom CSS

#wrapper {
  height:100%;
  background-color: #969aa0;    <- thats my colour yours in probably different
  margin: 0;
  padding: 0;
  border: none;
}

.dhtmlgoodies_xpPane{
  background-color:#969aa0;
  float:left;
  width:200px;   <- mine is 200px width not 150
}

I'm pretty sure thats all the CSS thats needed. Then i hack in a table which is a web technique to force 100% height in all browsers.

I am using frames, but it would also apply without. In my LeftFrame procedure (where the XP Panel is defined as an extension)

Create a piece of XHTML "After <body>" to include this, call it WrapperHeader:

<table id="wrapper" valign="top" height="100%">
<tr><td valign="top">


Create another "Before </body>" call it WrapperFooter:

</td></tr></table>

This just wraps the whole left menu in a 100% height table. The CSS for wrapper colours it in the same background colour as the panel itself.

In the most recent version of NetTalk Bruce has added a new DIV which breaks this code so I've unceremoniously hacked it out.

You'll need to add two embeds to strip out the code, its ugly and i'm embarrashed, (but it was quite pretty until recent builds) but it works. The embed is "Processed Code"

! [Priority 1200]
IF 1=0
  packet = clip(packet) & p_web._jsBodyOnLoad('PageBodyHardLeft',,)
    do SendPacket
    Do WrapperHeader
    do SendPacket
! [Priority 2700]
END
  Do WrapperHeader
  do SendPacket


The bold is my code. If you read the code you'll see I am getting rid of the jsBodyOnLoad, which introduces a new DIV which screws my CSS.

I know it messy, but once it done you can forget about the XP Panel and can trust it to work nicely and fill the whole left side of the browser and not look cut off halfway down.

Regards
Bill

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #6 on: April 25, 2009, 12:11:29 AM »
Hi Bill,

I'll need to go though this in more detail early next week - but just in case you haven't noticed there is a setting on the menu extension called
"Wrap Menu in Table" which may make your code neater.
I'm not sure if it's inside, or outside, the DIV you're referring to - but I'll check it out.

In a couple of our apps recently we've been using the XP-TaskPanel on non-frame pages, so I think the Div is there to assist with the layout in that case. But I'm sure with some checking I should be able to make it possible for everything to co-exist together.

Cheers
Bruce


bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #7 on: April 25, 2009, 01:35:58 AM »
Hi Bruce,

Thanks heaps for that. I've tested a "new and improved" approach.

It goes like this.

Tick "Wrap Menu in Table" then add a CSS class of 'wrapper'

Then add the following into your custom CSS file.

.wrapper {
  height:100%;
  background-color: #969aa0;    <- thats my colour yours in probably different
  margin: 0;
  padding: 0;
  border: none;
}

.dhtmlgoodies_xpPane{
  background-color:#969aa0;
  float:left;
  width:200px;   <- mine is 200px width not 150
}


This is much nicer... and shorter.

Regards
Bill



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #8 on: May 01, 2009, 03:09:50 AM »
Hi Bill,

I've tweaked the .dhtmlgoodies_xpPane class to remove the background image.
This makes the "default" one a bit friendlier, but still allows anyone to override it if they like.

There's also a built-in class (menutable) which is the default used by the template. In your case you're using 'wrapper' - but the only difference is the back-ground color. And the height.
In yours it's set to 100%. which is ok, it lets the menu expand and contract depending on the number of items shown.

The problem (for me I guess) is the contraction. Although it is "big enough" for the menu items, it also shrinks to be "just big enough" for the menu items. I experimented with, and without, the extra DIV but it seems to behave like this for me (not sure if you're getting the same.)

To keep it "similar" to past behavior I've set the height of menutable to 100em, which should be large enough for most any menu. If you have any suggestions on this front I'd be keen to hear them.

** Note - with PR37 you can suppress the extra DIV by setting the "body <div> CSS Class" (NetWebPage Settings, CSS tab NOT Menu CSS Tab) to blank.

So in summary - you can override the provided CSS (and often will) but the default CSS _should_ be giving much the same effect now. (PR 37)

Cheers
Bruce

Johan de Klerk

  • Full Member
  • ***
  • Posts: 217
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #9 on: May 25, 2009, 09:25:17 PM »
Hi Bruce,

The problem is still there in 4.32.
In IE all items are displayed in FF it does not display all the menu items.
I have tried it without any icons but it seems to be related to the number of items that needs to be displayed.

Regards

Johan de Klerk
Clarion 10, NT 11.57

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #10 on: May 25, 2009, 09:32:24 PM »
Have you ticked on "wrap menu in table" ?
Have you set a height parameter on the CSS tab?

cheers
Bruce

Johan de Klerk

  • Full Member
  • ***
  • Posts: 217
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: XP-Taskpanel menu not displaying all items in FireFox
« Reply #11 on: May 26, 2009, 12:45:28 AM »
Hi Bruce,

Sorry man.

I missed the "Wrap Menu in Table" setting.
Did not need to set the CSS height.

It works perfect.
All well now.

Thanks

Johan de Klerk
Clarion 10, NT 11.57