2015-02-22 16:31:14 +01:00
|
|
|
<!DOCTYPE html>
|
2013-08-29 20:42:59 +02:00
|
|
|
<html>
|
2015-02-22 16:31:14 +01:00
|
|
|
<head>
|
|
|
|
<title>WordPress QUnit Test Suite</title>
|
2013-08-29 20:42:59 +02:00
|
|
|
|
2015-02-22 16:31:14 +01:00
|
|
|
<!-- Dependencies -->
|
|
|
|
<script src="../../src/wp-includes/js/jquery/jquery.js"></script>
|
|
|
|
<script src="../../src/wp-includes/js/jquery/ui/core.js"></script>
|
|
|
|
<script src="../../src/wp-includes/js/underscore.min.js"></script>
|
|
|
|
<script src="../../src/wp-includes/js/backbone.min.js"></script>
|
|
|
|
<script src="../../src/wp-includes/js/zxcvbn.min.js"></script>
|
2015-05-30 02:02:13 +02:00
|
|
|
<script src="../../src/wp-includes/js/wp-util.js"></script>
|
Improve/introduce Customizer JavaScript models for Controls, Sections, and Panels.
* Introduce models for panels and sections.
* Introduce API to expand and focus a control, section or panel.
* Allow deep-linking to panels, sections, and controls inside of the Customizer.
* Clean up `accordion.js`, removing all Customizer-specific logic.
* Add initial unit tests for `wp.customize.Class` in `customize-base.js`.
https://make.wordpress.org/core/2014/10/27/toward-a-complete-javascript-api-for-the-customizer/ provides an overview of how to use the JavaScript API.
props westonruter, celloexpressions, ryankienstra.
see #28032, #28579, #28580, #28650, #28709, #29758.
fixes #29529.
git-svn-id: https://develop.svn.wordpress.org/trunk@30102 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 23:50:21 +01:00
|
|
|
|
2015-02-22 16:31:14 +01:00
|
|
|
<!-- QUnit -->
|
|
|
|
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
|
|
|
|
<script src="vendor/qunit.js"></script>
|
|
|
|
<script src="vendor/sinon.js"></script>
|
|
|
|
<script src="vendor/sinon-qunit.js"></script>
|
|
|
|
<script>QUnit.config.hidepassed = false;</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="qunit"></div>
|
|
|
|
<div id="qunit-fixture">
|
|
|
|
<script src="fixtures/customize-header.js"></script>
|
|
|
|
<script src="fixtures/customize-settings.js"></script>
|
|
|
|
</div>
|
|
|
|
<p><a href="editor">TinyMCE tests</a></p>
|
2014-03-29 11:05:22 +01:00
|
|
|
|
2015-02-22 16:31:14 +01:00
|
|
|
<!-- Tested files -->
|
|
|
|
<script src="../../src/wp-admin/js/password-strength-meter.js"></script>
|
|
|
|
<script src="../../src/wp-includes/js/customize-base.js"></script>
|
|
|
|
<script src="../../src/wp-includes/js/customize-models.js"></script>
|
|
|
|
<script src="../../src/wp-includes/js/shortcode.js"></script>
|
|
|
|
<script src="../../src/wp-admin/js/customize-controls.js"></script>
|
2015-06-19 12:34:59 +02:00
|
|
|
<script src="../../src/wp-admin/js/word-count.js"></script>
|
2014-03-29 11:05:22 +01:00
|
|
|
|
2015-02-22 16:31:14 +01:00
|
|
|
<!-- Unit tests -->
|
|
|
|
<script src="wp-admin/js/password-strength-meter.js"></script>
|
|
|
|
<script src="wp-admin/js/customize-base.js"></script>
|
|
|
|
<script src="wp-admin/js/customize-header.js"></script>
|
|
|
|
<script src="wp-includes/js/shortcode.js"></script>
|
|
|
|
<script src="wp-admin/js/customize-controls.js"></script>
|
|
|
|
<script src="wp-admin/js/customize-controls-utils.js"></script>
|
2015-06-19 12:34:59 +02:00
|
|
|
<script src="wp-admin/js/word-count.js"></script>
|
2015-05-30 02:02:13 +02:00
|
|
|
|
|
|
|
<!-- Customizer templates for sections -->
|
|
|
|
<script type="text/html" id="tmpl-customize-section-default">
|
|
|
|
<li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}">
|
|
|
|
<h3 class="accordion-section-title" tabindex="0">
|
|
|
|
{{ data.title }}
|
|
|
|
<span class="screen-reader-text">Press return or enter to expand</span>
|
|
|
|
</h3>
|
|
|
|
<ul class="accordion-section-content">
|
|
|
|
<# if ( data.description ) { #>
|
|
|
|
<li class="customize-section-description-container">
|
|
|
|
<p class="description customize-section-description">{{{ data.description }}}</p>
|
|
|
|
</li>
|
|
|
|
<# } #>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</script>
|
|
|
|
<script type="text/html" id="tmpl-customize-section-titleless">
|
|
|
|
<li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}">
|
|
|
|
<!-- Notice the lack of an h3 with title displayed inside. -->
|
|
|
|
<ul class="accordion-section-content">
|
|
|
|
<# if ( data.description ) { #>
|
|
|
|
<li class="customize-section-description-container">
|
|
|
|
<p class="description customize-section-description">{{{ data.description }}}</p>
|
|
|
|
</li>
|
|
|
|
<# } #>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<!-- Customizer templates for panels -->
|
|
|
|
<script type="text/html" id="tmpl-customize-panel-default">
|
|
|
|
<li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
|
|
|
|
<h3 class="accordion-section-title" tabindex="0">
|
|
|
|
{{ data.title }}
|
|
|
|
<span class="screen-reader-text">Press return or enter to open this panel</span>
|
|
|
|
</h3>
|
|
|
|
<ul class="accordion-sub-container control-panel-content"></ul>
|
|
|
|
</li>
|
|
|
|
</script>
|
|
|
|
<script type="text/html" id="tmpl-customize-panel-default-content">
|
|
|
|
<li class="panel-meta accordion-section control-section<# if ( ! data.description ) { #> cannot-expand<# } #>">
|
|
|
|
<div class="accordion-section-title" tabindex="0">
|
|
|
|
<span class="preview-notice">You are customizing <strong class="panel-title">{{ data.title }}</strong></span>
|
|
|
|
</div>
|
|
|
|
<# if ( data.description ) { #>
|
|
|
|
<div class="accordion-section-content description">
|
|
|
|
{{{ data.description }}}
|
|
|
|
</div>
|
|
|
|
<# } #>
|
|
|
|
</li>
|
|
|
|
</script>
|
|
|
|
<script type="text/html" id="tmpl-customize-panel-titleless">
|
|
|
|
<li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
|
|
|
|
<!-- Notice the lack of an h3 with title displayed inside. -->
|
|
|
|
<ul class="accordion-sub-container control-panel-content"></ul>
|
|
|
|
</li>
|
|
|
|
</script>
|
|
|
|
<script type="text/html" id="tmpl-customize-panel-titleless-content">
|
|
|
|
<li class="panel-meta accordion-section control-section<# if ( ! data.description ) { #> cannot-expand<# } #>">
|
|
|
|
<!-- Notice lack of title containing preview notice -->
|
|
|
|
<# if ( data.description ) { #>
|
|
|
|
<div class="accordion-section-content description">
|
|
|
|
{{{ data.description }}}
|
|
|
|
</div>
|
|
|
|
<# } #>
|
|
|
|
</li>
|
|
|
|
</script>
|
2015-06-06 22:07:00 +02:00
|
|
|
|
|
|
|
<!-- TinyMCE -->
|
|
|
|
|
|
|
|
<script src="../../src/wp-includes/js/tinymce/tinymce.js"></script>
|
|
|
|
<script src="editor/js/utils.js"></script>
|
|
|
|
<script src="wp-includes/js/tinymce/plugins/wptextpattern/plugin.js"></script>
|
2015-02-22 16:31:14 +01:00
|
|
|
</body>
|
2013-08-29 20:42:59 +02:00
|
|
|
</html>
|