Citytechinc/cq-groovy-console — pull request #5 by bryanw (2013-08-20 23:04:56+00:00)
Title: Editor features

These changes store the text in the editor in the local storage so that if the browser is accidentally closed or the user leaves the console page they can go back and still see their changes where they left off. Might want to consider a hook for clearing the local storage values when the user logs out for security reasons but I wouldn't think it would be that big of a concern. Also, there is only one local storage key for groovy console so if a user has it opened in two separate tabs then the one they typed in or last will hold the latest value.

The user is also able to resize the editor vertically in order to read more code at a time. This height is also persisted to local storage so the next time the user opens groovy console it will be the same height. I was not able to get this working with ExtJS so I had to bring in JQuery UI.

Obviously the browser needs to support HTML5 local storage for these features to work. Modernizr is used to check this.

I also added the Groovy version display on the console page next to the Help section. This could prove useful when diagnosing issues with the Groovy console.