public function modificationAction($id) { $tache = Tache::findFirst("id=" . $id); $this->view->setVars(array("tache" => $tache)); $this->jquery->postFormOnClick(".validate", "Taches/update/" . $id, "modifier", "#modifie", ""); $use = Usecase::findFirst("code='" . $tache->getCodeUseCase() . "'"); $this->jquery->click(".validate", "\$('#modifier-" . $use->getCode() . "').hide('400')"); $this->jquery->click(".cancel", "\$('#modifier-" . $use->getCode() . "').hide('400')"); $this->jquery->compile($this->view); }
public function tachesAction($id) { $tache = Tache::findFirst("id='" . $id . "'"); print_r(json_encode($tache->toArray())); $this->view->disable(); }
public function manageTasksAction($id = null, $idUc = null) { $tache = Tache::findFirst($id); if (!$tache) { $tache = new Tache(); $tache->setAvancement(0); $tache->setCodeUseCase($idUc); } $users = User::find("idRole<>3"); $this->view->setVars(array("tache" => $tache, "users" => $users, "baseHref" => $this->url->getBaseUri())); $_SESSION['bread']['object'] = $tache; $this->jquery->exec("\$('input[type=\"range\"]').rangeslider({\n \t\t\t\t\t\t\t\tpolyfill: false,\n\t\t\t\t\t\t\t\tonSlide: function(position, value) {\n\t\t\t\t\t\t\t\t\t\$('.avancementTasks').html(value.toString()+'%');\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});", true); $this->view->pick("projects/manageTasks"); $this->jquery->postFormOnClick(".validateTasks", "Taches/updateFromProject", "frmTasks", ".content"); $this->jquery->click(".cancelTask", "\$('.tasks').hide();"); $this->jquery->compile($this->view); $uc = Usecase::findFirst("code='" . $tache->getCodeUseCase() . "'"); $_SESSION['bread']['object'] = Projet::findFirst($uc->getIdProjet()); }