We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • @harveyev

    those js code blocks are added based on the order that snippets are called, the only real sure way to ensure it's the last is to manually put it in the template and use possibly a TV if it's only used in some situations.

    that's based on what I'm seeing and what I think your asking.

    cheers
      Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
      Visit CharlesMx.com for latest news and status updates.
      • 38878
      • 255 Posts
      Update: I used some TVs and such to work around the JS conflict so now my ajax month paging is working. I am having another issue with rendering the event detail. It seems I can't get it to load nor can I disable it when rendering the calendar with Ajax turned on. I want to page through the months with Ajax but no matter what settings I change I can't get either the event details to load in a modal window (seems to lightbox nor shadowbox js will load and no idea what setting I would change to choose) or disable the modal entirely without disabling the ajax paging.

      I am using property sets to control the mxcalendar snippet calls as I have one that lists on every page and one that renders the calendar on my events page, They are attached.

      You can see it in action http://www.skipngofarm.com


      Any ideas or pointers would awesome.
        • 38878
        • 255 Posts
        OK. Solved this issue. Seems the modal window height and width setting had "px" in them which was blowing up the modal window. Since the property is an integer needs to be just a number as Charles mentioned somewhere. Modal call is now working fine except calling the wrong detail chunk which I have posted in another thread.
        • How did you get the css to apply to the modal view content? shadowbox.css handles the modal container, but I can't figure out where I can tell the modal view for the html head within to pull css. I see yours is referencing css from the assets/templates. How did you do that?
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 38878
            • 255 Posts
            I had to add the html page header and body and call the css link explicitly within the modal content. My tpl detail chunk looks like this...
            <html>
            <head>
            <link type="text/css" href="/assets/templates/sng/css/style.css" rel="stylesheet" media="screen, projection" />
            <title>[[+title]]</title>
            <head>
            <body>
            <div class="event article">
            <h2>Event: [[+title]]</h2>
            <h4>Date/Time:[[+startdate:date=`%b %e %l:%M %p`]] - [[+enddate:date=`[[+durDay:notempty=`%b %e `]] %b %e %l:%M %p`]]</h4>
            
            <h4>Duration: [[+durYear:notempty=`[[+durYear]] Years `]][[+durMonth:notempty=`[[+durMonth]] Months `]][[+durDay:notempty=`[[+durDay]] Days `]][[+durHour:notempty=`[[+durHour]] Hours `]][[+durMin:notempty=`[[+durMin]] Minutes `]]</h4>
            
            [[+description]]
            <h3>Event Location: [[+location_name]]</h3>
            [[+map]]
            </div>
            <body>
            <html>
            


            Not the best but its the same css as the main page so it's already cached and not another server hit. I tried 18 different ways and this was the only one I could get to work for me. I agree there is definitely something squirrley with calling the modal template. I do think even when the modal template call is fixed you will still need the css defined within the window either inline in the code or called as I did above. My way I think is fastest as its the same cached css as the main page.

            Hope that helps. [ed. note: harveyev last edited this post 11 years, 7 months ago.]
            • Thank You!! That's exactly what I needed. Brilliant!

              Too bad it has to be in the detailTpl chunk. modalDetailTpl really would be appropriate for this.

              Was it you who said you had to use siblingNav to get the month paging to work? That's quite broken still and I never did get the modal view sizing to work either. It's quite the massive thing, but it looks much better now thanks to you.

              Much obliged.

              edit: Might be a good idea to post this solution at the mxcalendar page. [ed. note: frogabog last edited this post 11 years, 7 months ago.]
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 38878
                • 255 Posts
                I'm glad it worked out for you. FWIW, the detailTpl issue really only matters if you want to use both as far as I can tell. If you use modal everywhere, or if you use static everywhere, you should be okay. I found this issue b/c I was trying to use modal off the calendar view and non-modal of the list view. Therein lies the problem (and from my testing even using multiple property sets don't solve it).

                I luckily haven't had issues with the nav controls of yet.

                On a side note, I did some research on the google map v3 api and started messing with the map and added some directions functionality to my event template. Works pretty well except for a known issue with printing maps in the v3 api. Laying it all out in the modal window was actually harder than the directions stuff. I may write a quick tutorial if there's interest. Maybe I can trade Charles for a tutorial on integrating a registration form *hint* *cough* *hint*. You can check it out at the same link as above.

                Cheers!
                • Alright, so I didn't think the modal templates would cause as much greif as they have. In short they are there own complete web pages, I say to use blank templates as a starting point as I've had lots of others with issues when using full web page templates. The best thing to do is create a template with all the styles, layouts, etc. just as a normal page template and then use that template for your ajax pages that are calling mxCalendar.

                  I know that there is lots of work to do on creating better documentation on the uses, however there are just so darn many I can't cover them all. I'd be more than happy to post sample instruction and credit any community member as the author on my site.

                  @harveyev - yes I can work up a tutorial on form integration and have one started already from back when this was added, just need to finish it up.

                  Thanks again for your support and use of mxCalendar, I'll do everything I can to help make it easier to use for the community. If you want to start listing some items you would like more detailed examples on I can use that as my task list to get them completed.
                    Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                    Visit CharlesMx.com for latest news and status updates.
                    • 38878
                    • 255 Posts
                    @ Charles ..Sounds great. Really looking forward to see the form stuff.

                    Now that I finished the map and directions bits, I am working on a very lightweight registration form with formit (and ajax) so it all works within the detail templates and posts data to a backend db. So far so good but still fumbling through the layout and ajax bits. I'm gluing registrant entries to the events with the event ID in the db so every registrant will be associated with the event they register for. That way it should be trivial to list them within the event listing in the manager once it's all working. Pretty manual at this point but will meet the short term need. I'll send a link to the working version when finished and hopefully document what I did in case it's useful.

                    This is a great addon, btw. I know the documentation can be daunting. Thanks for such a great piece of work.
                    • FWIW, I've also got short term plans to publish a form builder CMP that provides a lot of new functionality not provided in other form tools. One big benefit of course is I'll have it automatically hook into mxCalendar, thus making things like event registration much easier. mxCalendar has been part of a large objective for me with more details to come certainly by the begining of next year.

                      Sorry for any tease, but just wanted to share it as it also make me more accoutable smiley

                      Cheers
                        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                        Visit CharlesMx.com for latest news and status updates.