Commit Graph

51 Commits

Author SHA1 Message Date
Mark Jaquith 3584dd58a9 Revisions: Cleanup, bug fixes, refactoring, polish.
* Hide the tooltip initially.
* Fix a bug with routing.
* Further separate the Slider model and view, refactoring its code.
* More reliance on events than direct calls between areas.
* Smarter background diff loading (single mode). Loads the diffs closest to your position first.
* Removed a bunch of manual templating and `render()` methods. Now relies more on the WP Backbone Views functionality.
* include the requested `id` in `ensure:load`.
* new trigger: `ensure`, for `ensure()` attempts, regardless of whether they are already loaded.
* pass along a promise in both `ensure` and `ensure:load`.
* in `ensure`, remove requests for diffs we aready have

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24671 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 14:01:39 +00:00
Mark Jaquith d88021e236 Revisions: Loading indicator, cleanup, bug fixes.
* Loading indicator when the user is waiting for a trip to the server.
* Bug fixes for diff priming.
* Fix the date display.
* Forget about local comparator, instead order by `modified` on the server.
* Initialize the frame model before the view (this was the source of a LOT of heartache).

git-svn-id: https://develop.svn.wordpress.org/trunk@24667 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 05:11:56 +00:00
Mark Jaquith 1fb9b2cfa1 Revisions: real URLs and preloading of the requested diff.
* Real URLs are being used now, using pushState. `?revision={id}` or `?from={from}&to={to}`.
* Drop the redundant `action=edit` from the URLs (this is the default).
* The initial comparison is preloaded, whether a single revision or a compare-two situation.

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24664 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 22:56:48 +00:00
Andrew Nacin e01a1a94bb Proper translation of '<time> ago' in revisions. props johnbillion, fixes #24721.
git-svn-id: https://develop.svn.wordpress.org/trunk@24643 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 16:15:18 +00:00
Mark Jaquith d42c83177b Revisions: Get rid of an unneccessary ID. IDs are a bad idea.
See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24629 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 04:37:50 +00:00
Daryl Koopersmith 5917fcb621 Revisions: Remove unused template. See #24425.
git-svn-id: https://develop.svn.wordpress.org/trunk@24604 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 07:34:54 +00:00
Mark Jaquith 4c35743a1a Tick marks are back for revisions
* Simple tick marks
* Tooltips snap to tick marks
* Tooltips arrow reverses side for LTR/RTL
* Fix for routing issue where just the hash is changed in the URL bar relating to compare two mode

see #24425. props adamsilverstein, ocean90.

git-svn-id: https://develop.svn.wordpress.org/trunk@24595 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-08 21:37:03 +00:00
Dominik Schilling (ocean90) 814c36baea Revisions improvements
* Corrected routing behavior
* Simplified CSS for tooltips
* Compare two mode for RTL
* Support for posts without titles 

props adamsilverstein, ocean90. see #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24578 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-06 10:48:14 +00:00
Dominik Schilling (ocean90) b7ebeea685 Revisions: CSS cleanup, see #24425.
git-svn-id: https://develop.svn.wordpress.org/trunk@24574 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-05 22:15:37 +00:00
Dominik Schilling (ocean90) 3690db14f7 Revisions UI update:
* Restore Compare two mode
* Restore tooltips
* RTL support
* First pass for URL routing and history

props adamsilverstein, see #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24549 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-03 20:27:19 +00:00
Mark Jaquith ac0d0d1dee Cleanup of the revisions screen, both on the PHP API side, and the JS.
* Much simpler PHP API
* Cleaner and more Backbone-y JS API
* Consequently, does batch queries; this now scales up to hundreds of revisions

Currently missing, but much easier considering the cleaned up base:

* Compare two mode
* RTL

props koopersmith, nacin, adamsilverstein, ocean90. see #24425

git-svn-id: https://develop.svn.wordpress.org/trunk@24520 602fd350-edb4-49c9-b593-d223f7449a82
2013-06-26 21:06:50 +00:00
Andrew Nacin 71fcaad59b Use wp_revisions_enabled(). props ethitter. fixes #24525.
git-svn-id: https://develop.svn.wordpress.org/trunk@24425 602fd350-edb4-49c9-b593-d223f7449a82
2013-06-07 02:06:22 +00:00
Dominik Schilling (ocean90) 123d8a1258 Revisions UI: Redesigned slider handlers.
Also:
* Fix diff header styling in grey admin theme
* Prevent an overlap of the compare two checkbox on smaller screens

props melchoyce, DrewAPicture, adamsilverstein. fixes #24276.

git-svn-id: https://develop.svn.wordpress.org/trunk@24219 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-09 10:07:26 +00:00
Dominik Schilling (ocean90) 40cf994e77 Revisions UI: Just another update - Now with improved tick marks and tooltips.
props adamsilverstein. see #23935.

