Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IF3110-II-25 Simple Blog #23

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9ae169e
hai
ichwanhs96 Nov 24, 2014
066204a
project kososng
luqmankusnadi Nov 24, 2014
c8116a0
Tambah template
luqmankusnadi Nov 24, 2014
2929110
ichwan commit's
ichwanhs96 Nov 24, 2014
ae5369d
db connect
luqmankusnadi Nov 24, 2014
8f2c8a7
Create .gitignore
luqmankusnadi Nov 25, 2014
0114ad1
progress tuesday 25/11/2014 22:40PM
ichwanhs96 Nov 25, 2014
f0743de
cookie's complete
ichwanhs96 Nov 26, 2014
344eafc
+list post, +view post
luqmankusnadi Nov 26, 2014
bdf1ca9
solve conflict
luqmankusnadi Nov 26, 2014
fbf257c
Merge branch 'master' of https://github.com/IF3110-II-25/IF3110-02-Si…
luqmankusnadi Nov 26, 2014
1879f5e
revisi cookie, tambah post
ichwanhs96 Nov 26, 2014
1ad5524
pindah file
ichwanhs96 Nov 26, 2014
abb9a7a
+komentar
luqmankusnadi Nov 26, 2014
d2836e0
menyelesaikan konflik yang berkepanjangan
luqmankusnadi Nov 26, 2014
2167bc1
solve conflict
luqmankusnadi Nov 26, 2014
57b9df1
add post, post validation
ichwanhs96 Nov 27, 2014
4a29814
sync edit database dari danang
ichwanhs96 Nov 29, 2014
855f846
+publish post
luqmankusnadi Nov 30, 2014
d5eb692
solve conflict
luqmankusnadi Nov 30, 2014
8497727
solve conflict
luqmankusnadi Nov 30, 2014
ca809d2
publish post control by luqman
ichwanhs96 Dec 1, 2014
91eb6cc
bonus soft delete
ichwanhs96 Dec 1, 2014
1a3929f
+ upload gambar
luqmankusnadi Dec 1, 2014
012af7e
menyelesaikan konflik yang berkepanjangan
luqmankusnadi Dec 1, 2014
f1c73c9
solve conflict
luqmankusnadi Dec 1, 2014
1795341
tugas 3
ichwanhs96 Dec 18, 2014
149e9e7
Merge branch 'master' of https://github.com/IF3110-II-25/IF3110-02-Si…
ichwanhs96 Dec 18, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# NetBeans specific #
simple-blog/nbproject/
simple-blog/nbproject/private/
simple-blog/build/
simple-blog/nbbuild/
simple-blog/dist/
simple-blog/nbdist/
simple-blog/nbactions.xml
simple-blog/nb-configuration.xml

# Class Files #
*.class
71 changes: 71 additions & 0 deletions simple-blog/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="simple-blog" default="default" basedir=".">
<description>Builds, tests, and runs the project simple-blog.</description>
<import file="nbproject/build-impl.xml"/>
<!--

There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:

-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying

Example of pluging an obfuscator after the compilation could look like

<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>

For list of available properties check the imported
nbproject/build-impl.xml file.


Other way how to customize the build is by overriding existing main targets.
The target of interest are:

init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation

Example of overriding the target for project execution could look like

<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>

Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.

-->
</project>
2 changes: 2 additions & 0 deletions simple-blog/build/web/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

9 changes: 9 additions & 0 deletions simple-blog/build/web/META-INF/context.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/simple-blog">
<Resource name="jdbc/simpleBlogDb" auth="Container" type="javax.sql.DataSource"
maxActive="50" maxIdle="30" maxWait="10000"
username="root" password=""
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/simple_blog"/>

</Context>
Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions simple-blog/build/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/redirectIndex.xhtml</welcome-file>
</welcome-file-list>
<resource-ref>
<description>MySQL Datasource example</description>
<res-ref-name>jdbc/simpleBlogDb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
55 changes: 55 additions & 0 deletions simple-blog/build/web/index.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core">

<h:head>
<title>Simple Blog</title>
</h:head>
<h:body>
<ui:composition template="mainTemplate.xhtml">
<ui:define name="content">
<div class="posts">
<nav class="art-list">
<ul class="art-list-body">
<!-- buat nge load content !-->
<ui:repeat var="post" value="#{postController.postList}">
<li class='art-list-item'>
<div class='art-list-item-title-and-time'>
<h2 class='art-list-title'>
<h:link value="#{post.title}" outcome="viewPost">
<f:param name="id" value="#{post.id}"/>
</h:link>
</h2>
<div class='art-list-time'>#{post.date}</div>
<div class='art-list-time'><span style='color:#F40034;'>&#10029;</span> Featured</div>
</div>
<p>#{post.content}</p>


<p>
<h:link value="edit" outcome="editPost" rendered="#{userController.showEditHapus(post.userId)}">
<f:param name="post_id" value="#{post.id}" />
</h:link>
<h:outputText value=" | " rendered="#{userController.showEditHapus(post.userId)}"/>
<h:link value="hapus" onclick="ConfirmDeletePost()" outcome="redirectDeletePost" rendered="#{userController.showEditHapus(post.userId)}">
<f:param name="post_id" value="#{post.id}" />
</h:link>
</p>

</li>
</ui:repeat>
</ul>
</nav>
</div>
</ui:define>
<ui:define name="bottom">
<h:outputScript name="./js/delete.js" />
</ui:define>
</ui:composition>
</h:body>
</html>

56 changes: 56 additions & 0 deletions simple-blog/build/web/mainTemplate.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">

<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Simple Blog</title>
</h:head>

<h:body>

<div id="top">
<ui:insert name="top">
<nav class ="nav">
<h:link style="border:none;" id="logo" outcome="index"><h1>Simple<span>-</span>Blog</h1></h:link>
<ul class="nav-primary">
<ui:include src="navigationBar.xhtml"/>
</ul>
</nav>
</ui:insert>
</div>
<div id="content" class="center_content">
<ui:insert name="content">

</ui:insert>
</div>
<div id="bottom">
<ui:insert name="bottom">
<footer class="footer">
<div class="back-to-top"><a href="">Back to top</a></div>
<!-- <div class="footer-nav"><p></p></div> -->
<div class="psi">&Psi;</div>
<aside class="offsite-links">
Asisten IF3110 /
<a class="rss-link" href="#rss">RSS</a> /
<br/>
<a class="twitter-link" href="http://twitter.com/YoGiiSinaga">Yogi</a> /
<a class="twitter-link" href="http://twitter.com/sonnylazuardi">Sonny</a> /
<a class="twitter-link" href="http://twitter.com/fathanpranaya">Fathan</a> /
<br/>
<a class="twitter-link" href="#">Renusa</a> /
<a class="twitter-link" href="#">Kelvin</a> /
<a class="twitter-link" href="#">Yanuar</a> /

</aside>
</footer>
</ui:insert>
</div>

</h:body>

</html>
4 changes: 4 additions & 0 deletions simple-blog/build/web/resources/css/cssLayout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@




Loading