summaryrefslogtreecommitdiffstatshomepage
path: root/src/js/_enqueues/admin/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/_enqueues/admin/common.js')
-rw-r--r--src/js/_enqueues/admin/common.js124
1 files changed, 62 insertions, 62 deletions
diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js
index 049b7de2e0..0541c8d0f2 100644
--- a/src/js/_enqueues/admin/common.js
+++ b/src/js/_enqueues/admin/common.js
@@ -42,7 +42,7 @@ window.columns = {
*
* @since 2.7.0
*
- * @returns {void}
+ * @return {void}
*/
init : function() {
var that = this;
@@ -64,7 +64,7 @@ window.columns = {
*
* @since 3.0.0
*
- * @returns {void}
+ * @return {void}
*/
saveManageColumnsState : function() {
var hidden = this.hidden();
@@ -82,7 +82,7 @@ window.columns = {
* @since 3.0.0
* @param {string} column The column name.
*
- * @returns {void}
+ * @return {void}
*/
checked : function(column) {
$('.column-' + column).removeClass( 'hidden' );
@@ -95,7 +95,7 @@ window.columns = {
* @since 3.0.0
* @param {string} column The column name.
*
- * @returns {void}
+ * @return {void}
*/
unchecked : function(column) {
$('.column-' + column).addClass( 'hidden' );
@@ -107,7 +107,7 @@ window.columns = {
*
* @since 3.0.0
*
- * @returns {string} The hidden column names separated by a comma.
+ * @return {string} The hidden column names separated by a comma.
*/
hidden : function() {
return $( '.manage-column[id]' ).filter( '.hidden' ).map(function() {
@@ -120,7 +120,7 @@ window.columns = {
*
* @since 3.0.0
*
- * @returns {string} String containing the checked column names.
+ * @return {string} String containing the checked column names.
*/
useCheckboxesForHidden : function() {
this.hidden = function(){
@@ -156,7 +156,7 @@ $document.ready(function(){columns.init();});
*
* @param {jQuery} form The form to validate.
*
- * @returns {boolean} Returns true if all required fields are not an empty string.
+ * @return {boolean} Returns true if all required fields are not an empty string.
*/
window.validateForm = function( form ) {
return !$( form )
@@ -176,7 +176,7 @@ window.validateForm = function( form ) {
*
* @type {{warn: showNotice.warn, note: showNotice.note}}
*
- * @returns {void}
+ * @return {void}
*/
window.showNotice = {
@@ -185,7 +185,7 @@ window.showNotice = {
*
* @since 2.7.0
*
- * @returns {boolean} Returns true if the message is confirmed.
+ * @return {boolean} Returns true if the message is confirmed.
*/
warn : function() {
var msg = commonL10n.warnDelete || '';
@@ -217,7 +217,7 @@ window.showNotice = {
* toggleEvent: screenMeta.toggleEvent, open: screenMeta.open,
* close: screenMeta.close}}
*
- * @returns {void}
+ * @return {void}
*/
window.screenMeta = {
element: null, // #screen-meta
@@ -229,7 +229,7 @@ window.screenMeta = {
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
init: function() {
this.element = $('#screen-meta');
@@ -244,7 +244,7 @@ window.screenMeta = {
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
toggleEvent: function() {
var panel = $( '#' + $( this ).attr( 'aria-controls' ) );
@@ -266,7 +266,7 @@ window.screenMeta = {
* @param {jQuery} panel The screen meta options panel div.
* @param {jQuery} button The toggle button.
*
- * @returns {void}
+ * @return {void}
*/
open: function( panel, button ) {
@@ -279,7 +279,7 @@ window.screenMeta = {
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
panel.slideDown( 'fast', function() {
panel.focus();
@@ -297,7 +297,7 @@ window.screenMeta = {
* @param {jQuery} panel The screen meta options panel div.
* @param {jQuery} button The toggle button.
*
- * @returns {void}
+ * @return {void}
*/
close: function( panel, button ) {
/**
@@ -305,7 +305,7 @@ window.screenMeta = {
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
panel.slideUp( 'fast', function() {
button.removeClass( 'screen-meta-active' ).attr( 'aria-expanded', false );
@@ -322,7 +322,7 @@ window.screenMeta = {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$('.contextual-help-tabs').delegate('a', 'click', function(e) {
var link = $(this),
@@ -503,7 +503,7 @@ $document.ready( function() {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$adminmenu.on('click.wp-submenu-head', '.wp-submenu-head', function(e){
$(e.target).parent().siblings('a').get(0).click();
@@ -512,7 +512,7 @@ $document.ready( function() {
/**
* Collapses the admin menu.
*
- * @returns {void}
+ * @return {void}
*/
$( '#collapse-button' ).on( 'click.collapse-menu', function() {
var viewportWidth = getViewportWidth() || 961;
@@ -551,7 +551,7 @@ $document.ready( function() {
*
* @since 4.4.0
*
- * @returns {void}
+ * @return {void}
*/
function currentMenuItemHasPopup() {
var $current = $( 'a.wp-has-current-submenu' );
@@ -574,7 +574,7 @@ $document.ready( function() {
*
* @param {jQuery} $menuItem The parent menu item containing the submenu.
*
- * @returns {void}
+ * @return {void}
*/
function adjustSubmenu( $menuItem ) {
var bottomOffset, pageHeight, adjustment, theFold, menutop, wintop, maxtop,
@@ -613,7 +613,7 @@ $document.ready( function() {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$body.on( mobileEvent+'.wp-mobile-hover', function(e) {
if ( $adminmenu.data('wp-responsive') ) {
@@ -630,7 +630,7 @@ $document.ready( function() {
*
* @param {Event} event The event object.
*
- * @returns {void}
+ * @return {void}
*/
$adminmenu.find( 'a.wp-has-submenu' ).on( mobileEvent + '.wp-mobile-hover', function( event ) {
var $menuItem = $(this).parent();
@@ -657,7 +657,7 @@ $document.ready( function() {
/**
* Opens the submenu when hovered over the menu item for desktops.
*
- * @returns {void}
+ * @return {void}
*/
over: function() {
var $menuItem = $( this ),
@@ -681,7 +681,7 @@ $document.ready( function() {
/**
* Closes the submenu when no longer hovering the menu item.
*
- * @returns {void}
+ * @return {void}
*/
out: function(){
if ( $adminmenu.data( 'wp-responsive' ) ) {
@@ -701,7 +701,7 @@ $document.ready( function() {
*
* @param {Event} event The event object.
*
- * @returns {void}
+ * @return {void}
*/
$adminmenu.on( 'focus.adminmenu', '.wp-submenu a', function( event ) {
if ( $adminmenu.data( 'wp-responsive' ) ) {
@@ -716,7 +716,7 @@ $document.ready( function() {
*
* @param {Event} event The event object.
*
- * @returns {void}
+ * @return {void}
*/
}).on( 'blur.adminmenu', '.wp-submenu a', function( event ) {
if ( $adminmenu.data( 'wp-responsive' ) ) {
@@ -728,7 +728,7 @@ $document.ready( function() {
/**
* Adjusts the size for the submenu.
*
- * @returns {void}
+ * @return {void}
*/
}).find( 'li.wp-has-submenu.wp-not-current-submenu' ).on( 'focusin.adminmenu', function() {
adjustSubmenu( $( this ) );
@@ -751,7 +751,7 @@ $document.ready( function() {
*
* @since 4.4.0
*
- * @returns {void}
+ * @return {void}
*/
function makeNoticesDismissible() {
$( '.notice.is-dismissible' ).each( function() {
@@ -784,7 +784,7 @@ $document.ready( function() {
*
* This event needs to be delegated. Ticket #37973.
*
- * @returns {boolean} Returns whether a checkbox is checked or not.
+ * @return {boolean} Returns whether a checkbox is checked or not.
*/
$body.on( 'click', 'tbody > tr > .check-column :checkbox', function( event ) {
// Shift click to select a range of checkboxes.
@@ -813,7 +813,7 @@ $document.ready( function() {
/**
* Determines if all checkboxes are checked.
*
- * @returns {boolean} Returns true if there are no unchecked checkboxes.
+ * @return {boolean} Returns true if there are no unchecked checkboxes.
*/
$(this).closest('table').children('thead, tfoot').find(':checkbox').prop('checked', function() {
return ( 0 === unchecked.length );
@@ -832,7 +832,7 @@ $document.ready( function() {
*
* @param {Event} event The event object.
*
- * @returns {boolean}
+ * @return {boolean}
*/
$body.on( 'click.wp-toggle-checkboxes', 'thead .check-column :checkbox, tfoot .check-column :checkbox', function( event ) {
var $this = $(this),
@@ -845,7 +845,7 @@ $document.ready( function() {
/**
* Updates the checked state on the checkbox in the table.
*
- * @returns {boolean} True checks the checkbox, False unchecks the checkbox.
+ * @return {boolean} True checks the checkbox, False unchecks the checkbox.
*/
.prop('checked', function() {
if ( $(this).is(':hidden,:disabled') ) {
@@ -867,7 +867,7 @@ $document.ready( function() {
/**
* Syncs the bulk checkboxes on the top and bottom of the table.
*
- * @returns {boolean} True checks the checkbox, False unchecks the checkbox.
+ * @return {boolean} True checks the checkbox, False unchecks the checkbox.
*/
.prop('checked', function() {
if ( toggle ) {
@@ -883,7 +883,7 @@ $document.ready( function() {
/**
* Shows row actions on focus of its parent container element or any other elements contained within.
*
- * @returns {void}
+ * @return {void}
*/
$( '#wpbody-content' ).on({
focusin: function() {
@@ -918,7 +918,7 @@ $document.ready( function() {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$('#newcontent').bind('keydown.wpevent_InsertTab', function(e) {
var el = e.target, selStart, selEnd, val, scroll, sel;
@@ -977,7 +977,7 @@ $document.ready( function() {
*
* The form closest to the pageInput is the post-filter form.
*
- * @returns {void}
+ * @return {void}
*/
pageInput.closest('form').submit( function() {
/*
@@ -992,7 +992,7 @@ $document.ready( function() {
/**
* Resets the bulk actions when the search button is clicked.
*
- * @returns {void}
+ * @return {void}
*/
$('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function () {
$('select[name^="action"]').val('-1');
@@ -1003,7 +1003,7 @@ $document.ready( function() {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$('#contextual-help-link, #show-settings-link').on( 'focus.scroll-into-view', function(e){
if ( e.target.scrollIntoView )
@@ -1013,7 +1013,7 @@ $document.ready( function() {
/**
* Disables the submit upload buttons when no data is entered.
*
- * @returns {void}
+ * @return {void}
*/
(function(){
var button, input, form = $('form.wp-upload-form');
@@ -1030,7 +1030,7 @@ $document.ready( function() {
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
function toggleUploadButton() {
// When no inputs have a value, disable the upload buttons.
@@ -1052,7 +1052,7 @@ $document.ready( function() {
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function pinMenu( event ) {
var windowPos = $window.scrollTop(),
@@ -1195,7 +1195,7 @@ $document.ready( function() {
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function resetHeights() {
height = {
@@ -1211,7 +1211,7 @@ $document.ready( function() {
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function unpinMenu() {
if ( isIOS || ! menuIsPinned ) {
@@ -1231,7 +1231,7 @@ $document.ready( function() {
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function setPinMenu() {
resetHeights();
@@ -1260,7 +1260,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- *@returns {void}
+ * @return {void}
*/
window.wpResponsive = {
@@ -1269,7 +1269,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
init: function() {
var self = this;
@@ -1327,7 +1327,7 @@ $document.ready( function() {
*
* @since 5.3.0
*
- * @returns {void}
+ * @return {void}
*/
maybeDisableSortables: function() {
var width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? $window.width() : window.innerWidth;
@@ -1350,7 +1350,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
activate: function() {
setPinMenu();
@@ -1371,7 +1371,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
deactivate: function() {
setPinMenu();
@@ -1385,7 +1385,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
trigger: function() {
var viewportWidth = getViewportWidth();
@@ -1421,7 +1421,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
enableOverlay: function() {
if ( $overlay.length === 0 ) {
@@ -1444,7 +1444,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
disableOverlay: function() {
$toolbarPopups.off( 'click.wp-responsive' );
@@ -1456,7 +1456,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
disableSortables: function() {
if ( $sortables.length ) {
@@ -1472,7 +1472,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
enableSortables: function() {
if ( $sortables.length ) {
@@ -1489,7 +1489,7 @@ $document.ready( function() {
*
* @since 4.5.0
*
- * @returns {void}
+ * @return {void}
*/
function aria_button_if_js() {
$( '.aria-button-if-js' ).attr( 'role', 'button' );
@@ -1504,8 +1504,8 @@ $document.ready( function() {
*
* @since 4.7.0
*
- * @returns {number|boolean} The current viewport width or false if the
- * browser doesn't support innerWidth (IE < 9).
+ * @return {number|boolean} The current viewport width or false if the
+ * browser doesn't support innerWidth (IE < 9).
*/
function getViewportWidth() {
var viewportWidth = false;
@@ -1526,7 +1526,7 @@ $document.ready( function() {
*
* @since 4.7.0
*
- * @returns {void}
+ * @return {void}
*/
function setMenuState() {
var viewportWidth = getViewportWidth() || 961;
@@ -1554,7 +1554,7 @@ $document.ready( function() {
*
* @since 4.7.0
*
- * @returns {void}
+ * @return {void}
*/
$document.on( 'wp-menu-state-set wp-collapse-menu', function( event, eventData ) {
var $collapseButton = $( '#collapse-button' ),
@@ -1613,7 +1613,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
function triggerEvent() {
$document.trigger( 'wp-window-resized' );
@@ -1624,7 +1624,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
function fireOnce() {
window.clearTimeout( timeout );