Removes hardcoded (and vestigial) 'upload' states in favor of using the default modal state.
When a media toolbar action is triggered, reset the modal after switching to the new state (as opposed to beforehand).
fixes#23675.
git-svn-id: https://develop.svn.wordpress.org/trunk@23590 602fd350-edb4-49c9-b593-d223f7449a82
* When overriding `Backbone.sync()`, ensure the `sync` and `error` events fire consistently.
* `Model#make()` has been removed. Use `$` instead, and be sure to grab the DOM node where necessary (using `[0]`).
* `Collection#get()` now accepts `cid`s. `Collection#getByCid()` has been removed.
* When overriding the `State` constructor, bind `change` callbacks after the default `Model` constructor is called, because the `Model` constructor no longer passes the `silent` flag when calling `set()` for the default attributes.
* In 'change' events, `options.changes` was removed. It can now be accessed through `model.changed`. Check if any attributes have changed by calling `model.hasChanged()`. Also, don't mess with `model.changed`; it persists beyond the scope of a single event.
* `options.index` is no longer be set in the `add` event callback. Use `collection.indexOf(model)` can be used to retrieve the index of a model instead.
props gcorne. fixes#23262.
git-svn-id: https://develop.svn.wordpress.org/trunk@23589 602fd350-edb4-49c9-b593-d223f7449a82
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
Remains uncompressed for now, until we work out all 1.9.x issues.
Fixes custom fields.
props ocean90, wonderboymusic. see #22975.
git-svn-id: https://develop.svn.wordpress.org/trunk@23421 602fd350-edb4-49c9-b593-d223f7449a82
This restores linking to media files as the default, over attachment pages. This 'default' cannot currently be changed by a user setting (per 3.4 behavior), due to the default database schema.
see #22841, for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@23262 602fd350-edb4-49c9-b593-d223f7449a82
The code now automatically selects uploading attachments in all workflows. In a workflow that selects multiple attachments, all attachments added to the upload queue are selected. In a workflow that selects a single attachment (e.g. selecting a featured image), the last attachment added to the upload queue is selected.
see #22817.
git-svn-id: https://develop.svn.wordpress.org/trunk@23259 602fd350-edb4-49c9-b593-d223f7449a82
Shortcode attributes are strings; fix a variable type error in wp.media.gallery defaults.
props adamsilverstein.
see #22919.
git-svn-id: https://develop.svn.wordpress.org/trunk@23247 602fd350-edb4-49c9-b593-d223f7449a82
Temporarily includes jQuery in original, unminified form, for ease of testing and bug reporting.
jQuery 1.9 introduces a "migrate" script for deprecated and removed behavior. Warnings are issued for methods we should not be using, and should be fixed in core. These warnings are sent to the JavaScript console and are collected in `jQuery.migrateWarnings`.
See http://blog.jquery.com/2012/12/17/jquery-1-9-beta-1-released/ for more.
props ocean90, see #22975.
git-svn-id: https://develop.svn.wordpress.org/trunk@23180 602fd350-edb4-49c9-b593-d223f7449a82
Remove conflicting and unnecessary code in the WP TinyMCE plugin.
Fixes all known regressions when working with the embed, object, video, audio, source, and param elements in TinyMCE.
props markjaquith, koopersmith.
fixes#22790, #22842.
fixes#22842.
git-svn-id: https://develop.svn.wordpress.org/trunk@23153 602fd350-edb4-49c9-b593-d223f7449a82