fix #976 edit : character change when editing with thesaurus

fix also display caption junk when a thesaurus term has no entry in the current language
This commit is contained in:
jygaulier
2012-10-31 10:42:51 +01:00
parent 409e0b1285
commit b79a9ba30b
2 changed files with 3 additions and 3 deletions

View File

@@ -470,7 +470,7 @@ class caption_Field_Value implements cache_cacheableInterface
break;
}
$synonyms = $XPATH_thesaurus->query("sy[@lng='" . $session->usr_i18 . "']", $node->parentNode);
$synonyms = $XPATH_thesaurus->query("sy[@lng='" . $session->get_I18n() . "']", $node->parentNode);
foreach ($synonyms as $synonym) {
$k = $synonym->getAttribute("k");
if ($synonym->getAttribute("w") != $term_noacc || $k != $context_noacc) {

View File

@@ -417,7 +417,7 @@ function updateCurrentMval(meta_struct_id, HighlightValue, vocabularyId)
+ '<table><tr><td>'
+ extra
+ '<span class="value" vocabId="' + (value.getVocabularyId() ? value.getVocabularyId() : '') + '">'
+ word
+ $('<div/>').text(word).html()
+ "</span></td><td class='options'>"
+ '<a href="#" class="add_all"><img src="/skins/icons/plus11.png"/></a> '
+ '<a href="#" class="remove_all"><img src="/skins/icons/minus11.png"/></a>'
@@ -1288,7 +1288,7 @@ function edit_dblclickThesaurus(event) // ondblclick dans le thesaurus
case "TH_W":
if(p4.edit.curField >= 0)
{
var w = e.innerHTML;
var w = $(e).text();
if(p4.edit.T_fields[p4.edit.curField].multi)
{
$("#EditTextMultiValued", p4.edit.editBox).val(w);