Commit Graph

1366 Commits

Author SHA1 Message Date
Mark Jaquith 8415e7f1fe Fixes and tweaks for the metabox accordion.
* Fixed hover issues in Customizer.
* Toned down the default active/hover style (as it is normally not the top level menu, and should not be so prominent).
* Allow the active section to be closed.
* Other misc fixes.

Props ocean90, helen. Fixes #23449.

git-svn-id: https://develop.svn.wordpress.org/trunk@24734 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-18 17:42:53 +00:00
bumpbot fb6badbc6f Compress scripts/styles: 3.6-RC1-24733.
git-svn-id: https://develop.svn.wordpress.org/trunk@24733 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-18 16:58:54 +00:00
Mark Jaquith 3dd36021d8 Revisions: Better error handling.
* Shows an error message if the current diff can't be loaded.
* For bulk pre-loading, catches errors, and cuts subsequent requests in half, until eventually giving up.
* Some CSS fixes related to this, and the loading spinner.
* `wp.revisions.loadAll()` now returns a promise representing whether or not all revisions could be loaded.

Fixes #24758.

git-svn-id: https://develop.svn.wordpress.org/trunk@24732 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-18 16:35:19 +00:00
bumpbot 61eaa1d080 Compress scripts/styles: 3.6-beta4-24700.
git-svn-id: https://develop.svn.wordpress.org/trunk@24700 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-13 02:58:56 +00:00
Mark Jaquith 77813f267e Turn off debug mode in revisions.
See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24699 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-13 02:53:59 +00:00
Mark Jaquith fb9fbad8cd Revisions: RTL tooltip fixes. Plus a fix for switching to compare-two mode while looking at the first revision.
Also, a meta box avatar RTL alignment fix. props DrewAPicture.

Fixes #24739.

git-svn-id: https://develop.svn.wordpress.org/trunk@24698 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-13 02:49:53 +00:00
bumpbot 3275463453 Compress scripts/styles: 3.6-beta4-24690.
git-svn-id: https://develop.svn.wordpress.org/trunk@24690 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 20:58:53 +00:00
Dominik Schilling (ocean90) 8336111b52 Revisions: Disable URL updating if a browser doesn't support the History API. Like IE < 10.
props markjaquith. see #24736.

git-svn-id: https://develop.svn.wordpress.org/trunk@24689 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 20:51:10 +00:00
Mark Jaquith b10a51b03e Revisions: more graceful tooltips
* Use hoverIntent to prevent inadvertent display and provide more forgiving exploration.
* Nice interruptable fading animation.
* Subtle CSS transition when moving the tooltip side-to-side.

Fixes #24734. See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24686 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 20:34:14 +00:00
bumpbot 91636339bc Compress scripts/styles: 3.6-beta4-24681.
git-svn-id: https://develop.svn.wordpress.org/trunk@24681 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 18:58:55 +00:00
Helen Hou-Sandi f04053fdd8 Tweaks to the accordion:
* Enqueues JS in `do_accordion_sections()`.
* Top and bottom rounded corners for the nav menu accordion.
* Better RTL and no-JS.

props lessbloat, DrewAPicture, aaroncampbell, helen. fixes #23449.


