Make WordPress Core


Ignore:
Timestamp:
10/31/2012 07:22:25 PM (14 years ago)
Author:
koopersmith
Message:

Add gallery settings to the media modal.

  • Abstracts wp.media.view.AttachmentDisplaySettings into wp.media.view.Settings for managing lists of settings with button groups and select boxes. Settings can optionally be tied to a user setting (i.e. using getUserSetting).
  • Adds wp.media.view.Settings.AttachmentDisplay.
  • Adds wp.media.view.Settings.Gallery.

see #21390, #21815.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22324 r22340  
    14351435        </script>
    14361436
     1437        <script type="text/html" id="tmpl-gallery-settings">
     1438                <h4><?php _e('Link To'); ?></h4>
     1439                <div class="link-to button-group button-large" data-setting="link">
     1440                        <button class="button" value="post">
     1441                                <?php esc_attr_e('Attachment Page'); ?>
     1442                        </button>
     1443                        <button class="button" value="file">
     1444                                <?php esc_attr_e('Media File'); ?>
     1445                        </button>
     1446                </div>
     1447
     1448                <h4><?php _e('Gallery Columns'); ?></h4>
     1449
     1450                <select class="columns" name="columns" data-setting="columns">
     1451                        <% _.times( 9, function( i ) { %>
     1452                                <option value="<%- i %>"><%- i %></option>
     1453                        <% }); %>
     1454                </select>
     1455        </script>
     1456
    14371457        <script type="text/html" id="tmpl-editor-attachment">
    14381458                <div class="editor-attachment-preview">
Note: See TracChangeset for help on using the changeset viewer.