From 4adb1bc92b3f1c695389167734b24b8f3f878b2a Mon Sep 17 00:00:00 2001 From: Oleh Astappiev Date: Tue, 23 Jan 2024 20:15:16 +0100 Subject: [PATCH] chore: minor changes --- .editorconfig | 12 ++++++++++-- src/main/java/de/l3s/learnweb/resource/Resource.java | 4 ++-- .../l3s/learnweb/resource/ted/TedTranscriptBean.java | 7 +------ .../de/l3s/learnweb/lang/messages.properties | 1 - .../de/l3s/learnweb/lang/messages_it.properties | 1 - .../de/l3s/learnweb/lang/messages_xy.properties | 1 - .../webapp/WEB-INF/templates/layout/template.xhtml | 2 +- src/main/webapp/lw/ted_transcript.xhtml | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.editorconfig b/.editorconfig index 01916fcc2..7ae7fc5c4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,18 +14,26 @@ ij_continuation_indent_size = 4 [*.properties] ij_properties_keep_blank_lines = true -[{*.yml,*.json}] +[{*.yml,*.yaml}] indent_size = 2 [{*.scss,*.sass,*.css}] indent_size = 2 +[{*.js,*.cjs,*.ts,*.jsx,*.tsx,*.vue,*.json}] +indent_size = 2 +ij_javascript_keep_simple_blocks_in_one_line = true +ij_javascript_keep_simple_methods_in_one_line = true +ij_javascript_align_object_properties = 0 +ij_javascript_method_call_chain_wrap = on_every_item + [{*.htm,*.html,*.ng,*.sht,*.shtm,*.shtml,*.xhtm,*.xhtml}] ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot,ui:composition ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,strike,strong,sub,sup,textarea,tt,u,var [*.java] -ij_java_imports_layout = $*,|,javax.**,java.**,|,jakarta.**,|,io.**,org.**,|,*,|,de.** +max_line_length = 180 +ij_java_imports_layout = $*,|,java.**,|,javax.**,|,jakarta.**,|,org.**,|,com.**,|,* ij_java_builder_methods = given,when,then ij_java_keep_builder_methods_indents = true ij_java_keep_simple_blocks_in_one_line = true diff --git a/src/main/java/de/l3s/learnweb/resource/Resource.java b/src/main/java/de/l3s/learnweb/resource/Resource.java index 37b273d9f..b7acb42d7 100644 --- a/src/main/java/de/l3s/learnweb/resource/Resource.java +++ b/src/main/java/de/l3s/learnweb/resource/Resource.java @@ -541,9 +541,9 @@ public void setTypeFromFormat(String format) { return; } - if (format.equals("text/html") || format.equals("application/xhtml+xml")) { + if (StringUtils.equalsAny(format, "text/html", "application/xhtml+xml")) { this.type = ResourceType.website; - } else if (format.startsWith("text/") || StringUtils.equalsAny(format, "application/json", "application/xml")) { + } else if (format.startsWith("text/") || StringUtils.equalsAny(format, "application/json", "application/xml", "application/sql")) { this.type = ResourceType.text; } else if (format.startsWith("image/")) { this.type = ResourceType.image; diff --git a/src/main/java/de/l3s/learnweb/resource/ted/TedTranscriptBean.java b/src/main/java/de/l3s/learnweb/resource/ted/TedTranscriptBean.java index 3af330485..1dcab3f4d 100644 --- a/src/main/java/de/l3s/learnweb/resource/ted/TedTranscriptBean.java +++ b/src/main/java/de/l3s/learnweb/resource/ted/TedTranscriptBean.java @@ -33,7 +33,6 @@ import de.l3s.learnweb.resource.ResourceService; import de.l3s.learnweb.resource.ResourceType; import de.l3s.learnweb.resource.ted.TedManager.SummaryType; -import de.l3s.learnweb.user.Course; import de.l3s.util.NlpHelper; import de.l3s.util.bean.BeanHelper; @@ -245,7 +244,7 @@ public List getLanguageList() { if (langList.isEmpty()) { languageList.add(new SelectItem("NA", "No Transcripts Available")); } else { - List locales = new ArrayList<>(); + ArrayList locales = new ArrayList<>(); try { for (String lang : langList) { locales.add(LocaleUtils.toLocale(lang)); @@ -272,10 +271,6 @@ public void setResourceId(int resourceId) { this.resourceId = resourceId; } - public List getCourses() { - return getUser().getCourses(); - } - public String getSummaryTextS() { return summaryTextS; } diff --git a/src/main/resources/de/l3s/learnweb/lang/messages.properties b/src/main/resources/de/l3s/learnweb/lang/messages.properties index 4c2223f78..51bbe192e 100644 --- a/src/main/resources/de/l3s/learnweb/lang/messages.properties +++ b/src/main/resources/de/l3s/learnweb/lang/messages.properties @@ -1514,7 +1514,6 @@ tedTranscriptHelp = Video transcript is a relevant resource for learning. Langua tedTranscriptTitle = TED Transcript -ted_transcript.Ok = Ok ted_transcript.owner_of_transcript = Owner of transcript templates = Templates diff --git a/src/main/resources/de/l3s/learnweb/lang/messages_it.properties b/src/main/resources/de/l3s/learnweb/lang/messages_it.properties index 82d05bad1..ae2d06d98 100644 --- a/src/main/resources/de/l3s/learnweb/lang/messages_it.properties +++ b/src/main/resources/de/l3s/learnweb/lang/messages_it.properties @@ -1355,7 +1355,6 @@ tedTranscriptHelp = Le trascrizioni dei video sono una risorsa importante per l' tedTranscriptTitle = Trascrizione del TED -ted_transcript.Ok = OK ted_transcript.owner_of_transcript = Proprietario della trascrizione text_analysis = Analisi del testo diff --git a/src/main/resources/de/l3s/learnweb/lang/messages_xy.properties b/src/main/resources/de/l3s/learnweb/lang/messages_xy.properties index 1bfe4a319..56077d8f3 100644 --- a/src/main/resources/de/l3s/learnweb/lang/messages_xy.properties +++ b/src/main/resources/de/l3s/learnweb/lang/messages_xy.properties @@ -1465,7 +1465,6 @@ tedTranscriptHelp = Help text for transcript tedTranscriptTitle = Title for TED transcript -ted_transcript.Ok = TODO ted_transcript.owner_of_transcript = TODO templates = Header for table with surveys diff --git a/src/main/webapp/WEB-INF/templates/layout/template.xhtml b/src/main/webapp/WEB-INF/templates/layout/template.xhtml index a4e5787c3..d5f48e77f 100644 --- a/src/main/webapp/WEB-INF/templates/layout/template.xhtml +++ b/src/main/webapp/WEB-INF/templates/layout/template.xhtml @@ -26,7 +26,7 @@ - +