diff --git a/js-tests/build/specs.js b/js-tests/build/specs.js
index c6155080..0f871224 100644
--- a/js-tests/build/specs.js
+++ b/js-tests/build/specs.js
@@ -1118,43 +1118,10 @@ var shortcodeViewConstructor = {
delayedFetch: function() {
return fetcher.queueToFetch({
post_id: $( '#post_ID' ).val(),
- shortcode: this.shortcodeModel.formatShortcode(),
- nonce: shortcodeUIData.nonces.preview,
+ shortcode: this.shortcodeModel.formatShortcode()
});
},
- /**
- * Fetch a preview of a single shortcode.
- *
- * Async. Sets this.content and calls this.render.
- *
- * @return undefined
- */
- fetch: function() {
- var self = this;
-
- if ( ! this.fetching ) {
- this.fetching = true;
-
- wp.ajax.post( 'do_shortcode', {
- post_id: $( '#post_ID' ).val(),
- shortcode: this.shortcodeModel.formatShortcode(),
- nonce: shortcodeUIData.nonces.preview,
- }).done( function( response ) {
- if ( '' === response ) {
- self.content = '' + self.shortcodeModel.formatShortcode() + '';
- } else {
- self.content = response;
- }
- }).fail( function() {
- self.content = '' + shortcodeUIData.strings.mce_view_error + '';
- } ).always( function() {
- delete self.fetching;
- self.render( null, true );
- } );
- }
- },
-
/**
* Get the shortcode model and open modal UI for editing.
*
diff --git a/js/build/shortcode-ui.js b/js/build/shortcode-ui.js
index 8bdea15b..a9132e20 100644
--- a/js/build/shortcode-ui.js
+++ b/js/build/shortcode-ui.js
@@ -625,43 +625,10 @@ var shortcodeViewConstructor = {
delayedFetch: function() {
return fetcher.queueToFetch({
post_id: $( '#post_ID' ).val(),
- shortcode: this.shortcodeModel.formatShortcode(),
- nonce: shortcodeUIData.nonces.preview,
+ shortcode: this.shortcodeModel.formatShortcode()
});
},
- /**
- * Fetch a preview of a single shortcode.
- *
- * Async. Sets this.content and calls this.render.
- *
- * @return undefined
- */
- fetch: function() {
- var self = this;
-
- if ( ! this.fetching ) {
- this.fetching = true;
-
- wp.ajax.post( 'do_shortcode', {
- post_id: $( '#post_ID' ).val(),
- shortcode: this.shortcodeModel.formatShortcode(),
- nonce: shortcodeUIData.nonces.preview,
- }).done( function( response ) {
- if ( '' === response ) {
- self.content = '' + self.shortcodeModel.formatShortcode() + '';
- } else {
- self.content = response;
- }
- }).fail( function() {
- self.content = '' + shortcodeUIData.strings.mce_view_error + '';
- } ).always( function() {
- delete self.fetching;
- self.render( null, true );
- } );
- }
- },
-
/**
* Get the shortcode model and open modal UI for editing.
*
@@ -890,6 +857,8 @@ var editAttributeFieldAttachment = sui.views.editAttributeField.extend( {
this._renderAll();
+ this.triggerCallbacks();
+
},
_renderAll: function() {
diff --git a/js/src/utils/shortcode-view-constructor.js b/js/src/utils/shortcode-view-constructor.js
index 61b85496..a1cc756d 100644
--- a/js/src/utils/shortcode-view-constructor.js
+++ b/js/src/utils/shortcode-view-constructor.js
@@ -118,43 +118,10 @@ var shortcodeViewConstructor = {
delayedFetch: function() {
return fetcher.queueToFetch({
post_id: $( '#post_ID' ).val(),
- shortcode: this.shortcodeModel.formatShortcode(),
- nonce: shortcodeUIData.nonces.preview,
+ shortcode: this.shortcodeModel.formatShortcode()
});
},
- /**
- * Fetch a preview of a single shortcode.
- *
- * Async. Sets this.content and calls this.render.
- *
- * @return undefined
- */
- fetch: function() {
- var self = this;
-
- if ( ! this.fetching ) {
- this.fetching = true;
-
- wp.ajax.post( 'do_shortcode', {
- post_id: $( '#post_ID' ).val(),
- shortcode: this.shortcodeModel.formatShortcode(),
- nonce: shortcodeUIData.nonces.preview,
- }).done( function( response ) {
- if ( '' === response ) {
- self.content = '' + self.shortcodeModel.formatShortcode() + '';
- } else {
- self.content = response;
- }
- }).fail( function() {
- self.content = '' + shortcodeUIData.strings.mce_view_error + '';
- } ).always( function() {
- delete self.fetching;
- self.render( null, true );
- } );
- }
- },
-
/**
* Get the shortcode model and open modal UI for editing.
*