Skip to content

Commit

Permalink
a 1000 new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vminkov committed May 30, 2013
1 parent 6f45a29 commit 5a6465e
Show file tree
Hide file tree
Showing 43 changed files with 583 additions and 194 deletions.
3 changes: 2 additions & 1 deletion WebContent/WEB-INF/header.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<nav id="mainNav">
<ul id="mainUl" class="nav nav-tabs">
<li class="active"><a href="#">Начало</a></li>
<li><a href="#tablesPart">Въпроси</a></li>
<li><a href="manager.jsp">Мениджър</a></li>
<li><a href="employee.jsp">Служител</a></li>
<li><a href="#">Профил</a></li>
<li><a href="#">Портфолио</a></li>
<li><a href="#">За нас</a></li>
Expand Down
32 changes: 32 additions & 0 deletions WebContent/WEB-INF/ideas.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<div id="ideaWrapper" class="span5">
<a href="#modalIdea" role="button" data-toggle="modal">
<img src="img/idea.png" width="400" /></a>

<div id="modalIdea" class="modal hide fade " tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="H3">Пусни идея!</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="ideaHeadline">Заглавие на идеята</label>
<div class="controls">
<input type="text" class="headlineQuestion" id="ideaHeadline" placeholder="short headline" />
</div>
</div>

<div class="control-group">
<label class="control-label" for="ideaDescription">Описание на идеята</label>
<div class="controls">
<textarea id="ideaDescription" placeholder="idea description"></textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Затвори</button>
<button class="btn btn-primary">Влез!</button>
</div>
</div>
</div>
20 changes: 13 additions & 7 deletions WebContent/WEB-INF/loggedHeader.jsp
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
<%@page import="eu.cointelligence.model.User"%>
<%@page import="eu.cointelligence.controller.Constants"%>
<header>
<%
User userInfo = (User) ((HttpSession) session)
.getAttribute(Constants.USER_INFO_SESSION_ATTR_NAME);
%>

<%!User user;%>
<%
user = (User) ((HttpSession) session)
.getAttribute(Constants.USER_INFO_SESSION_ATTR_NAME);
%>
<nav id="mainNav">
<span>Здравей, <%=userInfo.getFullName()%></span>
<script>var userrmation = {};
userrmation.username = <%=user.getUserName()%>;
userrmation.avatar = <%=user.getUserName()%>; </script>
<span>Здравей, <%=user.getUserName()%></span>
<ul id="mainUl" class="nav nav-tabs">
<li class="active"><a href="#">Начало</a></li>
<li><a href="#tablesPart">Въпроси</a></li>
<li><a href="#">Профил</a></li>
<li><a href="manager.jsp">Мениджър</a></li>
<li><a href="employee.jsp">Служител</a></li>
<li><a href="#">Портфолио</a></li>
<li><a href="#">За нас</a></li>
</ul>
<form action="<%=Constants.LOGOUT_PAGE%>">
<input type="submit" class="btn btn-primary" value="Изход"/>
<input type="submit" class="btn btn-primary" value="Изход" />
</form>
</nav>
<h1>
Expand Down
50 changes: 50 additions & 0 deletions WebContent/WEB-INF/questions.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

<div id="questionWrapper" class="span5">

<a href="#modalQuestion" role="button" data-toggle="modal"> <img
src="img/question.png" width="400" /></a>

<div id="modalQuestion" class="modal hide fade" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
<h3 id="H2">Задай въпрос!</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="headline">Заглавие на
въпроса</label>
<div class="controls">
<input type="text" class="headlineQuestion" id="headline"
placeholder="short headline" name="title" />
</div>
</div>

<div class="control-group">
<label class="control-label" for="description">Описание на
въпроса</label>
<div class="controls">
<textarea id="description" placeholder="description"></textarea>
</div>
</div>
<div class="control-group">
<label for="date" class="control-label">Дата на падеж</label>
<div class="controls">

<input type="datetime-local" id="date" />
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Затвори</button>
<button class="btn btn-primary">Задай въпроса!</button>
</div>
</div>
</div>




78 changes: 0 additions & 78 deletions WebContent/WEB-INF/questionsAndIdeas.jsp

This file was deleted.

12 changes: 12 additions & 0 deletions WebContent/WEB-INF/test.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>
2 changes: 1 addition & 1 deletion WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<init-param>
<description></description>
<param-name>exclude-uri-regex</param-name>
<param-value>((^/(.+)/login.jsp$)|(^/(.+)/userLogin$))</param-value>
<param-value>((^/(.+)/login.jsp$)|(^/(.+)/userLogin$)|(^/(.+)/index.jsp$))</param-value>
</init-param>
</filter>
<filter-mapping>
Expand Down
29 changes: 29 additions & 0 deletions WebContent/employee.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- insert head -->
<%@include file="head.jsp"%>
<!-- insert header -->
<%@include file="WEB-INF/loggedHeader.jsp"%>

<body>
<div id="wrapper">

<!-- ЗА ДА ВЛЕЗЕШ В МЕНИДЖЪРСКИЯ ПАНЕЛ НАТИСНИ ГОРЕ "МЕНИДЖЪР" -->
<!-- ЗА ДА ВЛЕЗЕШ В СЛУЖИТЕЛСКИЯ ПАНЕЛ НАТИСНИ ГОРЕ "СЛУЖИТЕЛ" -->
<div id="tablesPart">
<%@include file="WEB-INF/ideas.jsp"%>
<%@include file="WEB-INF/statementsTable.jsp"%>

<!-- insert rankings table -->
<%@include file="WEB-INF/rankingsTable.jsp"%>

<!-- end of first section-->


</div>
</div>
<%@include file="WEB-INF/foot.jsp"%>
</body>

</html>
3 changes: 0 additions & 3 deletions WebContent/head.jsp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<%@page import="eu.cointelligence.model.User"%>
<%@page import="eu.cointelligence.controller.Constants"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="UTF-8"%>
<head>
<title>Home</title>
<meta charset="utf-8" />

<link rel="stylesheet" href="styles/jquery.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
Expand Down
27 changes: 25 additions & 2 deletions WebContent/index.jsp
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- insert head -->
<%@include file="head.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8" />

<%!User userInfo;%>
<%
userInfo = (User) ((HttpSession) session)
.getAttribute(Constants.USER_INFO_SESSION_ATTR_NAME);
%>
<!-- insert header -->
<%
if (userInfo != null) {
%>
<%@include file="WEB-INF/loggedHeader.jsp"%>
<%
} else {
%>
<%@include file="WEB-INF/header.jsp"%>

<%
}
%>


<body>
<div id="wrapper">

<!-- insert submit questions and ideas .jsp -->
<%@include file="WEB-INF/questionsAndIdeas.jsp"%>
<!-- ЗА ДА ВЛЕЗЕШ В МЕНИДЖЪРСКИЯ ПАНЕЛ НАТИСНИ ГОРЕ "МЕНИДЖЪР" -->
<!-- ЗА ДА ВЛЕЗЕШ В СЛУЖИТЕЛСКИЯ ПАНЕЛ НАТИСНИ ГОРЕ "СЛУЖИТЕЛ" -->
<div id="tablesPart">
<!-- insert statements table -->
<%@include file="WEB-INF/statementsTable.jsp"%>
Expand All @@ -23,6 +45,7 @@

</div>
</div>
<%@include file="WEB-INF/foot.jsp"%>
</body>

</html>
29 changes: 29 additions & 0 deletions WebContent/manager.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- insert head -->
<%@include file="head.jsp"%>
<!-- insert header -->
<%@include file="WEB-INF/loggedHeader.jsp"%>

<body>
<div id="wrapper">

<!-- ЗА ДА ВЛЕЗЕШ В МЕНИДЖЪРСКИЯ ПАНЕЛ НАТИСНИ ГОРЕ "МЕНИДЖЪР" -->
<!-- ЗА ДА ВЛЕЗЕШ В СЛУЖИТЕЛСКИЯ ПАНЕЛ НАТИСНИ ГОРЕ "СЛУЖИТЕЛ" -->
<div id="tablesPart">
<%@include file="WEB-INF/questions.jsp"%>
<%@include file="WEB-INF/statementsTable.jsp"%>

<!-- insert rankings table -->
<%@include file="WEB-INF/rankingsTable.jsp"%>

<!-- end of first section-->


</div>
</div>
<%@include file="WEB-INF/foot.jsp"%>
</body>

</html>
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<artifactId>gson</artifactId>
<version>2.2.3</version>
</dependency>

</dependencies>
<dependencyManagement>
<dependencies>
Expand Down
1 change: 1 addition & 0 deletions src/eu/cointelligence/controller/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ public class Constants {

public static final String AUTHENTICATION_FILTER_EXCLUDE_URI_REGEX_PARAM_NAME = "exclude-uri-regex";
public static final String INVALID_AUTHENTICATION_PAGE = "loginfail.jsp";
public static final Long DEFAULT_COINTELS = new Long(2000);

}
4 changes: 2 additions & 2 deletions src/eu/cointelligence/controller/IMarketMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
public interface IMarketMaker {

// TODO javadoc
public abstract Map<String, Long> getStatementsAndPrices();
public abstract Map<Long, Long> getStatementsAndPrices();

public abstract Long getPriceForStatement(String statementId);
public abstract Long getPriceForStatement(Long statementId);

public abstract boolean addLog(Transaction log);

Expand Down
2 changes: 1 addition & 1 deletion src/eu/cointelligence/controller/IPricingAlgorithm.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
import eu.cointelligence.model.Transaction;

public interface IPricingAlgorithm {
public Map<String, Long> recalculate(Map<String, Long> oldPrices, List<Transaction> logs);
public Map<Long, Long> recalculate(Map<Long, Long> oldPrices, List<Transaction> logs);
}
Loading

0 comments on commit 5a6465e

Please sign in to comment.