Subversion Repositories bacoAlunos

Rev

Rev 1342 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1340 jmachado 1
<%@ page import="jomm.dao.impl.AbstractDao" %>
2
<%@ page import="pt.estgp.estgweb.domain.Course" %>
3
<%@ page import="pt.estgp.estgweb.domain.JobServiceTaskImpl" %>
4
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %>
5
<%@ page import="pt.estgp.estgweb.services.jobs.ServiceJob" %>
6
<%@ page import="pt.estgp.estgweb.services.questionarios.pedagogico.UpdateCoursesAndUnitsJobService" %>
7
<%@ page import="java.util.List" %>
8
<%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %>
9
<%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoUnidadeCurricularAfeta" %>
10
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
11
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
12
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
13
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
14
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
15
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
16
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %>
17
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
18
<%
19
    long unidadeAfetaId = Long.parseLong(request.getParameter("unidadeAfetaId"));
20
    AbstractDao.getCurrentSession().beginTransaction();
21
    QuestionarioPedagogicoUnidadeCurricularAfeta unidadeAfeta = DaoFactory.getQuestionarioPedagogicoUnidadeCurricularAfetaDaoImpl().load(unidadeAfetaId);
22
    String targetSetVarId = request.getParameter("targetSetVarId");
23
    long cursoAfetoId=unidadeAfeta.getCursoAfeto().getId();
24
%>
25
<script>
26
    $(document).ready(
27
            function(){
28
                $("#setObsUnidade<%=unidadeAfetaId%>").on("click",function(){
29
                    var val = $('#setObsUnidade<%=unidadeAfetaId%>Val').val();
30
                    if($.trim(val) != "")
31
                        $('#<%=targetSetVarId%>').addClass("obsContent");
32
                    else
33
                        $('#<%=targetSetVarId%>').removeClass("obsContent");
34
 
35
                    setUnidadeAfetaVar('<%=cursoAfetoId%>','<%=unidadeAfetaId%>','observacoes',val,$('#<%=targetSetVarId%>'));
36
 
37
                });
38
            }
39
    );
40
</script>
41
<form role="form">
42
    <div class="form-group">
43
        <label class="control-label col-sm-2">Observações</label>
44
        <div class="col-sm-10">
1341 jmachado 45
            <textarea class="form-control" rows="10" name="val" id="setObsUnidade<%=unidadeAfetaId%>Val"><%=unidadeAfeta.getObs()%></textarea>
1340 jmachado 46
        </div>
1342 jmachado 47
 
1340 jmachado 48
    </div>
1341 jmachado 49
    <button type="button" id="setObsUnidade<%=unidadeAfetaId%>" class="btn btn-success pull-right" data-dismiss="modal">Salvar</button>
50
    <button style="margin-right:10px" type="button" onclick="$(this.form).find('textarea').html('')" class="btn btn-warning pull-right">Clear</button>
1340 jmachado 51
</form>
52
<%
53
    AbstractDao.getCurrentSession().getTransaction().commit();
54
%>