Jump to content

Strana visualizzazione lingue nel back office


sergiodub
 Share

Recommended Posts

Salve,

dopo l'aggiornamento da 1.5.6.2  a  1.6.0.14 tutti i campi multilingua del back office mi vengono mostrati di seguito invece che selezionabili uno ad uno (vedi immagine allegata).

Qualcuno sa aiutarmi?

Non credo sia un problema di browser (uso chrome) perché con altre installazioni di prestashop 1.6 le lingue si visualizzano normalmente.

 

lingue.jpg

Share this post


Link to post
Share on other sites

I'm not very good with javascript, I think this is the section in question, but I do not know what to change.

Can you kindly help me?

 



function toggleLanguageFlags(elt)
{
$(elt).parents('.displayed_flag').siblings('.language_flags').toggle();
}

// Kept for retrocompatibility only (out of AdminProducts & AdminCategories)
function changeLanguage(field, fieldsString, id_language_new, iso_code)
{
$('div[id^='+field+'_]').hide();
var fields = fieldsString.split('¤');
for (var i = 0; i < fields.length; ++i)
{
$('div[id^='+fields[i]+'_]').hide();
$('#'+fields[i]+'_'+id_language_new).show();
$('#'+'language_current_'+fields[i]).attr('src', '../img/l/' + id_language_new + '.jpg');
}
$('#languages_' + field).hide();
id_language = id_language_new;
}

// kept for retrocompatibility - you should use hideOtherLanguage(id) since 1.6
function changeFormLanguage(id_language_new, iso_code, employee_cookie)
{
$('.translatable').each(function() {
$(this).find('.lang_' + id_language_new)
.show()
.siblings('div:not(.displayed_flag):not(.clear)').hide();
$(this).find('.language_current').attr('src', '../img/l/' + id_language_new + '.jpg');
});

// For multishop checkboxes
$('.multishop_lang_'+id_language_new).show().siblings('div[class^=\'multishop_lang_\']').hide();
id_language = id_language_new;
changeEmployeeLanguage();
updateCurrentText();
}

function displayFlags(languages, defaultLanguageID, employee_cookie)
{
if ($('.translatable'))
{
$('.translatable').each(function() {
if (!$(this).find('.displayed_flag').length > 0) {
$.each(languages, function(key, language) {
if (language['id_lang'] == defaultLanguageID)
{
defaultLanguage = language;
return false;
}
});
var displayFlags = $('<div></div>')
.addClass('displayed_flag')
.append($('<img>')
.addClass('language_current')
.addClass('pointer')
.attr('src', '../img/l/' + defaultLanguage['id_lang'] + '.jpg')
.attr('alt', defaultLanguage['name'])
.click(function() {
toggleLanguageFlags(this);
})
);
var languagesFlags = $('<div></div>')
.addClass('language_flags')
.html(choose_language_translate+':<br /><br />');
$.each(languages, function(key, language) {
var img = $('<img>')
.addClass('pointer')
.css('margin', '2px 2px')
.attr('src', '../img/l/' + language['id_lang'] + '.jpg')
.attr('alt', language['name'])
.click(function() {
changeFormLanguage(language['id_lang'], language['iso_code'], employee_cookie);
});
languagesFlags.append(img);
});
if ($(this).find('p:last-child').hasClass('clear'))
$(this).find('p:last-child').before(displayFlags).before(languagesFlags);
else
$(this).append(displayFlags).append(languagesFlags);
}
});
}
}


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More