Skip to content
Snippets Groups Projects
Commit 6ab03eda authored by wiepke's avatar wiepke
Browse files

fixing issue #62

parent a865be4c
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,7 @@
<div id="{{>nameLower}}" class="category-card not-added">
<p>{{>name}}</p>
</div>
<a onClick="deleteCategory('{{>nameLower}}');"><i class="fa fa-trash" aria-hidden="true"></i></a>
</li>
{{/for}}
</script>
......
......@@ -20,6 +20,7 @@ $(document).ready(function () {
saveButtonHandler();
});
/**
* Context menu handler
*/
......@@ -243,4 +244,19 @@ function buildAnnotationList(categories) {
let tmpl = $.templates("#annotationTemplate");
let html = tmpl.render(data);
$("#annotations").html(html);
}
function deleteCategory(category) {
let categoryLI = $('#' + category);
let textArrays = categoryLI.data('array');
for (let i = 0; i < textArrays.length; i++) {
quill.formatText(textArrays[i].start, textArrays[i].end - textArrays[i].start, 'background', '#FFF');
}
categoryLI.data('array', []);
$('.added-' + category).each(function () {
$(this).toggleClass('added-' + category + ' not-added');
});
let test = category;
}
\ No newline at end of file
......@@ -58,7 +58,7 @@ function fitObjectInTmpl(object) {
};
if (object.taskType !== "INFO") {
if (object.groupTask === true) {
if (object.groupTask !== 0) {
result.taskType = "grouptask"
} else {
result.taskType = "usertask"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment