diff --git a/lib/object_coordination/adminnode/adminnode.php b/lib/object_coordination/adminnode/adminnode.php index f06e5e4..b4fa8f1 100755 --- a/lib/object_coordination/adminnode/adminnode.php +++ b/lib/object_coordination/adminnode/adminnode.php @@ -279,7 +279,7 @@ Class AdminNode extends CoordinationObj $arrayCallJs[] = "data/javascript/bootstrap-toggle/2.2.2/bootstrap-toggle.min.js"; mxCallJs($arrayCallJs); - $arrayRawJs[] = "function imgPicto(){if(document.getElementById){if(document.getElementById(\"modifNode\")){var obj=document.getElementById(\"template\");document.getElementById(\"pictoObject\").src=\"data/template/\"+obj.options[(obj.selectedIndex)].value+\"/media/picto/node/\"+document.getElementById(\"modifNode\").iconeN.options[(document.getElementById(\"modifNode\").iconeN.selectedIndex)].value;}}else if(document.all){if(document.all[\"modifNode\"]){document.all[\"pictoObject\"].src=\"data/template/\"+obj.options[(obj.selectedIndex)].value+\"/media/picto/node/\"+document.all[\"modifNode\"].iconeN.options[(document.all[\"modifNode\"].iconeN.selectedIndex)].value;}}}function imgTemplate(){if(document.getElementById){if(document.getElementById(\"modifNode\")){document.getElementById(\"screenTemplate\").src=\"data/template/\"+document.getElementById(\"template\").value+\"/preview.png\";}}else if(document.all){if(document.all[\"modifNode\"]){var obj=document.getElementById(\"template\");document.all[\"modifNode\"].screenTemplate.src=\"data/template/\"+obj.options[(obj.selectedIndex)].value+\"/preview.png\";}}}\$(document).ready(imgTemplate());"; + $arrayRawJs[] = "function imgPicto(){if(document.getElementById){if(document.getElementById(\"modifNode\")){var obj=document.getElementById(\"template\");document.getElementById(\"pictoObject\").src=\"data/image/icons/node/\"+document.getElementById(\"modifNode\").iconeN.options[(document.getElementById(\"modifNode\").iconeN.selectedIndex)].value;}}else if(document.all){if(document.all[\"modifNode\"]){document.all[\"pictoObject\"].src=\"data/image/icons/node/\"+document.all[\"modifNode\"].iconeN.options[(document.all[\"modifNode\"].iconeN.selectedIndex)].value;}}}function imgTemplate(){if(document.getElementById){if(document.getElementById(\"modifNode\")){document.getElementById(\"screenTemplate\").src=\"data/template/\"+document.getElementById(\"template\").value+\"/preview.png\";}}else if(document.all){if(document.all[\"modifNode\"]){var obj=document.getElementById(\"template\");document.all[\"modifNode\"].screenTemplate.src=\"data/template/\"+obj.options[(obj.selectedIndex)].value+\"/preview.png\";}}}\$(document).ready(imgTemplate());"; mxRawJs($arrayRawJs); /* On inclus la template (voir package.template.php) */ @@ -308,7 +308,7 @@ Class AdminNode extends CoordinationObj # Affichage de la liste déroulante # Détermine le chemin des icones - $chemintotal = $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/node/"; + $chemintotal = $GLOBALS['CONF_DATA_PATH']."data/image/icons/node/"; /* -- Affichage des Group d'ajout */ // $tabTreeGroup=$GLOBALS["SYSTEM_CONTROL"]->arrayOfAdministrableGroup($nodeId); @@ -341,8 +341,10 @@ Class AdminNode extends CoordinationObj } @closedir($handle); asort($tabIcone); -// $GLOBALS['SYSTEM_TEMPLATE']->MxSelect("ToHidde.icone", "iconeN", $Node->getIcone(), $tabIcone, '', '', 'id=iconeN', "class=\"form-control\""); - $GLOBALS['SYSTEM_TEMPLATE']->MxSelect("ToHidde".".icone", "iconeN", $Node->getIcone(), $tabIcone, '', '', 'id="iconeN"', "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeIcon"), ENT_QUOTES)."\"", getMessage("txtNodeIcon")); +// var_dump($Node->getIcone()); + if ( $Node->getIcone() == "") $nodeIcone = "defaultnode.gif"; else $nodeIcone = $Node->getIcone(); +// var_dump($nodeIcone); + $GLOBALS['SYSTEM_TEMPLATE']->MxSelect("ToHidde".".icone", "iconeN", $nodeIcone, $tabIcone, '', '', 'id="iconeN"', "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeIcon"), ENT_QUOTES)."\"", getMessage("txtNodeIcon")); /* Affichage des templates */ @@ -369,8 +371,7 @@ Class AdminNode extends CoordinationObj reset($tabTemplate); $GLOBALS['SYSTEM_TEMPLATE']->MxSelect("ToHidde.template", "template_name", $Node->getTemplate(), $tabTemplate, '', '', 'id="template"', "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeTemplate"), ENT_QUOTES)."\"", getMessage("txtNodeTemplate")); -// $GLOBALS["SYSTEM_TEMPLATE"]->MxImage("ToHidde.pictoObject", $GLOBALS['SYSTEM_TEMPLATE_PATH']."default/media/picto/node/defaultnode.gif", getMessage("PreviewPicto")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxImage("ToHidde.pictoObject", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/node/".$Node->getIcone(), getMessage("PreviewPicto")); + $GLOBALS["SYSTEM_TEMPLATE"]->MxImage("ToHidde.pictoObject", $GLOBALS['CONF_DATA_PATH']."data/image/icons/node/".$nodeIcone, getMessage("PreviewPicto")); $GLOBALS["SYSTEM_TEMPLATE"]->MxImage("ToHidde.screenTemplate", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."preview.png", getMessage("PreviewTemplate")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.ctype", "text", "node_ctype", htmlentitiesconv($Node->getCType()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeType"), ENT_QUOTES)."\"", getMessage("txtNodeType")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.ctypereg", "text", "node_ctypereg", htmlentitiesconv($Node->getCTypereg()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeTypereg"), ENT_QUOTES)."\"", getMessage("txtNodeTypereg")); @@ -577,7 +578,7 @@ Class AdminNode extends CoordinationObj # Affichage de la liste déroulante # Détermine le chemin des icones - $chemintotal = $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/node/"; + $chemintotal = $GLOBALS['CONF_DATA_PATH']."data/image/icons/node/"; $tabTreeNode[0]=$myTree; printTabTreeNode($tabTreeNode, $node_id, "NODE", "node_id", false);