Hy, thanks for your code, I need suggestions since when I converted my code generator application to use facelets templating (on jboss seam). Previously we was not using facelets, and your snippet worked greatly, now we're experiencing these troubles with resizable elements of yours: - the div is shown only when not selected, as you click it becomes white. - the 8 resize handlers never show, we can se only the south-east one but stick on north-west. - you can resize the div (that looks like a white shadow so you gotta presume the position) by dragging wherever on it, but you can resize only pulling it south-east, like if all the div becomes a big s.east resize handler.
I did not modify your code in any part, just placed your demo in a static template. the template, is made up by two big div (header and body-content) wich <ui:include other pages dinamically) and looks like this.
<ui:insert name="body">just a template</ui:insert>
</body> [...]
then I call on jboss a page.seam wich feeds this template above's body with other xthml containing your script. this is the page that actually shows your example 3 divs (just one for 2000 char msg limit ^_O ):
I forgot to specify that I cannot drag the top border, nor the left one, I hope someone already faced that problem!
3) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 203.173.--.--
Posted:
I don't have that server setup here and it's way too complicated to setup to test :).
Try installing Firebug http://www.getfirebug.com for Firefox, and using it to see what CSS rules are applying to the DragResize elements. Chances are that another part of the document CSS is simply messing up the display of the DragResize elements, and you'll have to adjust them so they don't conflict.
That's about as helpful as I can be sorry!
- Angus.
4) paoloGroup: Guests IP: 151.11.--.--
Posted:
thanks, I'm downloading firebug right now. For further investigation, i placed an image inside the resizeble div, and noticed that when the page is freshly loaded, there's the image right above the div, as you touch it for resizing, the image shifts below, is correctly moved along, and when you're done resizing it pops again above the div. Hmm...
5) paoloGroup: Guests IP: 151.11.--.--
Posted:
I did it, i's mainly a problem of dragresize.css being loaded but not correctly considered. All the specifications inside are held quite randomly, so that "shadow" covering the draggable div was made up of all the 8 draghandlers maximized to their extents, and since the last one is the bottom-right, the only action available (on the whole surface of the div) was the sout-east resize.
I managed it in a horrible way, putting a switch into the dragresize.js with a case for each of the 8 handlers, so that I can specify via javascript the styling attributes for each of them:
i know it's bad, but for now it's a working fix. On Firefox only becauese with or without this fix, explorer still continue to blow as soon as you click the mouse (the "body" zIndex comes in front of everything like b.s.o.d. :D I noticed that each time I change the div, the zindexcount increases (let's say "205") an suddendly also the body zIndex jumps to the same value. Maybe this can may turn handy to you in a future fix, since untouched elements shouldn't change their Z. I also noticed this function is givin problems (in my jboss Seam configuration)
to include other pages that become parts or even the whole page structure, at the end you request a inexistent ".seam" page, jboss will compile and return you a all-merged page and this make many scripts blow up, because every page you use as page-piece or page-template must conform to xhtml strict specifications (have body tags etc...) so you may come out with some unexpected generated html.
In the detail, the generated .seam page gets this look: <!-- first line of xhtml code --> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:z="http://www.qualcomm.com/jsf/core" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:t="http://myfaces.apache.org/tomahawk" style="z-index: 201;">
both z-index you see increase by one each time you select a different draggable div. Mozilla behaves well while explorer places the body above everything else, if you resize the page with the browser window's hander it gets fixed. Now I'll move to another part of my work, but I need this to work with both of the 2 browsers, as soon I get it, I'll post my modifications to your script so you can see what I changed and if this can be of any help to you.
8) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
For a quick fix alter the z-index assignment function to test if the element equals body, and return if so.