public function __construct($titre, $idDeclencheur, $class, $id = '', $idTab = '') { parent::__construct($class, $id, $idTab); $popDiv = new SBalise(BAL_DIV); $popDiv->AddClass(TYPEPOP_SLIDECLICK); parent::Attach($popDiv); $declencheur = new SBalise(BAL_DIV); $declencheur->AddClass('jq_popdiv_declencheur'); $declencheur->SetText($idDeclencheur); $popDiv->Attach($declencheur); $bal = new SBalise(BAL_DIV); $bal->AddProp(PROP_ID, $idDeclencheur); $tab = new STableau(true); $tab->AddLigne(); $cellule = $tab->AddCellule(); $element = new SElement($class . ''); $element->SetText('+'); $cellule = $tab->AddCellule(); $element = new SElement($class . ''); $element->SetText($titre); $bal->Attach($tab); $popDiv->Attach($bal); $this->div = new SBalise(BAL_DIV); $this->div->AddClass('jq_popdiv_div'); $popDiv->Attach($this->div); }
public function __construct($titre = '', $titreListeGauche = '', $titreListeDroite = '', $elementsListeGauche = '', $elementsListeDroite = '') { parent::__construct(); if ($titre !== '') { $this->AddLigne(); $cellule = $this->AddCellule(); $cellule->SetText($titre); } $this->AddLigne(); $cellule = $this->AddCellule(); $conteneur = new SBalise(BAL_DIV); $conteneur->AddProp(PROP_CLASS, $class); $cellule->Attach($conteneur); $tabListe = new Tableau(); $conteneur->Attach($tabListe); if ($titreListeGauche !== '' && $titreListeDroite !== '') { $tabListe->AddLigne(); $cellule = $tabListe->AddCellule(); $cellule->SetText($titreListeGauche); $cellule = $tabListe->AddCellule(); $cellule->SetText($titreListeDroite); } $tabListe->AddLigne(); $this->listeGauche = $tabListe->AddCellule(); $this->listeDroite = $tabListe->AddCellule(); if ($elementsListeGauche !== '' && is_array($elementsListeGauche)) { $this->RemplirListeGauche($elementsListeGauche); } if ($elementsListeDroite !== '' && is_array($elementsListeDroite)) { $this->RemplirListeDroite($elementsListeDroite); } }
public function FabriquerNouvelInput($type, $valeur, $prefixIdClass, $label = '', $placeLabel = INPUTLABELPLACE_GAUCHE) { $element = null; $input = null; switch ($type) { case INPUTTYPE_SELECT: $input = new SInputSelect($prefixIdClass); if (is_array($valeur)) { while (list($i, $val) = each($valeur)) { $input->AjouterElement($val[COL_ID], $val[COL_LIBELLE], $val[COL_DESCRIPTION]); } } break; case INPUTTYPE_TEXT: $input = new SInputText($prefixIdClass, $valeur); break; case INPUTTYPE_BUTTON: $input = new SInputButton($prefixIdClass, $valeur); break; } if ($label !== '' && $input != null) { $element = new STableau(); $element->AddLigne(); if ($placeLabel == INPUTLABELPLACE_HAUT) { $cellule = $element->AddCellule(); $elem = new SElement($prefixIdClass . INPUT_LABEL); $elem->SetText($label); $cellule->Attach($elem); $element->AddLigne(); } else { if ($placeLabel == INPUTLABELPLACE_GAUCHE) { $cellule = $element->AddCellule(); $elem = new SElement($prefixIdClass . INPUT_LABEL); $elem->SetText($label); $cellule->Attach($elem); } } $cellule = $element->AddCellule(); $cellule->Attach($input); } else { $element = $input; } return $element; }
public function __construct($prefixIdClass, $label = '', $prefixIdComp = '') { parent::__construct(); $this->prefixIdClass = $prefixIdClass; $this->prefixIdComp = $prefixIdComp; $this->AddLigne(); if ($label !== '') { $cellule = $this->AddCellule(); $cellule->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_LABEL); $cellule->SetText($label); } $cellule = $this->AddCellule(); $cellule->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_CONTENU); $select = new SBalise(BAL_DIV); $select->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_SELECT); $cellule->Attach($select); $info = new SBalise(BAL_DIV); $info->AddProp(PROP_ID, $this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $info->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_INFO); $cellule->Attach($info); $selectTab = new STableau(true); $select->Attach($selectTab); $selectTab->AddLigne(); $cellule = $selectTab->AddCellule(); $cellule->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_VALEUR); $edit = new SInput($this->prefixIdClass . $this->prefixIdComp . SELECT_VALEUREDIT, 'text', '', $this->prefixIdClass . SELECT_VALEUREDIT); $jsFonc = new JsFonction(JS_INPUTSELECT_ONKEYUP_NAME, 4); $jsFonc->AddParamEvent(); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $edit->AddProp(PROP_ONKEYUP, $jsFonc->BuildJS()); $jsFonc = new JsFonction(JS_INPUTSELECT_ONFOCUS_NAME, 3); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $edit->AddProp(PROP_ONFOCUS, $jsFonc->BuildJS()); $jsFonc = new JsFonction(JS_INPUTSELECT_ONBLUR_NAME, 3); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $edit->AddProp(PROP_ONBLUR, $jsFonc->BuildJS()); $cellule->Attach($edit); $cellule = $selectTab->AddCellule(); $cellule->AddProp(PROP_ID, $this->prefixIdClass . $this->prefixIdComp . SELECT_DEROULEUR); $cellule->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_DEROULEUR); $jsFonc = new JsFonction(JS_INPUTSELECT_ONCLICK_NAME, 3); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $cellule->AddProp(PROP_ONCLICK, $jsFonc->BuildJS()); $jsFonc = new JsFonction(JS_INPUTSELECT_ONMOUSEOVER_NAME, 4); $jsFonc->AddParamThis(); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $cellule->AddProp(PROP_ONMOUSEOVER, $jsFonc->BuildJS()); $jsFonc = new JsFonction(JS_INPUTSELECT_ONMOUSEOUT_NAME, 4); $jsFonc->AddParamThis(); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_VALEUREDIT); $jsFonc->AddParamText($this->prefixIdClass . $this->prefixIdComp . SELECT_INFO); $cellule->AddProp(PROP_ONMOUSEOUT, $jsFonc->BuildJS()); $cellule->SetText('v'); $selectTab->AddLigne(); $cellule = $selectTab->AddCellule(); $cellule->AddProp(PROP_COLSPAN, 2); $liste = new SBalise(BAL_DIV); $liste->AddProp(PROP_ID, $this->prefixIdClass . $this->prefixIdComp . SELECT_LISTE); $liste->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_LISTE); $cellule->Attach($liste); $this->liste = new STableau(); $this->liste->AddProp(PROP_CLASS, $this->prefixIdClass . SELECT_LISTETAB); $liste->Attach($this->liste); }
public function BuildHTML() { if ($this->isCellDom === false && $this->equiCellules === true) { $ligne = $this->GetPlusGrandeLigne(); $numCellule = 0; for ($j = 1; $j <= $this->nbColonnes; $j++) { if (array_key_exists($j, $this->tableau[$ligne['NUMERO']])) { $numCellule++; if ($numCellule === $ligne['NBCELL']) { $this->AjouterPropCellule($ligne['NUMERO'], $j, PROP_STYLE, 'width:' . (100 - ($ligne['NBCELL'] - 1) * intval(100 / $ligne['NBCELL'])) . '%'); } else { $this->AjouterPropCellule($ligne['NUMERO'], $j, PROP_STYLE, 'width:' . intval(100 / $ligne['NBCELL']) . '%'); } } } } for ($i = 1; $i <= $this->nbLignes; $i++) { $hasCellule = false; for ($j = 1; $j <= $this->nbColonnes; $j++) { if (array_key_exists($j, $this->tableau[$i])) { if ($hasCellule === false) { $ligne = $this->AddLigne(); $hasCellule = true; while (list($propName, $propVal) = each($this->lignesProp[$i])) { $ligne->AddProp($propName, $propVal); } } $cellule = $this->AddCellule(); while (list($propName, $propVal) = each($this->tableau[$i][$j][SORG_CELLPROP])) { $cellule->AddProp($propName, $propVal); } $cellLargeur = $this->tableau[$i][$j][SORG_CELLLARGEUR]; if ($cellLargeur > 1) { $cellule->AddProp(PROP_COLSPAN, $cellLargeur); } $cellHauteur = $this->tableau[$i][$j][SORG_CELLHAUTEUR]; if ($cellHauteur > 1) { $cellule->AddProp(PROP_ROWSPAN, $cellHauteur); } for ($k = 0; array_key_exists($k, $this->tableau[$i][$j][SORG_CELLATTACH]); $k++) { $balise = $this->tableau[$i][$j][SORG_CELLATTACH][$k]; if ($balise != NULL) { $cellule->Attach($balise); } } $texte = $this->tableau[$i][$j][SORG_CELLTEXTE]; if ($texte != NULL) { $cellule->SetText($texte); } } } } return parent::BuildHTML(); }
//$cadreInfo->AjouterPropCellule(1, 3, PROP_ID, CADRE_INFO_AJAX); $cadreInfo->AjouterPropCellule(1, 4, PROP_WIDTH, '50%'); $cadreInfo->AjouterPropCellule(1, 5, PROP_ID, CADRE_INFO_LANGUE); $cadreInfo->AjouterPropCellule(1, 6, PROP_ID, CADRE_INFO_COMMUNAUTE); $cadreInfo->AjouterPropCellule(2, 1, PROP_ID, CADRE_INFO_ERREUR); $elem = new SElement(FORM_ERREURS); $cadreInfo->AttacherCellule(2, 1, $elem); $cellule->Attach($cadreInfo); // Cadre qui permet de redimensionner l'image (passée comme background-image au body) en fonction de la résolution d'affichage du client. $backgroundCadre = new SBalise(BAL_DIV); $backgroundCadre->AddProp(PROP_ID, CADRE_BACKGROUND); $image = new SImage('', '', ''); $image->AddProp(PROP_ID, CADRE_BACKGROUND . '_image'); $backgroundCadre->Attach($image); // Cadre qui contient tout le reste (menu, contenu, pub, ...). $mainCadre = new STableau(); $mainCadre->AddProp(PROP_ID, CADRE_PRINCIPAL); $org = new SOrganiseur(2, 3, true, false); $org->AddProp(PROP_ID, 'tab_contenu'); $org->AjouterPropCellule(1, 2, PROP_ID, CADRE_BANNIERE); $org->AjouterPropCellule(2, 1, PROP_ID, CADRE_MENU); $org->AjouterPropCellule(2, 2, PROP_ID, CADRE_CONTENU); $org->AjouterPropCellule(2, 3, PROP_ID, CADRE_CHAT); $cadreBanniere = new SElemOrg(4, 3, CADRE_BANNIERE, true, false, true); $cadreBanniere->FusionnerCellule(2, 1, 1, 0); $cadreBanniere->FusionnerCellule(2, 3, 1, 0); $cadreBanniere->AjouterClasseCellule(1, 2, CADRE_BANNIERE . CADRE_H); $cadreBanniere->AjouterClasseCellule(1, 1, CADRE_BANNIERE . CADRE_HG); $cadreBanniere->AjouterClasseCellule(2, 1, CADRE_BANNIERE . CADRE_G); $cadreBanniere->AjouterClasseCellule(4, 1, CADRE_BANNIERE . CADRE_BG); $cadreBanniere->AjouterClasseCellule(4, 2, CADRE_BANNIERE . CADRE_B);
public function __construct($prefixIdClass, $typeInput, $libelle, $libelleOnClick = '', $cadre = '', $fonction = '', $ajax = false, $reset = false, $niveau = '') { parent::__construct(true); GSession::PoidsJavascript(4); $this->AddLigne(); switch ($typeInput) { case INPUTBUTTONTYPE_GAUCHE: $cellule = $this->AddCellule(); $cell = $this->AddCellule(); $cell->AddProp(PROP_STYLE, 'width: 100%'); break; case INPUTBUTTONTYPE_DROIT: $cell = $this->AddCellule(); $cell->AddProp(PROP_STYLE, 'width: 100%'); $cellule = $this->AddCellule(); break; case INPUTBUTTONTYPE_REMPLI: $cellule = $this->AddCellule(); $cellule->AddProp(PROP_STYLE, 'width: 100%'); break; case INPUTBUTTONTYPE_MILIEU: default: $cell = $this->AddCellule(); $cell->AddProp(PROP_STYLE, 'width: 50%'); $cellule = $this->AddCellule(); $cell = $this->AddCellule(); $cell->AddProp(PROP_STYLE, 'width: 50%'); break; } $this->bouton = new SBalise(BAL_DIV); $cellule->Attach($this->bouton); $this->prefixIdClass = $prefixIdClass; $this->bouton->AddClass(INPUTBUTTON_JQ); $this->ajax = $ajax; if ($ajax == true) { $this->bouton->AddClass(INPUTBUTTON_JQ_AJAX); } if ($reset == true) { $this->bouton->AddClass(INPUTBUTTON_JQ_RESET); } $this->retour = new SBalise(BAL_DIV); $this->retour->AddClass(INPUTBUTTON_JQ_PARAM); $this->retour->SetText(''); $this->bouton->Attach($this->retour); if ($libelleOnClick !== '') { $div = new SBalise(BAL_DIV); $div->AddClass(INPUTBUTTON_JQ_VALONCLICK); $div->SetText($libelleOnClick); $this->bouton->Attach($div); } if ($cadre !== '') { $div = new SBalise(BAL_DIV); $div->AddClass(INPUTBUTTON_JQ_CADRE); $div->SetText($cadre); $this->bouton->Attach($div); } if ($fonction !== '') { $div = new SBalise(BAL_DIV); $div->AddClass(INPUTBUTTON_JQ_FONCTION); $div->SetText($fonction); $this->bouton->Attach($div); } $element = new SElement($this->prefixIdClass . INPUTBUTTON . $niveau, false); $element->AjouterClasse(INPUTBUTTON . $niveau); $element->AddClass(INPUTBUTTON_JQ_BOUTON); $element->SetText($libelle); $this->bouton->Attach($element); }
public function BuildHTML() { $this->ConstruireTableau(); return parent::BuildHTML(); }