Small update to LighthousePro
Just a quick note to say I released a minor update to Lighthouse Pro. This last update has a few changes, but the main one is that if you are editing an issue and let your session timeout, after you login your changes are preserved. So if you had entered some lengthy notes, timed out, hit Save, when you login, you changes to the issue are preserved and stored.
There are a few ways you can do this, but here is how I did it. Also note I was only only concerned about people timing out in an issue edit. First off, in login.cfm, I look for a form post from the issue editor:
<cfif structKeyExists(form, "issuetypeidfk")>
<cfset session.issueform = duplicate(form)>
</cfif>
Then back in view.cfm, the file that handles editing issues, I simply added:
<cfif structKeyExists(session, "issueform")>
<cfset structAppend(form, session.issueform)>
<cfset structDelete(session, "issueform")>
</cfif>
Note that I clear out the session data. This is important so as to not keep restoring the edits for future editing.
Comments
How does the form variable still exists when you get sent to the login screen? If you were to do a cflocation and send them to the login page the form variable would not exist. Is login displayed in the application.cfm file if the user's session is old?
I added this code to our server (removed the old code and put the new files up on the server). Everything works great except for the "Reports" page. It works nicely in Firefox, but IE is throwing JS errors. I would troubleshoot it myself, but I figured there may be something quick and easy I'm missing. The 2 stats.cfm pages look to be exactly the same, so I'm not sure what changed from the last version to this one. The errors received are:
Line: 98 (and 117, 136, 155, 174)
Char: 1
Error: Object Expected
Code: 0
URL: http://myurl/stats.cfm
Any ideas?
Thanks.
