Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-admin/js
File: image-edit.js
*/
[1000] Fix | Delete
onSelectChange: function(img, c) {
[1001] Fix | Delete
var sizer = imageEdit.hold.sizer;
[1002] Fix | Delete
selW.val( imageEdit.round(c.width / sizer) );
[1003] Fix | Delete
selH.val( imageEdit.round(c.height / sizer) );
[1004] Fix | Delete
selX.val( imageEdit.round(c.x1 / sizer) );
[1005] Fix | Delete
selY.val( imageEdit.round(c.y1 / sizer) );
[1006] Fix | Delete
}
[1007] Fix | Delete
});
[1008] Fix | Delete
},
[1009] Fix | Delete
[1010] Fix | Delete
/**
[1011] Fix | Delete
* Stores the current crop selection.
[1012] Fix | Delete
*
[1013] Fix | Delete
* @since 2.9.0
[1014] Fix | Delete
*
[1015] Fix | Delete
* @memberof imageEdit
[1016] Fix | Delete
*
[1017] Fix | Delete
* @param {number} postid The post ID.
[1018] Fix | Delete
* @param {Object} c The selection.
[1019] Fix | Delete
*
[1020] Fix | Delete
* @return {boolean}
[1021] Fix | Delete
*/
[1022] Fix | Delete
setCropSelection : function(postid, c) {
[1023] Fix | Delete
var sel;
[1024] Fix | Delete
[1025] Fix | Delete
c = c || 0;
[1026] Fix | Delete
[1027] Fix | Delete
if ( !c || ( c.width < 3 && c.height < 3 ) ) {
[1028] Fix | Delete
this.setDisabled( $( '.imgedit-crop', '#imgedit-panel-' + postid ), 1 );
[1029] Fix | Delete
this.setDisabled( $( '#imgedit-crop-sel-' + postid ), 1 );
[1030] Fix | Delete
$('#imgedit-sel-width-' + postid).val('');
[1031] Fix | Delete
$('#imgedit-sel-height-' + postid).val('');
[1032] Fix | Delete
$('#imgedit-start-x-' + postid).val('0');
[1033] Fix | Delete
$('#imgedit-start-y-' + postid).val('0');
[1034] Fix | Delete
$('#imgedit-selection-' + postid).val('');
[1035] Fix | Delete
return false;
[1036] Fix | Delete
}
[1037] Fix | Delete
[1038] Fix | Delete
sel = { 'x': c.x1, 'y': c.y1, 'w': c.width, 'h': c.height };
[1039] Fix | Delete
this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 1);
[1040] Fix | Delete
$('#imgedit-selection-' + postid).val( JSON.stringify(sel) );
[1041] Fix | Delete
},
[1042] Fix | Delete
[1043] Fix | Delete
[1044] Fix | Delete
/**
[1045] Fix | Delete
* Closes the image editor.
[1046] Fix | Delete
*
[1047] Fix | Delete
* @since 2.9.0
[1048] Fix | Delete
*
[1049] Fix | Delete
* @memberof imageEdit
[1050] Fix | Delete
*
[1051] Fix | Delete
* @param {number} postid The post ID.
[1052] Fix | Delete
* @param {boolean} warn Warning message.
[1053] Fix | Delete
*
[1054] Fix | Delete
* @return {void|boolean} Returns false if there is a warning.
[1055] Fix | Delete
*/
[1056] Fix | Delete
close : function(postid, warn) {
[1057] Fix | Delete
warn = warn || false;
[1058] Fix | Delete
[1059] Fix | Delete
if ( warn && this.notsaved(postid) ) {
[1060] Fix | Delete
return false;
[1061] Fix | Delete
}
[1062] Fix | Delete
[1063] Fix | Delete
this.iasapi = {};
[1064] Fix | Delete
this.hold = {};
[1065] Fix | Delete
[1066] Fix | Delete
// If we've loaded the editor in the context of a Media Modal,
[1067] Fix | Delete
// then switch to the previous view, whatever that might have been.
[1068] Fix | Delete
if ( this._view ){
[1069] Fix | Delete
this._view.back();
[1070] Fix | Delete
}
[1071] Fix | Delete
[1072] Fix | Delete
// In case we are not accessing the image editor in the context of a View,
[1073] Fix | Delete
// close the editor the old-school way.
[1074] Fix | Delete
else {
[1075] Fix | Delete
$('#image-editor-' + postid).fadeOut('fast', function() {
[1076] Fix | Delete
$( '#media-head-' + postid ).fadeIn( 'fast', function() {
[1077] Fix | Delete
// Move focus back to the Edit Image button. Runs also when saving.
[1078] Fix | Delete
$( '#imgedit-open-btn-' + postid ).trigger( 'focus' );
[1079] Fix | Delete
});
[1080] Fix | Delete
$(this).empty();
[1081] Fix | Delete
});
[1082] Fix | Delete
}
[1083] Fix | Delete
[1084] Fix | Delete
[1085] Fix | Delete
},
[1086] Fix | Delete
[1087] Fix | Delete
/**
[1088] Fix | Delete
* Checks if the image edit history is saved.
[1089] Fix | Delete
*
[1090] Fix | Delete
* @since 2.9.0
[1091] Fix | Delete
*
[1092] Fix | Delete
* @memberof imageEdit
[1093] Fix | Delete
*
[1094] Fix | Delete
* @param {number} postid The post ID.
[1095] Fix | Delete
*
[1096] Fix | Delete
* @return {boolean} Returns true if the history is not saved.
[1097] Fix | Delete
*/
[1098] Fix | Delete
notsaved : function(postid) {
[1099] Fix | Delete
var h = $('#imgedit-history-' + postid).val(),
[1100] Fix | Delete
history = ( h !== '' ) ? JSON.parse(h) : [],
[1101] Fix | Delete
pop = this.intval( $('#imgedit-undone-' + postid).val() );
[1102] Fix | Delete
[1103] Fix | Delete
if ( pop < history.length ) {
[1104] Fix | Delete
if ( confirm( $('#imgedit-leaving-' + postid).text() ) ) {
[1105] Fix | Delete
return false;
[1106] Fix | Delete
}
[1107] Fix | Delete
return true;
[1108] Fix | Delete
}
[1109] Fix | Delete
return false;
[1110] Fix | Delete
},
[1111] Fix | Delete
[1112] Fix | Delete
/**
[1113] Fix | Delete
* Adds an image edit action to the history.
[1114] Fix | Delete
*
[1115] Fix | Delete
* @since 2.9.0
[1116] Fix | Delete
*
[1117] Fix | Delete
* @memberof imageEdit
[1118] Fix | Delete
*
[1119] Fix | Delete
* @param {Object} op The original position.
[1120] Fix | Delete
* @param {number} postid The post ID.
[1121] Fix | Delete
* @param {string} nonce The nonce.
[1122] Fix | Delete
*
[1123] Fix | Delete
* @return {void}
[1124] Fix | Delete
*/
[1125] Fix | Delete
addStep : function(op, postid, nonce) {
[1126] Fix | Delete
var t = this, elem = $('#imgedit-history-' + postid),
[1127] Fix | Delete
history = ( elem.val() !== '' ) ? JSON.parse( elem.val() ) : [],
[1128] Fix | Delete
undone = $( '#imgedit-undone-' + postid ),
[1129] Fix | Delete
pop = t.intval( undone.val() );
[1130] Fix | Delete
[1131] Fix | Delete
while ( pop > 0 ) {
[1132] Fix | Delete
history.pop();
[1133] Fix | Delete
pop--;
[1134] Fix | Delete
}
[1135] Fix | Delete
undone.val(0); // Reset.
[1136] Fix | Delete
[1137] Fix | Delete
history.push(op);
[1138] Fix | Delete
elem.val( JSON.stringify(history) );
[1139] Fix | Delete
[1140] Fix | Delete
t.refreshEditor(postid, nonce, function() {
[1141] Fix | Delete
t.setDisabled($('#image-undo-' + postid), true);
[1142] Fix | Delete
t.setDisabled($('#image-redo-' + postid), false);
[1143] Fix | Delete
});
[1144] Fix | Delete
},
[1145] Fix | Delete
[1146] Fix | Delete
/**
[1147] Fix | Delete
* Rotates the image.
[1148] Fix | Delete
*
[1149] Fix | Delete
* @since 2.9.0
[1150] Fix | Delete
*
[1151] Fix | Delete
* @memberof imageEdit
[1152] Fix | Delete
*
[1153] Fix | Delete
* @param {string} angle The angle the image is rotated with.
[1154] Fix | Delete
* @param {number} postid The post ID.
[1155] Fix | Delete
* @param {string} nonce The nonce.
[1156] Fix | Delete
* @param {Object} t The target element.
[1157] Fix | Delete
*
[1158] Fix | Delete
* @return {boolean}
[1159] Fix | Delete
*/
[1160] Fix | Delete
rotate : function(angle, postid, nonce, t) {
[1161] Fix | Delete
if ( $(t).hasClass('disabled') ) {
[1162] Fix | Delete
return false;
[1163] Fix | Delete
}
[1164] Fix | Delete
this.closePopup(t);
[1165] Fix | Delete
this.addStep({ 'r': { 'r': angle, 'fw': this.hold.h, 'fh': this.hold.w }}, postid, nonce);
[1166] Fix | Delete
},
[1167] Fix | Delete
[1168] Fix | Delete
/**
[1169] Fix | Delete
* Flips the image.
[1170] Fix | Delete
*
[1171] Fix | Delete
* @since 2.9.0
[1172] Fix | Delete
*
[1173] Fix | Delete
* @memberof imageEdit
[1174] Fix | Delete
*
[1175] Fix | Delete
* @param {number} axis The axle the image is flipped on.
[1176] Fix | Delete
* @param {number} postid The post ID.
[1177] Fix | Delete
* @param {string} nonce The nonce.
[1178] Fix | Delete
* @param {Object} t The target element.
[1179] Fix | Delete
*
[1180] Fix | Delete
* @return {boolean}
[1181] Fix | Delete
*/
[1182] Fix | Delete
flip : function (axis, postid, nonce, t) {
[1183] Fix | Delete
if ( $(t).hasClass('disabled') ) {
[1184] Fix | Delete
return false;
[1185] Fix | Delete
}
[1186] Fix | Delete
this.closePopup(t);
[1187] Fix | Delete
this.addStep({ 'f': { 'f': axis, 'fw': this.hold.w, 'fh': this.hold.h }}, postid, nonce);
[1188] Fix | Delete
},
[1189] Fix | Delete
[1190] Fix | Delete
/**
[1191] Fix | Delete
* Crops the image.
[1192] Fix | Delete
*
[1193] Fix | Delete
* @since 2.9.0
[1194] Fix | Delete
*
[1195] Fix | Delete
* @memberof imageEdit
[1196] Fix | Delete
*
[1197] Fix | Delete
* @param {number} postid The post ID.
[1198] Fix | Delete
* @param {string} nonce The nonce.
[1199] Fix | Delete
* @param {Object} t The target object.
[1200] Fix | Delete
*
[1201] Fix | Delete
* @return {void|boolean} Returns false if the crop button is disabled.
[1202] Fix | Delete
*/
[1203] Fix | Delete
crop : function (postid, nonce, t) {
[1204] Fix | Delete
var sel = $('#imgedit-selection-' + postid).val(),
[1205] Fix | Delete
w = this.intval( $('#imgedit-sel-width-' + postid).val() ),
[1206] Fix | Delete
h = this.intval( $('#imgedit-sel-height-' + postid).val() );
[1207] Fix | Delete
[1208] Fix | Delete
if ( $(t).hasClass('disabled') || sel === '' ) {
[1209] Fix | Delete
return false;
[1210] Fix | Delete
}
[1211] Fix | Delete
[1212] Fix | Delete
sel = JSON.parse(sel);
[1213] Fix | Delete
if ( sel.w > 0 && sel.h > 0 && w > 0 && h > 0 ) {
[1214] Fix | Delete
sel.fw = w;
[1215] Fix | Delete
sel.fh = h;
[1216] Fix | Delete
this.addStep({ 'c': sel }, postid, nonce);
[1217] Fix | Delete
}
[1218] Fix | Delete
[1219] Fix | Delete
// Clear the selection fields after cropping.
[1220] Fix | Delete
$('#imgedit-sel-width-' + postid).val('');
[1221] Fix | Delete
$('#imgedit-sel-height-' + postid).val('');
[1222] Fix | Delete
$('#imgedit-start-x-' + postid).val('0');
[1223] Fix | Delete
$('#imgedit-start-y-' + postid).val('0');
[1224] Fix | Delete
},
[1225] Fix | Delete
[1226] Fix | Delete
/**
[1227] Fix | Delete
* Undoes an image edit action.
[1228] Fix | Delete
*
[1229] Fix | Delete
* @since 2.9.0
[1230] Fix | Delete
*
[1231] Fix | Delete
* @memberof imageEdit
[1232] Fix | Delete
*
[1233] Fix | Delete
* @param {number} postid The post ID.
[1234] Fix | Delete
* @param {string} nonce The nonce.
[1235] Fix | Delete
*
[1236] Fix | Delete
* @return {void|false} Returns false if the undo button is disabled.
[1237] Fix | Delete
*/
[1238] Fix | Delete
undo : function (postid, nonce) {
[1239] Fix | Delete
var t = this, button = $('#image-undo-' + postid), elem = $('#imgedit-undone-' + postid),
[1240] Fix | Delete
pop = t.intval( elem.val() ) + 1;
[1241] Fix | Delete
[1242] Fix | Delete
if ( button.hasClass('disabled') ) {
[1243] Fix | Delete
return;
[1244] Fix | Delete
}
[1245] Fix | Delete
[1246] Fix | Delete
elem.val(pop);
[1247] Fix | Delete
t.refreshEditor(postid, nonce, function() {
[1248] Fix | Delete
var elem = $('#imgedit-history-' + postid),
[1249] Fix | Delete
history = ( elem.val() !== '' ) ? JSON.parse( elem.val() ) : [];
[1250] Fix | Delete
[1251] Fix | Delete
t.setDisabled($('#image-redo-' + postid), true);
[1252] Fix | Delete
t.setDisabled(button, pop < history.length);
[1253] Fix | Delete
// When undo gets disabled, move focus to the redo button to avoid a focus loss.
[1254] Fix | Delete
if ( history.length === pop ) {
[1255] Fix | Delete
$( '#image-redo-' + postid ).trigger( 'focus' );
[1256] Fix | Delete
}
[1257] Fix | Delete
});
[1258] Fix | Delete
},
[1259] Fix | Delete
[1260] Fix | Delete
/**
[1261] Fix | Delete
* Reverts a undo action.
[1262] Fix | Delete
*
[1263] Fix | Delete
* @since 2.9.0
[1264] Fix | Delete
*
[1265] Fix | Delete
* @memberof imageEdit
[1266] Fix | Delete
*
[1267] Fix | Delete
* @param {number} postid The post ID.
[1268] Fix | Delete
* @param {string} nonce The nonce.
[1269] Fix | Delete
*
[1270] Fix | Delete
* @return {void}
[1271] Fix | Delete
*/
[1272] Fix | Delete
redo : function(postid, nonce) {
[1273] Fix | Delete
var t = this, button = $('#image-redo-' + postid), elem = $('#imgedit-undone-' + postid),
[1274] Fix | Delete
pop = t.intval( elem.val() ) - 1;
[1275] Fix | Delete
[1276] Fix | Delete
if ( button.hasClass('disabled') ) {
[1277] Fix | Delete
return;
[1278] Fix | Delete
}
[1279] Fix | Delete
[1280] Fix | Delete
elem.val(pop);
[1281] Fix | Delete
t.refreshEditor(postid, nonce, function() {
[1282] Fix | Delete
t.setDisabled($('#image-undo-' + postid), true);
[1283] Fix | Delete
t.setDisabled(button, pop > 0);
[1284] Fix | Delete
// When redo gets disabled, move focus to the undo button to avoid a focus loss.
[1285] Fix | Delete
if ( 0 === pop ) {
[1286] Fix | Delete
$( '#image-undo-' + postid ).trigger( 'focus' );
[1287] Fix | Delete
}
[1288] Fix | Delete
});
[1289] Fix | Delete
},
[1290] Fix | Delete
[1291] Fix | Delete
/**
[1292] Fix | Delete
* Sets the selection for the height and width in pixels.
[1293] Fix | Delete
*
[1294] Fix | Delete
* @since 2.9.0
[1295] Fix | Delete
*
[1296] Fix | Delete
* @memberof imageEdit
[1297] Fix | Delete
*
[1298] Fix | Delete
* @param {number} postid The post ID.
[1299] Fix | Delete
* @param {jQuery} el The element containing the values.
[1300] Fix | Delete
*
[1301] Fix | Delete
* @return {void|boolean} Returns false when the x or y value is lower than 1,
[1302] Fix | Delete
* void when the value is not numeric or when the operation
[1303] Fix | Delete
* is successful.
[1304] Fix | Delete
*/
[1305] Fix | Delete
setNumSelection : function( postid, el ) {
[1306] Fix | Delete
var sel, elX = $('#imgedit-sel-width-' + postid), elY = $('#imgedit-sel-height-' + postid),
[1307] Fix | Delete
elX1 = $('#imgedit-start-x-' + postid), elY1 = $('#imgedit-start-y-' + postid),
[1308] Fix | Delete
xS = this.intval( elX1.val() ), yS = this.intval( elY1.val() ),
[1309] Fix | Delete
x = this.intval( elX.val() ), y = this.intval( elY.val() ),
[1310] Fix | Delete
img = $('#image-preview-' + postid), imgh = img.height(), imgw = img.width(),
[1311] Fix | Delete
sizer = this.hold.sizer, x1, y1, x2, y2, ias = this.iasapi;
[1312] Fix | Delete
[1313] Fix | Delete
if ( false === this.validateNumeric( el ) ) {
[1314] Fix | Delete
return;
[1315] Fix | Delete
}
[1316] Fix | Delete
[1317] Fix | Delete
if ( x < 1 ) {
[1318] Fix | Delete
elX.val('');
[1319] Fix | Delete
return false;
[1320] Fix | Delete
}
[1321] Fix | Delete
[1322] Fix | Delete
if ( y < 1 ) {
[1323] Fix | Delete
elY.val('');
[1324] Fix | Delete
return false;
[1325] Fix | Delete
}
[1326] Fix | Delete
[1327] Fix | Delete
if ( ( ( x && y ) || ( xS && yS ) ) && ( sel = ias.getSelection() ) ) {
[1328] Fix | Delete
x2 = sel.x1 + Math.round( x * sizer );
[1329] Fix | Delete
y2 = sel.y1 + Math.round( y * sizer );
[1330] Fix | Delete
x1 = ( xS === sel.x1 ) ? sel.x1 : Math.round( xS * sizer );
[1331] Fix | Delete
y1 = ( yS === sel.y1 ) ? sel.y1 : Math.round( yS * sizer );
[1332] Fix | Delete
[1333] Fix | Delete
if ( x2 > imgw ) {
[1334] Fix | Delete
x1 = 0;
[1335] Fix | Delete
x2 = imgw;
[1336] Fix | Delete
elX.val( Math.round( x2 / sizer ) );
[1337] Fix | Delete
}
[1338] Fix | Delete
[1339] Fix | Delete
if ( y2 > imgh ) {
[1340] Fix | Delete
y1 = 0;
[1341] Fix | Delete
y2 = imgh;
[1342] Fix | Delete
elY.val( Math.round( y2 / sizer ) );
[1343] Fix | Delete
}
[1344] Fix | Delete
[1345] Fix | Delete
ias.setSelection( x1, y1, x2, y2 );
[1346] Fix | Delete
ias.update();
[1347] Fix | Delete
this.setCropSelection(postid, ias.getSelection());
[1348] Fix | Delete
}
[1349] Fix | Delete
},
[1350] Fix | Delete
[1351] Fix | Delete
/**
[1352] Fix | Delete
* Rounds a number to a whole.
[1353] Fix | Delete
*
[1354] Fix | Delete
* @since 2.9.0
[1355] Fix | Delete
*
[1356] Fix | Delete
* @memberof imageEdit
[1357] Fix | Delete
*
[1358] Fix | Delete
* @param {number} num The number.
[1359] Fix | Delete
*
[1360] Fix | Delete
* @return {number} The number rounded to a whole number.
[1361] Fix | Delete
*/
[1362] Fix | Delete
round : function(num) {
[1363] Fix | Delete
var s;
[1364] Fix | Delete
num = Math.round(num);
[1365] Fix | Delete
[1366] Fix | Delete
if ( this.hold.sizer > 0.6 ) {
[1367] Fix | Delete
return num;
[1368] Fix | Delete
}
[1369] Fix | Delete
[1370] Fix | Delete
s = num.toString().slice(-1);
[1371] Fix | Delete
[1372] Fix | Delete
if ( '1' === s ) {
[1373] Fix | Delete
return num - 1;
[1374] Fix | Delete
} else if ( '9' === s ) {
[1375] Fix | Delete
return num + 1;
[1376] Fix | Delete
}
[1377] Fix | Delete
[1378] Fix | Delete
return num;
[1379] Fix | Delete
},
[1380] Fix | Delete
[1381] Fix | Delete
/**
[1382] Fix | Delete
* Sets a locked aspect ratio for the selection.
[1383] Fix | Delete
*
[1384] Fix | Delete
* @since 2.9.0
[1385] Fix | Delete
*
[1386] Fix | Delete
* @memberof imageEdit
[1387] Fix | Delete
*
[1388] Fix | Delete
* @param {number} postid The post ID.
[1389] Fix | Delete
* @param {number} n The ratio to set.
[1390] Fix | Delete
* @param {jQuery} el The element containing the values.
[1391] Fix | Delete
*
[1392] Fix | Delete
* @return {void}
[1393] Fix | Delete
*/
[1394] Fix | Delete
setRatioSelection : function(postid, n, el) {
[1395] Fix | Delete
var sel, r, x = this.intval( $('#imgedit-crop-width-' + postid).val() ),
[1396] Fix | Delete
y = this.intval( $('#imgedit-crop-height-' + postid).val() ),
[1397] Fix | Delete
h = $('#image-preview-' + postid).height();
[1398] Fix | Delete
[1399] Fix | Delete
if ( false === this.validateNumeric( el ) ) {
[1400] Fix | Delete
this.iasapi.setOptions({
[1401] Fix | Delete
aspectRatio: null
[1402] Fix | Delete
});
[1403] Fix | Delete
[1404] Fix | Delete
return;
[1405] Fix | Delete
}
[1406] Fix | Delete
[1407] Fix | Delete
if ( x && y ) {
[1408] Fix | Delete
this.iasapi.setOptions({
[1409] Fix | Delete
aspectRatio: x + ':' + y
[1410] Fix | Delete
});
[1411] Fix | Delete
[1412] Fix | Delete
if ( sel = this.iasapi.getSelection(true) ) {
[1413] Fix | Delete
r = Math.ceil( sel.y1 + ( ( sel.x2 - sel.x1 ) / ( x / y ) ) );
[1414] Fix | Delete
[1415] Fix | Delete
if ( r > h ) {
[1416] Fix | Delete
r = h;
[1417] Fix | Delete
var errorMessage = __( 'Selected crop ratio exceeds the boundaries of the image. Try a different ratio.' );
[1418] Fix | Delete
[1419] Fix | Delete
$( '#imgedit-crop-' + postid )
[1420] Fix | Delete
.prepend( '<div class="notice notice-error" tabindex="-1" role="alert"><p>' + errorMessage + '</p></div>' );
[1421] Fix | Delete
[1422] Fix | Delete
wp.a11y.speak( errorMessage, 'assertive' );
[1423] Fix | Delete
if ( n ) {
[1424] Fix | Delete
$('#imgedit-crop-height-' + postid).val( '' );
[1425] Fix | Delete
} else {
[1426] Fix | Delete
$('#imgedit-crop-width-' + postid).val( '');
[1427] Fix | Delete
}
[1428] Fix | Delete
} else {
[1429] Fix | Delete
var error = $( '#imgedit-crop-' + postid ).find( '.notice-error' );
[1430] Fix | Delete
if ( 'undefined' !== typeof( error ) ) {
[1431] Fix | Delete
error.remove();
[1432] Fix | Delete
}
[1433] Fix | Delete
}
[1434] Fix | Delete
[1435] Fix | Delete
this.iasapi.setSelection( sel.x1, sel.y1, sel.x2, r );
[1436] Fix | Delete
this.iasapi.update();
[1437] Fix | Delete
}
[1438] Fix | Delete
}
[1439] Fix | Delete
},
[1440] Fix | Delete
[1441] Fix | Delete
/**
[1442] Fix | Delete
* Validates if a value in a jQuery.HTMLElement is numeric.
[1443] Fix | Delete
*
[1444] Fix | Delete
* @since 4.6.0
[1445] Fix | Delete
*
[1446] Fix | Delete
* @memberof imageEdit
[1447] Fix | Delete
*
[1448] Fix | Delete
* @param {jQuery} el The html element.
[1449] Fix | Delete
*
[1450] Fix | Delete
* @return {void|boolean} Returns false if the value is not numeric,
[1451] Fix | Delete
* void when it is.
[1452] Fix | Delete
*/
[1453] Fix | Delete
validateNumeric: function( el ) {
[1454] Fix | Delete
if ( false === this.intval( $( el ).val() ) ) {
[1455] Fix | Delete
$( el ).val( '' );
[1456] Fix | Delete
return false;
[1457] Fix | Delete
}
[1458] Fix | Delete
}
[1459] Fix | Delete
};
[1460] Fix | Delete
})(jQuery);
[1461] Fix | Delete
[1462] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function