Commit Graph

14 Commits

Author SHA1 Message Date
Ryan Boren c53137f535 Scope button classes so they can be used on the frontend without interfering with theme styles.
Props helenyhou, koopersmith
fixes #22644


git-svn-id: https://develop.svn.wordpress.org/trunk@22948 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:40:59 +00:00
Daryl Koopersmith 10d46dd112 Buttons: Remove unused button arrows and dropdowns. see #21598, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22707 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 11:26:26 +00:00
Daryl Koopersmith aae8a0bdd1 Buttons: Ensure correct disabled submit button state in iOS. props johnbillion, fixes #22490.
git-svn-id: https://develop.svn.wordpress.org/trunk@22704 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 03:20:17 +00:00
Andrew Nacin 30df4b2aa0 Allow the .hidden class to hide a button. props helenyhou. fixes #22018.
git-svn-id: https://develop.svn.wordpress.org/trunk@22440 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 21:25:25 +00:00
Andrew Nacin 9f4d6a2ebe Don't show a hand cursor when hovering over a disabled button. props sabreuse, fixes #22371.
git-svn-id: https://develop.svn.wordpress.org/trunk@22405 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 22:30:41 +00:00
Daryl Koopersmith 737ed62a1c Streamlining media, part I.
The main goal here is to rearrange the media components in a modularized structure to support more linear workflows. This is that structure using the pre-existing workflows, which will be improved over the course of the next few commits.

This leaves a few pieces a bit rough around the edges: namely gallery editing and selecting a featured image.

The fine print follows.

----

'''Styles'''
* Tightened padding around the modal to optimize for a smaller default screen size.
* Added a light dashed line surrounding the modal to provide a subtle cue for the persistent dropzone (which is evolving into a power user feature since we now have a dedicated `upload` state).
* Add a size for `hero` buttons.
* Remove transitions from frame subviews (e.g. menu, content, sidebar, toolbar).

----

'''Code'''

`wp.media.controller.StateManager`
* Don't fire `activate` and `deactivate` if attempting to switch to the current state.

`wp.media.controller.State`
* Add a base state class to bind default methods (as not all states will inherit from the `Library` state).
* On `activate`, fire `activate()`, `menu()`, `content()`, `sidebar()`, and `toolbar()`.
* The menu view is often a shared object (as its most common use case is switching between states). Assign the view to the state's `menu` attribute.
* `menu()` automatically fetches the state's `menu` attribute, attaches the menu view to the frame, and attempts to select a menu item that matches the state's `id`.

`wp.media.controller.Library`
* Now inherits from `wp.media.controller.State`.

`wp.media.controller.Upload`
* A new state to improve the upload experience.
* Displays a large dropzone when empty (a `UploaderInline` view).
* When attachments are uploaded, displays management interface (a `library` state restricted to attachments uploaded during the current session).

`wp.media.view.Frame`
* In `menu()`, `content()`, `sidebar()`, and `toolbar()`, only change the view if it differs from the current view. Also, ensure `hide-*` classes are properly removed.
*

`wp.media.view.PriorityList`
* A new container view used to sort and render child views by the `priority` property.
* Used by `wp.media.view.Sidebar` and `wp.media.view.Menu`.
* Next step: Use two instances to power `wp.media.view.Toolbar`.

`wp.media.view.Menu` and `wp.media.view.MenuItem`
* A new `PriorityList` view that renders a list of views used to switch between states.
* `MenuItem` instances have `id` attributes that are tied directly to states.
* Separators can be added as plain `Backbone.View` instances with the `separator` class.
* Supports any type of `Backbone.View`.

`media.view.Menu.Landing`
* The landing menu for the 'insert media' workflow.
* Includes an inactive link to an "Embed from URL" state.
* Next steps: only use in select cases to allot for other workflows (such as featured images).

`wp.media.view.AttachmentsBrowser`
* A container to render an `Attachments` view with accompanying UI controls (similar to what the `Attachments` view was when it contained the `$list` property).
* Currently only renders a `Search` view as a control.
* Next steps: Add optional view counts (e.g. "21 images"), upload buttons, and collection filter UI.

