/impl/conf/language/MessageResources.properties |
---|
89,7 → 89,8 |
fail.timer=Lamentamos o incomodo, mas a acção que tentou efectuar não pode ser executada nesta data. |
fail.authenticate=Falhou a autênticação |
#palavras comuns |
at=a |
#Menus |
site.title=Escola Superior de Tecnologia e Gestão |
administration=Administração |
/impl/conf/language/MessageResourcesBlog.properties |
---|
12,4 → 12,5 |
blog.edited.success=Blog alterado com sucesso |
blog.status=Válido |
submit.blog=Criar um Blog |
blog.owner=Criado por |
/impl/conf/WEB-INF/struts/struts-courseunits.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<struts-config> |
20,7 → 20,10 |
<action-mappings> |
<action path="/startTeste2" forward="page.separators.home"/> |
</action-mappings> |
</struts-config> |
/impl/conf/WEB-INF/struts/tiles-courseunits.xml |
---|
1,13 → 1,19 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<tiles-definitions> |
<definition name="page.load.courseunits" extends="base.layout1"> |
<definition name="base.separators" extends="base.definition" path="/layout/layoutintranet.jsp"> |
<put name="separators" value="/layout/separators.jsp" /> |
</definition> |
<definition name="page.separators.home" extends="base.separators"> |
<put name="body" value="/user/home.jsp" /> |
</definition> |
</tiles-definitions> |
/impl/conf/berserk/sd.xml |
---|
188,5 → 188,15 |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadBlog</name> |
<implementationClass>pt.estgp.estgweb.services.blog.LoadBlogService</implementationClass> |
<description>Load a Blog</description> |
<isTransactional>true</isTransactional> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
</filterChains> |
</service> |
</serviceDefinitions> |
/impl/src/java/pt/estgp/estgweb/services/blog/LoadBlogService.java |
---|
New file |
0,0 → 1,38 |
package pt.estgp.estgweb.services.blog; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.Globals; |
import org.apache.log4j.Logger; |
import java.util.Date; |
/* |
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
* |
* |
* Created at 17/Out/2003 , 23:45:24 |
* |
*/ |
/** |
* @author Jorge Machado |
* |
* |
* Created at 17/Out/2003 , 23:45:24 |
* |
*/ |
public class LoadBlogService implements IService |
{ |
private static final Logger logger = Logger.getLogger(LoadBlogService.class); |
public BlogView run(Long id, UserSession userSession) throws ServiceException |
{ |
DaoFactory.getBlogDaoImpl().get(id); |
return new BlogView(DaoFactory.getBlogDaoImpl().get(id)); |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/announcements/CreateAnnouncementService.java |
---|
3,16 → 3,22 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.domain.Announcement; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
import pt.estgp.estgweb.domain.Image; |
import pt.estgp.estgweb.domain.views.AnnouncementView; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.utils.RoleManager; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.web.form.announcements.AnnouncementsForm; |
import java.util.Date; |
import java.util.List; |
import java.io.InputStream; |
import java.io.ByteArrayOutputStream; |
import org.apache.log4j.Logger; |
import org.apache.struts.upload.FormFile; |
/* |
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
35,19 → 41,94 |
private static final String ALL_ROLE = Globals.ALL_ROLE; |
public AnnouncementView run(Announcement announcement, UserSession userSession) |
public AnnouncementView run(AnnouncementsForm announcementsForm, UserSession userSession) |
{ |
if(announcement.getTargetRoles() == null || announcement.getTargetRoles().length() == 0) |
announcement.setTargetRoles(ALL_ROLE); |
announcement.setOwner(userSession.getUser()); |
announcement.setSaveDate(new Date()); |
Announcement a = null; |
if(announcementsForm.getAnnouncementView().getId() <= 0) |
{ |
a = DomainObjectFactory.createAnnouncementImpl(); |
announcementsForm.getAnnouncementView().persistViewInObject(a); |
a.setOwner(userSession.getUser()); |
a.setSaveDate(new Date()); |
if(a.getTargetRoles() == null || a.getTargetRoles().length() == 0) |
a.setTargetRoles(ALL_ROLE); |
} |
else |
{ |
AnnouncementView view = announcementsForm.getAnnouncementView(); |
a= DaoFactory.getAnnouncementDaoImpl().load(view.getSerializable()); |
view.persistViewInObject(a); |
if(view.getTargetRoles() == null || view.getTargetRoles().size() == 0) |
a.setTargetRoles(ALL_ROLE); |
} |
try{ |
if(announcementsForm.getBigImage().getFileSize()!= 0) |
{ |
FormFile bigImage = announcementsForm.getBigImage(); |
InputStream stream = bigImage.getInputStream(); |
ByteArrayOutputStream b = new ByteArrayOutputStream(); |
int readedBytes; |
byte[] buf = new byte[1024]; |
while((readedBytes = stream.read(buf)) > 0) |
{ |
b.write(buf,0,readedBytes); |
} |
b.close(); |
Image i = DomainObjectFactory.createImageImpl(); |
i.setImage(b.toByteArray()); |
i.setContentType(bigImage.getContentType()); |
i.setSize(bigImage.getFileSize()); |
i.setDescription(a.getTitle()); |
i.setName(bigImage.getFileName()); |
i.setSaveDate(new Date()); |
a.setBigImage(i); |
} |
if(announcementsForm.getSmallImage().getFileSize()!= 0) |
{ |
FormFile smallImage = announcementsForm.getSmallImage(); |
InputStream stream2 = smallImage.getInputStream(); |
ByteArrayOutputStream b2 = new ByteArrayOutputStream(); |
int readedBytes2; |
byte[] buf2 = new byte[1024]; |
while((readedBytes2 = stream2.read(buf2)) > 0) |
{ |
b2.write(buf2,0,readedBytes2); |
} |
b2.close(); |
Image i2 = DomainObjectFactory.createImageImpl(); |
i2.setImage(b2.toByteArray()); |
i2.setDescription(a.getTitle()); |
i2.setContentType(smallImage.getContentType()); |
i2.setSize(smallImage.getFileSize()); |
i2.setName(smallImage.getFileName()); |
i2.setSaveDate(new Date()); |
a.setSmallImage(i2); |
} |
} |
catch(Exception e) |
{ |
logger.error(e,e); |
} |
String finalUrl=""; |
if(!announcementsForm.getUrl().equals("")) |
{ |
finalUrl=announcementsForm.getUrlProtocol()+announcementsForm.getUrl(); |
a.setUrl(finalUrl); |
} |
else |
{ |
a.setUrl(null); |
} |
if(RoleManager.hasRole(userSession.getUser(),Globals.AUTOMATIC_VALIDATION_ROLES)) |
announcement.setStatus(true); |
a.setStatus(true); |
else |
{ |
String[] userRoles=announcement.getChoosedOwnerRole().split(","); |
String[] userRoles=a.getChoosedOwnerRole().split(","); |
Boolean validation=false; |
for(String role: userRoles) |
60,9 → 141,9 |
String userAutoValitation=ConfigProperties.getProperty(validationTargets); |
String[] userAutoValitationRoles=userAutoValitation.split(","); |
int validTargetRoles=0; |
if(announcement.getTargetRoles().contains(",")) |
if(a.getTargetRoles().contains(",")) |
{ |
String[] targetRolesAnnouncementSplited=announcement.getTargetRoles().split(","); |
String[] targetRolesAnnouncementSplited=a.getTargetRoles().split(","); |
//Percorre os targets todos a quem se destina |
for(String target: targetRolesAnnouncementSplited) |
87,14 → 168,14 |
String[] userAutoValitationTypes=userAutoTypes.split(","); |
for(String types: userAutoValitationTypes) |
{ |
if(types.equals(announcement.getType())) |
if(types.equals(a.getType())) |
validation=true; |
} |
} |
} |
else |
{ |
String targetRolesAnnouncement=announcement.getTargetRoles(); |
String targetRolesAnnouncement=a.getTargetRoles(); |
//Percorre todos os validation targets |
for(String userTargetRoles: userAutoValitationRoles) |
{ |
110,7 → 191,7 |
String[] userAutoValitationTypes=userAutoTypes.split(","); |
for(String types: userAutoValitationTypes) |
{ |
if(types.equals(announcement.getType())) |
if(types.equals(a.getType())) |
validation=true; |
} |
} |
119,11 → 200,19 |
catch(Exception e){} |
} |
} |
announcement.setStatus(validation); |
a.setStatus(validation); |
} |
DaoFactory.getAnnouncementDaoImpl().save(announcement); |
logger.info("Creating announcement:" + announcement.getId()); |
return new AnnouncementView(announcement); |
if(announcementsForm.getAnnouncementView().getId() <= 0) |
{ |
DaoFactory.getAnnouncementDaoImpl().save(a); |
logger.info("Creating announcement:" + a.getId()); |
return new AnnouncementView(a); |
} |
else |
{ |
logger.info("Updating announcement:" + a.getId()); |
return new AnnouncementView(a); |
} |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/AnnouncementView.java |
---|
34,6 → 34,7 |
private Date expireDate; |
private Integer counter; |
private boolean status; |
private long ownerID; |
public AnnouncementView() |
{} |
41,6 → 42,7 |
public AnnouncementView(Announcement announcement) |
{ |
super(announcement); |
this.title = announcement.getTitle(); |
this.text = announcement.getText(); |
this.bigImage = announcement.getBigImage(); |
54,6 → 56,7 |
this.startDate = announcement.getStartDate(); |
this.expireDate = announcement.getExpireDate(); |
this.choosedOwnerRole = announcement.getChoosedOwnerRole(); |
this.ownerID=announcement.getOwner().getId(); |
} |
public void persistViewInObject(Announcement announcement) |
187,6 → 190,10 |
} |
public long getOwnerID() { |
return ownerID; |
} |
public Integer getCounter() { |
return counter; |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/DomainObjectView.java |
---|
3,6 → 3,9 |
import pt.estgp.estgweb.domain.DomainObject; |
import java.io.Serializable; |
import java.util.Date; |
import java.text.DateFormat; |
import java.text.SimpleDateFormat; |
/** |
* @author Jorge Machado |
15,10 → 18,28 |
public abstract Class getReferenceClass(); |
public abstract Serializable getSerializable(); |
private Date saveDate; |
DateFormat df= new SimpleDateFormat("yyyy/MM/dd"); |
public String getFragment(int maxSize, String text) |
{ |
if(text.length() > maxSize) |
return text.substring(0,text.substring(0, maxSize).lastIndexOf(' ')) + "..."; |
return text; |
} |
public DomainObjectView() |
{} |
public DomainObjectView(DomainObject obj) |
{ |
this.saveDate = obj.getSaveDate(); |
} |
public String getFormatedSaveDate() |
{ |
if(saveDate == null) |
return null; |
return df.format(saveDate); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/BlogView.java |
---|
2,11 → 2,14 |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.Image; |
import pt.estgp.estgweb.domain.User; |
import pt.estgp.estgweb.domain.GenericUser; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.utils.RoleManager; |
import java.io.Serializable; |
import java.util.List; |
import java.util.Date; |
/** |
* @author Jorge Machado |
25,7 → 28,7 |
private String description; |
private List<String> targetRoles; |
private Image image; |
private long ownerId; |
private GenericUser owner; |
private boolean status; |
public BlogView() |
33,13 → 36,14 |
public BlogView(Blog blog) |
{ |
super(blog); |
this.title = blog.getTitle(); |
this.description = blog.getDescription(); |
this.image = blog.getImage(); |
this.targetRoles = RoleManager.getRolesFromSerial(blog.getTargetRoles()); |
this.status=blog.isStatus(); |
this.id = blog.getId(); |
this.ownerId = blog.getOwner().getId(); |
this.owner = blog.getOwner(); |
} |
public void persistViewInObject(Blog blog) |
60,6 → 64,11 |
this.id = id; |
} |
public GenericUser getOwner() |
{ |
return owner; |
} |
public String getTitle() { |
return title; |
} |
92,10 → 101,6 |
this.image = image; |
} |
public long getOwnerId() { |
return ownerId; |
} |
public boolean isStatus() { |
return status; |
} |
123,4 → 128,12 |
{ |
return id; |
} |
public String getOwnerEmail() |
{ |
if(owner instanceof User) |
return ((User)owner).getEmail(); |
else |
return null; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/DomainObject.java |
---|
22,6 → 22,10 |
public void setSaveDate(Date d){} |
public Date getSaveDate() |
{ |
return null; |
} |
/** |
* can be override in proper classes |
/impl/src/java/pt/estgp/estgweb/web/controllers/blog/BlogController.java |
---|
39,30 → 39,25 |
private static final Logger logger = Logger.getLogger(BlogController.class); |
public ActionForward save(ActionMapping mapping, |
ActionForm form , |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable, ServletException |
{ |
try |
{ |
throws Throwable, ServletException { |
try { |
BlogForm blogForm = (BlogForm) form; |
if(blogForm.getBlogView().getId() <= 0) |
{ |
if (blogForm.getBlogView().getId() <= 0) { |
Blog blog = DomainObjectFactory.createBlogImpl(); |
blogForm.getBlogView().persistViewInObject(blog); |
IServiceManager sm = ServiceManager.getInstance(); |
if(blogForm.getImage().getFileSize()!= 0) |
{ |
if (blogForm.getImage().getFileSize() != 0) { |
FormFile image = blogForm.getImage(); |
InputStream stream = image.getInputStream(); |
ByteArrayOutputStream b = new ByteArrayOutputStream(); |
int readedBytes; |
byte[] buf = new byte[1024]; |
while((readedBytes = stream.read(buf)) > 0) |
{ |
b.write(buf,0,readedBytes); |
while ((readedBytes = stream.read(buf)) > 0) { |
b.write(buf, 0, readedBytes); |
} |
b.close(); |
Image i = DomainObjectFactory.createImageImpl(); |
76,30 → 71,50 |
} |
String[] names = new String[]{"object"}; |
Object[] args = new Object[]{blog}; |
BlogView bV = (BlogView) sm.execute(RequestUtils.getRequester(request),"CreateBlog",args,names); |
addMessage(request,"blog.created.success","" + bV.getId()); |
request.setAttribute("BlogView",bV); |
BlogView bV = (BlogView) sm.execute(RequestUtils.getRequester(request), "CreateBlog", args, names); |
addMessage(request, "blog.created.success", "" + bV.getId()); |
request.setAttribute("BlogView", bV); |
return mapping.findForward("success"); |
} |
else |
{ |
} else { |
BlogView bV = blogForm.getBlogView(); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"object"}; |
Object[] args = new Object[]{bV}; |
bV = (BlogView) sm.execute(RequestUtils.getRequester(request),"EditBlog",args,names); |
addMessage(request,"blog.edited.success","" + bV.getId()); |
bV = (BlogView) sm.execute(RequestUtils.getRequester(request), "EditBlog", args, names); |
addMessage(request, "blog.edited.success", "" + bV.getId()); |
return mapping.findForward("success"); |
} |
} |
catch(FilterChainFailedException e) |
catch (FilterChainFailedException e) { |
return mapping.findForward("error401"); |
} |
catch (Throwable e) { |
logger.error(e, e); |
throw e; |
} |
} |
public ActionForward load(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable, ServletException { |
try |
{ |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"serializable"}; |
Object[] args = new Object[]{Long.parseLong(request.getParameter("id"))}; |
BlogView bV = (BlogView) sm.execute(RequestUtils.getRequester(request), "LoadBlog", args, names); |
request.setAttribute("BlogView", bV); |
return mapping.findForward("success"); |
} |
catch (FilterChainFailedException e) { |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e,e); |
catch (Throwable e) { |
logger.error(e, e); |
throw e; |
} |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/controllers/announcements/AnnouncementsController.java |
---|
34,9 → 34,9 |
public class AnnouncementsController extends AddRolesController { |
private static final Logger logger = Logger.getLogger(AnnouncementsController.class); |
private static final String TARGET_ROLES_KEY = AddRolesForm.TARGET_ROLES_KEY; |
public ActionForward save(ActionMapping mapping, |
ActionForm form , |
HttpServletRequest request, |
45,7 → 45,14 |
{ |
try |
{ |
AnnouncementsForm announcementsForm = (AnnouncementsForm) form; |
AnnouncementsForm a = (AnnouncementsForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"object"}; |
Object[] args = new Object[]{a}; |
AnnouncementView aV = (AnnouncementView) sm.execute(RequestUtils.getRequester(request),"CreateAnnouncement",args,names); |
addMessage(request,"announcement.edited.success","" + aV.getId()); |
return mapping.findForward("success"); |
/*AnnouncementsForm announcementsForm = (AnnouncementsForm) form; |
if(announcementsForm.getAnnouncementView().getId() <= 0) |
{ |
Announcement a = DomainObjectFactory.createAnnouncementImpl(); |
115,14 → 122,15 |
} |
else |
{ |
AnnouncementView a = announcementsForm.getAnnouncementView(); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"object"}; |
Object[] args = new Object[]{a}; |
AnnouncementView aV = (AnnouncementView) sm.execute(RequestUtils.getRequester(request),"EditAnnouncement",args,names); |
AnnouncementView aV = (AnnouncementView) sm.execute(RequestUtils.getRequester(request),"CreateAnnouncement",args,names); |
addMessage(request,"announcement.edited.success","" + aV.getId()); |
return mapping.findForward("success"); |
} |
} */ |
} |
catch(FilterChainFailedException e) |
{ |
/impl/src/java/pt/estgp/estgweb/examples/DBInit.java |
---|
24,12 → 24,14 |
AbstractDao.getCurrentSession().beginTransaction(); |
UserImpl user = DomainObjectFactory.createUserImpl(); |
user.setUsername("super"); |
user.setName("super user"); |
user.setRoles("all,admin"); |
user.setPassword(BytesUtils.getMD5("1")); |
DaoFactory.getUserDaoImpl().save(user); |
UserImpl userStudent = DomainObjectFactory.createUserImpl(); |
userStudent.setUsername("student"); |
userStudent.setRoles("student"); |
userStudent.setName("student user"); |
userStudent.setPassword(BytesUtils.getMD5("1")); |
DaoFactory.getUserDaoImpl().save(userStudent); |
AnnouncementImpl announcement = DomainObjectFactory.createAnnouncementImpl(); |
/impl/src/web/css/style.css |
---|
6,6 → 6,21 |
FONT-SIZE:0.98em; |
} |
.pFooter |
{ |
background-color:#8EC73F; |
font-size:0.7em; |
border-top: 1px solid #cccccc; |
border-bottom: 1px solid #cccccc; |
text-align:right; |
clear:both; |
} |
.pFooter a |
{ |
font-style:italic; |
} |
#body |
{ |
width:950px; |
/impl/src/web/css/intranet.css |
---|
New file |
0,0 → 1,75 |
/* --- Main Navigation --- */ |
#body,#page |
{ |
width:950px; |
margin-left: auto; |
margin-right: auto; |
} |
#testeTop { |
border-bottom: 10px solid #ebe6d6; |
} |
#testeTop ul { |
margin: 0; |
padding: 0; |
} |
#testeTop ul li { |
margin: 0; |
padding: 0; |
} |
#testeTop ul li span { |
margin: 0; |
padding: 0; |
} |
#testeTop { |
float: left; |
width: 100%; |
font-size: 11px; |
padding-top: 0.5em; |
} |
#testeTop ul { |
margin: 0; |
margin-left: 200px; |
list-style: none; |
} |
#testeTop li { |
float: left; |
padding: 0; |
font-family: Tahoma, Verdana, Sans-Serif; |
margin: 0; |
} |
#testeTop ul li { |
margin-right: 2px; |
} |
#testeTop li a { |
float: left; |
font-size: 100%; |
font-weight: normal; |
text-decoration: none; |
white-space: nowrap; |
} |
#testeTop li a span { |
float: left; |
padding: 0.4em 8px; |
cursor: pointer; /* IE6 tweak */ |
} |
#testeTop { border-top: 4px solid #31C70F; background: #5fC73F url(../images/0grad01.gif) bottom repeat-x; } |
#testeTop li a { display: block; background: #11a71F url(../images/0corner_left_01.gif) top left repeat-x;} |
#testeTop li a span { background: url(../images/0corner_right_01.gif) top right no-repeat; } |
#testeTop ul li.selected a { background: #ebe6d6 url(../images/0corner_left_span_01.gif) top left no-repeat; } |
#testeTop ul li.selected a span { background: url(../images/0corner_right_span_01.gif) top right no-repeat; } |
#testeTop ul li.selected a:hover { background: #ebe6d6 url(../images/0corner_left_span_01.gif) top left no-repeat; color: #000; } |
#testeTop ul li.selected a:hover span { background: url(../images/0corner_right_span_01.gif) top right no-repeat; color: #000; } |
#testeTop li a:hover { background: #23C71F url(../images/0corner_left_light_01.gif) top left repeat-x; } |
#testeTop li a:hover span { background: url(../images/0corner_right_light_01.gif) top right no-repeat; } |
#testeTop a, #testeTop a:visited, #testeTop a:hover |
{ |
COLOR:BLACK; |
} |
/impl/src/web/layout/layout1.jsp |
---|
12,46 → 12,52 |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
</div> |
<table class="pageDefault"> |
<tr> |
<td colspan="2"><tiles:insert attribute="navigationTop"/></td> |
</tr> |
<tr> |
<td id="leftPage"> |
<tiles:insert attribute="navigation" /> |
</td> |
<td class="content"> |
<tiles:insert attribute="topnav"/> |
<tiles:insert attribute="body" /> |
</td> |
</tr> |
</table> |
<div id="footer"> |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
<table width="100%"> |
<tr> |
<td align="center"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
</div> |
<table class="pageDefault"> |
<tr> |
<td colspan="2"><tiles:insert attribute="navigationTop"/></td> |
</tr> |
<tr> |
<td id="leftPage"> |
<tiles:insert attribute="navigation" /> |
</td> |
<td class="content"> |
<tiles:insert attribute="topnav"/> |
<tiles:insert attribute="body" /> |
</td> |
</tr> |
</table> |
<div id="footer"> |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
</td> |
</tr> |
</table> |
</body> |
</html:html> |
/impl/src/web/layout/layout2.jsp |
---|
12,43 → 12,49 |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
</div> |
<table id="page"> |
<tr> |
<td><tiles:insert attribute="navigationTop"/></td> |
</tr> |
<tr> |
<td class="content"> |
<tiles:insert attribute="topnav"/> |
<tiles:insert attribute="body" /> |
</td> |
</tr> |
</table> |
<div id="footer"> |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
<table width="100%"> |
<tr> |
<td align="center"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
</div> |
<table id="page"> |
<tr> |
<td><tiles:insert attribute="navigationTop"/></td> |
</tr> |
<tr> |
<td class="content"> |
<tiles:insert attribute="topnav"/> |
<tiles:insert attribute="body" /> |
</td> |
</tr> |
</table> |
<div id="footer"> |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
</td> |
</tr> |
</table> |
</body> |
</html:html> |
/impl/src/web/layout/layoutPortal.jsp |
---|
32,6 → 32,9 |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<table width="100%"> |
<tr> |
<td align="center"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
62,6 → 65,9 |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
</td> |
</tr> |
</table> |
</body> |
</html:html> |
/impl/src/web/layout/layout3.jsp |
---|
12,46 → 12,52 |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
</div> |
<table id="page"> |
<tr> |
<td colspan="2"><tiles:insert attribute="navigationTop"/></td> |
</tr> |
<tr> |
<td class="content"> |
<tiles:insert attribute="topnav"/> |
<tiles:insert attribute="body" /> |
</td> |
<td class="rightPage"> |
<tiles:insert attribute="navigation" /> |
</td> |
</tr> |
</table> |
<div id="footer"> |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
<table width="100%"> |
<tr> |
<td align="center"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
</div> |
<table id="page"> |
<tr> |
<td colspan="2"><tiles:insert attribute="navigationTop"/></td> |
</tr> |
<tr> |
<td class="content"> |
<tiles:insert attribute="topnav"/> |
<tiles:insert attribute="body" /> |
</td> |
<td class="rightPage"> |
<tiles:insert attribute="navigation" /> |
</td> |
</tr> |
</table> |
<div id="footer"> |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
</td> |
</tr> |
</table> |
</body> |
</html:html> |
/impl/src/web/layout/layout4.jsp |
---|
31,6 → 31,9 |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<table width="100%"> |
<tr> |
<td align="center"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
56,6 → 59,9 |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
</td> |
</tr> |
</table> |
</body> |
</html:html> |
/impl/src/web/layout/layoutintranet.jsp |
---|
New file |
0,0 → 1,57 |
<%@page contentType="text/html"%> |
<%@page pageEncoding="UTF-8"%> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<html:html locale="true"> |
<head> |
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/></title> |
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/intranet.css"/> |
<jsp:include page="/layout/scripts.jsp"/> |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<div id="body"> |
<div id="header"> |
<tiles:insert attribute="header"/> |
</div> |
<table id="page"> |
<tr> |
<td><tiles:insert attribute="navigationTop"/></td> |
</tr> |
<tr> |
<td class="content"> |
<tiles:insert attribute="topnav"/> |
<tiles:insert attribute="separators"/> |
<tiles:insert attribute="body" /> |
</td> |
</tr> |
</table> |
<div id="footer"> |
<tiles:insert attribute="footer"/> |
</div> |
</div> |
</body> |
</html:html> |
/impl/src/web/layout/separators.jsp |
---|
New file |
0,0 → 1,46 |
<%-- |
Created by IntelliJ IDEA. |
User: Susana Monteiro |
Date: 23/Abr/2008 |
Time: 15:05:50 |
To change this template use File | Settings | File Templates. |
--%> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<div id="testeTop"> |
<% |
int sep = Integer.parseInt(request.getParameter("separator")); |
String sep1 = ""; |
String sep2 = ""; |
String sep3 = ""; |
String link1 = "href=\"" + request.getContextPath() + "/startTeste2.do?separator=1\""; |
String link2 = "href=\"" + request.getContextPath() + "/startTeste2.do?separator=2\""; |
String link3 = "href=\"" + request.getContextPath() + "/startTeste2.do?separator=3\""; |
if(sep == 1) |
{ |
sep1 ="class=\"selected\""; |
link1 = ""; |
} |
else if(sep == 2) |
{ |
sep2 ="class=\"selected\""; |
link2 = ""; |
} |
else if(sep == 3) |
{ |
link3 = ""; |
sep3 ="class=\"selected\""; |
} |
%> |
<div id="separators"> |
<ul> |
<li <%=sep1%>> |
<a <%=link1%>><span> Home </span></a> |
</li> |
<li <%=sep2%>> <a <%=link2%>> <span>Cadeiras</span> </a></li> |
<li <%=sep3%>> <a <%=link3%>><span>Perfil</span> </a></li> |
</ul> |
</div> |
</div> |
/impl/src/web/public/blog/blog.jsp |
---|
5,13 → 5,26 |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %> |
<jsp:useBean id="BlogView" type="pt.estgp.estgweb.domain.views.BlogView"/> |
<jsp:useBean id="BlogView" type="pt.estgp.estgweb.domain.views.BlogView" scope="request"/> |
<div class="seccao"> |
<h1><bean:write name="BlogView" property="title"/></h1> |
<p> |
<bean:write name="BlogView" property="description"/> |
<bean:write name="BlogView" property="image.id"/> |
<% |
if(BlogView.getImage() != null) |
{ |
%> |
<img align="left" alt="<%=BlogView.getTitle()%>" src="<%=request.getContextPath()%>/imageStream/<%=BlogView.getImage().getId()%>"> |
<% |
} |
%> |
${BlogView.description} |
</p> |
<p class="pFooter"> |
<bean:message key="blog.owner"/> <a href="mailto:${BlogView.ownerEmail}">${BlogView.owner.name}</a> <bean:message key="at"/> ${BlogView.formatedSaveDate} |
</p> |
</div> |
/impl/src/web/user/index.jsp |
---|
New file |
0,0 → 1,12 |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %> |
<estgweb:hasRole role="teacher"> |
</estgweb:hasRole> |
/impl/src/web/user/home.jsp |
---|
New file |
0,0 → 1,8 |
<%-- |
Created by IntelliJ IDEA. |
User: Susana Monteiro |
Date: 23/Abr/2008 |
Time: 15:10:16 |
To change this template use File | Settings | File Templates. |
--%> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
/common/mysql/mysql-connector-java-3.0.15-ga-bin.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/common/mysql/mysql-connector-java-5.1.6-bin.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |