|
|
|
@ -61,7 +61,7 @@ module.exports = function() { |
|
|
|
|
var title = scope.isPreview ? PREVIEW_DISABLE_TEXT : PREVIEW_ENABLE_TEXT; |
|
|
|
|
var toggledClasses = 'icon-preview icon-ticket-edit -active'; |
|
|
|
|
|
|
|
|
|
element.closest('.wp-edit-field') |
|
|
|
|
element.closest('.textarea-wrapper') |
|
|
|
|
.find('.' + PREVIEW_BUTTON_CLASS).attr('title', title) |
|
|
|
|
.attr('aria-label', title) |
|
|
|
|
.toggleClass(toggledClasses); |
|
|
|
@ -69,7 +69,7 @@ module.exports = function() { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
element |
|
|
|
|
.closest('.wp-edit-field') |
|
|
|
|
.closest('.textarea-wrapper') |
|
|
|
|
.find('.jstb_help') |
|
|
|
|
.after(jQuery('<button>', previewButtonAttributes)); |
|
|
|
|
// changes are made by jQuery, we trigger input event so that
|
|
|
|
@ -84,7 +84,7 @@ module.exports = function() { |
|
|
|
|
transclude: false, |
|
|
|
|
link: link, |
|
|
|
|
scope: { |
|
|
|
|
previewToggle: '=' |
|
|
|
|
previewToggle: '&' |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|