Loading js/block-class.js +6 −2 Original line number Diff line number Diff line Loading @@ -12,9 +12,13 @@ // Hide the parent of hidden items on block class field. $('.hidden-class-field').parent().css( "display", "none" ); $('.multiple-textfield').keyup(function() { $(this).val($(this).val().replace(/ /g, "")); }); // On click to add another item, prevent default to stop going to another // page. $(".block-class-add-another-item").on( "click", function(event) { $(".block-class-add-another-item").unbind().click(function(event) { // Prevent Default to stop the normal behavior and avoid going to // another page. Loading @@ -33,7 +37,7 @@ // On click to remove item, prevent default to stop going to another // page. $(".block-class-remove-item").on( "click", function(event) { $(".block-class-remove-item").unbind().click(function(event) { // Prevent Default to stop the normal behavior and avoid going to // another page. Loading src/Service/BlockClassHelperService.php +2 −1 Original line number Diff line number Diff line Loading @@ -390,9 +390,10 @@ class BlockClassHelperService { '#maxlength' => $maxlength_block_class_field, ]; $form['third_party_settings']['block_class']['classes_' . $i]['#attributes']['class'][] = 'multiple-textfield'; if ($i >= 1) { $form['third_party_settings']['block_class']['classes_' . $i]['#attributes']['class'][] = 'hidden-class-field'; $form['third_party_settings']['block_class']['classes_' . $i]['#attributes']['class'][] = 'multiple-textfield'; } } Loading Loading
js/block-class.js +6 −2 Original line number Diff line number Diff line Loading @@ -12,9 +12,13 @@ // Hide the parent of hidden items on block class field. $('.hidden-class-field').parent().css( "display", "none" ); $('.multiple-textfield').keyup(function() { $(this).val($(this).val().replace(/ /g, "")); }); // On click to add another item, prevent default to stop going to another // page. $(".block-class-add-another-item").on( "click", function(event) { $(".block-class-add-another-item").unbind().click(function(event) { // Prevent Default to stop the normal behavior and avoid going to // another page. Loading @@ -33,7 +37,7 @@ // On click to remove item, prevent default to stop going to another // page. $(".block-class-remove-item").on( "click", function(event) { $(".block-class-remove-item").unbind().click(function(event) { // Prevent Default to stop the normal behavior and avoid going to // another page. Loading
src/Service/BlockClassHelperService.php +2 −1 Original line number Diff line number Diff line Loading @@ -390,9 +390,10 @@ class BlockClassHelperService { '#maxlength' => $maxlength_block_class_field, ]; $form['third_party_settings']['block_class']['classes_' . $i]['#attributes']['class'][] = 'multiple-textfield'; if ($i >= 1) { $form['third_party_settings']['block_class']['classes_' . $i]['#attributes']['class'][] = 'hidden-class-field'; $form['third_party_settings']['block_class']['classes_' . $i]['#attributes']['class'][] = 'multiple-textfield'; } } Loading