Folks, I'm after some testers for some experimental changes I've made that introduce the HTML5 History API in to Fusion. What is the HTML5 history API? Well, it allows scripts on pages to modify the URL shown in the address bar of your browser. Kayako already does this, using a third party jQuery plugin called BBQ, except it changes the hash portion of the URL. This is great for older browsers (and IE), but for newer browsers, using the history API gives us the following advantages: URLs are no longer cluttered with hash tags. What was /staff/#/Ticket/View/... is now a normal URL that looks like /staff/Ticket/View/..., even with the AJAX driven UI in Fusion Reloading the page, or copying/pasting the URL will cause Fusion to directly load in the requested page instead of doing the initial page load and then another AJAX request to fetch the page listed in the hash Attached you'll find a diff, that you can apply to a Kayako installation that should get you up and running. (On Linux you should use "patch -p1 < history-api-diff" from your Fusion directory) I'm posting this here for now for feedback/testing, and then if all goes to plan I'll submit the patch to Kayako for inclusion in a future release. This may seem like a nothing change, but it's all part of building a user experience.
Thanks Chris, I am on a vacation right now and will be back in office by 17th. I will give this a whirl and merge it into the trunk if everything is good. Thanks for the hard work!
One thing to note that I've just discovered, if someone using a non-History API supported browser sends you a hashtag link, your browser won't follow it and load the page. I'm thinking a simple location.hash.indexOf('/') !== -1 and then call to BBQ should do the trick, but I haven't had a chance to implement that yet.
At the moment, it seems to fail when patching core.js in admin_default Code: patching file __swift/themes/admin_default/core.js Hunk #2 FAILED at 18. Hunk #3 FAILED at 109. Hunk #4 FAILED at 143. Hunk #5 succeeded at 370 (offset -39 lines). Hunk #7 FAILED at 479. Hunk #8 succeeded at 682 (offset -39 lines). Hunk #9 FAILED at 698. Hunk #11 FAILED at 775. Hunk #12 succeeded at 777 (offset -39 lines). Hunk #14 succeeded at 1088 (offset -39 lines). Hunk #16 succeeded at 1406 (offset -39 lines). Hunk #18 succeeded at 1840 (offset -39 lines). Hunk #20 succeeded at 2208 (offset -39 lines). Hunk #22 succeeded at 2310 (offset -39 lines). Hunk #24 succeeded at 2494 (offset -39 lines). Hunk #26 succeeded at 2565 (offset -39 lines). 6 out of 27 hunks FAILED -- saving rejects to file __swift/themes/admin_default/core.js.rej I'm currently running Kayako version 4.01.204.