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

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

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