Commit ed75892e authored by Fabiano Sluzarski's avatar Fabiano Sluzarski
Browse files

Floating menu, report properties and function to get this properties.

parent 6122625c
package br.ufpr.c3sl.sapos.models.util;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.util.Properties;
import org.springframework.core.io.support.PropertiesLoaderUtils;
public class PropertyUtil {
public static void getInstance() throws IOException {
Properties props = PropertiesLoaderUtils.loadAllProperties("WEB-INF/i18n/messages.properties");
System.out.println(props);
/*Properties prop = (new PropertyUtil()).getInstance();
System.out.println(prop.getProperty("database.username"));*/
public Properties getInstance() {
URL myurl = this.getClass().getResource("/META-INF/spring/report.properties"); //access src/main/resources by default
//getResourceAsStream()??
String filePath = myurl.getPath();
Properties prop = new Properties();
try {
prop.load(new FileInputStream(filePath));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return prop;
}
}
......
......@@ -3,14 +3,13 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
import org.apache.solr.client.solrj.request.ContentStreamUpdateRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.MailSender;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
......@@ -20,6 +19,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import br.ufpr.c3sl.sapos.models.customization.Configuration;
import br.ufpr.c3sl.sapos.models.scholar.Registration;
import br.ufpr.c3sl.sapos.models.util.PropertyUtil;
@RooWebScaffold(path = "configurations", formBackingObject = Configuration.class)
@RequestMapping("/configurations")
......
......@@ -110,9 +110,4 @@ public class TravelRequisitionController {
return "travelrequisitions/list";
}
/*@ModelAttribute("peopletype")
public java.util.Collection<Person> populatePeopleType() {
return Person.findAllPeopleWithType();
}*/
}
#when loaded, the space in the beginning doesn't count, but the space in the end count
#ReportUtil
prop1: de
prop2:.
prop3:Ministério da Educação
prop4:Programa de
prop5:janeiro
prop6:fevereiro
prop7:março
prop8:abril
prop9:maio
prop11:junho
prop12:julho
prop13:agosto
prop14:setembro
prop15:outubro
prop16:novembro
prop17:dezembro
prop18:primeiro
prop19:segundo
prop20:terceiro
prop21:quarto
prop22:quinto
prop23:sexto
prop24:sétimo
prop25:oitavo
prop26:nono
prop27:décimo
prop28:conceitos: 9,0 a 10,0 = A; 8,0 a 8,9 = B; 7,0 a 7,9 = C; Zero a 6,9 = D = Reprovado
prop29:Coordenador da
#Registration
prop30:DECLARAÇÃO
prop31:Declaramos que
prop32:está regularmente matriculado no curso de
prop33:, no Programa de
prop34: é aluno(a) e
prop35: da
prop36:Declaro, para os devidos fins que
prop37:, foi aceito no curso de
prop38:mestrado
prop39:doutorado
prop40: do Programa de
prop41:. As aulas tem inicio em
prop42:Ingressantes:
prop43:Desistentes:
prop44:Concluidos:
prop45:Ativos em
prop46:Bolsas
prop47::
prop48: (
prop49:):
#Transcript
prop50:, é aluno(a)
prop51: no Curso de
prop52: Declaro ainda que o(a) mesmo(a) cursou as disciplinas abaixo relacionadas.
prop53:, cursou disciplinas no Programa de
prop54:Disciplinas Cursadas:
prop55:Código
prop56:Nome
prop57:Conceito
prop58:Créditos
prop59:Período
prop60:/
prop61: Portaria Ministerial Homologado pelo CNE (Portaria n° 2.878, 24/08/2005), Conceito 4 na CAPES.
prop62:Alemão
prop63:Inglês
prop64:Francês
prop65:Aprovação em Exame de Língua Estrangeira (
prop66:HISTÓRICO ESCOLAR
prop67:Curso:
prop68:Aluno:
prop69: Matricula:
prop70:Filiação:
prop71: /
prop72:
prop73:Data de Nascimento:
prop74: RG:
prop75: CPF:
prop76:Natural de:
prop77: Nacionalidade:
prop78:Periodo Sem/Ano
prop79:Disciplinas
prop80:Carga Horária
prop81:Reaproveitamento de Crédito:
prop82:Dissertação aprovada em:
prop83:Título:
prop84:Banca Examinadora:
prop85:Prof. Dr.
prop86: -
prop87: - Orientador(a)
prop88:Linha de Pesquisa:
prop89:Obs:
prop90:Discente
prop91:Frequencia
\ No newline at end of file
......@@ -10,14 +10,18 @@
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<util:load-scripts />
<spring:message code="application_name" var="app_name"/>
<title><spring:message code="welcome_h3" arguments="${app_name}" /></title>
</head>
<body class="tundra spring">
<tiles:insertAttribute name="header" ignore="true" />
<div id="wrapper">
<tiles:insertAttribute name="header" ignore="true" />
<tiles:insertAttribute name="menu" ignore="true" />
<div id="main">
<tiles:insertAttribute name="body"/>
......
......@@ -5,6 +5,7 @@
<jsp:directive.attribute name="field" type="java.lang.String" required="true" rtexprvalue="true" description="The field exposed from the form backing object" />
<jsp:directive.attribute name="path" type="java.lang.String" required="true" rtexprvalue="true" description="The relative path to the referenced resource" />
<jsp:directive.attribute name="items" type="java.util.Collection" required="true" rtexprvalue="true" description="The name of the collection displayed in the select box" />
<jsp:directive.attribute name="itemConcat" type="java.lang.String" required="false" rtexprvalue="true" description="Name of the field to show after the default value of this field (values on the combo)" />
<jsp:directive.attribute name="label" type="java.lang.String" required="false" rtexprvalue="true" description="The label used for this field, will default to a message bundle if not supplied" />
<jsp:directive.attribute name="itemValue" type="java.lang.String" required="false" rtexprvalue="true" description="The identifier used as value in the select box (defaults to 'id' for non enum types)" />
<jsp:directive.attribute name="required" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicates if this field is required (default false)" />
......@@ -62,7 +63,7 @@
<c:when test="${disableFormBinding}">
<select id="_${sec_field}_id" name="${sec_field}" multiple="${multiple}" >
<c:forEach items="${items}" var="item">
<option value="${item}">
<option value="${item}" >
<spring:eval expression="item" />
</option>
</c:forEach>
......@@ -94,8 +95,19 @@
itemValue="${fn:escapeXml(itemValue)}" >
<form:option value="-1">
<spring:eval expression="select_one_value" />
</form:option>
<form:options items="${items}" itemValue="${fn:escapeXml(itemValue)}"/>
</form:option>
<c:if test="${not empty itemConcat}">
<c:forEach items="${items}" var="item">
<option value="${item[fn:escapeXml(itemValue)]}">
<spring:eval expression="item" /> -- <spring:eval expression="item.${itemConcat}" />
</option>
</c:forEach>
</c:if>
<c:if test="${empty itemConcat}">
<form:options items="${items}" itemValue="${fn:escapeXml(itemValue)}"/>
</c:if>
</form:select>
<br />
<form:errors cssClass="errors" id="_${sec_field}_error_id" path="${sec_field}" />
......
<jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" version="2.0">
<jsp:output omit-xml-declaration="yes"/>
<jsp:directive.attribute name="id" type="java.lang.String" required="true" rtexprvalue="true" description="The identifier for this tag (do not change!)"/>
......@@ -6,8 +6,12 @@
<jsp:directive.attribute name="z" type="java.lang.String" required="false" description="Used for checking if element has been modified (to recalculate simply provide empty string value)"/>
<c:if test="${empty render or render}">
<ul id="${fn:escapeXml(id)}">
<jsp:doBody />
</ul>
<!-- <div style="position: fixed; height: 70%; overflow: auto;"> -->
<!-- <util:panel id="${id}" title=" " openPane="true"> -->
<ul id="${fn:escapeXml(id)}">
<jsp:doBody />
</ul>
<!-- </util:panel> -->
<!-- </div> -->
</c:if>
</jsp:root>
\ No newline at end of file
......@@ -24,5 +24,24 @@
<script src="${spring_url}" type="text/javascript"><!-- /required for FF3 and Opera --></script>
<script src="${spring_dojo_url}" type="text/javascript"><!-- required for FF3 and Opera --></script>
<script language="JavaScript" type="text/javascript">dojo.require("dojo.parser");</script>
<script src="http://code.jquery.com/jquery-1.7.2.js"><!-- required for FF3 and Opera --></script>
<script language="javascript">
$(document).ready(function(){
$(window).scroll(function () {
var tam = 0;
if ( $("#img_banner").height() > window.pageYOffset ) {
tam = $("#img_banner").height() - window.pageYOffset + 7 + $("#header").bottom;
}
else {
tam = 7;
}
$("#menu").animate({
top: $(document).scrollTop() + tam + "px"
},{duration:00,queue:false}
);
});
});
</script>
</jsp:root>
\ No newline at end of file
......@@ -6,6 +6,6 @@
<spring:url var="home" value="/" />
<spring:message code="button_home" var="home_label" />
<a href="${home}" name="${fn:escapeXml(home_label)}" title="${fn:escapeXml(home_label)}">
<img style="width: 100%" src="${banner}" />
<img id = "img_banner" style="width: 100%" src="${banner}" />
</a>
</div>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<form:create id="fc_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition" modelAttribute="travelRequisition" path="/travelrequisitions" render="${empty dependencies}" z="user-managed">
<b>Requirente</b>
<p/>
<field:select field="person" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_person" itemValue="id" items="${people}" path="/people" z="user-managed"/>
<field:select field="person" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_person" itemValue="id" items="${people}" itemConcat="userKind" path="/people" z="user-managed"/>
<field:select field="requesterKind" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_requesterKind" items="${requesterkinds}" path="requesterkinds" z="user-managed"/>
<field:input field="profession" id="c_br_ufpr_c3sl_sapos_models_scholar_TravelRequisition_profession" z="user-managed"/>
......
......@@ -9,11 +9,13 @@ body,div,td {
body {
background-color: #fff;
text-align: center;
/*margin-left:230px; menu flutuante*/
margin-left:230px; /*menu flutuante*/
}
#header {
margin-bottom: 1em;
/* position : fixed; */
margin-left: -220px;
}
#wrapper {
......@@ -33,19 +35,20 @@ body {
/* header and footer elements */
#main {
overflow:hidden;
overflow: hidden;
display:box;
}
#menu {
background: #eee;
/*position:fixed; menu flutuante*/
position:relative;
float:left;
/*left:8px; menu flutuante*/
left:0px;
background: #eee;
/* position:fixed; */
position:absolute;
float:left;
/* left:8px; menu flutuante*/
left:8px;
width:220px;
margin-right:15px;
margin-right:15px;
height: 75%; overflow: auto; /* menu flutuante */
}
#menu ul{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment