Commit Graph

62 Commits

Author SHA1 Message Date
Evan Prodromou
09cffc1928 hide and disable ToSelector for replies 2011-04-11 12:55:49 -04:00
Shashi Gowda
c44a94e8f5 Port autocomplete from tagInput to jQuery UI, send Last-Modified header and look for it in JS. 2011-04-08 14:51:05 +05:30
Shashi Gowda
ad86eb78d3 Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
Conflicts:
	js/util.min.js
	lib/default.php
2011-04-07 23:13:45 +05:30
Evan Prodromou
6a7f3501e5 forgot other two files while minifying 2011-04-05 12:27:07 -04:00
Evan Prodromou
ac24ed3dff add checkbox initialization 2011-04-05 11:48:53 -04:00
Shashi Gowda
5a2bab07b2 Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
Conflicts:
	actions/tagother.php
	classes/Profile.php
	classes/Profile_tag.php
	js/util.min.js
2011-03-30 15:47:42 +05:30
Brion Vibber
2707a481e4 Enhancement for 'ajax' form class: submit buttons behave more like normal submissions, submitting their name/values through a hidden field.
This should work well for simple cases, but could conceivably create false positives if there's a click handler on the specific buttons, depending on whether event processing passes it on. Double-check if you're doing such forms along with the 'ajax' class!
2011-03-23 15:21:31 -07:00
Shashi Gowda
31c1177970 Merge branch '1.0.x' into people_tags_rebase
Conflicts:
	EVENTS.txt
	actions/peopletag.php
	actions/tagother.php
	classes/Notice.php
	js/util.js
	js/util.min.js
	lib/accountprofileblock.php
	lib/action.php
	lib/activityobject.php
	lib/command.php
	lib/personalgroupnav.php
	plugins/OStatus/OStatusPlugin.php
2011-03-22 07:56:25 +05:30
Brion Vibber
4afa3caae3 ajax load for additional inline replies; /replies variant of conversationview 2011-03-17 16:27:42 -07:00
Brion Vibber
057a831026 Fixes for race conditions between Realtime plugin and the AJAX display of inline replies.
* keep the notice-reply-placeholder around, but hidden
* insert things before the placeholder, rather than appending to the end of the list.
* append the active form after the hidden placeholder, so things inserted before the placeholder never come after it
* Realtime: check pre-existing notice visibility a second time after loading the HTML for a notice. Fixes bug where sometimes your own post would be shown twice because the Realtime notification arrived before the AJAX posting returned, but Realtime's AJAX fetch of the notice returned after.
2011-03-17 15:54:40 -07:00
Brion Vibber
7d202e9c61 Detect and show AJAX errors on FormXHR submission handling.
Previously we threw away errore reported by the actual AJAX submission and only used whatever error the browser reported to us; this didn't help if we reached the server ok but had a problem there.
We now extract the #error if given and use that in the alert().
Also should now show 'Unknown error' instead of a crappy generic 'something died in jQuery' when we get a 200 response but bogus return data.
2011-03-16 16:10:43 -07:00
Brion Vibber
096f99be16 (update util.min.js for recent changes) 2011-03-11 15:31:58 -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
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
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
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
Shashi Gowda
b372ed721d styling for people tag UI 2011-03-07 00:44:21 +05:30
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
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
Brion Vibber
e6c972ebcb Inline replies: drop the box if tabbing out and no text 2011-03-01 14:24:06 -08:00
Brion Vibber
c0dcd73379 Inline replies: fix replies on repeats, placeholder re-add when replying to a reply 2011-03-01 13:49:13 -08:00