Fix the error text on Chrome when navigating away from a page while editing.
Fix the error text on Chrome when navigating away from a page while editing.

On Chrome, opening a field to edit and then navigating away or closing
Chrome would result in an error dialog with the text "true". This was due to
a difference in how Chrome handles the onbeforeunload event.

Like Firefox, it requires returning a string for the text. To handle IE
(which requires setting the text in event.returnValue), we would set the text
in returnValue and then return that string. Chrome, however, ignores any
attempt to set this text, so it remains "true".

Now we create the message, store it in a variable, attempt to set on
returnValue, and then just return the string variable itself, fixing all
browsers.

Fixes bug #2178

chipx86/reviewboard,custode/reviewboard,chipx86/reviewboard,chipx86/reviewboard,KnowNo/reviewboard,bkochendorfer/reviewboard,custode/reviewboard,custode/reviewboard,1tush/reviewboard,Khan/reviewboard,1tush/reviewboard,1tush/reviewboard,bkochendorfer/reviewboard,1tush/reviewboard,1tush/reviewboard,1tush/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,Khan/reviewboard,chazy/reviewboard,KnowNo/reviewboard,beol/reviewboard,davidt/reviewboard,chazy/reviewboard,KnowNo/reviewboard,brennie/reviewboard,sgallagher/reviewboard,brennie/reviewboard,beol/reviewboard,sgallagher/reviewboard,atagar/ReviewBoard,chazy/reviewboard,davidt/reviewboard,atagar/ReviewBoard,Khan/reviewboard,beol/reviewboard,beol/reviewboard,atagar/ReviewBoard,KnowNo/reviewboard,sgallagher/reviewboard,chazy/reviewboard,davidt/reviewboard,Khan/reviewboard,atagar/ReviewBoard,brennie/reviewboard,atagar/ReviewBoard,bkochendorfer/reviewboard,Khan/reviewboard,custode/reviewboard,Khan/reviewboard,1tush/reviewboard,chazy/reviewboard,Khan/reviewboard,Khan/reviewboard,bkochendorfer/reviewboard,chazy/reviewboard,sgallagher/reviewboard,brennie/reviewboard,atagar/ReviewBoard,atagar/ReviewBoard,1tush/reviewboard,Khan/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,chazy/reviewboard,davidt/reviewboard,reviewboard/reviewboard,chazy/reviewboard,1tush/reviewboard,atagar/ReviewBoard,chazy/reviewboard,atagar/ReviewBoard