git-svn-id: https://develop.svn.wordpress.org/trunk@24174 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-03 23:17:06 +00:00
Dominik Schilling (ocean90) 85cd918ff6 Revisions UI: Add a help tab. props siobhan, DrewAPicture. see #23899.
git-svn-id: https://develop.svn.wordpress.org/trunk@24173 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-03 23:00:14 +00:00
Dominik Schilling (ocean90) 11ba4ed67a Fix typo in [24157]. props johnjamesjacoby. fixes #24253.
git-svn-id: https://develop.svn.wordpress.org/trunk@24166 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-03 07:05:19 +00:00
Dominik Schilling (ocean90) 67d2cfeb89 Revisions UI: Add translation contexts and remove unneeded lines.
props nao. fixes #23917.

git-svn-id: https://develop.svn.wordpress.org/trunk@24157 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-02 10:12:19 +00:00
Dominik Schilling (ocean90) 800d88397a Revisions UI update:
* Style status loading as a regular update message like on the other screens
 * Move compare two checkbox to diff header to avoid an overlap on long post titles
 * Restore color shades for the scope of changes visualisation 
 * Show tooltips while moving the slider handle
 * Diff header styling
 * Move color declarations to classic/fresh stylesheets
 * Sync admin color stylesheets

props jrbeilke for initial patch. see #23935.

git-svn-id: https://develop.svn.wordpress.org/trunk@24119 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-28 10:56:57 +00:00
Dominik Schilling (ocean90) d8bf6c44b3 Revisions: Clean up JavaScript variable names, see #23901.
git-svn-id: https://develop.svn.wordpress.org/trunk@24019 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-17 19:34:21 +00:00
Dominik Schilling (ocean90) b3879a543a Revisions UI: Remove the "To:" prefix from the header when viewing a single revision. Also prefix a revision field with a label.
props SergeyBiryukov, adamsilverstein, faishal. fixes #23903.

git-svn-id: https://develop.svn.wordpress.org/trunk@23994 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-15 18:40:17 +00:00
Sergey Biryukov d25e6cb006 Fix closing tag in revisions UI. props adamsilverstein. fixes #23999.
git-svn-id: https://develop.svn.wordpress.org/trunk@23934 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-08 23:38:48 +00:00
Sergey Biryukov 244974e838 Fix typo in revisions JS/CSS. props mgibbs189, JustinSainton. fixes #23941.
git-svn-id: https://develop.svn.wordpress.org/trunk@23908 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-04 20:49:26 +00:00
Mark Jaquith 25c799470e Revisions CSS cleanup.
props ocean90. fixes #23933

git-svn-id: https://develop.svn.wordpress.org/trunk@23901 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-04 15:49:28 +00:00
Mark Jaquith 8351c2e87d Further cleanup of revisions code. Probably not the last.
see #23901. props adamsilverstein, azaozz, ocean90.

git-svn-id: https://develop.svn.wordpress.org/trunk@23898 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-04 07:53:49 +00:00
Mark Jaquith 15a0ae209d Kill the HR on revisions page. see #23497
git-svn-id: https://develop.svn.wordpress.org/trunk@23834 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-28 03:17:03 +00:00
Mark Jaquith 404aa52ea2 Take revision control out of the realm of a pure constant. Make it filterable.
* New filter: wp_revisions_to_keep

props ethitter, SergeyBiryukov. fixes #22289.

git-svn-id: https://develop.svn.wordpress.org/trunk@23818 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-27 18:11:56 +00:00
Peter Westwood ae03f1a0b6 Revisions: UI Update.
* Refines the UI to make it clearer and easier to use
* Introduces weighted tickmarks
* Fixes comparison bugs.

See #23497 props adamsilverstein


git-svn-id: https://develop.svn.wordpress.org/trunk@23769 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-21 15:54:11 +00:00
Peter Westwood ae4522b5f1 Revisions: Updates to the new Revisions UI.
Various Updates including:
 * i18n fixes
 * Added tracking of what revision ID was restored
 * async fetching of diffs so that slider works sooner even with many revisions

See #23497 props adamsilverstein, ethitter


git-svn-id: https://develop.svn.wordpress.org/trunk@23639 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-07 15:32:26 +00:00
Helen Hou-Sandi 45b4d47b02 * Simplify jQuery UI slider CSS and bring into line with admin styles.
* Merge styles into wp-admin.css and colors-*.css.
* Scope the CSS with a class so as not to conflict with the color picker, which also utilizes jQuery UI slider. Authors wanting to use built-in styling for sliders should add a class of `.wp-slider` to the container to be intialized.

props karmatosed, helen. see #23497.


git-svn-id: https://develop.svn.wordpress.org/trunk@23581 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 19:24:03 +00:00
Helen Hou-Sandi 7f7f9a805c Merge revisions.css into wp-admin.css. Move misplaced block of revisions CSS in wp-admin.css into appropriate section. Some standards clean up and selector merging. see #23497.
git-svn-id: https://develop.svn.wordpress.org/trunk@23507 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 15:40:44 +00:00
Peter Westwood 554627a0d5 Revisions: First pass an implementing a new UI/UX for reviewing the revisions of posts. See #23497 props adamsilverstein for the initial patch.
This implements a new revisions ui using Backbone and preserves all the old methods of "integration" so the change should be transparent to plugins using revisi
ons with CPTs.

