We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4018
    • 1,131 Posts
    Wasn’t sure where to post this so...I figured this is probably more related to the core architecture and design of the manager. Anyways...

    Been doing a little R&D on figuring out how to do away with the frames in the manager. One of the things that is a bit of a stopping block for me is figuring out how to allow for resizing of the main content and document tree frames of the manager without the use of frames. Ideally, I would like to have just two DIV’s that are side-by-side. The tree DIV would be set to an initial size on launch with the content DIV set for 100% of the remaining space. What I’d like is a way to emulate how the functionality is now, that is, allowing for resizing of the two DIV’s with some sort of draggable handle between the two. Right now my mind is a complete blank on this so...if anyone has an idea on how to do this and could either send me or place an example on the forums that would be fantastic. Otherwise, we might have to live with having the document tree live in a scrollable DIV that isn’t resizable. Hope someone has a solution. smiley

    L8R!

    Jeff
      Jeff Whitfield

      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
      • 32963
      • 1,732 Posts
      It’s possible to create some a kind of spliter component that’s able to split the screen. I’ve seen it past but personal have never created one.

      The logic is to have a vertical div that’s can be dragged only from left to right. On release you adjust the other two divs to the new size. This normally requires a library that allows you to set boundries on the draggable div. Otherwise it would have to be coded from scratch.

      We had a splitter control in the good old DynAPI days. Ah! Those good old days smiley







        xWisdom
        www.xwisdomhtml.com
        The fear of the Lord is the beginning of wisdom:
        MODx Co-Founder - Create and do more with less.
        • 25663 MODX Staff
        • 12,272 Posts
        Use the moo.fx + moo. ajax effects to grow or shrink the DIV (or maybe it’s scriptaculous):
        http://moofx.mad4milk.net/forum/index.php?action=vthread&forum=8&topic=457&page=0#2

        Or allow it to be put anywhere on the page with a grid snap feature too:
        http://clement.lavoillotte.info/devs/moofx/new/

        Or this: http://www.jsmadeeasy.com/javascripts/DHMTL%20Miscelanious/drag_resize/drag_resize.htm

        Some ideas for the tree code:
        http://www.barclaey.com/experiments/tree.php
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 32963
          • 1,732 Posts
          Hi Jeff,

          Here’s quick little example of a splitter. It works in IE but needs to be tweaked for FF
            xWisdom
            www.xwisdomhtml.com
            The fear of the Lord is the beginning of wisdom:
            MODx Co-Founder - Create and do more with less.
            • 4018
            • 1,131 Posts
            Quote from: xwisdom at Jun 28, 2006, 07:42 PM

            Hi Jeff,

            Here’s quick little example of a splitter. It works in IE but needs to be tweaked for FF

            Good example. Damn close to what I’m thinking of. About the only thing I don’t like about it is the use of a table to do it with. But, hey...if it works, it works. I can live with using a table to make it work. smiley However, if we can find a similar javascript routine that works on a couple of DIVs, then that would propbably be better.
              Jeff Whitfield

              "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
              • 4018
              • 1,131 Posts
              Check out this page:

              http://www.turboajax.com/turbowidgets/examples/

              Click on the TurboSplitter example. This is exactly what I’m talking about! But...sigh...unfortunately, it looks like the TurboWidgets scripts aren’t exactly open source. So...if we can find another script or library that does this very thing but is open source then we’re in business! laugh
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                • 4018
                • 1,131 Posts
                Found one more example. This one looks like it might be a winner:

                dojo Toolkit (http://dojotoolkit.org/)

                Click on "see it in action"; then click on "Layout Widgets" and then SplitContainer. View the demo and you’ll see what I mean. Although the main dojo javascript file is a little on the heavy side (127kb), it looks like there is a lot of functionality wrapped up in it. I can see where we could use a buttload of it in the manager to replace existing functions (tabs, tree menus, buttons, popup menus, etc.). Works quite a bit differently than Scriptaculous and MooFX...difficult to grasp in some respects but easier to implement in others. I’m almost thinking that this could be used to quickly snap together all the pieces to drive the functionality of the manager. Only thing is though...if we do this then it would probably be best to stick with it and not use much out of any other library.

                Jeff
                  Jeff Whitfield

                  "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                  • 25663 MODX Staff
                  • 12,272 Posts
                  I think Dojo is compatible with other libs, actually. Then again, we may be able to extract the splitter part.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 25663 MODX Staff
                    • 12,272 Posts
                    Nice research btw. smiley
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 4018
                      • 1,131 Posts
                      Although it is likely to be compatible with other libraries, my thinking is that if what you are attempting to do is already a function of the Dojo library then why even use the other library? My thinking is that we can pretty much use the Dojo toolkit for all the functionality in the manager. Granted, the Scriptaculous library (and other ones) will still be a part of the default distro. However, I think those particular libraries are better suited for providing functionality to the front-end pages. Since it is a little heavy ended, I think of Dojo being more suited towards building robust interfaces...which is exactly what were doing with the manager. However, for other uses in snippets and such that outputs functionality and code to the front-end, Scriptaculous and other light-weight libraries are the way to go. So any functionality that is specific to the manager itself should be build with Dojo if at all possible. Everything else can fall under one of the other lighter libraries in the distro.

                      Does this make sense? Does it seem like a logical way to go? And what do you think about the Dojo library? Just curious before I push ahead with this and start building some concept pages. laugh
                        Jeff Whitfield

                        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."