Created
September 29, 2014 16:40
-
-
Save radmiraal/13622e0d289809e292a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../Templates/TypoScriptObjects/NeosBackendEndpoints.html | |
../../Public/JavaScript/Content/Inspector/Editors/ImageEditor.js | |
*/ | |
_imageServiceEndpointUri: null, | |
+ _sites: [], | |
+ | |
loadingindicator: null, | |
init: function() { | |
@@ -341,6 +343,7 @@ function(Ember, $, FileUpload, template, BooleanEditor, TextFieldEditor, Spinner | |
return; | |
} | |
this._super(); | |
+ this.set('_sites', JSON.stringify([$('link[rel="neos-site"]').data('node-name'))); | |
this.set('_originalImageUuid', response.imageUuid); | |
this._setPreviewImage(response); | |
@@ -522,6 +525,7 @@ function(Ember, $, FileUpload, template, BooleanEditor, TextFieldEditor, Spinner | |
this.set('value', JSON.stringify({ | |
originalImage: this.get('_originalImageUuid'), | |
+ sites: this.get('_sites'), | |
processingInstructions: processingInstructions | |
})); | |
}, | |
@@ -549,6 +553,7 @@ function(Ember, $, FileUpload, template, BooleanEditor, TextFieldEditor, Spinner | |
// we hide the default upload preview image; as we only want the loading indicator to be visible | |
this.set('_uploadPreviewShown', false); | |
+ that.set('_sites', imageVariant.sites); | |
that.set('_loadPreviewImageHandler', HttpClient.getResource( | |
$('link[rel="neos-images"]').attr('href') + '?image=' + imageVariant.originalImage, | |
{dataType: 'json'} | |
--- a/Resources/Private/Templates/TypoScriptObjects/NeosBackendEndpoints.html | |
+++ b/Resources/Private/Templates/TypoScriptObjects/NeosBackendEndpoints.html | |
@@ -4,7 +4,7 @@ | |
<meta name="neos-workspace" content="{node.context.workspace.name}" /> | |
<meta name="neos-csrf-token" content="{f:security.csrfToken()}" /> | |
- <link rel="neos-site" href="{f:uri.action(action: 'show', controller: 'Frontend\Node', package: 'TYPO3.Neos', format:'html', arguments: '{node: node.context.currentSiteNode}', absolute: true)}" /> | |
+ <link rel="neos-site" href="{f:uri.action(action: 'show', controller: 'Frontend\Node', package: 'TYPO3.Neos', format:'html', arguments: '{node: node.context.currentSiteNode}', absolute: true)}" data-node-name="{node.context.currentSiteNode.name}" /> | |
<link rel="neos-service-nodes" type="application/vnd.typo3.neos.nodes" data-current-workspace="{node.context.workspace.name}" href="{f:uri.action(action: 'index', controller: 'Service\Nodes', package: 'TYPO3.Neos', absolute: true)}" /> | |
<f:alias map="{configurationCacheIdentifier: '{neos:backend.configurationCacheVersion()}'}"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment