Skip to content

Commit

Permalink
chore: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
astappiev committed Jan 23, 2024
1 parent d29d077 commit 4adb1bc
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
12 changes: 10 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/l3s/learnweb/resource/Resource.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -245,7 +244,7 @@ public List<SelectItem> getLanguageList() {
if (langList.isEmpty()) {
languageList.add(new SelectItem("NA", "No Transcripts Available"));
} else {
List<Locale> locales = new ArrayList<>();
ArrayList<Locale> locales = new ArrayList<>();
try {
for (String lang : langList) {
locales.add(LocaleUtils.toLocale(lang));
Expand All @@ -272,10 +271,6 @@ public void setResourceId(int resourceId) {
this.resourceId = resourceId;
}

public List<Course> getCourses() {
return getUser().getCourses();
}

public String getSummaryTextS() {
return summaryTextS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/templates/layout/template.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<h:outputScript name="bundle/learnweb.main.js"/>
<h:outputScript name="learnweb/js/layout.js"/>

<ui:fragment rendered="#{userBean.trackingEnabled}">
<ui:fragment rendered="#{userBean.trackingEnabled and not empty userBean.trackerApiKey}">
<script>
if (window.self === window.top) {
window.wapsTrackerData = {
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/lw/ted_transcript.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<div class="mt-2 d-flex justify-content-between">
<p:defaultCommand target="userinput_ok"/>
<p:commandButton id="userinput_cancel" value="#{msg.cancel}" onclick="getUserText('cancel'); return false;"></p:commandButton>
<p:commandButton id="userinput_ok" value="#{msg['ted_transcript.Ok']}" onclick="getUserText('ok'); return false;"></p:commandButton>
<p:commandButton id="userinput_ok" value="#{msg.save}" onclick="getUserText('ok'); return false;"></p:commandButton>
</div>
</h:form>
</p:dialog>
Expand Down

0 comments on commit 4adb1bc

Please sign in to comment.