Andrew Nacin
cbc7814345
For an intermittent connection, only disable save and publish buttons when the request times out. An error still means a we have a connection.
...
props azaozz.
see #24695 .
git-svn-id: https://develop.svn.wordpress.org/trunk@24691 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 21:07:44 +00:00
Andrew Ozz
88e774f7a0
Autosave: properly set autosaveLast when TinyMCE is the default editor. Prevents firing autosave when there are no changes. See #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@24431 602fd350-edb4-49c9-b593-d223f7449a82
2013-06-09 00:45:01 +00:00
Andrew Ozz
2390c48b88
Remove saving of post_format in autosave and revisions, fixes #24455
...
git-svn-id: https://develop.svn.wordpress.org/trunk@24397 602fd350-edb4-49c9-b593-d223f7449a82
2013-06-02 01:29:44 +00:00
Andrew Ozz
23514efe8a
Local autosaves: always set 'autosave = true' in the post data when triggering local autosave on form submit. Fixes cases where the form is submitted shortly after loading the Edit screen, local autosave hasn't run yet and there is no previous data to be merged. Fixes #23960 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@24328 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-22 21:43:45 +00:00
Andrew Ozz
5326a36210
Local autosaves: remove debug logging, see #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@24269 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-15 23:26:36 +00:00
Andrew Ozz
8acec51116
Local autosaves: show the notice above the post formats UI, see #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@24221 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-09 18:23:05 +00:00
Andrew Ozz
701a2d23f9
Post locks and autosave:
...
- Move nonces refreshing from autosave to lock checking.
- Do autosave only when there is something to save.
See #23295
git-svn-id: https://develop.svn.wordpress.org/trunk@24209 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-08 22:52:55 +00:00
Andrew Ozz
008336ee9c
Post locks:
...
- Show 'Saving revision...' while autosaving after a post has been taken over. Change to 'Your latest changes were saved as a revision.' when autosave completes.
- Make sure a user exists before using $user->display_name.
- Add 'post_lock_text' action for extending the message text.
git-svn-id: https://develop.svn.wordpress.org/trunk@24042 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-22 03:08:51 +00:00
Mark Jaquith
177556309d
Standardize post format postmeta keys around the ones already used by the Crowd Favorite plugin.
...
props wonderboymusic. fixes #24010 .
git-svn-id: https://develop.svn.wordpress.org/trunk@24021 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-17 20:57:44 +00:00
Andrew Ozz
48dc22b9eb
Revisions:
...
- Store the post format as meta on revisions (including autosaves).
- Add post formats data (post meta) when autosaving.
- Only add non-empty post formats data to revisions.
- Correct the post format when previewing a published post.
Props kovshenin, see #19570 , see #20564 .
git-svn-id: https://develop.svn.wordpress.org/trunk@23928 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-06 23:18:52 +00:00
Andrew Ozz
28a928ddb1
Autosave: use heartbeat to determine when connection is lost and disable the Save and Publish buttons. Re-enable the buttons when connection is restored. Props dh-shredder, see #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23886 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-02 22:51:09 +00:00
Mark Jaquith
e7cde8715f
Post Format UI.
...
* Icons
* Selection
* Prompt text
* Special fields
* Styling
* Sparkles
This is going to need testing, polish, and love.
see #19570 . props melchoyce, helen, wonderboymusic, lessbloat, rachelbaker, aaroncampbell, DrewAPicture, ryelle.
git-svn-id: https://develop.svn.wordpress.org/trunk@23843 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-29 03:35:41 +00:00
Andrew Ozz
6d5bbd04bc
Local autosave: remove the locally stored data after a post is saved. This prevents false positives when several users edit the same post multiple times. See #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23796 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-25 23:43:06 +00:00
Andrew Ozz
c996f27c4d
Create one autosave per user rather than a single autosave for all users. Remove unused code from autosave.js and wp_ajax_autosave(). See #23665 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23735 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-16 21:15:43 +00:00
Andrew Ozz
ded373a640
Local autosave: remove the temp cookie after first use. Prevents false negative if the browser crashes. Add some temp logging to aid testing. See #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23705 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-15 06:15:14 +00:00
Mark Jaquith
4163b21746
Wrap self.run in an anonymous function wrapper so self always gets the same scope.
...
props azaozz. fixes #23780
git-svn-id: https://develop.svn.wordpress.org/trunk@23703 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-15 02:32:05 +00:00
Andrew Ozz
5e71fb3992
Local autosave: set a temp cookie on submitting the form and change it on redirecting after the post is saved/updated, then use it to determine if saving worked properly. Removes the chance for false positives after saving/updating a post. See #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23693 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-14 03:06:07 +00:00
Andrew Ozz
4ad27d6d14
Autosave to the browser's sessionStorage, compare this autosave to the post content on page load and let the user restore it when the data is not the same. First run, see #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23683 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-13 10:08:16 +00:00
Andrew Nacin
57f7ae7af4
Stop using deprecated jQuery API (.browser and .live). Do manual UA sniffing where still necessary. Improve selector performance by using delegated events. props ocean90. see #22975 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23518 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 18:05:28 +00:00
Ryan Boren
a0a13a3fc4
When inserting from URL in the media modal, retain query params and properly insert the caption code.
...
Props koopersmith
fixes #22796
git-svn-id: https://develop.svn.wordpress.org/trunk@23110 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 23:12:59 +00:00
Andrew Nacin
2b0d2a17fb
Autosave: Properly convert undefined fields to empty strings. This bug could cause issues if a post type didn't support the title and/or editor. see #22491 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22794 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 21:04:04 +00:00
Andrew Nacin
e82d5080b8
New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
...
Be on the lookout for weirdness.
props lessbloat. see #21456 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22019 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 19:57:44 +00:00
Andrew Nacin
db981a3b27
Switch to .min for compressed JS and CSS files.
...
* This moves our "development" versions from .dev.js to .js (same for css).
* The compressed version then moves from .js to .min.js (same for css).
By switching to the standard .min convention, it sets expectations for developers,
and works nicely with existing tools such as ack.
fixes #21633 .
git-svn-id: https://develop.svn.wordpress.org/trunk@21592 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-23 00:04:18 +00:00
bumpbot
54c5743c66
Compress scripts/styles: 3.5-alpha-21587.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@21587 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-22 18:58:32 +00:00
bumpbot
3778e5ea4a
Compress scripts/styles: 3.5-alpha-21304.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@21304 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-23 00:58:20 +00:00
bumpbot
a95752402e
Compress scripts/styles: 3.5-alpha-21301. TinyMCE updated.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@21301 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-22 02:58:18 +00:00
Andrew Ozz
b8a1940ac7
Prevent error in autosave for CPTs without title or editor, props sorich87, fixes #18227
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19476 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-29 18:06:56 +00:00
Andrew Ozz
1ccfd1739c
Workaround for WebKit bug when previewing posts, props SergeyBiryukov, fixes #18341
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19299 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-15 18:48:55 +00:00
Andrew Ozz
93e5c50ad8
Send the 'wp-remove-post-lock' XHR only when the main window is unloaded (unloading the Thickbox iframe triggers it too), see #18515
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19258 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-11 19:52:12 +00:00
Andrew Ozz
a7f2758641
Remove stray comma, fixes #18929
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18967 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-13 19:46:13 +00:00
Andrew Nacin
35edc4264d
Release a user's post lock when the user leaves a post. see #18515 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18796 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-27 20:52:07 +00:00
Andrew Ozz
3a20d6aa17
Replace .attr() with .prop() as per jQuery 1.6.1. Also fixes couple places where the JS wasn't working because attr('some', '') does not remove the HTML property now, see #17311
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18027 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-25 01:04:12 +00:00
Andrew Ozz
89b108095f
Fix autosave and word count for DFW HTML editor, always update word count on autosave, see #17136
...
git-svn-id: https://develop.svn.wordpress.org/trunk@17936 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-16 06:17:44 +00:00
Andrew Ozz
4c67fd9d0f
Remove blocking alert when login cookie has expired.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@17931 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-15 05:48:35 +00:00
Andrew Ozz
787995a1ab
DFW: remove unneeded JS global, fix screen flash in WebKit, props koopersmith, see #17136
...
git-svn-id: https://develop.svn.wordpress.org/trunk@17702 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-26 01:19:26 +00:00
Andrew Ozz
07a62334de
Distraction Free Writing mode, see #17136
...
git-svn-id: https://develop.svn.wordpress.org/trunk@17695 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-25 01:01:34 +00:00
Andrew Ozz
6d0f618fd9
Fix two rare regressions: alert when the login has expires and when post is edited by another user, fixes #16928
...
git-svn-id: https://develop.svn.wordpress.org/trunk@17640 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-16 02:37:44 +00:00
Andrew Ozz
d400b19f92
Handle error response in autosave_update_slug(), props nacin, fixes #16975
...
git-svn-id: https://develop.svn.wordpress.org/trunk@17565 602fd350-edb4-49c9-b593-d223f7449a82
2011-03-27 20:09:09 +00:00
Andrew Nacin
4360f8c1a4
Use separate ajax spinners for the Save Draft and Publish buttons on the post form. fixes #14582 with initial patch from wojtek.szkutnik.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@15722 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-04 20:53:04 +00:00
Ryan Boren
afc24755fc
autosave_update_post_ID() no longer needed. Fix button enable lag. Props duck_. fixes #13400
...
git-svn-id: https://develop.svn.wordpress.org/trunk@14663 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-15 14:03:46 +00:00
Dion Hulse
8823027da6
Remember the post_parent during autosaves. Props duck_. Fixes #12938
...
git-svn-id: https://develop.svn.wordpress.org/trunk@14057 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-10 12:39:01 +00:00
Mark Jaquith
2d54780d5e
Create post_status=auto-draft when creating a new post item. status changes to draft on first auto-save. now we always have a real post ID to work with. see #11889 . fixes #11145 . fixes #11990
...
git-svn-id: https://develop.svn.wordpress.org/trunk@12987 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-06 10:07:57 +00:00
Andrew Ozz
9d5f38a1df
Merge post.js with page.js and slug.js, optimize categories and tags JS, standardize postboxes IDs and JS.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@12022 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-13 10:02:42 +00:00
Andrew Ozz
8e956b6488
Show the login form in a popup when autosave hits the login grace period, fixes #10704
...
git-svn-id: https://develop.svn.wordpress.org/trunk@12021 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-11 11:26:59 +00:00
Mark Jaquith
04772d1b9f
Surface "Move to Trash" link for posts/pages immediately after first autosave fires. Props cross country flight. fixes #10344
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11986 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-01 11:44:18 +00:00
Andrew Ozz
b967e7d4bd
Avoid rare autosave collision when trying to publish the post immediately after it was autosaved, fixes #6785
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11927 602fd350-edb4-49c9-b593-d223f7449a82
2009-09-13 23:36:09 +00:00
Andrew Ozz
6db1862bd7
Fix race condition with autosave when clicking Publish immediately after entering post title, fixes #6728
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11879 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-26 04:11:16 +00:00
Andrew Ozz
61c97aba16
Clean up .button and .button[disabled] CSS classes, add spinner and gray-out buttons after clicking Publish or Update post.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11874 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-25 05:14:49 +00:00
Andrew Ozz
ad9e217bf4
Don't do autosave while the TinyMCE spellchecker is active (it strips all the markup), fixes #10515
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11790 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-08 09:03:56 +00:00
Andrew Ozz
adda656922
Ensure autosave is run before showing preview for new posts/pages.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@11466 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-27 11:04:00 +00:00