Skip to content
Snippets Groups Projects
Commit 77221370 authored by chris's avatar chris
Browse files

new files

parent d8491eab
No related branches found
No related tags found
1 merge request!396add inputs
Showing
with 66 additions and 46 deletions
......@@ -21,10 +21,9 @@ import {
EditorInfoToolGroupServices,
BottomInfoService,
MultipleChoiceQuestionService,
MultipleChoiceToolGroupService,
FillTheGapQuestionService,
FillTheGapToolGroupService,
MultipleDropDownToolGroupService,
MultipleChoiceDropDownToolGroupService,
EssayService,
EssayToolGroupService,
MatchingService,
......@@ -54,7 +53,7 @@ export default {
'Lists',
'Images',
'Tables',
'MultipleDropDown',
'MultipleChoiceDropDown',
'Essay',
'FillTheGap',
'Matching',
......@@ -74,8 +73,7 @@ export default {
new FillTheGapQuestionService(),
new FillTheGapToolGroupService(),
new MultipleChoiceQuestionService(),
new MultipleChoiceToolGroupService(),
new MultipleDropDownToolGroupService(),
new MultipleChoiceDropDownToolGroupService(),
new EssayService(),
new EssayToolGroupService(),
new ListsService(),
......
......@@ -51,6 +51,7 @@ export { default as FillTheGapQuestionService } from './src/FillTheGapQuestionSe
export { default as EssayService } from './src/EssayService/EssayService';
export { default as MatchingService } from './src/MatchingService/MatchingService';
export { default as EnterService } from './src/EnterService/EnterService';
export { default as MultipleDropDownService } from './src/MultipleDropDownService/MultipleDropDownService';
/*
ToolGroups
*/
......@@ -75,8 +76,7 @@ export { default as TrackOptionsToolGroupService } from './src/WaxToolGroups/Tra
export { default as TrackCommentOptionsToolGroupService } from './src/WaxToolGroups/TrackCommentOptionsToolGroupService/TrackCommentOptionsToolGroupService';
export { default as CustomTagInlineToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService';
export { default as CustomTagBlockToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService';
export { default as MultipleChoiceToolGroupService } from './src/WaxToolGroups/MultipleChoiceToolGroupService/MultipleChoiceToolGroupService';
export { default as FillTheGapToolGroupService } from './src/WaxToolGroups/FillTheGapToolGroupService/FillTheGapToolGroupService';
export { default as MultipleDropDownToolGroupService } from './src/WaxToolGroups/MultipleDropDownToolGroupService/MultipleDropDownToolGroupService';
export { default as MultipleChoiceDropDownToolGroupService } from './src/WaxToolGroups/MultipleChoiceDropDownToolGroupService/MultipleChoiceDropDownToolGroupService';
export { default as EssayToolGroupService } from './src/WaxToolGroups/EssayToolGroupService/EssayToolGroupService';
export { default as MatchingToolGroupService } from './src/WaxToolGroups/MatchingToolGroupService/MatchingToolGroupService';
import QuestionsNodeView from '../lib/helpers/QuestionsNodeView';
export default class MultipleDropDownContainerNodeView extends QuestionsNodeView {
constructor(
node,
view,
getPos,
decorations,
createPortal,
Component,
context,
) {
super(node, view, getPos, decorations, createPortal, Component, context);
this.node = node;
this.outerView = view;
this.getPos = getPos;
this.context = context;
}
static name() {
return 'multiple_drop_down_container';
}
stopEvent(event) {
if (event.target.type === 'text') {
return true;
}
const innerView = this.context.pmViews[this.node.attrs.id];
return innerView && innerView.dom.contains(event.target);
}
}
import Service from '../Service';
import MultipleDropDownQuestion from './MultipleDropDownQuestion';
import MultipleDropDownContainerNodeView from './MultipleDropDownContainerNodeView';
class MultipleDropDownService extends Service {
name = 'MultipleDropDownService';
register() {
this.container
.bind('MultipleDropDownQuestion')
.to(MultipleDropDownQuestion);
const createNode = this.container.get('CreateNode');
const addPortal = this.container.get('AddPortal');
}
}
export default MultipleDropDownService;
......@@ -6,7 +6,7 @@ import ToolGroup from '../../lib/ToolGroup';
import DropComponent from './DropComponent';
@injectable()
class MultipleDropDown extends ToolGroup {
class MultipleChoiceDropDown extends ToolGroup {
tools = [];
constructor(
@inject('MultipleChoiceQuestion') multipleChoiceQuestion,
......@@ -33,4 +33,4 @@ class MultipleDropDown extends ToolGroup {
}
}
export default MultipleDropDown;
export default MultipleChoiceDropDown;
import Service from '../../Service';
import MultipleChoiceDropDown from './MultipleChoiceDropDown';
class MultipleChoiceDropDownToolGroupService extends Service {
register() {
this.container.bind('MultipleChoiceDropDown').to(MultipleChoiceDropDown);
}
}
export default MultipleChoiceDropDownToolGroupService;
import { injectable, inject } from 'inversify';
import ToolGroup from '../../lib/ToolGroup';
@injectable()
class MultipleChoice extends ToolGroup {
tools = [];
constructor(
@inject('MultipleChoiceQuestion') multipleChoiceQuestion,
@inject('MultipleChoiceSingleCorrectQuestion')
multipleChoiceSingleCorrectQuestion,
) {
super();
this.tools = [multipleChoiceQuestion, multipleChoiceSingleCorrectQuestion];
}
}
export default MultipleChoice;
import Service from '../../Service';
import MultipleChoice from './MultipleChoice';
class MultipleChoiceToolGroupService extends Service {
register() {
this.container.bind('MultipleChoice').to(MultipleChoice);
}
}
export default MultipleChoiceToolGroupService;
import Service from '../../Service';
import MultipleDropDown from './MultipleDropDown';
class MultipleDropDownToolGroupService extends Service {
register() {
this.container.bind('MultipleDropDown').to(MultipleDropDown);
}
}
export default MultipleDropDownToolGroupService;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment