Text editing for sci-types-project

pull/1/head
Jens Pelzetter 2022-05-07 17:02:27 +02:00
parent 76b5d83d8c
commit f194231550
10 changed files with 27 additions and 986 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@
"webpack-cli": "^4.8.0"
},
"dependencies": {
"@librecms/ccm-cms-editor": "^7.0.0-SNAPSHOT"
},
"targets": {
"main": false

View File

@ -25,7 +25,9 @@ public class SciProjectAuthoringSteps implements MvcAuthoringSteps {
@Override
public Set<Class<?>> getResourceClasses() {
return Set.of(
SciProjectDescriptionStepResources.class,
SciProjectDescriptionStepService.class,
SciProjectFundingStepResources.class,
SciProjectFundingStepService.class
);
}

View File

@ -153,7 +153,7 @@ public class SciProjectFundingStep extends AbstractMvcAuthoringStep {
new Locale(localeParam).toString()
);
return "org/scientificcms/contenttypes/sciproject/ui/sciproject-fundingtext/view.xhtml";
return "org/scientificcms/contenttypes/sciproject/ui/funding/view.xhtml";
} else {
return documentUi.showAccessDenied(
getContentSection(),
@ -206,7 +206,7 @@ public class SciProjectFundingStep extends AbstractMvcAuthoringStep {
}
@GET
@Path("/funding-text/edit")
@Path("/funding-text/edit/{locale}")
@Transactional(Transactional.TxType.REQUIRED)
@AuthorizationRequired
public String editFundingTextValue(
@ -229,7 +229,7 @@ public class SciProjectFundingStep extends AbstractMvcAuthoringStep {
new Locale(localeParam).toString()
);
return "org/scientificcms/contenttypes/sciproject/ui/sciproject-fundingtext/edit.xhtml";
return "org/scientificcms/contenttypes/sciproject/ui/fundingtext/edit.xhtml";
} else {
return documentUi.showAccessDenied(
getContentSection(),
@ -332,7 +332,7 @@ public class SciProjectFundingStep extends AbstractMvcAuthoringStep {
new Locale(localeParam).toString()
);
return "org/scientificcms/contenttypes/sciproject/ui/sciproject-fundingvolume/view.xhtml";
return "org/scientificcms/contenttypes/sciproject/ui/fundingvolume/view.xhtml";
} else {
return documentUi.showAccessDenied(
getContentSection(),
@ -385,7 +385,7 @@ public class SciProjectFundingStep extends AbstractMvcAuthoringStep {
}
@GET
@Path("/funding-volume/edit")
@Path("/funding-volume/edit/{locale}")
@Transactional(Transactional.TxType.REQUIRED)
@AuthorizationRequired
public String editFundingVolumeValue(
@ -408,7 +408,7 @@ public class SciProjectFundingStep extends AbstractMvcAuthoringStep {
new Locale(localeParam).toString()
);
return "org/scientificcms/contenttypes/sciproject/ui/sciproject-fundingtext/edit.xhtml";
return "org/scientificcms/contenttypes/sciproject/ui/fundingvolume/edit.xhtml";
} else {
return documentUi.showAccessDenied(
getContentSection(),
@ -695,7 +695,7 @@ public class SciProjectFundingStep extends AbstractMvcAuthoringStep {
.collect(Collectors.toList())
);
final Set<Locale> fundingVolumeLocales = getProject()
.getProjectDescription()
.getFundingVolume()
.getAvailableLocales();
fundingVolumeModel.setUnusedLocales(
globalizationHelper

View File

@ -80,7 +80,7 @@ public class SciProjectFundingStepResources {
}
@GET
@Path("/project-funding/{locale}")
@Path("/funding/{locale}")
@Produces(MediaType.TEXT_HTML)
@Transactional(Transactional.TxType.REQUIRED)
public String viewFundingValue(
@ -117,7 +117,7 @@ public class SciProjectFundingStepResources {
}
@GET
@Path("/project-fundingvolume/wordcount/{locale}")
@Path("/fundingvolume/wordcount/{locale}")
@Produces(MediaType.TEXT_HTML)
@Transactional(Transactional.TxType.REQUIRED)
public String getFundingVolumeWordCount(
@ -154,7 +154,7 @@ public class SciProjectFundingStepResources {
}
@GET
@Path("/project-fundingvolume/{locale}")
@Path("/fundingvolume/{locale}")
@Produces(MediaType.TEXT_HTML)
@Transactional(Transactional.TxType.REQUIRED)
public String viewFundingVolumeValue(

View File

@ -29,14 +29,14 @@
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
selectedLocale="#{SciProjectDescriptionModel.selectedLocale}"
title="#{SciProjectMessageBundle['description.editor.header']}"
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-description/description/variants"
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-description-resources/project-description"
/>
</c:if>
</ui:define>
<ui:define name="scripts">
<script src="#{request.contextPath}/assets/@sciproject/sciproject-description.js"></script>
<script src="#{request.contextPath}/assets/@content-sections/cms-editor.js"></script>
</ui:define>
</ui:composition>

View File

@ -29,14 +29,14 @@
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
selectedLocale="#{SciProjectFundingText.selectedLocale}"
title="#{SciProjectMessageBundle['fundingtext.editor.header']}"
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-funding/funding-text/variants"
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-funding-resources/funding"
/>
</c:if>
</ui:define>
<ui:define name="scripts">
<script src="#{request.contextPath}/assets/@content-sections/sciproject-fundingtext.js"></script>
<script src="#{request.contextPath}/assets/@content-sections/cms-editor.js"></script>
</ui:define>
</ui:composition>

View File

@ -27,16 +27,16 @@
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-funding/funding-volume/edit"
editorId="sciproject-funding-volume-editor"
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
selectedLocale="#{SciProjectFundingText.selectedLocale}"
selectedLocale="#{SciProjectFundingVolume.selectedLocale}"
title="#{SciProjectMessageBundle['fundingvolume.editor.header']}"
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-funding/funding-volume/variants"
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-funding-resources/fundingvolume"
/>
</c:if>
</ui:define>
<ui:define name="scripts">
<script src="#{request.contextPath}/assets/@content-sections/sciproject-fundingvolume.js"></script>
<script src="#{request.contextPath}/assets/@content-sections/cms-editor.js"></script>
</ui:define>
</ui:composition>

View File

@ -11,7 +11,7 @@
"outDir": "target/generated-resources/assets/@content-sections",
"sourceMap": true,
"strict": true,
"target": "ES5"
"target": "ES6"
},
"include": [
"src/main/typescript/**/*"

View File

@ -5,10 +5,10 @@ module.exports = {
chunkIds: false
},
entry: {
"sciproject-description": "./src/main/typescript/sciproject-description.ts",
// "sciproject-description": "./src/main/typescript/sciproject-description.ts",
//"sciproject-contacts": "./src/main/typescript/sciproject-contacts.ts",
"sciproject-fundingtext": "./src/main/typescript/sciproject-fundingtext.ts",
"sciproject-fundingvolume": "./src/main/typescript/sciproject-fundingvolume.ts",
// "sciproject-fundingtext": "./src/main/typescript/sciproject-fundingtext.ts",
// "sciproject-fundingvolume": "./src/main/typescript/sciproject-fundingvolume.ts",
//"sciproject-sponsoring": "./src/main/typescript/sciproject-sponsoring.ts"
},
output: {