Skip to content
Snippets Groups Projects
Commit b1cb93b1 authored by aboeckle's avatar aboeckle
Browse files

OO-4678: Reload catalog on config change and i18n change

(cherry picked from commit ca86d740)
parent e7dbbe1e
No related branches found
No related tags found
No related merge requests found
......@@ -88,17 +88,6 @@ public class CatalogAdminController extends FormBasicController {
String[] addEntryKeys = {AddEntryPosition.alphabetical.name(), AddEntryPosition.top.name(), AddEntryPosition.bottom.name()};
String[] addEntryValues = {translate("catalog.add.position." + AddEntryPosition.alphabetical.name()), translate("catalog.add.position." + AddEntryPosition.top.name()), translate("catalog.add.position." + AddEntryPosition.bottom.name())};
addEntryPosEl = uifactory.addDropdownSingleselect("catalog.add.entry.position", "catalog.add.entry.position", formLayout, addEntryKeys, addEntryValues);
if (repositoryModule.getCatalogAddEntryPosition() == 2) {
addEntryPosEl.select(AddEntryPosition.bottom.name(), true);
} else if (repositoryModule.getCatalogAddEntryPosition() == 1) {
addEntryPosEl.select(AddEntryPosition.top.name(), true);
} else {
addEntryPosEl.select(AddEntryPosition.alphabetical.name(), true);
}
addEntryPosEl.setEnabled(enabled);
addEntryPosEl.addActionListener(FormEvent.ONCHANGE);
addCategoryPosEl = uifactory.addDropdownSingleselect("catalog.add.category.position", "catalog.add.category.position", formLayout, addEntryKeys, addEntryValues);
if (repositoryModule.getCatalogAddCategoryPosition() == 2) {
addCategoryPosEl.select(AddEntryPosition.bottom.name(), true);
......@@ -110,6 +99,17 @@ public class CatalogAdminController extends FormBasicController {
addCategoryPosEl.setEnabled(enabled);
addCategoryPosEl.addActionListener(FormEvent.ONCHANGE);
addEntryPosEl = uifactory.addDropdownSingleselect("catalog.add.entry.position", "catalog.add.entry.position", formLayout, addEntryKeys, addEntryValues);
if (repositoryModule.getCatalogAddEntryPosition() == 2) {
addEntryPosEl.select(AddEntryPosition.bottom.name(), true);
} else if (repositoryModule.getCatalogAddEntryPosition() == 1) {
addEntryPosEl.select(AddEntryPosition.top.name(), true);
} else {
addEntryPosEl.select(AddEntryPosition.alphabetical.name(), true);
}
addEntryPosEl.setEnabled(enabled);
addEntryPosEl.addActionListener(FormEvent.ONCHANGE);
}
@Override
......
......@@ -5,9 +5,9 @@ admin.menu.title.alt=Katalog
catalog.add.entry.position=Neue Eintr\u00e4ge hinzuf\u00fcgen
catalog.add.category.position=Neue Kategorien hinzuf\u00fcgen
catalog.add.multiple.entries=Mehrere Eintr\u00e4ge zusammen hinzuf\u00fcgen
catalog.add.position.alphabetical=Alphabtisch
catalog.add.position.bottom=Am Ende
catalog.add.position.top=Am Anfang
catalog.add.position.alphabetical=Automatische Sortierung - Alphabtisch
catalog.add.position.bottom=Manuelle Sortierung - Am Ende
catalog.add.position.top=Manuelle Sortierung - Am Anfang
catalog.browsing=Katalog in "Kurse"
catalog.enable=Katalog einschalten
catalog.site=Katalog in eigener Site
......
......@@ -5,9 +5,9 @@ admin.menu.title.alt=Catalog
catalog.add.entry.position=Add new entries
catalog.add.category.position=Add new categories
catalog.add.multiple.entries=Add multiple entries at once
catalog.add.position.alphabetical=Alphabetical
catalog.add.position.bottom=At the end
catalog.add.position.top=At the beginning
catalog.add.position.alphabetical=Automatic sorting - Alphabetical
catalog.add.position.bottom=Manual sorting - At the end
catalog.add.position.top=Manual sorting - At the beginning
catalog.enable=Enable catalog
catalog.browsing=Catalog in "Courses"
catalog.site=Catalog in its own site
......
......@@ -906,6 +906,8 @@ public class CatalogNodeManagerController extends FormBasicController implements
protected void event(UserRequest ureq, Controller source, Event event) {
if(addEntryCtrl == source) {
if(event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
loadEntryInfos();
loadResources(ureq);
loadNodesChildren();
}
cmc.deactivate();
......@@ -914,8 +916,9 @@ public class CatalogNodeManagerController extends FormBasicController implements
} else if(editEntryCtrl == source) {
if(event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
catalogEntry = editEntryCtrl.getEditedCatalogEntry();
loadNodesChildren();
loadEntryInfos();
loadResources(ureq);
loadNodesChildren();
}
cmc.deactivate();
cleanUp();
......@@ -929,8 +932,10 @@ public class CatalogNodeManagerController extends FormBasicController implements
moveMe = categoryMoveCtrl.getMoveMe();
} else if(event.equals(Event.FAILED_EVENT)){
showError("tools.move.catalog.entry.failed");
loadNodesChildren();
}
loadEntryInfos();
loadResources(ureq);
loadNodesChildren();
cleanUp();
// in any case, remove the lock
......@@ -959,7 +964,9 @@ public class CatalogNodeManagerController extends FormBasicController implements
toolbarPanel.popUpToController(this);
removeAsListenerAndDispose(childNodeCtrl);
childNodeCtrl = null;
loadEntryInfos();
loadResources(ureq);
loadNodesChildren();
}
} else if(entrySearchCtrl == source) {
......
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