1function wpdapro_inline_editor(schema_name, table_name, primary_key, primary_key_values, column_name, column_value, wpnonce, elem_msg, path, column_data_type = '') { 2 jQuery.ajax({ 3 type: "POST", 4 url: path + '?action=wpdapro_inline_editor', 5 data: { 6 'wpdaschema_name': schema_name, 7 'table_name': table_name, 8 'primary_key': primary_key, 9 'primary_key_values': primary_key_values, 10 'column_name': column_name, 11 'column_value': column_value, 12 'column_data_type': column_data_type, 13 'wpnonce': wpnonce 14 } 15 }).done( 16 function (msg) { 17 if ( msg.substr(0, 3) === 'UPD' ) { 18 if ( msg.substr(4) == '0' ) { 19 wpdapro_show_msg(elem_msg, 'No update') 20 } else { 21 wpdapro_show_msg(elem_msg, 'Saved') 22 } 23 } else { 24 wpdapro_show_msg(elem_msg, 'Failed') 25 } 26 } 27 ).fail( 28 function (msg) { 29 console.log(msg); 30 wpdapro_show_msg(elem_msg, 'Failed') 31 } 32 ); 33} 34 35function wpdapro_show_msg(elem_msg, msg) { 36 elem_msg.html(msg); 37 elem_msg.show(); 38 setTimeout(function(){ 39 elem_msg.html(''); 40 elem_msg.hide(); 41 }, 2000); 42} 43 44function wpdapro_inline_editor_focus(ev, elem) { 45 elem.parent().find('.wpdapro_inline_element_toolbar').show(); 46} 47 48function wpdapro_inline_editor_blur(ev, elem) { 49 setTimeout(function(){ 50 if (!jQuery(':focus').hasClass('wpdapro_inline_element_toolbar_icon')) { 51 elem.parent().find('.wpdapro_inline_element_toolbar').hide(); 52 } else { 53 elem.focus(); 54 } 55 }, 200); 56} 57 58function wpdapro_inline_editor_reset(source, target) { 59 target.val(source.val()); 60} 61 62jQuery(function () { 63 jQuery('.wpda_data_type_number').on('keyup paste', function () { 64 this.value = this.value.replace(/[^\d\-]/g, ''); // Allow only 0-9 65 if (isNaN(this.value)) { 66 jQuery(this).addClass('wpda_input_error'); 67 } else { 68 jQuery(this).removeClass('wpda_input_error'); 69 } 70 }); 71 72 jQuery('.wpda_data_type_float').on('keyup paste', function () { 73 this.value = this.value.replace(/[^\d\-\.\,]/g, ''); // Allow only 0-9 . , 74 if (isNaN(this.value)) { 75 jQuery(this).addClass('wpda_input_error'); 76 } else { 77 jQuery(this).removeClass('wpda_input_error'); 78 } 79 }); 80});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.