Skip to content
Extraits de code Groupes Projets
Valider cf96c4e0 rédigé par renato's avatar renato
Parcourir les fichiers

removed the activation of the multilanguage javascript. The library...

removed the activation of the multilanguage javascript. The library multilang.js remains available in the core
parent b5dbaa47
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -172,7 +172,6 @@ function articles_documents($flag_editable, $type, $id)
{
global $spip_lang_left;
$multi_js = "";
if ($GLOBALS['meta']["documents_$type"]!='non' AND $flag_editable) {
$joindre = charger_fonction('joindre', 'inc');
......@@ -196,22 +195,11 @@ function articles_documents($flag_editable, $type, $id)
$("form.form_upload").async_upload(async_upload_portfolio_documents);
</script>
EOF;
if($GLOBALS['meta']['multi_rubriques']=="oui" || $GLOBALS['meta']['multi_articles']=="oui" || $GLOBALS['meta']['multi_secteurs']=="oui") {
$active_langs = "'".str_replace(",","','",$GLOBALS['meta']['langues_multilingue'])."'";
$multi_js = "<script type='text/javascript' src='"._DIR_JAVASCRIPT."multilang.js'></script>\n".
"<script type='text/javascript'>\n".
"var multilang_def_lang='".$GLOBALS["spip_lang"]."';var multilang_avail_langs=[$active_langs];\n".
"$(function(){\n".
"multilang_init_lang({'root':'#portfolio,#documents','forms':'form:not(.form_upload)','fields':'input,textarea'});\n".
"onAjaxLoad(function(){forms_init_multi({'target':this})});\n".
"});\n".
"</script>\n";
}
} else $res = '';
$documenter = charger_fonction('documenter', 'inc');
return $multi_js."<div id='portfolio'>" . $documenter($id, 'article', 'portfolio', $flag_editable) . "</div>"
return "<div id='portfolio'>" . $documenter($id, 'article', 'portfolio', $flag_editable) . "</div>"
. "<div id='documents'>" . $documenter($id, 'article', 'documents', $flag_editable) . "</div>"
. $res;
}
......
......@@ -57,19 +57,6 @@ function articles_edit($id_article, $id_rubrique,$lier_trad, $id_version, $new,
debut_gauche();
// Pave "documents associes a l'article"
$multi_js = "";
if($GLOBALS['meta']['multi_rubriques']=="oui" || $GLOBALS['meta']['multi_articles']=="oui" || $GLOBALS['meta']['multi_secteurs']=="oui") {
$active_langs = "'".str_replace(",","','",$GLOBALS['meta']['langues_multilingue'])."'";
$multi_js = "<script type='text/javascript' src='"._DIR_JAVASCRIPT."multilang.js'></script>\n".
"<script type='text/javascript'>\n".
"var multilang_def_lang='".$GLOBALS["spip_lang"]."';var multilang_avail_langs=[$active_langs];\n".
"$(function(){\n".
"multilang_init_lang({'root':'#page','forms':'#liste_images form,#liste_documents form','fields':'input,textarea'});\n".
"onAjaxLoad(function(){forms_init_multi({'target':this})});\n".
"});\n".
"</script>\n";
}
echo $multi_js;
if (!$new){
# affichage sur le cote des pieces jointes, en reperant les inserees
......
......@@ -59,19 +59,6 @@ global
$commencer_page = charger_fonction('commencer_page', 'inc');
$out .= $commencer_page("&laquo; $titre_mot &raquo;", "naviguer", "mots");
$multi_js = "";
if($GLOBALS['meta']['multi_rubriques']=="oui" || $GLOBALS['meta']['multi_articles']=="oui" || $GLOBALS['meta']['multi_secteurs']=="oui") {
$active_langs = "'".str_replace(",","','",$GLOBALS['meta']['langues_multilingue'])."'";
$multi_js = "<script type='text/javascript' src='"._DIR_JAVASCRIPT."multilang.js'></script>\n".
"<script type='text/javascript'>\n".
"var multilang_def_lang='".$GLOBALS["spip_lang"]."';var multilang_avail_langs=[$active_langs];\n".
"$(function(){\n".
"multilang_init_lang({'root':'.cadre-formulaire','fields':'input[@name=\'titre\'],textarea'});\n".
"});\n".
"</script>\n";
}
$out .= $multi_js;
$out .= debut_gauche('',true);
......
......@@ -60,20 +60,6 @@ function exec_mots_type_dist()
$commencer_page = charger_fonction('commencer_page', 'inc');
echo $commencer_page("&laquo; $titre &raquo;", "naviguer", "mots");
$multi_js = "";
if($GLOBALS['meta']['multi_rubriques']=="oui" || $GLOBALS['meta']['multi_articles']=="oui" || $GLOBALS['meta']['multi_secteurs']=="oui") {
$active_langs = "'".str_replace(",","','",$GLOBALS['meta']['langues_multilingue'])."'";
$multi_js = "<script type='text/javascript' src='"._DIR_JAVASCRIPT."multilang.js'></script>\n".
"<script type='text/javascript'>\n".
"var multilang_def_lang='".$GLOBALS["spip_lang"]."';var multilang_avail_langs=[$active_langs];\n".
"$(function(){\n".
"multilang_init_lang({'root':'#page','form_menu':'div.cadre-formulaire:eq(0)','fields':'input[@name=\'change_type\'],textarea'});\n".
"});\n".
"</script>\n";
}
echo $multi_js;
debut_gauche();
echo pipeline('affiche_gauche',array('args'=>array('exec'=>'mots_types','id_groupe'=>$id_groupe),'data'=>''));
......
......@@ -365,7 +365,6 @@ function contenu_naviguer($id_rubrique, $id_parent) {
function naviguer_doc ($id, $type = "article", $script, $flag_editable) {
global $spip_lang_left;
$multi_js = "";
if ($GLOBALS['meta']["documents_$type"]!='non' AND $flag_editable) {
$joindre = charger_fonction('joindre', 'inc');
......@@ -387,22 +386,11 @@ function naviguer_doc ($id, $type = "article", $script, $flag_editable) {
$(".form_upload").async_upload(async_upload_portfolio_documents);
</script>
EOF;
if($GLOBALS['meta']['multi_rubriques']!="oui" && $GLOBALS['meta']['multi_secteurs']!="oui") {
$active_langs = "'".str_replace(",","','",$GLOBALS['meta']['langues_multilingue'])."'";
$multi_js = "<script type='text/javascript' src='"._DIR_JAVASCRIPT."multilang.js'></script>\n".
"<script type='text/javascript'>\n".
"var multilang_def_lang='".$GLOBALS["spip_lang"]."';var multilang_avail_langs=[$active_langs];\n".
"$(function(){\n".
"multilang_init_lang({'root':'#portfolio,#documents','forms':'form:not(.form_upload)','fields':'input,textarea'});\n".
"onAjaxLoad(function(){forms_init_multi({'target':this})});\n".
"});\n".
"</script>\n";
}
} else $res ='';
$documenter = charger_fonction('documenter', 'inc');
return $multi_js."<div id='portfolio'>".$documenter($id, $type, 'portfolio', $flag_editable)."</div>"
return "<div id='portfolio'>".$documenter($id, $type, 'portfolio', $flag_editable)."</div>"
."<div id='documents'>". $documenter($id, $type, 'documents', $flag_editable)."</div>"
. $res;
}
......
......@@ -82,19 +82,6 @@ function exec_rubriques_edit_dist()
debut_gauche();
// Pave "documents associes a la rubrique"
$multi_js = "";
if($GLOBALS['meta']['multi_rubriques']!="oui" && $GLOBALS['meta']['multi_secteurs']!="oui") {
$active_langs = "'".str_replace(",","','",$GLOBALS['meta']['langues_multilingue'])."'";
$multi_js = "<script type='text/javascript' src='"._DIR_JAVASCRIPT."multilang.js'></script>\n".
"<script type='text/javascript'>\n".
"var multilang_def_lang='".$GLOBALS["spip_lang"]."';var multilang_avail_langs=[$active_langs];\n".
"$(function(){\n".
"multilang_init_lang({'root':'#page','forms':'#liste_images form,#liste_documents form:not(.form_upload) , div.cadre-formulaire form','fields':'input,textarea'});\n".
"onAjaxLoad(function(){forms_init_multi({'target':this})});\n".
"});\n".
"</script>\n";
}
echo $multi_js;
if (!$new){
# affichage sur le cote des pieces jointes, en reperant les inserees
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter