-
@@ -282,9 +288,10 @@
currentUserAuthor: false,
certificateEnabled: null,
newKeyword: '',
- editorConfig: { toolbar: CKEditorToolbar.default },
+ editorConfig: { toolbar: CKEditorToolbar.default, versionCheck: false },
ResourceType,
resourceProviderId: null,
+ keywordLengthExceeded: false,
};
},
computed: {
@@ -477,6 +484,7 @@
},
keywordChange() {
this.keywordError = false;
+ this.keywordLengthExceeded = false;
},
resetSelectedLicence() {
this.resourceLicenceId = 0;
@@ -529,7 +537,7 @@
if (!this.keywords.find(_keyword => allTrimmedKeyword.includes(_keyword.keyword.toLowerCase()))) {
for (var i = 0; i < allTrimmedKeyword.length; i++) {
let item = allTrimmedKeyword[i];
- if (item.length > 0) {
+ if (item.length > 0 && item.length <= 50) {
let newkeywordObj = new KeywordModel();
newkeywordObj.keyword = item;
newkeywordObj.resourceVersionId = this.resourceDetail.resourceVersionId;
@@ -547,6 +555,10 @@
break;
}
}
+ else {
+ this.keywordLengthExceeded = true;
+ break;
+ }
}
}
else {
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/resource.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/resource.ts
index b6ba8dbaf..817ffcf2f 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/resource.ts
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/resource.ts
@@ -545,6 +545,29 @@ const getMKPlayerKey = async function (): Promise
{
});
};
+const getObsoleteResourceFile = async function (id: number): Promise {
+ return await AxiosWrapper.axios.get('/api/Resource/GetObsoleteResourceFile/' + id + '/' + true + `?timestamp=${new Date().getTime()}`)
+ .then(response => {
+ console.log(response.data);
+ return response.data;
+ })
+ .catch(e => {
+ console.log('getObsoleteResourceFiles:' + e);
+ throw e;
+ });
+};
+
+const archiveResourceFile = async function (filepaths: string[]): Promise {
+
+ return await AxiosWrapper.axios.post('/api/Resource/ArchiveResourceFile', filepaths).then(() => {
+ return true
+ }).catch(e => {
+ console.log('archiveResourceFile:' + e);
+ throw e;
+ });
+};
+
+
export const resourceData = {
getContributeConfiguration,
getContributeSettings,
@@ -586,5 +609,7 @@ export const resourceData = {
getContributeAVResourceFlag,
getDisplayAVResourceFlag,
getAVUnavailableView,
+ getObsoleteResourceFile,
+ archiveResourceFile,
getMKPlayerKey
};
\ No newline at end of file
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/mycontributions/gridcomponent.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/mycontributions/gridcomponent.vue
index 422e88a9c..78bd5d506 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/mycontributions/gridcomponent.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/mycontributions/gridcomponent.vue
@@ -44,7 +44,7 @@
- You are about to make a change to this resource. If you continue, changes cannot be undone.
+ You are about to make a change to this resource. Editing this page will create a new draft, nothing will change until this draft is published.