Brion Vibber [Mon, 14 Mar 2011 19:32:39 +0000 (12:32 -0700)]
Realtime work in progress: switch makeNoticeData to async -- next we'll load fresh copies from server, maintaining proper language and plugin enhancements.
Brion Vibber [Fri, 11 Mar 2011 23:20:20 +0000 (15:20 -0800)]
JS optimization: move creation of inline reply placeholders to server-side so we don't have to create them client-side (which causes reflows and takes about 25-30ms on my test system)
Using live instead of bind for the event handling, we don't have to play any games on the ones that we do add at runtime. Yay!
Brion Vibber [Fri, 11 Mar 2011 23:03:15 +0000 (15:03 -0800)]
JS performance: speeding up initialization by consolidating event handlers for reply buttons
Saved about 60ms on my test system during page setup by using a single global 'live' click handler for reply links.
No longer need to seek out and attach event handlers on every notice, yay!
Brion Vibber [Fri, 11 Mar 2011 20:28:15 +0000 (12:28 -0800)]
Poll plugin: switching Atom & JSON output to use new hooks & methods, much nicer output. Also switched types, which may break old entries. Beware!
Input not yet updated.
Brion Vibber [Fri, 11 Mar 2011 00:29:13 +0000 (16:29 -0800)]
Fix disappearing reply forms when closing geo section
Missing default-cancel in the click handler allowed the event to bubble up to the body handler, where we think the click is outside of the form because the target is no longer in the form by the time we check
Now the event no longer bubbles up, as we cancel it when we're done.
Brion Vibber [Thu, 10 Mar 2011 19:35:04 +0000 (11:35 -0800)]
Provisional tweak for polls to go through atom feeds / ostatus
Had to fix some calls to MicroAppPlugin->saveNoticeFromActivity() which passed an OStatus_profile instead of a Profile...
Imported polls don't get data from upstream or send it back currently.
Brion Vibber [Thu, 10 Mar 2011 01:43:31 +0000 (17:43 -0800)]
Update LinkPreview plugin for multiple notice forms.
* main notice form setup now encapsulated into SN.Init.NoticeForm(form) -- this can be monkeypatched by plugins to append their own setup code, as LinkPreview does
* LinkPreview now supports debugging with non-minified JS source when $config['site']['minify'] is false
* tweaked core & neo styles so 'notice-status' class gets same styles as attach-status, so we can more easily add mroe statusy things. (needs more consolidation with geo-status, etc)
* tweaked LinkPreview's preview area to use that style
Brion Vibber [Wed, 9 Mar 2011 23:46:24 +0000 (15:46 -0800)]
Ticket #3076: fix regression in password recovery when email address given that doesn't match
Was triggering errors due to use of common_canonical_nickname() on arbitrary input without checking for exceptions about invalid nicknames (which didn't exist long ago in the before time)
Brion Vibber [Wed, 9 Mar 2011 22:10:26 +0000 (14:10 -0800)]
Fixes for Event plugin:
* RSVP cancel/delete now works
* caching fix for RSVP insert and delete (compound unique keys aren't properly handled for pkeyGet's caching right now; hacked it for this class for the moment)
* div nesting fix
* missing name/avatar on RSVP responses
Brion Vibber [Wed, 9 Mar 2011 20:38:06 +0000 (12:38 -0800)]
Stub 'home' subsection at top of settings & admin nav panels, so folks always know how to get home.
(If we drop the section titles, these'll look a little cleaner since it'll only show 'Home' once :D)
Notes:
* URLs must be quoted in the .ini file or the .ini file parser explodes!
* To do multiples, list as external[] instead of external.
* If there's an included base theme, any externals it lists will be included first.
* All externals are loaded before any local styles.
Brion Vibber [Wed, 9 Mar 2011 00:06:30 +0000 (16:06 -0800)]
Hackaround for http caching problem on poll pages; the notice doesn't change, but the results do, so don't use the notice's last-modifeid time as a caching epoch.
Brion Vibber [Tue, 8 Mar 2011 23:10:30 +0000 (15:10 -0800)]
Bookmark and poll plugins' custom notice forms now do AJAX submit, with the resulting notice appearing in the timeline.
FormNoticeXHR now is triggered on any form labeled with class 'ajax-notice', so those other than the traditional notice form should work as long as they handle the AJAX submission and return a properly formatted notice.
Things to watch out for:
* to determine whether the resulting notice should show on the current timeline, the JS code needs to be able to check the author and such. Keeping the existing vcard bits helps for this!
* the notice form submission stuff clears out inputs from your form -- test to make sure this behaves correctly
* error messages returned from the thingy _should_ come through, but this needs more testing for consistency
* while form components that aren't in a custom form should just be ignored, this should be tested more. (eg there's no location or attachment box for poll or bookmark plugins)
* NoticeListItem isn't currently reachable via autoloader -- touch NoticeList explicitly before calling into it for now.
Brion Vibber [Tue, 8 Mar 2011 21:58:28 +0000 (13:58 -0800)]
Replace explicit FormXHR setup for a bunch of simple AJAX form submissions with adding the 'ajax' class on them.
This avoids having to add extra custom JS bits just to initialize forms using the common AJAX submission path.
Brion Vibber [Tue, 8 Mar 2011 20:01:12 +0000 (12:01 -0800)]
de-IDifying labels in notice form to fix issue with geo pin activating the wrong place when cloning the form
Note that changes to the attachment from <label for/><input id/> to <label><input></label> affect some of the existing styles which attempt to place them both in the same place based on having a common parent. Only 'neo' has been fully tested and fixed for this case, as the others all fail due to the new layout anyway. :)
Zach Copley [Tue, 8 Mar 2011 05:35:48 +0000 (21:35 -0800)]
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
* '1.0.x' of gitorious.org:statusnet/mainline:
Initial checkin of Poll plugin: micro-app to post mini polls/surveys from the notice form.
Localisation updates from http://translatewiki.net.
More doc comments on MicroApp stuff; some of the show-notice code & the ActivityStreams stuff is a bit wonky and may need smoothing out
Doc comments for MicroAppPlugin
mailboxes were wrongly overriding global menu
Brion Vibber [Tue, 8 Mar 2011 05:28:36 +0000 (21:28 -0800)]
Initial checkin of Poll plugin: micro-app to post mini polls/surveys from the notice form.
This version is fairly basic; votes do not (yet) show a reply, they just got in the table. No pretty graphs for the results yet, just text.
The ActivityStream output is temporary and probably should be replaced; the current structures for adding custom data aren't really ready yet (especially since we need to cover JSON and Atom formats, probably pretty differently)
Uses similar system as Bookmark for attaching to notices -- saves a custom URI for an alternate action, which we can then pass in and hook back up to our poll object. This can probably do with a little more simplification in the parent MicroAppPlugin class.
Currently adds two tables:
- poll holds the main poll info: id and URI to associate with the notice, then the question and a text blob with the options.
- poll_response records the selections picked by our nice fellows.
Hopefully no off-by-one bugs left in the selection, but I give no guarantees. ;)
Some todo notes in the README and in doc comments.