gnu-social/js
Brion Vibber 46d9496ee6 Tickets #2112, 2333, 1677, 2362, 2831: fix AJAX form posting on SSL page views with ssl=sometimes
These have been failing for ages due to our outputting full URLs all the time, usually with the default protocol instead of the current one.
Forms would get output with an http: URL in their contents even when destined for an HTTPS page; while a regular form submission would just warn you about the secure->insecure transition, the AJAX code was failing outright and then not bothering to fall back to the regular submission.

I found it was easy to detect the mismatch -- just check the target URL and the current page's protocol before submitting.

Since failing over to non-AJAX submission to the HTTP URL throws up a warning, I figured it'd be easier (and much nicer for users) to just let it rewrite the target URL to use the secure protocol & hostname before doing the final submit.
This check is now automatically done for anything that calls SN.U.FormXHR() -- making most of our buttons on notices and profile/group headers work naturally.
The notice form setup code also runs the rewrite, which gets posting working without an error dialog.

I'd prefer in the long run to simply use relative URLs in most of our output; it avoids this problem completely and lets users simply stay in the current protocol mode instead of being constantly switched back to HTTP when clicking around.
(Note that folks using the SSLAlways extension to Firefox, for instance, will have their browsers constantly sending them back to HTTP pages, mimicking the desired user experience even though we haven't fully implemented it. These folks are likely going to be a lot happier with forms that submit correctly to go along with it!)
2010-12-16 17:02:02 -08:00
..
farbtastic Moved farbtastic's stylesheet to use relative paths for its own images 2010-01-18 11:12:05 +00:00
jcrop last scrub of Laconica -> StatusNet 2009-08-26 03:33:43 -04:00
emailsettings.js Ticket #2912 further cleanup: use JS on emailsettings form to help connect the 'I want to post by email' checkbox with the controls for adding or removing a post-by-email alias. 2010-12-01 14:23:56 -08:00
identica-badge.js Fixed innerHTML problem in IE7 and 8 for badge script 2010-01-22 21:08:51 +01:00
install.js Added site path field to installer + fancy URL javascript auto-detection. 2009-05-17 00:05:07 -04:00
jquery.cookie.js Implement user interface for user to preview what location they are sharing with a notice 2009-12-29 16:18:52 -05:00
jquery.cookie.min.js use minified version of jquery.cookie.js 2010-11-17 12:32:11 -05:00
jquery.form.js upgrade jquery.form.js 2010-11-17 12:30:55 -05:00
jquery.form.min.js use minified version of jquery.form.js 2010-11-17 12:31:35 -05:00
jquery.joverlay.js Upgrade to joverlay 0.8 (needed the html option) 2009-11-19 19:13:55 -05:00
jquery.joverlay.min.js Upgrade to joverlay 0.8 (needed the html option) 2009-11-19 19:13:55 -05:00
jquery.js upgrade to JQuery 1.4.4 2010-11-17 12:14:50 -05:00
jquery.min.js upgrade to JQuery 1.4.4 2010-11-17 12:14:50 -05:00
json2.js include full updated source of JSON2 and use updated minified version 2010-11-17 12:34:04 -05:00
json2.min.js include full updated source of JSON2 and use updated minified version 2010-11-17 12:34:04 -05:00
Makefile Makefile to re-generate util.min.js (needs yui-compressor in path) 2010-12-15 15:00:44 -08:00
userdesign.go.js Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x 2009-08-27 14:52:32 -07:00
util.js Tickets #2112, 2333, 1677, 2362, 2831: fix AJAX form posting on SSL page views with ssl=sometimes 2010-12-16 17:02:02 -08:00
util.min.js Tickets #2112, 2333, 1677, 2362, 2831: fix AJAX form posting on SSL page views with ssl=sometimes 2010-12-16 17:02:02 -08:00