Commit Graph

427 Commits

Author SHA1 Message Date
Evan Prodromou
41420449f8 Merge branch 'jqueryui' into 1.0.x
Conflicts:
	lib/action.php
2011-03-16 09:56:26 -04:00
Evan Prodromou
afa1aa6c9b Revert "use jquery-ui for input_forms tabset"
This reverts commit c4bada9022.
2011-03-16 09:53:27 -04:00
Brion Vibber
096f99be16 (update util.min.js for recent changes) 2011-03-11 15:31:58 -08:00
Brion Vibber
2bccd18d9a 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!
2011-03-11 15:20:20 -08:00
Brion Vibber
10e5cb482e 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!
2011-03-11 15:03:15 -08:00
Brion Vibber
0f3af3e3b7 Keep 'Status' tab current while showing the placeholder -- pretend like it's a mini version of the status notice form :D 2011-03-10 18:01:40 -08:00
Brion Vibber
0ee5d79739 Return to placeholder entry after successful post 2011-03-10 17:54:07 -08:00
Brion Vibber
6066bce02c Clicking outside the active top posting form now returns to the placeholder if all textarea/input fields are empty 2011-03-10 17:52:03 -08:00
Brion Vibber
b89b89ce89 Focus in textarea when popping up the status tab 2011-03-10 17:44:17 -08:00
Brion Vibber
f88689cc87 Trigger status notice form when top placeholder form gets used. Delay initialization of notice ajax forms until they get shown. 2011-03-10 17:40:39 -08:00
Brion Vibber
874804a0c4 use a data attribute instead of 'title' for geo lookup api; fixes failure of cloned forms to work 2011-03-10 16:49:24 -08:00
Brion Vibber
e43ee373ae 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.
2011-03-10 16:29:13 -08:00
Brion Vibber
eef9786e36 click -> focus for reply placeholder trigger; lets keyboarders use it though not super ideal :D 2011-03-10 16:23:18 -08:00
Brion Vibber
d107164aec Tweaks for closing 2011-03-10 16:15:44 -08:00
Brion Vibber
4e1ce4e5bb Remove inline reply forms on click-away if they have initial text as well as if empty (plus whitespace stripping) 2011-03-10 16:10:58 -08:00
Brion Vibber
acca8a24b4 Fix for inline reply placeholders: only remove the one we're clicking in, not all of them! 2011-03-10 16:08:28 -08:00
Brion Vibber
6b5b6d072b Make inline reply forms close when clicking outside them if there's no text again.
(That went away when we switched to reusing the main notice form)
2011-03-10 16:06:01 -08:00
Evan Prodromou
c4bada9022 use jquery-ui for input_forms tabset 2011-03-10 10:53:11 -06:00
Evan Prodromou
a5daed0aa8 load jquery-ui css and js by default 2011-03-10 10:28:08 -06:00
Evan Prodromou
5c26f36a7c slim down the name of the jquery file 2011-03-10 10:19:50 -06:00
Evan Prodromou
347dd08272 add jquery-ui js and css 2011-03-10 10:18:35 -06:00
Brion Vibber
ec828a094c 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
2011-03-09 17:43:31 -08:00
Brion Vibber
cecc2576a5 Fixes for direct message form for JS changes to the main form 2011-03-09 16:55:52 -08:00
Brion Vibber
040baf291d Fix for input tab selection 2011-03-09 13:05:12 -08:00
Brion Vibber
cbf16a4974 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.
2011-03-08 15:10:30 -08:00
Brion Vibber
28809035d0 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.
2011-03-08 13:58:28 -08:00
Brion Vibber
90f1cfcfc0 Poll plugin: make the polling response form submit via AJAX and return the results.
Now, any form marked with 'ajax' class will get the simple FormXHR treatment. Should help cut down on code that just adds that into individual forms.
2011-03-08 13:45:51 -08:00
Brion Vibber
0c2289fb2f Avoid AJAX fetch delay for inline replies when possible; we clone a copy of the notice form skeleton at initialization, then insert it in place instead of fetching a new one. 2011-03-07 12:18:46 -08:00
Evan Prodromou
cf1a4d8292 Input form switcher works
This change adds the input form switcher, which adds a navigation menu
across the top of the input form, letting you switch between different kinds of input.

The input menu doesn't yet look like a nice set of tabs; it could use some love.
2011-03-07 04:57:49 -05:00
Brion Vibber
2fa95144ed Cleanup & minification for migration to reusable notice form in inline replies. Yay! 2011-03-04 15:00:20 -08:00
Brion Vibber
a1002cc107 Work in progress: inline reply form reusing the main reply form now inserts the successful result more or less right 2011-03-04 14:58:30 -08:00
Brion Vibber
5358f78e82 Reusable notice form fixes for geolocation 2011-03-04 14:27:55 -08:00
Brion Vibber
9689bda21c Loading the original form instead of faking up our own. Sorta works but not pretty :D 2011-03-04 14:11:11 -08:00
Brion Vibber
b68f8643a2 Kill some more hardcoded ids... 2011-03-04 13:53:41 -08:00
Brion Vibber
56d5c4a4d1 More hardcoded id cleanup in notice form... 2011-03-04 13:40:33 -08:00
Brion Vibber
e7662bb1d9 Moving bit by bit more towards reusable forms... per-form-izing some of the location setup (not all yet) 2011-03-03 17:58:35 -08:00
Brion Vibber
cd20190ba5 Remove hardcoded #notice_action-submit from JS/CSS (prep for reusable notice forms) 2011-03-03 17:48:16 -08:00
Brion Vibber
9d40c8f835 Pulling out some more #-references to per-form items 2011-03-03 17:39:37 -08:00
Brion Vibber
b58aa29168 Notice form cleanup: removing hardcoded id from counter references; prep for reusable notice forms. 2011-03-03 17:15:17 -08:00
Brion Vibber
f94a5e1a6a Notice form cleanup: drop use of id for #notice_data-text (prep for reusable notice form) 2011-03-03 17:05:19 -08:00
Brion Vibber
1ff17f0ed9 Notice form cleanup: removing hardcoded IDs from attachment handling (prep for reusable notice forms) 2011-03-03 16:56:54 -08:00
Brion Vibber
488230c3e1 Drop auto-focusing of the notice form. 2011-03-03 16:15:28 -08:00
Brion Vibber
822f08e3ed Kill 'hit return to send'... 2011-03-03 16:14:36 -08:00
Brion Vibber
6f73b2870b Rework geolocation status display so you can actually tell what it's doing and whether a location will be posted.
Goes in along with the file attachment info, below the notice box. Still needs to be generalized to work with multiple forms.
2011-03-03 15:21:27 -08:00
Brion Vibber
5a404ee713 'Comment' -> 'Reply' in inline comment/reply messages 2011-03-03 12:26:07 -08:00
Brion Vibber
018b11a883 Fix for realtime vs threaded reply fix 2011-03-01 16:29:00 -08:00
Brion Vibber
764d069ccd Clean up threaded notices vs replies classes, and fixed realtime's threaded behavior to only run on threaded lists 2011-03-01 16:08:37 -08:00
Brion Vibber
9fd2ee86f3 Inline reply work for threaded lists in realtime 2011-03-01 16:04:11 -08:00
Brion Vibber
c6521db620 Fix for timeline insert on primary AJAX post: only insert on the first, primary timeline. Don't insert on sub-timelines for replies! 2011-03-01 15:24:44 -08:00
Brion Vibber
db4ab2cd92 When canceling out of inline reply field and there are no other replies, drop the section 2011-03-01 14:26:11 -08:00