expand language codes to language names after adding/editing annotation

This commit is contained in:
j 2014-09-02 15:30:31 +02:00
parent 1556699723
commit d5450840ad

View file

@ -141,6 +141,11 @@ pandora.ui.editor = function(data) {
result.data.date = Ox.formatDate( result.data.date = Ox.formatDate(
result.data.modified.slice(0, 10), '%B %e, %Y' result.data.modified.slice(0, 10), '%B %e, %Y'
); );
result.data.languages = (
result.data.languages || [pandora.site.language]
).map(function(language) {
return Ox.getLanguageNameByCode(language);
});
that.updateAnnotation(data.id, result.data); that.updateAnnotation(data.id, result.data);
Ox.Request.clearCache(); Ox.Request.clearCache();
}; };