This is the first pass and so there are a number of things still to be resolved, more details in the ticket. Feedback welcomed.


git-svn-id: https://develop.svn.wordpress.org/trunk@23506 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 15:14:34 +00:00
Peter Westwood 553395cb92 Revisions: Pass the whole revision being filtered along with context about which side it is to the _wp_post_revision_field_$field filters.
Fixes #19932 props pollett, ethitter.


git-svn-id: https://develop.svn.wordpress.org/trunk@23404 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-13 21:42:03 +00:00
Andrew Nacin 48c841392a Mid-page headers should be h3, not h2.
git-svn-id: https://develop.svn.wordpress.org/trunk@15910 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-22 00:27:12 +00:00
Ryan Boren efff0fe8bb Fix viewing autosave revision for custom post types. Props duck_. fixes #13110
git-svn-id: https://develop.svn.wordpress.org/trunk@14749 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-19 18:36:52 +00:00
Andrew Nacin ec4f5b83bf Use relative paths when including files, avoiding include_path. fixes #12594, props sorich87.
git-svn-id: https://develop.svn.wordpress.org/trunk@14139 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-18 06:14:45 +00:00
Andrew Nacin 4d2c75d785 Assume WP_DEBUG is defined in wpdb. Remove unnecessary constant() calls. Ensure DB_COLLATE defined as empty string doesn't override default Multisite collation. fixes #12041, see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@13209 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-19 01:03:58 +00:00
Ryan Boren 72adbb470e Remove trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@12859 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-26 22:49:05 +00:00
Dion Hulse 333b3c517c Introduce Revisioning for custom Post Types, Introduce 'supports' argument to register_post_type() to wrap add_post_type_support(), Whitespace additions to create_initial_post_types(). See #9674. Fixes #11703
git-svn-id: https://develop.svn.wordpress.org/trunk@12751 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-18 11:44:51 +00:00
Peter Westwood ca583c9b1a Improve the revision comparison user interface to hilight that we compare "old on left" to "new on right". Includes some js to hide the radio buttons to stop you selecting reverse comparisions.
Fixes #11088 props filosofo.

git-svn-id: https://develop.svn.wordpress.org/trunk@12500 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-23 09:15:13 +00:00
Mark Jaquith f0336cfa7d deprecate wp_specialchars() in favor of esc_html(). Encode quotes for esc_html() as in esc_attr(), to improve plugin security.
git-svn-id: https://develop.svn.wordpress.org/trunk@11380 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-18 15:11:07 +00:00
Ryan Boren bda582ab0d Notice fixes. see #7509
git-svn-id: https://develop.svn.wordpress.org/trunk@8732 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-25 21:50:11 +00:00
Peter Westwood e1adf1d070 More phpdoc updates for wp-adming. See #7496 props santosj.
git-svn-id: https://develop.svn.wordpress.org/trunk@8656 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-16 07:27:34 +00:00
Ryan Boren 2272a1a950 Trailing whitespace cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@8600 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-09 05:36:14 +00:00
Ryan Boren 6c433a5dce Store current user rather than original post author when saving revisions. Props mdawaffe. fixes #7317 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@8480 602fd350-edb4-49c9-b593-d223f7449a82
2008-07-28 23:58:24 +00:00
Matt Mullenweg 9327a37ebf Javascriptify revision selections to deal elegantly while comparing.
git-svn-id: https://develop.svn.wordpress.org/trunk@8306 602fd350-edb4-49c9-b593-d223f7449a82
2008-07-10 07:58:19 +00:00
Ryan Boren a3269818d9 better handling of comparing a revision to itself. Props mdawaffe. see #6775
git-svn-id: https://develop.svn.wordpress.org/trunk@8176 602fd350-edb4-49c9-b593-d223f7449a82
2008-06-23 22:45:19 +00:00
Ryan Boren 66c719f214 Validation fixes for post revisions. Props mdawaffe. see #6775
git-svn-id: https://develop.svn.wordpress.org/trunk@8012 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-29 23:16:11 +00:00
Ryan Boren 163aa65807 Post revisions API cleanup from mdawaffe. see #6775
git-svn-id: https://develop.svn.wordpress.org/trunk@8011 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-29 22:21:36 +00:00
Ryan Boren 1c4f5de9a1 Revisioning for pages from mdawaffe. see #6775
git-svn-id: https://develop.svn.wordpress.org/trunk@7913 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-09 15:59:17 +00:00
Ryan Boren a1be16cf86 Move autosave to post revisions. Props mdawaffe. see #6775
git-svn-id: https://develop.svn.wordpress.org/trunk@7907 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-08 17:25:07 +00:00