/*--------------------------*/ /* Category */ /*--------------------------*/ /** * toggle section defined by its id */ function toggleSection(id_section) { $(id_section).toggle(); } /** * toggle all sections except price and general */ function toggleAllSection(css_selector) { var elements = $$(css_selector); for( i=0; i < elements.length ; i++ ) { toggleSection( elements[i].id ); } } /*------------------------------*/ /* ChangeWorkingCultureHelper */ /*------------------------------*/ /** * Close all the WorkingCulture selector * * @param id_zone string the current workingCulture selector * @param culture the new selected culture * @return */ function toggleAllWorkingCulture(culture) { selectors = $$(".presta_workingCultureSelector dt a"); for(var i = 0; i < selectors.length ; i++) { selectors[i].innerHTML = culture; } $$("dd.working_culture_list").invoke("hide"); } /** * Default function for the helper who change the display in function of the working culture * * @param a_culture array all authorized culture * @param newCulture string the new selected culture * @return */ function changeWorkingCulture( a_culture, newCulture ) { for (var j = 0; j < a_culture.length; j++) { $$(".presta_pageContentByCulture[culture="+a_culture[j]+"]").each(function(el){ if (a_culture[j] != newCulture) { el.hide(); } else { el.show(); } }); } } /** * hide all input or container with culture whiwh is not the current * * @param culture String - the current culture * @param parents Array - list of id where to search * * @deprecated - use workingCultureManager */ function initWorkingCultureContent(culture, parents) { for( var i=0; i