Refresh custom event delimiter when changed

This commit is contained in:
Brian Miyaji
2014-03-22 00:45:06 +11:00
parent 412844830a
commit cb8d88df25
2 changed files with 10 additions and 1 deletions

View File

@@ -316,6 +316,15 @@ jQuery(document).ready(function($){
$(this).siblings("label").find(".preset").prop("checked", true);
});
// Adjust example field when custom preset is entered
$(".sp-custom-input-wrapper .value").on("keyup", function() {
val = $(this).val();
if ( val === undefined ) return true;
format = $(this).attr("data-example-format");
example = format.replace("__val__", val);
$(this).siblings(".example").html(example);
});
// Remove slug editor in quick edit for slug-sensitive post types
$(".inline-edit-sp_result, .inline-edit-sp_outcome, .inline-edit-sp_column, .inline-edit-sp_statistic").find("input[name=post_name]").closest("label").remove();