Make WordPress Core

Ticket #32688: 32688.diff

File 32688.diff, 5.0 KB (added by jorbin, 11 years ago)
  • tests/qunit/fixtures/customize-menus.js

     
     1window._wpCustomizeMenusSettings = {
     2        'nonce': 'yo',
     3        'phpIntMax': '2147483647',
     4        'menuItemTransport': 'postMessage',
     5        'allMenus': [
     6                {
     7                        'term_id': '2',
     8                        'name': 'Awesome menu',
     9                        'slug': 'awesome-menu',
     10                        'term_group': '0',
     11                        'term_taxonomy_id': '2',
     12                        'taxonomy': 'nav_menu',
     13                        'description': '',
     14                        'parent': '0',
     15                        'count': '0'
     16                },
     17                {
     18                        'term_id': '3',
     19                        'name': 'Cool Menu',
     20                        'slug': 'cool-menu',
     21                        'term_group': '0',
     22                        'term_taxonomy_id': '3',
     23                        'taxonomy': 'nav_menu',
     24                        'description': '',
     25                        'parent': '0',
     26                        'count': '0'
     27                }
     28        ],
     29        'defaultSettingValues': {
     30                'nav_menu': {
     31                        'name': '',
     32                        'description': '',
     33                        'parent': 0,
     34                        'auto_add': false
     35                },
     36                'nav_menu_item': {
     37                        'object_id': 0,
     38                        'object': '',
     39                        'menu_item_parent': 0,
     40                        'position': 0,
     41                        'type': 'custom',
     42                        'title': '',
     43                        'url': '',
     44                        'target': '',
     45                        'attr_title': '',
     46                        'description': '',
     47                        'classes': '',
     48                        'xfn': '',
     49                        'status': 'publish',
     50                        'original_title': '',
     51                        'nav_menu_term_id': 0
     52                }
     53        },
     54        'itemTypes': {
     55                'postTypes': {
     56                        'page': {
     57                                'label': 'Page'
     58                        },
     59                        'post': {
     60                                'label': 'Post'
     61                        }
     62                },
     63                'taxonomies': {
     64                        'post_tag': {
     65                                'label': 'Tag'
     66                        },
     67                        'post_format': {
     68                                'label': 'Format'
     69                        },
     70                        'category': {
     71                                'label': 'Category'
     72                        }
     73                }
     74        },
     75        'l10n': {
     76                'custom_label': 'Custom Link',
     77                'customizingMenus': 'Customizing ▸ Menus',
     78                'invalidTitleTpl': '%s (Invalid)',
     79                'itemAdded': 'Menu item added',
     80                'itemDeleted': 'Menu item deleted',
     81                'itemsFound': 'Number of items found: %d',
     82                'itemsFoundMore': 'Additional items found: %d',
     83                'itemsLoadingMore': 'Loading more results... please wait.',
     84                'menuAdded': 'Menu created',
     85                'menuDeleted': 'Menu deleted',
     86                'menuLocation': '(Currently set to: %s)',
     87                'menuNameLabel': 'Menu Name',
     88                'movedDown': 'Menu item moved down',
     89                'movedLeft': 'Menu item moved out of submenu',
     90                'movedRight': 'Menu item is now a sub-item',
     91                'movedUp': 'Menu item moved up',
     92                'pendingTitleTpl': '%s (Pending)',
     93                'postTypeLabel': 'Post Type',
     94                'reorderLabelOff': 'Close reorder mode',
     95                'reorderLabelOn': 'Reorder menu items',
     96                'reorderModeOff': 'Reorder mode closed',
     97                'reorderModeOn': 'Reorder mode enabled',
     98                'taxonomyTermLabel': 'Taxonomy',
     99                'unnamed': '(unnamed)',
     100                'untitled': '(no label)'
     101        }
     102};
     103
     104window._wpCustomizeSettings.panels.nav_menus = {
     105        'id': 'nav_menus',
     106        'description': '<p>This panel is used for managing navigation menus for content you have already published on your site. You can create menus and add items for existing content such as pages, posts, categories, tags, formats, or custom links.</p><p>Menus can be displayed in locations defined by your theme or in <a href="javascript:wp.customize.panel( "widgets" ).focus();">widget areas</a> by adding a &#8220;Custom Menu&#8221; widget.</p>',
     107        'priority': 100,
     108        'type': 'nav_menus',
     109        'title': 'Menus',
     110        'content': '',
     111        'active': true,
     112        'instanceNumber': 2
     113};
     114
  • tests/qunit/index.html

    Property changes on: tests/qunit/fixtures/customize-menus.js
    ___________________________________________________________________
    Added: svn:executable
    ## -0,0 +1 ##
    +*
    \ No newline at end of property
     
    2323                <div id="qunit-fixture">
    2424                        <script src="fixtures/customize-header.js"></script>
    2525                        <script src="fixtures/customize-settings.js"></script>
     26                        <script src="fixtures/customize-menus.js"></script>
    2627                </div>
    2728                <p><a href="editor">TinyMCE tests</a></p>
    2829
     
    4142                <script src="wp-includes/js/shortcode.js"></script>
    4243                <script src="wp-admin/js/customize-controls.js"></script>
    4344                <script src="wp-admin/js/customize-controls-utils.js"></script>
     45                <script src="wp-admin/js/customize-nav-menus.js"></script>
    4446                <script src="wp-admin/js/word-count.js"></script>
    4547
    4648                <!-- Customizer templates for sections -->
  • tests/qunit/wp-admin/js/customize-nav-menus.js

     
     1/* global wp */
     2
     3jQuery( function( $ ) {
     4
     5
     6        module( 'Customize Base: Class', {
     7                setup: function() {
     8                        // Init the menus?
     9
     10
     11                },
     12                teardown: function() {
     13                        // Maybe restore things?
     14                }
     15
     16        });
     17
     18        test( 'jQuery is not WordPress', function() {
     19                notEqual( $, wp );
     20        });
     21
     22
     23
     24});