Skip to content
Snippets Groups Projects

Feature/review conversation

Open Maxime requested to merge feature/review-conversation into master
11 unresolved threads

issue ongoing --> Blocking conversation form submit when resource form is invalid

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
20 20 //Compile custom function
21 21 async function compile() {
22 22 //Retrieve langues proposed
23 const langs = (await fs.readdir(dataDir))
23 console.log("the dir is",dataDir)
  • npm-debug.log 0 → 100644
    1 0 info it worked if it ends with ok
  • 127 )
    128 //class reviewConversation used in Js to hide element
    129 p.reviewConversation="Explain the changes you have brought before submitting them"
  • 147 152 p
    148 153 i.fas.fa-times
    149 154 h2.title_lead=`${data.SuggestImprovement}`
    155
    156 //- sib-conversation#improvement_dialog_form(
  • 270 270 * Manage the report broken links hidden form
    271 271 */
    272 272 function fillReportBrokenLinkForm(event, userWhoSubmitReport, formBrokenLink) {
    273 /*
  • 506 508 });
    507 509 }
    508 510
    511 /*********
    512 * Feature: Comment review conversation
    513 *********/
    514 //event listener on conversation modules loading
    515 document.addEventListener("DOMContentLoaded", () => {
  • 506 508 });
    507 509 }
    508 510
    511 /*********
    512 * Feature: Comment review conversation
    513 *********/
    514 //event listener on conversation modules loading
    515 document.addEventListener("DOMContentLoaded", () => {
    516
    517 //on nav check if the resource is validated
    518 //hide the review conversations && display normal submit button
    519
    520 document.addEventListener("navigate", (e) => {
    521
    522 if (["contributor-resource-edit","contributor-resource-validate"].includes(e.detail.route)) {
    523 console.log("navigate");
  • 513 *********/
    514 //event listener on conversation modules loading
    515 document.addEventListener("DOMContentLoaded", () => {
    516
    517 //on nav check if the resource is validated
    518 //hide the review conversations && display normal submit button
    519
    520 document.addEventListener("navigate", (e) => {
    521
    522 if (["contributor-resource-edit","contributor-resource-validate"].includes(e.detail.route)) {
    523 console.log("navigate");
    524
    525 setTimeout(() => {
    526 checkResourceValidity(e);
    527 removeEmptyConversation();
    528
  • 520 document.addEventListener("navigate", (e) => {
    521
    522 if (["contributor-resource-edit","contributor-resource-validate"].includes(e.detail.route)) {
    523 console.log("navigate");
    524
    525 setTimeout(() => {
    526 checkResourceValidity(e);
    527 removeEmptyConversation();
    528
    529
    530 }, 500);
    531
    532 setTimeout(() => {
    533 //make sure
    534 var conversationModule = document.querySelectorAll( "#" + e.detail.route + " solid-conversation")[1];
    535 console.log("target of event",conversationModule);
  • 564 else if (resourceValidateFormSubmit){
    565 resourceValidateFormSubmit.click()
    566 }
    567 else{
    568 console.log("Script should not launch",conversationModules);
    569 }
    570
    571 });
    572 }, 8000);
    573 };
    574 });
    575
    576
    577
    578 //hide element on edit form if there's no feedback
    579 /*
  • 616 reviewConversations.forEach(reviewConversation => {
    617 console.log("convo to display",reviewConversation);
    618 reviewConversation.style.display = "block";
    619 });
    620 //display form submit
    621 let reviewFormSubmit = document.querySelector( "#" + e.detail.route + " #resource_edition_form input[type=submit]");
    622 reviewFormSubmit.style.display = "none";
    623 }
    624 }
    625 /**
    626 * On edit forms
    627 * If no feedback, hide section
    628 */
    629 function removeEmptyConversation() {
    630 /*
    631 //select the content in first conversation's
    Please register or sign in to reply
    Loading