`wp.media.view.Attachments`
* If the `Attachments` scroll buffer is not filled with `Attachment` views, continue loading more attachments.
* Use `this.model` instead of `this.controller.state()` to allow `Attachments` views to have differing `edge` and `gutter` properties.
* Add `edge()`, a method used to calculate the optimal dimensions for an attachment based on the current width of the `Attachments` container element.
* `edge()` is currently only enabled on resize, as the relative positioning and CSS transforms used to center thumbnails are suboptimal when coupled with frequent resizing.
* Next steps: For infinite scroll performance improvements, look into absolutely positioning attachment views and paging groups of attachment views.

`wp.media.view.UploaderWindow`
* Now generates a `$browser` element as the browse button (instead of a full `UploaderInline` view). Using a portable browse button prevents us from having to create a new `wp.Uploader` instance every time we want access to a browse button.

`wp.media.view.UploaderInline`
* No longer directly linked to the `UploaderWindow` view or its `wp.Uploader` instance.
* Used as the default `upload` state view.

`wp.media.view.Selection`
* An interactive representation of the selected `Attachments`.
* Based on the improved workflows, this is likely overkill. For simplicity's sake, will probably remove this in favor of `SelectionPreview`.

----

see #21390.



git-svn-id: https://develop.svn.wordpress.org/trunk@22362 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-04 22:59:12 +00:00
Andrew Ozz c71700c7b4 Buttons:
- Update the install/initial configuration/repair screens buttons, props DrewAPicture
- Fix the welcome screen buttons and fine-tune the buttons css, props lessbloat

fixes #21598


git-svn-id: https://develop.svn.wordpress.org/trunk@22314 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-26 19:40:39 +00:00
Andrew Ozz 8564fb5851 Fix the buttons in IE, make them better in IE7, remove the default padding in Firefox, make all .button <a> and <input> look the same, fixes #21598
git-svn-id: https://develop.svn.wordpress.org/trunk@22289 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-24 01:33:59 +00:00
Andrew Ozz 108c09fdd3 Buttons: slightly bolder :focus styles, make the "Log In" button '.button-large', props lessbloat, see #21598
git-svn-id: https://develop.svn.wordpress.org/trunk@22288 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-24 01:27:56 +00:00
Daryl Koopersmith 9e8cd23bdb Add attachment display settings to the media modal.
* Add a media view for button groups.
* Add button dropdown containers.
* Add a dropdown property to the button media model.

fixes #22206, #21814, see #21390, #21813, #21598.


git-svn-id: https://develop.svn.wordpress.org/trunk@22247 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 19:25:17 +00:00
Daryl Koopersmith b8b5c89522 Add a down arrow button. see #21598, #21390, #21813.
git-svn-id: https://develop.svn.wordpress.org/trunk@22245 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 15:42:34 +00:00
Daryl Koopersmith 55b4a66c55 Add button groups. see #21598, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22242 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 13:34:01 +00:00
Daryl Koopersmith 201729df85 Revise and combine button selectors.
* Simplifies button selectors. Maintains backwards compatibility for several classes and makes creating new button styles considerably easier.
* Adds buttons documentation.
* Raw input submit/reset/button types now use default browser styles (instead of half-styled borders that did not look like buttons).
* Moves basic button color standardization to the beginning of wp-admin.

see #21598, #22197.



git-svn-id: https://develop.svn.wordpress.org/trunk@22239 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 21:25:25 +00:00
Daryl Koopersmith 2ec630204a Consolidate buttons CSS into a single file.
Adds `wp-includes/css/buttons.css` to consolidate buttons files and make them available in a modular fashion. Buttons are included automatically with the `colors` styles, and can be included independently by running:

	`wp_enqueue_style('buttons');`

fixes #22197, see #21598.


git-svn-id: https://develop.svn.wordpress.org/trunk@22236 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:55:29 +00:00