public static function RechargerPresentation() { require_once INC_GCSS; require_once INC_GJS; require_once PATH_METIER . 'mListePresentationsModules.php'; require_once PATH_METIER . 'mListeTypesPresentationsModules.php'; $valeur = self::GetValeurPage('presentation', 'active'); self::$presentationChargee = true; // Chargement de la présentation par défaut. if ($valeur == NULL) { $mListeTypesPresentationsModules = new mListeTypesPresentationsModules(); $mListeTypesPresentationsModules->AjouterColSelection(COL_ID); $mListeTypesPresentationsModules->AjouterColSelection(COL_NOMFICHIER); $mListeTypesPresentationsModules->AjouterFiltreEgal(COL_ACTIF, true); $mListeTypesPresentationsModules->Charger(); foreach ($mListeTypesPresentationsModules->GetListe() as $mTypePresentationModule) { GReponse::AjouterElementCSS($mTypePresentationModule->Id(), PATH_SERVER_HTTP . GCss::GetCheminFichierBase() . $mTypePresentationModule->NomFichier() . '.css'); GReponse::AjouterElementJS($mTypePresentationModule->Id(), PATH_SERVER_HTTP . GJs::GetCheminFichierBase() . $mTypePresentationModule->NomFichier() . '.js'); } } else { $mListePresentationsModules = new mListePresentationsModules(); $mListePresentationsModules->AjouterColSelection(COL_RESSOURCECSS); $mListePresentationsModules->AjouterColSelection(COL_RESSOURCEJS); $mListePresentationsModules->AjouterFiltreEgal(COL_PRESENTATION, $valeur); $numJointure = $mListePresentationsModules->AjouterJointure(COL_TYPEPRESENTATIONMODULE, COL_ID, 0, SQL_RIGHT_JOIN); $mListePresentationsModules->AjouterColSelectionPourJointure($numJointure, COL_ID); $mListePresentationsModules->AjouterFiltreEgalPourJointure($numJointure, COL_ACTIF, true); $mListePresentationsModules->Charger(); foreach ($mListePresentationsModules->GetListe() as $mPresentationModule) { if ($mPresentationModule->RessourceCSS() != NULL) { GReponse::AjouterElementCSS($mPresentationModule->TypePresentationModule()->Id(), PATH_SERVER_HTTP . $mPresentationModule->RessourceCSS()); } else { GReponse::AjouterElementCSS($mPresentationModule->TypePresentationModule()->Id(), ''); } if ($mPresentationModule->RessourceJS() != NULL) { GReponse::AjouterElementJS($mPresentationModule->TypePresentationModule()->Id(), PATH_SERVER_HTTP . $mPresentationModule->RessourceJS()); } else { GReponse::AjouterElementJS($mPresentationModule->TypePresentationModule()->Id(), ''); } } } }
$classeur = new SClasseur('', 'presex', true, true); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); $cadre = new SCadre('', GSession::Libelle(LIB_PRS_TABONGLETS), $classeur, true, false); $vue->AttacherCellule(4, 1, $cadre); $cListeCssParties->AjouterElement(GSession::Libelle(LIB_PRS_PRESGEN, false, true), $vue); /*********************************************/ $form = new SForm($prefixIdClass, 2, 1, true, false); $form->SetCadreInputs(1, 1, 1, 1); $form->AjouterInput(1, 1, '', $cListeCssParties, false); $form->SetCadreBoutons(2, 1, 1, 1); $form->AjouterInputButtonModifierDansContexte(1, 1, $nomContexte, false, GSession::Libelle(LIB_PRS_SAUVEGARDER)); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $form); $mListePresentationsModules = new mListePresentationsModules(); $mListePresentationsModules->AjouterColSelection(COL_RESSOURCEJS); $mListePresentationsModules->AjouterFiltreEgal(COL_PRESENTATION, $presentationModif); $numJointure = $mListePresentationsModules->AjouterJointure(COL_TYPEPRESENTATIONMODULE, COL_ID, 0, SQL_RIGHT_JOIN); $mListePresentationsModules->AjouterColSelectionPourJointure($numJointure, COL_ID); $mListePresentationsModules->AjouterFiltreEgalPourJointure($numJointure, COL_ACTIF, true); $mListePresentationsModules->Charger(); foreach ($mListePresentationsModules->GetListe() as $mPresentationModule) { if ($mPresentationModule->RessourceJS() != NULL) { GReponse::AjouterElementJS($mPresentationModule->TypePresentationModule()->Id(), PATH_SERVER_HTTP . $mPresentationModule->RessourceJS(), true); } else { GReponse::AjouterElementJS($mPresentationModule->TypePresentationModule()->Id(), '', true); } } } } }