git-svn-id: https://develop.svn.wordpress.org/trunk@24680 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 18:16:29 +00:00
Mark Jaquith f215ae599a Revisions: Code and whitespace cleanup.
See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24679 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 18:14:23 +00:00
Mark Jaquith db9e747264 Revisions: Have the tooltip follow the "from" scrubber handle when that is the one being moved, in compare-two mode.
See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24678 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 17:25:27 +00:00
bumpbot 60e8683a41 Compress scripts/styles: 3.6-beta4-24672.
git-svn-id: https://develop.svn.wordpress.org/trunk@24672 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 14:58:49 +00:00
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
bumpbot 88b8cd8f2f Compress scripts/styles: 3.6-beta4-24669.
git-svn-id: https://develop.svn.wordpress.org/trunk@24669 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 06:19:07 +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 539440d159 Revisions: use `reject()`, not `fail()`, when rejecting a deferred.
See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24666 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-12 05:11:50 +00:00
bumpbot a73c2969dd Compress scripts/styles: 3.6-beta4-24665.
git-svn-id: https://develop.svn.wordpress.org/trunk@24665 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 22:58:49 +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
bumpbot 9fe8848e7b Compress scripts/styles: 3.6-beta4-24662.
git-svn-id: https://develop.svn.wordpress.org/trunk@24662 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 18:58:51 +00:00
Mark Jaquith f22e1a65d2 Revisions: Immediately do a disabled button check on `ready()`.
Solves the issue of Prev/Next buttons not being disabled on initial load, when routing to an extremity.

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24661 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 18:43:18 +00:00
Mark Jaquith 9c1bac9eba Revisions: Use jQuery animation.
The CSS3 animations caused issues because the element was still there, and there is no standard way to know when a CSS3 animation is done.

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24660 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 18:43:12 +00:00
bumpbot 7edc21a054 Compress scripts/styles: 3.6-beta4-24659.
git-svn-id: https://develop.svn.wordpress.org/trunk@24659 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 10:58:54 +00:00
Mark Jaquith c5d53046a9 Revisions: Bunch of refactoring and code cleanup
* Extracted a lot of model-y stuff from the view code.
* Slider now has a proper model, with communication with other models.
* Use of `get( foo )` instead of `findWhere({ id: foo })`.
* Properly set the `from` diff when routing single mode.
* Bind `prev()` and `next()` to their model.
* Tick marks are now percentage based, which means the slider resizes with the browser, without JS resize events.
* When scrubbing, the position of the scrubber is considered a hover, so you can fall off the timeline while still scrubbing and the tooltips will persist.
* Tooltips fade in and out.
* Tooltips hang around for a grace period instead of immediately going away. More forgiving.
* Unused code paths removed.
* Got rid of a bunch of view-to-view communication.
* Use `_.times()` instead of a `for` loop.
* Removed premature `Math.floor()` and `Math.ceil()` calls that were making things not add up to 100%.

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24658 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 09:14:14 +00:00
bumpbot d653baf6da Compress scripts/styles: 3.6-beta4-24653.
git-svn-id: https://develop.svn.wordpress.org/trunk@24653 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 00:22:41 +00:00
Andrew Nacin 31322f220a Rename wp.xhr to wp.ajax to match admin-ajax.php (which it uses), jQuery.ajax (which it wraps), etc. see #24424.
git-svn-id: https://develop.svn.wordpress.org/trunk@24652 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-11 00:20:36 +00:00
bumpbot 461bb165f8 Compress scripts/styles: 3.6-beta4-24647.
git-svn-id: https://develop.svn.wordpress.org/trunk@24647 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 20:58:49 +00:00
Mark Jaquith 3fb18a0cc4 Revisions: fixes for routing and initial setting of compareTwoMode
* Fix routing handler logic (`compareTwoMode` was reversed).
* Fix routing handler typo (both should use the same handler).
* Set `compareTwoMode` to false, to start. props duck_.

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24646 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 19:17:01 +00:00
bumpbot 792fd2aab9 Compress scripts/styles: 3.6-beta4-24645.
git-svn-id: https://develop.svn.wordpress.org/trunk@24645 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 16:58:55 +00:00
Helen Hou-Sandi 974508b221 Add sliding animations to the accordion. props kovshenin, DrewAPicture, helen. fixes #23890.
git-svn-id: https://develop.svn.wordpress.org/trunk@24644 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 16:32:09 +00:00
bumpbot 707fe97ed8 Compress scripts/styles: 3.6-beta4-24640.
git-svn-id: https://develop.svn.wordpress.org/trunk@24640 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 06:58:52 +00:00
Mark Jaquith 63980a7297 Revisions: simpler hash URLs. Misc refactoring.
* Single mode: `#at/:to`
* Compare two mode: `#from/:from/to/:to`
* Make use of `_.isUndefined()`

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24638 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 06:08:56 +00:00
Mark Jaquith 90511e935b Revisions: remove some redundant code.
* Move some slider code into the slider view that was loitering in the checkmark view.
* `this.$()`, not `$()`.
* Cache a selector.
* `toggleClass()`, not `addClass()` with a ternary.
* Remove two classes with a single `removeClass()`.

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24636 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 05:40:45 +00:00
bumpbot d42e1e99ed Compress scripts/styles: 3.6-beta4-24632.
git-svn-id: https://develop.svn.wordpress.org/trunk@24632 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 04:58:53 +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
Mark Jaquith d60db0ea48 Revisions: Update the compare mode before rendering subviews.
See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24627 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 04:15:34 +00:00
Mark Jaquith e62170f6e2 Don't call `updateDiff()` in the Revisions FrameState model.
* Stuff needs to hook in, so firing it early results in a half-rendered screen.
* `updateDiff()` now returns a promise.
* Now, in the frame view's `render()`, it calls `updateDiff()`, relying on its promise.

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24622 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 03:20:58 +00:00
bumpbot 9d31473e23 Compress scripts/styles: 3.6-beta4-24620.
git-svn-id: https://develop.svn.wordpress.org/trunk@24620 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 22:58:53 +00:00
Andrew Ozz f24c4ee1b3 Collapse Menu: use jQuery normalized window width only for WebKit. Use window.innerWidth in Firefox, IE > 8, etc. so the window width in JS and for the @media rules match. Fixes #23817.
git-svn-id: https://develop.svn.wordpress.org/trunk@24619 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 21:26:32 +00:00
bumpbot 01f8aa101e Compress scripts/styles: 3.6-beta4-24618.
git-svn-id: https://develop.svn.wordpress.org/trunk@24618 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 20:58:49 +00:00
Mark Jaquith 8dfbe56e79 Pass back dateUnix (a unix timestamp) for better sorting of revisions in Backbone.
Props duck_. See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24615 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 19:21:25 +00:00
Mark Jaquith b4b9544d35 Move the loading of surrounding diffs functionality into the model.
* `wp.revisions.log()` — temporary measure for logging based on `wp.revisions.debug`
* Return promises from functions that sometimes bail but normally return promises.

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24613 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 19:00:11 +00:00
bumpbot 26bb582335 Compress scripts/styles: 3.6-beta4-24612.
git-svn-id: https://develop.svn.wordpress.org/trunk@24612 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 10:58:49 +00:00
Daryl Koopersmith 286a44fcf6 Revisions: Debounce fetching Diffs when revisions are updated.
Fixes navigation and casting bugs.

