Skip to content

Commit

Permalink
Make text_medium and text_small fields work properly. Fixes #20
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Jun 7, 2017
1 parent 67df607 commit 642de1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions js/shortcode-quicktag-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ window.wp_sc_buttons = window.wp_sc_buttons || {};
// TODO: Reset all types
switch ( type ) {
case 'text':
case 'text-medium':
case 'text-small':
return $this.find( '[type="text"]' ).val( '' );
case 'file':
$this.find( '.cmb2-upload-file-id' ).val( '' );
Expand Down Expand Up @@ -461,6 +463,8 @@ window.wp_sc_buttons = window.wp_sc_buttons || {};
// TODO: Set fields for all types
switch ( data.type ) {
case 'text':
case 'text-medium':
case 'text-small':
case 'textarea':
case 'file':
return $field.val( data.value );
Expand Down
2 changes: 1 addition & 1 deletion js/shortcode-quicktag-button.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 642de1a

Please sign in to comment.