public function __construct($prefixIdClass, $typeInput = '', $oblig = false, $niveau = '') { parent::__construct(BAL_DIV); GSession::PoidsJavascript(1); switch ($typeInput) { default: if ($typeInput === '') { $typeInput = INPUTNEW_TYPE_SELECT; } break; } $this->prefixIdClass = $prefixIdClass; $this->niveau = $niveau; $this->AddClass(INPUTNEW_JQ); $this->AddClass('jq_fill'); if ($oblig == true) { $this->AddClass('jq_input_form_oblig'); } $elem = new SElement($this->prefixIdClass . INPUTNEW . $this->niveau); $elem->AjouterClasse(INPUTNEW . $this->niveau); $this->Attach($elem); $org = new SOrganiseur(1, 2); $elem->Attach($org); // Input. if ($typeInput == INPUTNEW_TYPE_SELECT && $this->select != NULL) { $org->AttacherCellule(1, 1, $this->select); } else { if ($typeInput == INPUTNEW_TYPE_TEXT && $this->text != NULL) { $org->AttacherCellule(1, 1, $this->text); } } $this->newTab = new STableau(true); $this->newTab->AddClass('jq_fill'); $org->AttacherCellule(1, 2, $this->newTab); }
public function __construct($value, $label) { parent::__construct(BAL_OPTION); $this->attributs['value'] = $value; $this->attributs['label'] = $label; $this->texte = $label; }
public function __construct($id, $valeurDefaut = '') { parent::__construct(BAL_SELECT); $this->attributs['id'] = $id; if ($valeurDefaut != '') { $this->Attach(new SOption('', $valeurDefaut)); } }
public function __construct($id = '', $class = '') { parent::__construct(BAL_UL); if ($id !== '') { $this->AddProp(PROP_ID, $id); } if ($class !== '') { $this->AddProp(PROP_CLASS, $class); } }
public function __construct($largeurMax = false) { parent::__construct(BAL_TABLE); $this->currentLigne = -1; $this->currentCellule = -1; $this->AddProp(PROP_CELLPADDING, 0); $this->AddProp(PROP_CELLSPACING, 0); if ($largeurMax) { $this->AddProp(PROP_CLASS, TABLE_MAXLARGEUR); } }
public function __construct($location, $noImage = '', $verifValideImage = true) { parent::__construct(BAL_IMAGE); // Protection contre le CSRF (ne pas enlever!!). if ($location !== '' && ($verifValideImage === false || $verifValideImage === true && getimagesize(PATH_SERVER_LOCAL . $location) !== false)) { $this->AddProp(PROP_SRC, PATH_SERVER_HTTP . $location); } else { //if ($noImage !== '') $this->AddProp(PROP_SRC, $noImage); //else // $this->AddProp(PROP_SRC, 'url::noImage'); // A REMPLACER.. } }
public function __construct($typePop, $idDeclencheur, $class) { parent::__construct(BAL_DIV); $this->AddClass($typePop); $elem = new SElement($class); $declencheur = new SBalise(BAL_DIV); $declencheur->AddClass('jq_popdiv_declencheur'); $declencheur->SetText($idDeclencheur); parent::Attach($declencheur); $this->div = new SBalise(BAL_DIV); $this->div->AddClass('jq_popdiv_div'); parent::Attach($this->div); }
public function __construct($prefixIdClass, $type = '', $oblig = false, $retour = '', $info = '', $erreur = '', $niveau = '') { parent::__construct(BAL_DIV); $this->AddClass('jq_fill'); if ($oblig == true) { $this->AddClass('jq_input_form_oblig'); } $this->prefixIdClass = $prefixIdClass; $this->niveau = $niveau; $this->nbCheckboxElem = 0; $this->info = $info; switch ($type) { case INPUTCHECKBOX_TYPE_LISTE: $this->AddClass(LISTEINPUTCHECKBOX_JQ); break; default: $this->AddClass(INPUTCHECKBOX_JQ); } $this->checkboxTab = NULL; $this->checkboxCadre = new SElement($this->prefixIdClass . INPUTCHECKBOX . $this->niveau); $this->checkboxCadre->AjouterClasse(INPUTCHECKBOX . $this->niveau); $this->Attach($this->checkboxCadre); // Retour. if ($retour !== '') { $divRetour = new SBalise(BAL_DIV); $divRetour->SetText(strval($retour)); $divRetour->AddClass(INPUTCHECKBOX_JQ_RETOUR); $divRetour->AddStyle('display:none;'); $this->Attach($divRetour); } // Info. if ($info !== '') { $divInfo = new SBalise(BAL_DIV); $elemInfo = new SElement(CLASSCADRE_INFO, false); $elemInfo->SetText($info); $divInfo->AddClass(INPUTCHECKBOX_JQ_INFO); $divInfo->AddStyle('display:none;'); $divInfo->Attach($elemInfo); $this->Attach($divInfo); } // Erreur. if ($erreur !== '') { $divErreur = new SBalise(BAL_DIV); $elemErreur = new SElement(CLASSCADRE_ERREUR, false); $elemErreur->SetText($erreur); $divErreur->AddClass(INPUTCHECKBOX_JQ_ERREUR); $divErreur->AddStyle('display:none;'); $divErreur->Attach($elemErreur); $this->Attach($divErreur); } }
public function __construct($id = '', $type = 'text', $valeur = '', $class = '') { parent::__construct(BAL_INPUT); if ($id !== '') { $this->attributs[PROP_ID] = $id; } if ($class !== '') { $this->attributs[PROP_CLASS] = $class; } if ($valeur !== '') { $this->attributs[PROP_VALUE] = $valeur; } $this->attributs[PROP_TYPE] = $type; }
public function __construct($class = '', $valeur = '', $nbLignes = -1, $nbColonnes = -1) { parent::__construct(BAL_TEXTAREA, true); if ($class !== '') { $this->AddClass($class); } if ($valeur !== '') { $this->SetText($valeur); } if ($nbLignes != -1) { $this->AddProp(PROP_ROWS, $nbLignes); } if ($nbColonnes != -1) { $this->AddProp(PROP_COLS, $nbColonnes); } }
public function __construct($class = '', $remplirParent = true, $id = '', $idTab = '', $tabMaxLargeur = true) { parent::__construct(BAL_DIV); $this->tableau = new STableau($tabMaxLargeur); $this->tableau->AddLigne(); $this->cellule = $this->tableau->AddCellule(); if ($id !== '') { $this->AddProp(PROP_ID, $id); } if ($idTab !== '') { $this->cellule->AddProp(PROP_ID, $idTab); } if ($class !== '') { $this->AddClass($class); $this->cellule->AddClass($class . '_tab'); } if ($remplirParent === true) { $this->AddClass('jq_fill'); $this->tableau->AddClass('jq_fill'); } parent::Attach($this->tableau); }
public function __construct($prefixIdClass, $typeInput = '', $oblig = false, $retour = '', $chemin = '', $extensions = '', $id = '', $info = '', $erreur = '', $type = '', $contexte = '', $niveau = '') { parent::__construct(BAL_DIV); GSession::PoidsJavascript(1); $this->select == NULL; $this->prefixIdClass = $prefixIdClass; $this->niveau = $niveau; if ($typeInput === INPUTFILE_TYPE_LISTEFICHIER) { $this->AddClass(LISTEINPUTFILE_JQ); } else { if ($typeInput === '' || $typeInput === INPUTFILE_TYPE_FICHIER) { $this->AddClass(INPUTFILE_JQ); } } $this->AddClass('jq_fill'); if ($oblig == true) { $this->AddClass('jq_input_form_oblig'); } $elem = new SElement($this->prefixIdClass . INPUTFILE . $this->niveau, true, '', '', false); $elem->AjouterClasse(INPUTFILE . $this->niveau); $this->Attach($elem); $org = new SOrganiseur(1, 2, true); $org->SetCelluleDominante(1, 1); $elem->Attach($org); // Select. $rechargeFonc = ''; $rechargeParam = ''; if ($contexte !== '') { $rechargeFonc = AJAXFONC_CHARGERREFERENTIELCONTEXTE; $rechargeParam = to_html('contexte=' . $contexte); } $this->select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_FICHIER, $oblig, $retour, $info, $erreur, $type, '', '', $rechargeFonc, $rechargeParam, '', '', $niveau); $org->AttacherCellule(1, 1, $this->select); // InputFile. $action = ''; switch ($type) { default: if ($type === '') { $type = INPUTFILE_TYPE_FICHIER; } $action = PATH_SERVER_HTTP . 'fonctions/General/fUploadFichier.php'; } // - Input. $div = new SBalise(BAL_DIV); $div->AddClass(INPUTFILE_JQ_NEWINPUT); $div->AddProp(PROP_STYLE, 'overflow:hidden;'); $form = new SBalise(BAL_FORM); $form->AddProp(PROP_ACTION, $action); $form->AddProp(PROP_METHOD, 'post'); $form->AddProp(PROP_ENCTYPE, 'multipart/form-data'); //$form->AddStyle('display:none;'); $div->Attach($form); $rand = mt_rand(); $file = new SInput('', 'file', '', ''); $file->AddProp(PROP_NAME, 'fichierUp' . $rand); $file->AddStyle('display:none;'); $form->Attach($file); $fileType = new SInput('', 'hidden', '', ''); $fileType->AddProp(PROP_NAME, 'type' . $rand); $fileType->AddProp(PROP_VALUE, $type); $form->Attach($fileType); $fileId = new SInput('', 'hidden', '', ''); $fileId->AddProp(PROP_NAME, 'id' . $rand); $fileId->AddProp(PROP_VALUE, $id); $form->Attach($fileId); /*$fileFrame = new SInput('', 'hidden', '', ''); $fileFrame->AddClass(INPUTFILE_JQ_IFRAMEINPUT); $fileFrame->AddProp(PROP_NAME, 'iframe'.$rand); $form->Attach($fileFrame);*/ $org->AttacherCellule(1, 2, $div); // - Declencheur. //$element = new SElement($this->prefixIdClass.INPUTFILE_NEWDECLENCHEUR.$this->niveau, false); //$element->AjouterClasse(INPUTFILE_NEWDECLENCHEUR.$this->niveau); $element = new SElement($this->prefixIdClass . INPUTNEW_DECLENCHEUR . $this->niveau, false); $element->AjouterClasse(INPUTNEW_DECLENCHEUR . $this->niveau); $element->AddClass(INPUTFILE_JQ_NEWDECLENCHEUR); $org->AttacherCellule(1, 2, $element); //if ($chemin !== '') // $this->GetNomsFichiers($chemin); }
public function __construct($id, $valeurDefaut, $libelle) { parent::__construct(BAL_DIV); $this->enfants[] = new SLabel($libelle); $this->enfants[] = new SSelect($id, $valeurDefaut); }
public function __construct() { parent::__construct(XML_LISTE); }
public function __construct($prefixIdClass, $typeInput = '', $oblig = false, $retour = '', $info = '', $erreur = '', $type = '', $impact = '', $dependance = '', $rechargeFonc = '', $rechargeParam = '', $changeFonc = '', $changeParam = '', $niveau = '') { parent::__construct(BAL_DIV); GSession::PoidsJavascript(4); $this->currentCategorie == NULL; $this->nbElemCurCat = 0; $this->nbCat = 0; $this->prefixIdClass = $prefixIdClass; $this->niveau = $niveau; switch ($typeInput) { case INPUTSELECT_TYPE_FICHIER: $this->AddClass(INPUTFILESELECT_JQ); break; case INPUTSELECT_TYPE_NEW: $this->AddClass(INPUTNEWSELECT_JQ); break; case INPUTSELECT_TYPE_LISTE: $this->AddClass(LISTEINPUTSELECT_JQ); break; case INPUTSELECT_TYPE_LISTEFIND: $this->AddClass(INPUTSELECTFIND_JQ); $this->AddClass(LISTEINPUTSELECT_JQ); break; case INPUTSELECT_TYPE_FIND: $this->AddClass(INPUTSELECTFIND_JQ); $this->AddClass(INPUTSELECT_JQ); break; default: $this->AddClass(INPUTSELECT_JQ); } $this->AddClass('jq_fill'); if ($oblig == true) { $this->AddClass('jq_input_form_oblig'); } $elem = new SElement($this->prefixIdClass . INPUTSELECT . $this->niveau); $elem->AjouterClasse(INPUTSELECT . $this->niveau); $this->Attach($elem); $org = new SOrganiseur(2, 2, true); $elem->Attach($org); $org->FusionnerCellule(2, 1, 0, 1); //$org->SetCelluleDominante(1, 1); $org->SetLargeurCellule(1, 1, '100%'); $org->SetLargeurCellule(1, 2, '0%'); // Edit. $element = new SElement($this->prefixIdClass . INPUTSELECT_VALEUR . $this->niveau); //, true, '', '', false); $element->AjouterClasse(INPUTSELECT_VALEUR . $this->niveau); $edit = new SInput('', 'text', '', $this->prefixIdClass . INPUTSELECT_VALEUREDIT . $this->niveau); $edit->AddClass(INPUTSELECT_VALEUREDIT . $this->niveau); $edit->AddClass(INPUTSELECT_JQ_EDIT); $element->Attach($edit); $org->AttacherCellule(1, 1, $element); // Dérouleur. $element = new SElement($this->prefixIdClass . INPUTSELECT_DEROULEUR . $this->niveau); $element->AjouterClasse(INPUTSELECT_DEROULEUR . $this->niveau); $element->AddClass(INPUTSELECT_JQ_DEROULEUR); $org->AttacherCellule(1, 2, $element); // Liste. $div = new SBalise(BAL_DIV); $div->AddClass(INPUTSELECT_JQ_LISTE); $div->AddStyle('display:none;'); $orgListe = new SOrganiseur(1, 2, true); $liste = new SElement($this->prefixIdClass . INPUTSELECT_LISTE . $this->niveau); $liste->AjouterClasse(INPUTSELECT_LISTE . $this->niveau); //$liste->AddClass(INPUTSELECT_JQ_ELEMENTS); $divElem = new SBalise(BAL_DIV); $divElem->AddClass(INPUTSELECT_JQ_ELEMENTS); $this->liste = new STableau(true); $divElem->Attach($this->liste); //$liste->Attach($this->liste); $liste->Attach($divElem); $orgListe->AttacherCellule(1, 1, $liste); // Barre de défilement. $elemDef = new SElement($this->prefixIdClass . INPUTSELECT_LISTE_BARDEF . $this->niveau); $elemDef->AjouterClasse(INPUTSELECT_LISTE_BARDEF . $this->niveau); $elemDef->AddClass(INPUTSELECT_JQ_BARREDEFILEMENT); $elemDefHaut = new SElement($this->prefixIdClass . INPUTSELECT_LISTE_BARDEF_HAUT . $this->niveau); $elemDefHaut->AjouterClasse(INPUTSELECT_LISTE_BARDEF_HAUT . $this->niveau); $elemDefHaut->AddClass(INPUTSELECT_JQ_BARREDEFILEMENT_HAUT); $elemDef->Attach($elemDefHaut); $divDefBarre = new SBalise(BAL_DIV); $elemDefBarre = new SElement($this->prefixIdClass . INPUTSELECT_LISTE_BARDEF_BARRE . $this->niveau); $elemDefBarre->AjouterClasse(INPUTSELECT_LISTE_BARDEF_BARRE . $this->niveau); $elemDefBarre->AddClass(INPUTSELECT_JQ_BARREDEFILEMENT_BARRE); $divDefBarre->Attach($elemDefBarre); $elemDef->Attach($divDefBarre); $elemDefBas = new SElement($this->prefixIdClass . INPUTSELECT_LISTE_BARDEF_BAS . $this->niveau); $elemDefBas->AjouterClasse(INPUTSELECT_LISTE_BARDEF_BAS . $this->niveau); $elemDefBas->AddClass(INPUTSELECT_JQ_BARREDEFILEMENT_BAS); $elemDef->Attach($elemDefBas); $orgListe->AttacherCellule(1, 2, $elemDef); $div->Attach($orgListe); $org->AttacherCellule(2, 1, $div); // Retour. if ($retour !== '') { $divRetour = new SBalise(BAL_DIV); $divRetour->SetText(strval($retour)); $divRetour->AddClass(INPUTSELECT_JQ_RETOUR); $divRetour->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divRetour); } // Info. $divInfo = new SBalise(BAL_DIV); $elemInfo = new SElement(CLASSCADRE_INFO, false); $elemInfo->SetText($info); $divInfo->AddClass(INPUTSELECT_JQ_INFO); $divInfo->Attach($elemInfo); $divInfo->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divInfo); // Erreur. if ($erreur !== '') { $divErreur = new SBalise(BAL_DIV); $elemErreur = new SElement(CLASSCADRE_ERREUR, false); $elemErreur->SetText($erreur); $divErreur->AddClass(INPUTSELECT_JQ_ERREUR); $divErreur->Attach($elemErreur); $divErreur->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divErreur); } // Type. if ($type !== '') { $divType = new SBalise(BAL_DIV); $divType->SetText(strval($type)); $divType->AddClass(INPUTSELECT_JQ_TYPE); $divType->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divType); } // Impact (Noms des différents types de select (séparés par des ',') // qui doivent se recharger si changement de celui-ci). if ($impact !== '') { $divImpact = new SBalise(BAL_DIV); $divImpact->SetText(to_html($impact)); $divImpact->AddClass(INPUTSELECT_JQ_IMPACT); $divImpact->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divImpact); } // Dépendance (Noms des différents types de select (séparés par des ',') // dont la valeur est importante pour le rechargement de ce select). if ($dependance !== '') { $divDep = new SBalise(BAL_DIV); $divDep->SetText(to_html($dependance)); $divDep->AddClass(INPUTSELECT_JQ_DEPENDANCE); $divDep->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divDep); } // RechargeFonc (Nom de la fonction Ajax de rechargement de la combobox). if ($rechargeFonc !== '') { $divRecFonc = new SBalise(BAL_DIV); $divRecFonc->SetText(strval($rechargeFonc)); $divRecFonc->AddClass(INPUTSELECT_JQ_RECFONC); $divRecFonc->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divRecFonc); } // RechargeParam (Paramètres de la fonction Ajax de rechargement de la combobox). if ($rechargeParam !== '') { $divRecParam = new SBalise(BAL_DIV); $divRecParam->SetText(to_ajax($rechargeParam)); $divRecParam->AddClass(INPUTSELECT_JQ_RECPARAM); $divRecParam->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divRecParam); } // ChangeFonc (Nom de la fonction Ajax qui est appelée quand la valeur de la combobox change). if ($changeFonc !== '') { $divChangeFonc = new SBalise(BAL_DIV); $divChangeFonc->SetText(strval($changeFonc)); $divChangeFonc->AddClass(INPUTSELECT_JQ_CHANGEFONC); $divChangeFonc->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divChangeFonc); } // RechargeParam (Paramètres de la fonction Ajax qui est appelée quand la valeur de la combobox change). if ($changeParam !== '') { $divChangeParam = new SBalise(BAL_DIV); $divChangeParam->SetText(to_ajax($changeParam)); $divChangeParam->AddClass(INPUTSELECT_JQ_CHANGEPARAM); $divChangeParam->AddProp(PROP_STYLE, 'display:none'); $this->Attach($divChangeParam); } }
public function __construct($prefixIdClass, $type = '', $oblig = false, $retour = '', $valeurParDefaut = '', $longueurMin = -1, $longueurMax = -1, $taille = -1, $tailleAuto = false, $unite = '', $info = '', $erreur = '', $formatValide = '', $min = NULL, $max = NULL, $niveau = '') { parent::__construct(BAL_DIV); GSession::PoidsJavascript(2); $this->AddClass('jq_fill'); if ($oblig == true) { $this->AddClass('jq_input_form_oblig'); } if ($tailleAuto === true) { $this->AddClass(INPUTTEXT_JQ_AUTOWIDTH); } $this->prefixIdClass = $prefixIdClass; switch ($type) { case INPUTTEXT_TYPE_NEW: $this->AddClass(INPUTNEWTEXT_JQ); break; case INPUTTEXT_TYPE_LISTE: $this->AddClass(LISTEINPUTTEXT_JQ); break; default: $this->AddClass(INPUTTEXT_JQ); } $elem = new SElement($this->prefixIdClass . INPUTTEXT . $niveau); $elem->AjouterClasse(INPUTTEXT . $niveau); $elem->AddClass(INPUTTEXT_JQ_EDIT); if ($type === INPUTTEXT_TYPE_PASSWORD) { $edit = new SInput('', 'password', '', $this->prefixIdClass . INPUTTEXT_VALEUREDIT); } else { if ($longueurMax === NULL && $formatValide !== INPUTTEXT_REGEXP_DECIMAL_FV) { $edit = new SText($this->prefixIdClass . INPUTTEXT_VALEUREDIT . $niveau, $valeurParDefaut); } else { $edit = new SInput('', 'text', '', $this->prefixIdClass . INPUTTEXT_VALEUREDIT . $niveau); } } $edit->AddClass(INPUTTEXT_VALEUREDIT . $niveau); $edit->AddClass(INPUTTEXT_JQ_EDITVAL); if ($valeurParDefaut !== '') { $edit->AddProp(PROP_VALUE, $valeurParDefaut); } else { $edit->AddProp(PROP_VALUE, '- null -'); } if ($longueurMax !== NULL && $longueurMax > 0) { $edit->AddProp(PROP_MAXLENGTH, $longueurMax); } if ($taille !== NULL && $taille > 0) { if ($longueurMax === NULL && $formatValide !== INPUTTEXT_REGEXP_DECIMAL_FV) { $edit->AddProp(PROP_ROWS, $taille); } else { $edit->AddProp(PROP_SIZE, $taille); } } else { if ($tailleAuto === true && $taille <= 0) { $edit->AddProp(PROP_SIZE, '1'); } } $org = NULL; if ($unite !== '') { $org = new SOrganiseur(1, 2); $org->AttacherCellule(1, 1, $edit); if ($taille === -1) { $org->SetCelluleDominante(1, 1); } $org->SetTexteCellule(1, 2, strval($unite)); } else { $org = $edit; } $elem->Attach($org); $this->Attach($elem); // Format valide et caractères valides (min et max quand nécessaires). switch ($formatValide) { case INPUTTEXT_REGEXP_EMAIL_FV: $caracteresValides = INPUTTEXT_REGEXP_EMAIL_CV; break; case INPUTTEXT_REGEXP_DECIMAL_FV: $caracteresValides = INPUTTEXT_REGEXP_DECIMAL_CV; $this->AddClass(INPUTTEXT_JQ_DECIMAL); if ($min !== NULL) { $divMin = new SBalise(BAL_DIV); $divMin->SetText(strval($min)); $divMin->AddClass(INPUTTEXT_JQ_MIN); $divMin->AddStyle('display:none;'); $this->Attach($divMin); } if ($max !== NULL) { $divMax = new SBalise(BAL_DIV); $divMax->SetText(strval($max)); $divMax->AddClass(INPUTTEXT_JQ_MAX); $divMax->AddStyle('display:none;'); $this->Attach($divMax); } break; case INPUTTEXT_REGEXP_TOUT_FV: default: $formatValide = INPUTTEXT_REGEXP_TOUT_FV; $caracteresValides = INPUTTEXT_REGEXP_TOUT_CV; if ($longueurMin === NULL) { $longueurMin = ''; } else { if ($longueurMin <= 0) { $longueurMin = 1; } } if ($longueurMax === NULL) { $longueurMax = ''; } else { if ($longueurMax <= 0) { $longueurMax = 1; } } $formatValide = str_replace('min', strval($longueurMin), $formatValide); $formatValide = str_replace('max', strval($longueurMax), $formatValide); break; } $divFV = new SBalise(BAL_DIV); $divFV->SetText(strval($formatValide)); $divFV->AddClass(INPUTTEXT_JQ_FV); $divFV->AddStyle('display:none;'); $this->Attach($divFV); if ($caracteresValides !== '') { $divCA = new SBalise(BAL_DIV); $divCA->SetText(strval($caracteresValides)); $divCA->AddClass(INPUTTEXT_JQ_CV); $divCA->AddStyle('display:none;'); $this->Attach($divCA); } // Retour. if ($retour !== '') { $divRetour = new SBalise(BAL_DIV); $divRetour->SetText(strval($retour)); $divRetour->AddClass(INPUTTEXT_JQ_RETOUR); $divRetour->AddStyle('display:none;'); $this->Attach($divRetour); } // Info. if ($info !== '') { $divInfo = new SBalise(BAL_DIV); $elemInfo = new SElement(CLASSCADRE_INFO, false); $elemInfo->SetText($info); $divInfo->AddClass(INPUTTEXT_JQ_INFO); $divInfo->Attach($elemInfo); $divInfo->AddStyle('display:none;'); $this->Attach($divInfo); } // Erreur. if ($erreur !== '') { $divErreur = new SBalise(BAL_DIV); $elemErreur = new SElement(CLASSCADRE_ERREUR, false); $elemErreur->SetText($erreur); $divErreur->AddClass(INPUTTEXT_JQ_ERREUR); $divErreur->Attach($elemErreur); $divErreur->AddStyle('display:none;'); $this->Attach($divErreur); } }
public function __construct() { parent::__construct(BAL_DIV); $this->currentMenu = NULL; //$this->menus = array(); }
public function __construct($prefixIdClass, $titre) { parent::__construct(BAL_DIV); $this->AddClass(BUFFERCOULEUR_JQ); $cadre = new SElemOrg(2, 1, $prefixIdClass . PALETTE, false, false, false); $cadre->AjouterClasse(PALETTE); $cadre->AddClass(BUFFERCOULEUR_JQ_CADRE); $this->Attach($cadre); // Titre. $divTitre = new SBalise(BAL_DIV); $divTitre->AddClass(BUFFERCOULEUR_JQ_CADRETITRE); $elemTitre = new SElemOrg(1, 2, $prefixIdClass . PALETTE_CADRETITRE, true); $elemTitre->AjouterClasse(PALETTE_CADRETITRE); $elem = new SElement($prefixIdClass . PALETTE_TITRE); $elem->AjouterClasse(PALETTE_TITRE); $elem->SetText($titre); $elemTitre->AttacherCellule(1, 1, $elem); $elemTitre->SetCelluleDominante(1, 1); $elemIndic = new SElement($prefixIdClass . PALETTE_INDIC); $elemIndic->AjouterClasse(PALETTE_INDIC); $elemIndic->AddClass(BUFFERCOULEUR_JQ_INDIC); $elemIndic->SetText('-'); $elemTitre->AttacherCellule(1, 2, $elemIndic); $divTitre->Attach($elemTitre); $cadre->AttacherCellule(1, 1, $divTitre); // Couleur. $divCouleur = new SBalise(BAL_DIV); $divCouleur->AddClass(BUFFERCOULEUR_JQ_CADRECOULEUR); $elemCouleur = new SElement($prefixIdClass . PALETTE_CADRECOULEUR); $elemCouleur->AjouterClasse(PALETTE_CADRECOULEUR); $divCouleur->Attach($elemCouleur); $divInputColor = new SBalise(BAL_DIV); $divInputColor->AddClass(INPUTCOLOR_JQ); $orgInputColor = new SOrganiseur(1, 2, true); $orgInputColor->SetCelluleDominante(1, 1); $divInputColor->Attach($orgInputColor); $elemCouleur->Attach($divInputColor); // // Partie visualisation. $elemOrgVisualiseur = new SElemOrg(1, 10, $prefixIdClass . PALETTE_VISUALISEUR, false, false, false); $elemOrgVisualiseur->AjouterClasse(PALETTE_VISUALISEUR); $elemOrgVisualiseur->AjouterClasseTableau(INPUTCOLOR_JQ_CAL); $div1 = new SBalise(BAL_DIV); $div2 = new SBalise(BAL_DIV); $img = new SImage(PATH_IMAGES . 'Css/jq_inputcolor_overlay.png'); $div1->Attach($img); $div1->Attach($div2); $elemOrgVisualiseur->AjouterClasseCellule(1, 1, INPUTCOLOR_JQ_COLOR); $elemOrgVisualiseur->AttacherCellule(1, 1, $div1); // $div = new SBalise(BAL_DIV); $img = new SImage(PATH_IMAGES . 'Css/jq_inputcolor_slider.jpg'); //$img->AddProp(PROP_STYLE, 'display: none'); $elemOrgVisualiseur->AjouterClasseCellule(1, 2, INPUTCOLOR_JQ_HUE); $elemOrgVisualiseur->AttacherCellule(1, 2, $img); $elemOrgVisualiseur->AttacherCellule(1, 2, $div); // $elemOrgVisualiseur->AjouterClasseCellule(1, 3, INPUTCOLOR_JQ_NEW_COLOR); // $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '6'); $input->AddProp(PROP_SIZE, '6'); $elemOrgVisualiseur->AjouterClasseCellule(1, 4, INPUTCOLOR_JQ_HEX); $elemOrgVisualiseur->AttacherCellule(1, 4, $input); // $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $elemOrgVisualiseur->AjouterClasseCellule(1, 5, INPUTCOLOR_JQ_FIELD); $elemOrgVisualiseur->AjouterClasseCellule(1, 5, INPUTCOLOR_JQ_RGB_R); $elemOrgVisualiseur->AttacherCellule(1, 5, $input); // $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $elemOrgVisualiseur->AjouterClasseCellule(1, 6, INPUTCOLOR_JQ_FIELD); $elemOrgVisualiseur->AjouterClasseCellule(1, 6, INPUTCOLOR_JQ_RGB_G); $elemOrgVisualiseur->AttacherCellule(1, 6, $input); // $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $elemOrgVisualiseur->AjouterClasseCellule(1, 7, INPUTCOLOR_JQ_FIELD); $elemOrgVisualiseur->AjouterClasseCellule(1, 7, INPUTCOLOR_JQ_RGB_B); $elemOrgVisualiseur->AttacherCellule(1, 7, $input); // $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $elemOrgVisualiseur->AjouterClasseCellule(1, 8, INPUTCOLOR_JQ_FIELD); $elemOrgVisualiseur->AjouterClasseCellule(1, 8, INPUTCOLOR_JQ_HSB_H); $elemOrgVisualiseur->AttacherCellule(1, 8, $input); // $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $elemOrgVisualiseur->AjouterClasseCellule(1, 9, INPUTCOLOR_JQ_FIELD); $elemOrgVisualiseur->AjouterClasseCellule(1, 9, INPUTCOLOR_JQ_HSB_S); $elemOrgVisualiseur->AttacherCellule(1, 9, $input); // $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $elemOrgVisualiseur->AjouterClasseCellule(1, 10, INPUTCOLOR_JQ_FIELD); $elemOrgVisualiseur->AjouterClasseCellule(1, 10, INPUTCOLOR_JQ_HSB_B); $elemOrgVisualiseur->AttacherCellule(1, 10, $input); $orgInputColor->AjouterClasseCellule(1, 1, INPUTCOLOR_JQ_VISUALISEUR); $orgInputColor->AttacherCellule(1, 1, $elemOrgVisualiseur); // // Partie édition. $elemOrgEditeur = new SElemOrg(3, 3, $prefixIdClass . PALETTE_EDITEUR); $elemOrgEditeur->AjouterClasse(PALETTE_EDITEUR); $elemOrgEditeur->AjouterClasseLigne(1, INPUTCOLOR_JQ_COMPOSANTE); $elem = new SElement($prefixIdClass . PALETTE_SLIDER); $elem->AjouterClasse(PALETTE_SLIDER); $div = new SBalise(BAL_DIV); $div->AddClass(INPUTCOLOR_JQ_COMPOSANTE_SLIDER); $div->AddClass('jq_fill'); $elem->Attach($div); $elemOrgEditeur->AjouterClasseCellule(1, 1, INPUTCOLOR_JQ_COMPOSANTE_ROUGE); $elemOrgEditeur->AttacherCellule(1, 1, $elem); // $elem = new SElement($prefixIdClass . PALETTE_SLIDER); $elem->AjouterClasse(PALETTE_SLIDER); $div = new SBalise(BAL_DIV); $div->AddClass(INPUTCOLOR_JQ_COMPOSANTE_SLIDER); $div->AddClass('jq_fill'); $elem->Attach($div); $elemOrgEditeur->AjouterClasseCellule(1, 2, INPUTCOLOR_JQ_COMPOSANTE_VERTE); $elemOrgEditeur->AttacherCellule(1, 2, $elem); // $elem = new SElement($prefixIdClass . PALETTE_SLIDER); $elem->AjouterClasse(PALETTE_SLIDER); $div = new SBalise(BAL_DIV); $div->AddClass(INPUTCOLOR_JQ_COMPOSANTE_SLIDER); $div->AddClass('jq_fill'); $elem->Attach($div); $elemOrgEditeur->AjouterClasseCellule(1, 3, INPUTCOLOR_JQ_COMPOSANTE_BLEUE); $elemOrgEditeur->AttacherCellule(1, 3, $elem); // $elemOrg = new SElemOrg(1, 2, $prefixIdClass . PALETTE_INCDEC, true); $elemOrg->AjouterClasse(PALETTE_INCDEC); $elemInc = new SElement($prefixIdClass . PALETTE_INC); $elemInc->AjouterClasse(PALETTE_INC); $elemInc->SetText('+'); $elemOrg->AjouterClasseCellule(1, 1, INPUTCOLOR_JQ_SUIV); $elemOrg->AttacherCellule(1, 1, $elemInc); $elemDec = new SElement($prefixIdClass . PALETTE_DEC); $elemDec->AjouterClasse(PALETTE_DEC); $elemDec->SetText('-'); $elemOrg->AjouterClasseCellule(1, 2, INPUTCOLOR_JQ_PREC); $elemOrg->AttacherCellule(1, 2, $elemDec); $elemOrgEditeur->AttacherCellule(2, 1, $elemOrg); // $elemOrg = new SElemOrg(1, 2, $prefixIdClass . PALETTE_INCDEC, true); $elemOrg->AjouterClasse(PALETTE_INCDEC); $elemInc = new SElement($prefixIdClass . PALETTE_INC); $elemInc->AjouterClasse(PALETTE_INC); $elemInc->SetText('+'); $elemOrg->AjouterClasseCellule(1, 1, INPUTCOLOR_JQ_SUIV); $elemOrg->AttacherCellule(1, 1, $elemInc); $elemDec = new SElement($prefixIdClass . PALETTE_DEC); $elemDec->AjouterClasse(PALETTE_DEC); $elemDec->SetText('-'); $elemOrg->AjouterClasseCellule(1, 2, INPUTCOLOR_JQ_PREC); $elemOrg->AttacherCellule(1, 2, $elemDec); $elemOrgEditeur->AttacherCellule(2, 2, $elemOrg); // $elemOrg = new SElemOrg(1, 2, $prefixIdClass . PALETTE_INCDEC, true); $elemOrg->AjouterClasse(PALETTE_INCDEC); $elemInc = new SElement($prefixIdClass . PALETTE_INC); $elemInc->AjouterClasse(PALETTE_INC); $elemInc->SetText('+'); $elemOrg->AjouterClasseCellule(1, 1, INPUTCOLOR_JQ_SUIV); $elemOrg->AttacherCellule(1, 1, $elemInc); $elemDec = new SElement($prefixIdClass . PALETTE_DEC); $elemDec->AjouterClasse(PALETTE_DEC); $elemDec->SetText('-'); $elemOrg->AjouterClasseCellule(1, 2, INPUTCOLOR_JQ_PREC); $elemOrg->AttacherCellule(1, 2, $elemDec); $elemOrgEditeur->AttacherCellule(2, 3, $elemOrg); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $input->AddProp(PROP_VALUE, '127'); $elem->Attach($input); $elemOrgEditeur->AjouterClasseCellule(3, 1, INPUTCOLOR_JQ_COMPOSANTE_TEXT); $elemOrgEditeur->AttacherCellule(3, 1, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $input->AddProp(PROP_VALUE, '127'); $elem->Attach($input); $elemOrgEditeur->AjouterClasseCellule(3, 2, INPUTCOLOR_JQ_COMPOSANTE_TEXT); $elemOrgEditeur->AttacherCellule(3, 2, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $input = new SInput(); $input->AddProp(PROP_MAXLENGTH, '3'); $input->AddProp(PROP_SIZE, '3'); $input->AddProp(PROP_VALUE, '127'); $elem->Attach($input); $elemOrgEditeur->AjouterClasseCellule(3, 3, INPUTCOLOR_JQ_COMPOSANTE_TEXT); $elemOrgEditeur->AttacherCellule(3, 3, $elem); // $orgInputColor->AjouterClasseCellule(1, 2, INPUTCOLOR_JQ_EDITEUR); $orgInputColor->AttacherCellule(1, 2, $elemOrgEditeur); $cadre->AttacherCellule(2, 1, $divCouleur); // Mémoire. $elemOrgMemoire = new SElemOrg(1, 10, $prefixIdClass . PALETTE_MEMOIRE, true, true, false); $elemOrgMemoire->AjouterClasse(PALETTE_MEMOIRE); $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 1, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 2, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 3, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 4, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 5, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 6, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 7, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 8, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 9, $elem); // $elem = new SElement($prefixIdClass . PALETTE_TEXTE); $elem->AjouterClasse(PALETTE_TEXTE); $div = new SBalise(BAL_DIV); $div->AddClass(COLOR_JQ); $elem->Attach($div); $elemOrgMemoire->AttacherCellule(1, 10, $elem); $elemCouleur->Attach($elemOrgMemoire); }