See #24425.


git-svn-id: https://develop.svn.wordpress.org/trunk@24611 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 09:57:58 +00:00
bumpbot 28c43dfb05 Compress scripts/styles: 3.6-beta4-24610.
git-svn-id: https://develop.svn.wordpress.org/trunk@24610 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 08:58:52 +00:00
Daryl Koopersmith f9e4a8500a Revisions: Move data management into the frame state. See #24425.
This helps to solidify the separation between data and UI. We track the diffId internally now, as the property itself was never referenced, and was always derived from the 'from' and 'to' models. This also sets us up for better request debouncing and diff management.



git-svn-id: https://develop.svn.wordpress.org/trunk@24609 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 08:50:32 +00:00
Daryl Koopersmith f2ab17ee13 Revisions: Simplify router property name. See #24425.
git-svn-id: https://develop.svn.wordpress.org/trunk@24608 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 08:20:12 +00:00
Daryl Koopersmith 155046f796 Revisions: Remove unnecessary router property. See #24425.
git-svn-id: https://develop.svn.wordpress.org/trunk@24607 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 08:15:55 +00:00
Daryl Koopersmith 0e8e4b4e49 Revisions: Simplify how URLs are updated. See #24425.
git-svn-id: https://develop.svn.wordpress.org/trunk@24606 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-09 08:14:38 +00:00