Edit File by line
/home/barbar84/www/wp-admin/js
File: common.js
/**
[0] Fix | Delete
* @output wp-admin/js/common.js
[1] Fix | Delete
*/
[2] Fix | Delete
[3] Fix | Delete
/* global setUserSetting, ajaxurl, alert, confirm, pagenow */
[4] Fix | Delete
/* global columns, screenMeta */
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Adds common WordPress functionality to the window.
[8] Fix | Delete
*
[9] Fix | Delete
* @param {jQuery} $ jQuery object.
[10] Fix | Delete
* @param {Object} window The window object.
[11] Fix | Delete
* @param {mixed} undefined Unused.
[12] Fix | Delete
*/
[13] Fix | Delete
( function( $, window, undefined ) {
[14] Fix | Delete
var $document = $( document ),
[15] Fix | Delete
$window = $( window ),
[16] Fix | Delete
$body = $( document.body ),
[17] Fix | Delete
__ = wp.i18n.__,
[18] Fix | Delete
sprintf = wp.i18n.sprintf;
[19] Fix | Delete
[20] Fix | Delete
/**
[21] Fix | Delete
* Throws an error for a deprecated property.
[22] Fix | Delete
*
[23] Fix | Delete
* @since 5.5.1
[24] Fix | Delete
*
[25] Fix | Delete
* @param {string} propName The property that was used.
[26] Fix | Delete
* @param {string} version The version of WordPress that deprecated the property.
[27] Fix | Delete
* @param {string} replacement The property that should have been used.
[28] Fix | Delete
*/
[29] Fix | Delete
function deprecatedProperty( propName, version, replacement ) {
[30] Fix | Delete
var message;
[31] Fix | Delete
[32] Fix | Delete
if ( 'undefined' !== typeof replacement ) {
[33] Fix | Delete
message = sprintf(
[34] Fix | Delete
/* translators: 1: Deprecated property name, 2: Version number, 3: Alternative property name. */
[35] Fix | Delete
__( '%1$s is deprecated since version %2$s! Use %3$s instead.' ),
[36] Fix | Delete
propName,
[37] Fix | Delete
version,
[38] Fix | Delete
replacement
[39] Fix | Delete
);
[40] Fix | Delete
} else {
[41] Fix | Delete
message = sprintf(
[42] Fix | Delete
/* translators: 1: Deprecated property name, 2: Version number. */
[43] Fix | Delete
__( '%1$s is deprecated since version %2$s with no alternative available.' ),
[44] Fix | Delete
propName,
[45] Fix | Delete
version
[46] Fix | Delete
);
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
window.console.warn( message );
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* Deprecate all properties on an object.
[54] Fix | Delete
*
[55] Fix | Delete
* @since 5.5.1
[56] Fix | Delete
* @since 5.6.0 Added the `version` parameter.
[57] Fix | Delete
*
[58] Fix | Delete
* @param {string} name The name of the object, i.e. commonL10n.
[59] Fix | Delete
* @param {object} l10nObject The object to deprecate the properties on.
[60] Fix | Delete
* @param {string} version The version of WordPress that deprecated the property.
[61] Fix | Delete
*
[62] Fix | Delete
* @return {object} The object with all its properties deprecated.
[63] Fix | Delete
*/
[64] Fix | Delete
function deprecateL10nObject( name, l10nObject, version ) {
[65] Fix | Delete
var deprecatedObject = {};
[66] Fix | Delete
[67] Fix | Delete
Object.keys( l10nObject ).forEach( function( key ) {
[68] Fix | Delete
var prop = l10nObject[ key ];
[69] Fix | Delete
var propName = name + '.' + key;
[70] Fix | Delete
[71] Fix | Delete
if ( 'object' === typeof prop ) {
[72] Fix | Delete
Object.defineProperty( deprecatedObject, key, { get: function() {
[73] Fix | Delete
deprecatedProperty( propName, version, prop.alternative );
[74] Fix | Delete
return prop.func();
[75] Fix | Delete
} } );
[76] Fix | Delete
} else {
[77] Fix | Delete
Object.defineProperty( deprecatedObject, key, { get: function() {
[78] Fix | Delete
deprecatedProperty( propName, version, 'wp.i18n' );
[79] Fix | Delete
return prop;
[80] Fix | Delete
} } );
[81] Fix | Delete
}
[82] Fix | Delete
} );
[83] Fix | Delete
[84] Fix | Delete
return deprecatedObject;
[85] Fix | Delete
}
[86] Fix | Delete
[87] Fix | Delete
window.wp.deprecateL10nObject = deprecateL10nObject;
[88] Fix | Delete
[89] Fix | Delete
/**
[90] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[91] Fix | Delete
*
[92] Fix | Delete
* @since 2.6.0
[93] Fix | Delete
* @deprecated 5.5.0
[94] Fix | Delete
*/
[95] Fix | Delete
window.commonL10n = window.commonL10n || {
[96] Fix | Delete
warnDelete: '',
[97] Fix | Delete
dismiss: '',
[98] Fix | Delete
collapseMenu: '',
[99] Fix | Delete
expandMenu: ''
[100] Fix | Delete
};
[101] Fix | Delete
[102] Fix | Delete
window.commonL10n = deprecateL10nObject( 'commonL10n', window.commonL10n, '5.5.0' );
[103] Fix | Delete
[104] Fix | Delete
/**
[105] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[106] Fix | Delete
*
[107] Fix | Delete
* @since 3.3.0
[108] Fix | Delete
* @deprecated 5.5.0
[109] Fix | Delete
*/
[110] Fix | Delete
window.wpPointerL10n = window.wpPointerL10n || {
[111] Fix | Delete
dismiss: ''
[112] Fix | Delete
};
[113] Fix | Delete
[114] Fix | Delete
window.wpPointerL10n = deprecateL10nObject( 'wpPointerL10n', window.wpPointerL10n, '5.5.0' );
[115] Fix | Delete
[116] Fix | Delete
/**
[117] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[118] Fix | Delete
*
[119] Fix | Delete
* @since 4.3.0
[120] Fix | Delete
* @deprecated 5.5.0
[121] Fix | Delete
*/
[122] Fix | Delete
window.userProfileL10n = window.userProfileL10n || {
[123] Fix | Delete
warn: '',
[124] Fix | Delete
warnWeak: '',
[125] Fix | Delete
show: '',
[126] Fix | Delete
hide: '',
[127] Fix | Delete
cancel: '',
[128] Fix | Delete
ariaShow: '',
[129] Fix | Delete
ariaHide: ''
[130] Fix | Delete
};
[131] Fix | Delete
[132] Fix | Delete
window.userProfileL10n = deprecateL10nObject( 'userProfileL10n', window.userProfileL10n, '5.5.0' );
[133] Fix | Delete
[134] Fix | Delete
/**
[135] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[136] Fix | Delete
*
[137] Fix | Delete
* @since 4.9.6
[138] Fix | Delete
* @deprecated 5.5.0
[139] Fix | Delete
*/
[140] Fix | Delete
window.privacyToolsL10n = window.privacyToolsL10n || {
[141] Fix | Delete
noDataFound: '',
[142] Fix | Delete
foundAndRemoved: '',
[143] Fix | Delete
noneRemoved: '',
[144] Fix | Delete
someNotRemoved: '',
[145] Fix | Delete
removalError: '',
[146] Fix | Delete
emailSent: '',
[147] Fix | Delete
noExportFile: '',
[148] Fix | Delete
exportError: ''
[149] Fix | Delete
};
[150] Fix | Delete
[151] Fix | Delete
window.privacyToolsL10n = deprecateL10nObject( 'privacyToolsL10n', window.privacyToolsL10n, '5.5.0' );
[152] Fix | Delete
[153] Fix | Delete
/**
[154] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[155] Fix | Delete
*
[156] Fix | Delete
* @since 3.6.0
[157] Fix | Delete
* @deprecated 5.5.0
[158] Fix | Delete
*/
[159] Fix | Delete
window.authcheckL10n = {
[160] Fix | Delete
beforeunload: ''
[161] Fix | Delete
};
[162] Fix | Delete
[163] Fix | Delete
window.authcheckL10n = window.authcheckL10n || deprecateL10nObject( 'authcheckL10n', window.authcheckL10n, '5.5.0' );
[164] Fix | Delete
[165] Fix | Delete
/**
[166] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[167] Fix | Delete
*
[168] Fix | Delete
* @since 2.8.0
[169] Fix | Delete
* @deprecated 5.5.0
[170] Fix | Delete
*/
[171] Fix | Delete
window.tagsl10n = {
[172] Fix | Delete
noPerm: '',
[173] Fix | Delete
broken: ''
[174] Fix | Delete
};
[175] Fix | Delete
[176] Fix | Delete
window.tagsl10n = window.tagsl10n || deprecateL10nObject( 'tagsl10n', window.tagsl10n, '5.5.0' );
[177] Fix | Delete
[178] Fix | Delete
/**
[179] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[180] Fix | Delete
*
[181] Fix | Delete
* @since 2.5.0
[182] Fix | Delete
* @deprecated 5.5.0
[183] Fix | Delete
*/
[184] Fix | Delete
window.adminCommentsL10n = window.adminCommentsL10n || {
[185] Fix | Delete
hotkeys_highlight_first: {
[186] Fix | Delete
alternative: 'window.adminCommentsSettings.hotkeys_highlight_first',
[187] Fix | Delete
func: function() { return window.adminCommentsSettings.hotkeys_highlight_first; }
[188] Fix | Delete
},
[189] Fix | Delete
hotkeys_highlight_last: {
[190] Fix | Delete
alternative: 'window.adminCommentsSettings.hotkeys_highlight_last',
[191] Fix | Delete
func: function() { return window.adminCommentsSettings.hotkeys_highlight_last; }
[192] Fix | Delete
},
[193] Fix | Delete
replyApprove: '',
[194] Fix | Delete
reply: '',
[195] Fix | Delete
warnQuickEdit: '',
[196] Fix | Delete
warnCommentChanges: '',
[197] Fix | Delete
docTitleComments: '',
[198] Fix | Delete
docTitleCommentsCount: ''
[199] Fix | Delete
};
[200] Fix | Delete
[201] Fix | Delete
window.adminCommentsL10n = deprecateL10nObject( 'adminCommentsL10n', window.adminCommentsL10n, '5.5.0' );
[202] Fix | Delete
[203] Fix | Delete
/**
[204] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[205] Fix | Delete
*
[206] Fix | Delete
* @since 2.5.0
[207] Fix | Delete
* @deprecated 5.5.0
[208] Fix | Delete
*/
[209] Fix | Delete
window.tagsSuggestL10n = window.tagsSuggestL10n || {
[210] Fix | Delete
tagDelimiter: '',
[211] Fix | Delete
removeTerm: '',
[212] Fix | Delete
termSelected: '',
[213] Fix | Delete
termAdded: '',
[214] Fix | Delete
termRemoved: ''
[215] Fix | Delete
};
[216] Fix | Delete
[217] Fix | Delete
window.tagsSuggestL10n = deprecateL10nObject( 'tagsSuggestL10n', window.tagsSuggestL10n, '5.5.0' );
[218] Fix | Delete
[219] Fix | Delete
/**
[220] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[221] Fix | Delete
*
[222] Fix | Delete
* @since 3.5.0
[223] Fix | Delete
* @deprecated 5.5.0
[224] Fix | Delete
*/
[225] Fix | Delete
window.wpColorPickerL10n = window.wpColorPickerL10n || {
[226] Fix | Delete
clear: '',
[227] Fix | Delete
clearAriaLabel: '',
[228] Fix | Delete
defaultString: '',
[229] Fix | Delete
defaultAriaLabel: '',
[230] Fix | Delete
pick: '',
[231] Fix | Delete
defaultLabel: ''
[232] Fix | Delete
};
[233] Fix | Delete
[234] Fix | Delete
window.wpColorPickerL10n = deprecateL10nObject( 'wpColorPickerL10n', window.wpColorPickerL10n, '5.5.0' );
[235] Fix | Delete
[236] Fix | Delete
/**
[237] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[238] Fix | Delete
*
[239] Fix | Delete
* @since 2.7.0
[240] Fix | Delete
* @deprecated 5.5.0
[241] Fix | Delete
*/
[242] Fix | Delete
window.attachMediaBoxL10n = window.attachMediaBoxL10n || {
[243] Fix | Delete
error: ''
[244] Fix | Delete
};
[245] Fix | Delete
[246] Fix | Delete
window.attachMediaBoxL10n = deprecateL10nObject( 'attachMediaBoxL10n', window.attachMediaBoxL10n, '5.5.0' );
[247] Fix | Delete
[248] Fix | Delete
/**
[249] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[250] Fix | Delete
*
[251] Fix | Delete
* @since 2.5.0
[252] Fix | Delete
* @deprecated 5.5.0
[253] Fix | Delete
*/
[254] Fix | Delete
window.postL10n = window.postL10n || {
[255] Fix | Delete
ok: '',
[256] Fix | Delete
cancel: '',
[257] Fix | Delete
publishOn: '',
[258] Fix | Delete
publishOnFuture: '',
[259] Fix | Delete
publishOnPast: '',
[260] Fix | Delete
dateFormat: '',
[261] Fix | Delete
showcomm: '',
[262] Fix | Delete
endcomm: '',
[263] Fix | Delete
publish: '',
[264] Fix | Delete
schedule: '',
[265] Fix | Delete
update: '',
[266] Fix | Delete
savePending: '',
[267] Fix | Delete
saveDraft: '',
[268] Fix | Delete
'private': '',
[269] Fix | Delete
'public': '',
[270] Fix | Delete
publicSticky: '',
[271] Fix | Delete
password: '',
[272] Fix | Delete
privatelyPublished: '',
[273] Fix | Delete
published: '',
[274] Fix | Delete
saveAlert: '',
[275] Fix | Delete
savingText: '',
[276] Fix | Delete
permalinkSaved: ''
[277] Fix | Delete
};
[278] Fix | Delete
[279] Fix | Delete
window.postL10n = deprecateL10nObject( 'postL10n', window.postL10n, '5.5.0' );
[280] Fix | Delete
[281] Fix | Delete
/**
[282] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[283] Fix | Delete
*
[284] Fix | Delete
* @since 2.7.0
[285] Fix | Delete
* @deprecated 5.5.0
[286] Fix | Delete
*/
[287] Fix | Delete
window.inlineEditL10n = window.inlineEditL10n || {
[288] Fix | Delete
error: '',
[289] Fix | Delete
ntdeltitle: '',
[290] Fix | Delete
notitle: '',
[291] Fix | Delete
comma: '',
[292] Fix | Delete
saved: ''
[293] Fix | Delete
};
[294] Fix | Delete
[295] Fix | Delete
window.inlineEditL10n = deprecateL10nObject( 'inlineEditL10n', window.inlineEditL10n, '5.5.0' );
[296] Fix | Delete
[297] Fix | Delete
/**
[298] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[299] Fix | Delete
*
[300] Fix | Delete
* @since 2.7.0
[301] Fix | Delete
* @deprecated 5.5.0
[302] Fix | Delete
*/
[303] Fix | Delete
window.plugininstallL10n = window.plugininstallL10n || {
[304] Fix | Delete
plugin_information: '',
[305] Fix | Delete
plugin_modal_label: '',
[306] Fix | Delete
ays: ''
[307] Fix | Delete
};
[308] Fix | Delete
[309] Fix | Delete
window.plugininstallL10n = deprecateL10nObject( 'plugininstallL10n', window.plugininstallL10n, '5.5.0' );
[310] Fix | Delete
[311] Fix | Delete
/**
[312] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[313] Fix | Delete
*
[314] Fix | Delete
* @since 3.0.0
[315] Fix | Delete
* @deprecated 5.5.0
[316] Fix | Delete
*/
[317] Fix | Delete
window.navMenuL10n = window.navMenuL10n || {
[318] Fix | Delete
noResultsFound: '',
[319] Fix | Delete
warnDeleteMenu: '',
[320] Fix | Delete
saveAlert: '',
[321] Fix | Delete
untitled: ''
[322] Fix | Delete
};
[323] Fix | Delete
[324] Fix | Delete
window.navMenuL10n = deprecateL10nObject( 'navMenuL10n', window.navMenuL10n, '5.5.0' );
[325] Fix | Delete
[326] Fix | Delete
/**
[327] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[328] Fix | Delete
*
[329] Fix | Delete
* @since 2.5.0
[330] Fix | Delete
* @deprecated 5.5.0
[331] Fix | Delete
*/
[332] Fix | Delete
window.commentL10n = window.commentL10n || {
[333] Fix | Delete
submittedOn: '',
[334] Fix | Delete
dateFormat: ''
[335] Fix | Delete
};
[336] Fix | Delete
[337] Fix | Delete
window.commentL10n = deprecateL10nObject( 'commentL10n', window.commentL10n, '5.5.0' );
[338] Fix | Delete
[339] Fix | Delete
/**
[340] Fix | Delete
* Removed in 5.5.0, needed for back-compatibility.
[341] Fix | Delete
*
[342] Fix | Delete
* @since 2.9.0
[343] Fix | Delete
* @deprecated 5.5.0
[344] Fix | Delete
*/
[345] Fix | Delete
window.setPostThumbnailL10n = window.setPostThumbnailL10n || {
[346] Fix | Delete
setThumbnail: '',
[347] Fix | Delete
saving: '',
[348] Fix | Delete
error: '',
[349] Fix | Delete
done: ''
[350] Fix | Delete
};
[351] Fix | Delete
[352] Fix | Delete
window.setPostThumbnailL10n = deprecateL10nObject( 'setPostThumbnailL10n', window.setPostThumbnailL10n, '5.5.0' );
[353] Fix | Delete
[354] Fix | Delete
/**
[355] Fix | Delete
* Removed in 3.3.0, needed for back-compatibility.
[356] Fix | Delete
*
[357] Fix | Delete
* @since 2.7.0
[358] Fix | Delete
* @deprecated 3.3.0
[359] Fix | Delete
*/
[360] Fix | Delete
window.adminMenu = {
[361] Fix | Delete
init : function() {},
[362] Fix | Delete
fold : function() {},
[363] Fix | Delete
restoreMenuState : function() {},
[364] Fix | Delete
toggle : function() {},
[365] Fix | Delete
favorites : function() {}
[366] Fix | Delete
};
[367] Fix | Delete
[368] Fix | Delete
// Show/hide/save table columns.
[369] Fix | Delete
window.columns = {
[370] Fix | Delete
[371] Fix | Delete
/**
[372] Fix | Delete
* Initializes the column toggles in the screen options.
[373] Fix | Delete
*
[374] Fix | Delete
* Binds an onClick event to the checkboxes to show or hide the table columns
[375] Fix | Delete
* based on their toggled state. And persists the toggled state.
[376] Fix | Delete
*
[377] Fix | Delete
* @since 2.7.0
[378] Fix | Delete
*
[379] Fix | Delete
* @return {void}
[380] Fix | Delete
*/
[381] Fix | Delete
init : function() {
[382] Fix | Delete
var that = this;
[383] Fix | Delete
$('.hide-column-tog', '#adv-settings').on( 'click', function() {
[384] Fix | Delete
var $t = $(this), column = $t.val();
[385] Fix | Delete
if ( $t.prop('checked') )
[386] Fix | Delete
that.checked(column);
[387] Fix | Delete
else
[388] Fix | Delete
that.unchecked(column);
[389] Fix | Delete
[390] Fix | Delete
columns.saveManageColumnsState();
[391] Fix | Delete
});
[392] Fix | Delete
},
[393] Fix | Delete
[394] Fix | Delete
/**
[395] Fix | Delete
* Saves the toggled state for the columns.
[396] Fix | Delete
*
[397] Fix | Delete
* Saves whether the columns should be shown or hidden on a page.
[398] Fix | Delete
*
[399] Fix | Delete
* @since 3.0.0
[400] Fix | Delete
*
[401] Fix | Delete
* @return {void}
[402] Fix | Delete
*/
[403] Fix | Delete
saveManageColumnsState : function() {
[404] Fix | Delete
var hidden = this.hidden();
[405] Fix | Delete
$.post(ajaxurl, {
[406] Fix | Delete
action: 'hidden-columns',
[407] Fix | Delete
hidden: hidden,
[408] Fix | Delete
screenoptionnonce: $('#screenoptionnonce').val(),
[409] Fix | Delete
page: pagenow
[410] Fix | Delete
});
[411] Fix | Delete
},
[412] Fix | Delete
[413] Fix | Delete
/**
[414] Fix | Delete
* Makes a column visible and adjusts the column span for the table.
[415] Fix | Delete
*
[416] Fix | Delete
* @since 3.0.0
[417] Fix | Delete
* @param {string} column The column name.
[418] Fix | Delete
*
[419] Fix | Delete
* @return {void}
[420] Fix | Delete
*/
[421] Fix | Delete
checked : function(column) {
[422] Fix | Delete
$('.column-' + column).removeClass( 'hidden' );
[423] Fix | Delete
this.colSpanChange(+1);
[424] Fix | Delete
},
[425] Fix | Delete
[426] Fix | Delete
/**
[427] Fix | Delete
* Hides a column and adjusts the column span for the table.
[428] Fix | Delete
*
[429] Fix | Delete
* @since 3.0.0
[430] Fix | Delete
* @param {string} column The column name.
[431] Fix | Delete
*
[432] Fix | Delete
* @return {void}
[433] Fix | Delete
*/
[434] Fix | Delete
unchecked : function(column) {
[435] Fix | Delete
$('.column-' + column).addClass( 'hidden' );
[436] Fix | Delete
this.colSpanChange(-1);
[437] Fix | Delete
},
[438] Fix | Delete
[439] Fix | Delete
/**
[440] Fix | Delete
* Gets all hidden columns.
[441] Fix | Delete
*
[442] Fix | Delete
* @since 3.0.0
[443] Fix | Delete
*
[444] Fix | Delete
* @return {string} The hidden column names separated by a comma.
[445] Fix | Delete
*/
[446] Fix | Delete
hidden : function() {
[447] Fix | Delete
return $( '.manage-column[id]' ).filter( '.hidden' ).map(function() {
[448] Fix | Delete
return this.id;
[449] Fix | Delete
}).get().join( ',' );
[450] Fix | Delete
},
[451] Fix | Delete
[452] Fix | Delete
/**
[453] Fix | Delete
* Gets the checked column toggles from the screen options.
[454] Fix | Delete
*
[455] Fix | Delete
* @since 3.0.0
[456] Fix | Delete
*
[457] Fix | Delete
* @return {string} String containing the checked column names.
[458] Fix | Delete
*/
[459] Fix | Delete
useCheckboxesForHidden : function() {
[460] Fix | Delete
this.hidden = function(){
[461] Fix | Delete
return $('.hide-column-tog').not(':checked').map(function() {
[462] Fix | Delete
var id = this.id;
[463] Fix | Delete
return id.substring( id, id.length - 5 );
[464] Fix | Delete
}).get().join(',');
[465] Fix | Delete
};
[466] Fix | Delete
},
[467] Fix | Delete
[468] Fix | Delete
/**
[469] Fix | Delete
* Adjusts the column span for the table.
[470] Fix | Delete
*
[471] Fix | Delete
* @since 3.1.0
[472] Fix | Delete
*
[473] Fix | Delete
* @param {number} diff The modifier for the column span.
[474] Fix | Delete
*/
[475] Fix | Delete
colSpanChange : function(diff) {
[476] Fix | Delete
var $t = $('table').find('.colspanchange'), n;
[477] Fix | Delete
if ( !$t.length )
[478] Fix | Delete
return;
[479] Fix | Delete
n = parseInt( $t.attr('colspan'), 10 ) + diff;
[480] Fix | Delete
$t.attr('colspan', n.toString());
[481] Fix | Delete
}
[482] Fix | Delete
};
[483] Fix | Delete
[484] Fix | Delete
$document.ready(function(){columns.init();});
[485] Fix | Delete
[486] Fix | Delete
/**
[487] Fix | Delete
* Validates that the required form fields are not empty.
[488] Fix | Delete
*
[489] Fix | Delete
* @since 2.9.0
[490] Fix | Delete
*
[491] Fix | Delete
* @param {jQuery} form The form to validate.
[492] Fix | Delete
*
[493] Fix | Delete
* @return {boolean} Returns true if all required fields are not an empty string.
[494] Fix | Delete
*/
[495] Fix | Delete
window.validateForm = function( form ) {
[496] Fix | Delete
return !$( form )
[497] Fix | Delete
.find( '.form-required' )
[498] Fix | Delete
.filter( function() { return $( ':input:visible', this ).val() === ''; } )
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function