summaryrefslogtreecommitdiff
path: root/js
AgeCommit message (Collapse)Author
2010-12-16Tickets #2112, 2333, 1677, 2362, 2831: fix AJAX form posting on SSL page ↵Brion Vibber
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-16Fix for ticket #2910: fix inconsistencies in notice posting response display ↵Brion Vibber
that broke help command, could be generally wonky Previous code was importing nodes from the XHR result into current document, then pulling text content of what might be the right element, then concat'ing that straight into HTML. Eww! Now pulling the text content straight from the XHR result -- same element that we check for existence of -- and using jQuery's own text() to do the getting and setting of text. Also note that some browsers might have been pulling HTML instead of text, or other funkiness.
2010-12-16Add lots of doc comments to util.js. Most stuff makes some kind of stuff, ↵Brion Vibber
but some is kinda.... funky :D These comments are all stripped during minification, so util.min.js remains unchanged.
2010-12-16work in progressBrion Vibber
2010-12-15Makefile to re-generate util.min.js (needs yui-compressor in path)Brion Vibber
2010-12-15Fix for ticket #2942: character counter now updates on cut and paste ↵Brion Vibber
operations made with mouse or menu This uses the 'copy' and 'paste' DOM events to trigger a counter update. I haven't had a chance to 100% confirm that middle-button click on X11 triggers the event, but it ought to. Cut and paste events from context menu and main edit menu known good in: * Firefox 4.08b-pre * IE 9 preview 7 * IE 8 current * Chrome 8 beta current * Safari 5.0.3 Opera is listed as not supporting these events, oh well. Note that using a *delete* command from a menu doesn't trigger an event. Sigh, you can't win everything.
2010-12-01Ticket #2912 further cleanup: use JS on emailsettings form to help connect ↵Brion Vibber
the 'I want to post by email' checkbox with the controls for adding or removing a post-by-email alias. Now, when you first come up the checkbox will most likely be off and the button to create an address is grayed out. Checking the box enables use of the 'new' button to generate an email address -- it's left disabled until you check the box, so you can't accidentally trip it. Actually adding the address now enables the post-by-mail option, as well, thus ensuring that it's saved. WARNING: OTHER CHANGES ON THE FORM WILL STILL BE LOST. Removing the address now disables the post-by-mail option, so it's not sitting around confusingly enabled but useless. You can still disable the checkbox manually without removing the address, in case you want to keep it for later. It's also still possible to actually save it in the state where the option is enabled, but there's no configured address, but that shouldn't happen too often. Possibly that should be prevented outright though.
2010-11-24Update util.min.js for attachment preview on Firefox, ChromeBrion Vibber
2010-11-24Preview thumbnails of uploaded image attachments before posting on ↵Brion Vibber
supporting browsers. Tested working so far: * Firefox 3.6 and 4.0 (FileReader -> data URL) * Chrome 8 (createObjectURL; FileReader also works) Tested with limited support: * Safari 5.0.3 (no preview, but we can show type and size) Tested and known not to support FileAPI, keeps current behavior: * Opera 11 beta
2010-11-17Partial fix for tickets #2194, #2393: Workaround for Meteor breaking AJAX ↵Brion Vibber
error responses returned on posting new notices. Fixes things in Firefox 4, but Safari 5 and Chrome 8 still don't return data... either on success or failure! Sigh. The Meteor realtime plugin sets document.domain to the common prefix between the main server and the Meteor server's hostnames, which overrides the same-origin controls on JavaScript DOM access so the two parts of the app can speak to each other. This unfortunately causes "fun" side effects for XMLHTTPRequest access to the main domain... if the new domain doesn't match the actual host (eg 'status.net' instead of 'brion.status.net') then we can't access the XHR's responseXML attribute, which holds a DOM tree of the parsed XML return data. As a workaround, if we can't get at the contents there, we'll parse a fresh DOM tree in the local context from the responseText property, which remains available. In the longer term, recommend retooling the realtime stuff so it's not fiddling with document.domain. It could also be an issue as it could allow local JavaScript XSS attacks to migrate to subdomains in other open windows.
2010-11-17include full updated source of JSON2 and use updated minified versionEvan Prodromou
2010-11-17use minified version of jquery.cookie.jsEvan Prodromou
2010-11-17use minified version of jquery.form.jsEvan Prodromou
2010-11-17upgrade jquery.form.jsEvan Prodromou
2010-11-17Use minified version of util.jsEvan Prodromou
2010-11-17upgrade to JQuery 1.4.4Evan Prodromou
2010-11-12drop a comma which isn't actually an error but keeps throwing annoying ↵Brion Vibber
warnings in netbeans
2010-11-12Drop commented-out code from old lightbox & thumbnail popup stuffBrion Vibber
2010-11-08doomy doom doomBrion Vibber
2010-11-08Some initial testing w/ thumb genBrion Vibber
2010-11-02Tossing in a basic i18n message export to script code. Plugins can hook ↵Brion Vibber
StartScriptMessage/EndScriptMessage, or directly add needed mappings in Action::getScriptMessages(). Exported entries are accessible as SN.msg(key) at runtime. StatusNet core code now sets the tooltip text on .attachment.more links when they receive their attachment-expansion magic; this will override the hardcoded tooltip text saved from OStatus plugin when displaying timelines in the web UI.
2010-09-02combine our standard scripts into one big scriptEvan Prodromou
2010-08-12TinyMCE: counter support (may not be 100% exact match to server-side count, ↵Brion Vibber
but there's already discrepencies due to URL shortening) Fix for bad char conversions also, caused short text to not be saved in some cases.
2010-07-29Initial fix for #2479: New post should be displayed on timeline only if it ↵Brion Vibber
belongs there (AJAX post) Previously we pushed out your latest post into the currently visible timeline regardless of whether it belonged there or not. This could be pretty confusing! Currently we don't have clearly machine-readable info on the page and returned notice HTML to determine whether it belongs, but we can do a couple checks easily which I've added: * public timeline (always show) * 'and friends' timeline (show for your own page only) * profile timeline (show for your own page only) Other places that should be added in the future: * group timelines if it's a group your posting to * tag timelines if the post contains the tag * reply & friends timelines for people you've mentioned Currently those aren't easy since the mention/group target links in the notice HTML are using the canonical form with user or group ID, while the available navigation links we can use to identify the current page use the names.
2010-06-23Fix for ticket http://status.net/open-source/issues/2380 "AutofocusZach Copley
shouldn't override scroll" -- Thanks @michaeltwofish!
2010-03-31Revert "Multiple file upload handling."Sarven Capadisli
This reverts commit 260f00d60bc83ac641d6fbe465e70aec33ccd9be. As mentioned in http://gitorious.org/statusnet/mainline/commit/260f00d60bc83ac641d6fbe465e70aec33ccd9be#comment_8367 Reverting this merge until the bugs are fixed and there is a general agreement on the need for this enhancement.
2010-03-26Multiple file upload handling.Nick Holliday
2010-03-26Fix for XHR more text behaviour on conversation pagesSarven Capadisli
2010-03-18Added processing indicator for more anchorSarven Capadisli
2010-03-18Updated 'more' anchor for attachments to do an XHR GETSarven Capadisli
2010-03-16Removed unnecessary form_id. Using jQuery .find() instead ofSarven Capadisli
constructing the selector.
2010-03-16Added extra condition to focusing on notice form on page load. If theSarven Capadisli
window location contains a fragument identifier, it will skip focus and do what the UA does natively.
2010-03-02OStatus: save file records for enclosuresBrion Vibber
Also stripping id from foreign HTML messages (could interfere with UI) and disabled failing attachment popup for a.attachment links that don't have a proper id, so you can click through instead of getting an error. Issues: * any other links aren't marked and saved * inconsistent behavior between local and remote attachments (local displays in lightbox, remote doesn't) * if the enclosure'd object isn't referenced in the content, you won't be offered a link to it in our UI
2010-03-02Changed the geo location cookie Expire to Session.Sarven Capadisli
2010-02-25Fixes replyto JS after the upgrade from jQuery 1.4.2Sarven Capadisli
2010-02-25Updated jQuery JavaScript Library from v1.4.1 to v1.4.2Sarven Capadisli
2010-02-25Revert "Updated jQuery Form Plugin from v2.17 to v2.36"Sarven Capadisli
This reverts commit 72037d61436978daa1edbd19d52b7e6fc6ae1fa8. Until some of the XHR notice related bugs are sorted out in Opera and Chromium, reverting back to the previous version. It throws slightly less errors. XHR file attachments is still a bit problematic in Opera 10.10/Ubuntu, Opera 10.10/Windows, and Chrome 4/Ubuntu. But this revert will at least allow regular XHR notices to work okay in Opera and Chromium. Standards suck!
2010-02-24Added a cookie for the nickname cookie for the login page and prefillSarven Capadisli
the input field.
2010-02-24Moved StatusNetInstance into SN in util.jsSarven Capadisli
2010-02-16Minor optimization to only bind an hover event to the notice at hand.Sarven Capadisli
2010-02-16Fix to allow any notice item with an attachment to use the overlay viewSarven Capadisli
2010-02-10Refactored repeat confirmation dialog. Also fixes dialog skipping.Sarven Capadisli
2010-02-01Reusing fixed selector name for 'processing' in util.jsSarven Capadisli
2010-01-31Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testingSarven Capadisli
2010-01-31Updated XHR binded events to work better in jQuery 1.4.1. UsingSarven Capadisli
.live() for event delegation instead of jQuery.data() and checking to see if an element was previously binded.
2010-01-31Updated jQuery Form Plugin from v2.17 to v2.36Sarven Capadisli
2010-01-31Updated jQuery JavaScript Library from v1.3.2 to v1.4.1Sarven Capadisli
2010-01-30Globalized form notice data geo valuesSarven Capadisli
2010-01-30Using jQuery chaining in FormNoticeXHRSarven Capadisli
2010-01-30Using form object instead of form_id and find(). Slightly faster andSarven Capadisli
easier to read.