Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#24424 closed task (blessed) (fixed)

Add a general WordPress Backbone utility file

Reported by: koopersmith's profile koopersmith Owned by: koopersmith's profile koopersmith
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

We've already added wp.template, but we could use a few more common Backbone helpers. Let's move these to a single wp-backbone file to start.

Attachments (1)

24424.diff (3.0 KB) - added by nacin 12 years ago.

Download all attachments as: .zip

Change History (16)

#2 @koopersmith
12 years ago

In 24360:

Extract the base views from media.

See #24424.

#3 @koopersmith
12 years ago

  • Owner set to koopersmith
  • Resolution set to fixed
  • Status changed from new to closed

In 24361:

Update the subview controller for the patterns found in Backbone 1.0.

Fixes #24424.

#4 @koopersmith
12 years ago

In 24366:

Alias media.template to wp.template. See #23263, #24424.

#5 @koopersmith
12 years ago

In 24367:

Add Backbone property to the wp-backbone namespace. See #24424.

#6 @koopersmith
12 years ago

In 24368:

Branch the generic JS utilities from the Backbone commands. See #24424.

#7 @koopersmith
12 years ago

In 24369:

Move XHR helpers from media to utils. See #24424.

#8 @SergeyBiryukov
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Getting this on Edit Post screen after [24369] (with SCRIPT_DEBUG disabled):

TypeError: wp.xhr is undefined

The error breaks "Add Media" button (as reported in the forums), and also breaks the JS for switching post formats.

Looks like bumpbot didn't create wp-util.min.js.

Last edited 12 years ago by SergeyBiryukov (previous) (diff)

#9 follow-up: @mindctrl
12 years ago

I can't seem to replicate it at the moment, but when I first saw the issue with "Add Media", "Select Audio", etc. I was also having a problem, where on custom post types, the switcher was kicking me out to standard 'post' types and out of the custom post type. The link was missing the post_type=demo var. Just a heads up that maybe someone else can test.

#10 in reply to: ↑ 9 @SergeyBiryukov
12 years ago

Replying to mindctrl:

I can't seem to replicate it at the moment, but when I first saw the issue with "Add Media", "Select Audio", etc. I was also having a problem, where on custom post types, the switcher was kicking me out to standard 'post' types and out of the custom post type.

Related: #24360

#11 @nacin
12 years ago

In 24374:

Add wp-util.min.js. See #24424.

#12 @SergeyBiryukov
12 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

#13 @sunnyratilal
12 years ago

#24435 was marked as a duplicate.

@nacin
12 years ago

#14 @nacin
12 years ago

In 24652:

Rename wp.xhr to wp.ajax to match admin-ajax.php (which it uses), jQuery.ajax (which it wraps), etc. see #24424.

#15 @kadamwhite
12 years ago

  • Cc kadamwhite added
Note: See TracTickets for help on using tickets.