Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3,404 changes: 3,404 additions & 0 deletions assets/css/AdminLTE.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions assets/css/ionicons.min.css

Large diffs are not rendered by default.

1,057 changes: 1,057 additions & 0 deletions assets/js/app.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/Assets.hx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ class Assets {
Context.addResource("page_accueil", File.getBytes("src/services/account/tpl/accueil.mtt"));
Context.addResource("page_subscribe", File.getBytes("src/services/account/tpl/subscribe.mtt"));
Context.addResource("page_login", File.getBytes("src/services/account/tpl/login.mtt"));
Context.addResource("page_404", File.getBytes("src/services/account/tpl/404.mtt"));
Context.addResource("page_print", File.getBytes("src/services/account/tpl/print.mtt"));
//#----TicketService Pages----#
Context.addResource("page_ticket_widget", File.getBytes("src/services/ticket/tpl/ticket_widget.mtt"));
//#----SurveyService Pages----#
Expand Down
9 changes: 7 additions & 2 deletions src/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,20 @@ class Main {
beluga = Beluga.getInstance();
Dispatch.run(beluga.getDispatchUri(), Web.getParams(), new Main());
beluga.cleanup();
} catch (e : BelugaException) {
trace(e);
} catch (e : Dynamic) {
new Main().do404Error();
}
}

public function new() {

}

public function do404Error() {
var html = Renderer.renderDefault("page_404", "404 not found", {});
Sys.print(html);
}

public function doBeluga(d : Dispatch) {
d.dispatch(beluga.api);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/tpl/game_widget.mtt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section style="margin-left:260px;padding-top:20px;">
<section>
<p> Your flash game here i think ?</p>
</section>
10 changes: 10 additions & 0 deletions src/main_view/Renderer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,14 @@ class Renderer {
return bodyhtml;
}

public static function renderPage(page : String, title: String, ctx : Dynamic) {
if (ConfigLoader.config.hasNode.url && ConfigLoader.config.node.url.hasNode.base && ConfigLoader.config.node.url.node.base.has.value)
ctx.base_url = ConfigLoader.config.node.url.node.base.att.value;
else
ctx.base_url = "";
var page_res = (new haxe.Template(Resource.getString(page))).execute(ctx);

return page_res;
}

}
12 changes: 8 additions & 4 deletions src/main_view/tpl/footer.mtt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<script src="::base_url::/js/jquery-1.10.2.js"></script>
<script src="::base_url::/js/bootstrap.min.js"></script>
<script src="::base_url::/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="::base_url::/js/website.js"></script>
</aside><!-- /.right-side -->
</div><!-- ./wrapper -->
<!-- jQuery 2.0.2 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="::base_url::/js/bootstrap.min.js" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="::base_url::/js/app.js" type="text/javascript"></script>
314 changes: 260 additions & 54 deletions src/main_view/tpl/header.mtt

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions src/main_view/tpl/htmlbody.mtt
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>dominaxe - ::title::</title>
<title>dominax - ::title::</title>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width"/>

<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

<!-- <link rel="stylesheet" href="::base_url::/css/normalize.css"/> -->
<link rel="stylesheet" href="::base_url::/css/main.css"/>
<!-- <link rel="stylesheet" href="::base_url::/css/main.css"/> -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet"/>
<link href="::base_url::css/ionicons.min.css" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="::base_url::/css/AdminLTE.css" rel="stylesheet" type="text/css" />
<!--link rel="stylesheet"/-->
<!-- <script src="::base_url::/js/vendor/modernizr-2.6.2.min.js"></script> -->
</head>
<body>
<body class="skin-blue">
<!--[if lt IE 7]>
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome-ie7.min.css" rel="stylesheet">
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
Expand Down
13 changes: 6 additions & 7 deletions src/main_view/tpl/layout.mtt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div>
::header::

::content::

::footer::
</div>
::header::
<!-- Main content -->
<section class="content">
::content::
</section><!-- /.content -->
::footer::
20 changes: 7 additions & 13 deletions src/services/account/AccountService.hx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ class AccountService implements MetadataReader {
}

public function loginFail() {
var widget = acc.getWidget("login");
widget.context = {error : "Invalid login and/or password"};
var loginWidget = widget.render();
var html = Renderer.renderDefault("page_login", "Authentification", {
loginWidget: loginWidget
});
var html = Renderer.renderPage("page_login", "Authentification", {
error: "Invalid login and / or password"
});
Sys.print(html);
}

Expand Down Expand Up @@ -78,7 +75,7 @@ class AccountService implements MetadataReader {
public function subscribeSuccess(user : User) {
var html = Renderer.renderDefault("page_accueil", "Home", {
success : "Subscribe succeeded !",
login: Beluga.getInstance().getModuleInstance(Account).getLoggedUser().login
login: user.login
});
Sys.print(html);
}
Expand All @@ -89,11 +86,8 @@ class AccountService implements MetadataReader {
}

public function subscribeFail(error : String) {
var subscribeWidget = acc.getWidget("subscribe");

subscribeWidget.context = {error : error};
var html = Renderer.renderDefault("page_subscribe", "Inscription", {
subscribeWidget: subscribeWidget.render(), error : error
var html = Renderer.renderPage("page_subscribe", "Inscription", {
error : error
});
Sys.print(html);
}
Expand All @@ -114,7 +108,7 @@ class AccountService implements MetadataReader {
var subscribeWidget = acc.getWidget("info");
subscribeWidget.context = {user : user, path : "/accountService/"};

var html = Renderer.renderDefault("page_subscribe", "Information", {
var html = Renderer.renderDefault("page_print", "Information", {
subscribeWidget: subscribeWidget.render()
});
Sys.print(html);
Expand Down
23 changes: 9 additions & 14 deletions src/services/account/AccountServiceApi.hx
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,15 @@ class AccountServiceApi {
}

public function doLoginPage() {
var loginWidget = acc.getWidget("login");
loginWidget.context = {error : ""};

var html = Renderer.renderDefault("page_login", "Authentification", {
loginWidget: loginWidget.render()
});
var html = Renderer.renderPage("page_login", "Authentification", {
error: ""
});
Sys.print(html);
}


public function doSubscribePage() {
var subscribeWidget = acc.getWidget("subscribe").render();
var html = Renderer.renderDefault("page_subscribe", "Inscription", {
subscribeWidget: subscribeWidget
});
var html = Renderer.renderPage("page_subscribe", "Inscription", {});
Sys.print(html);
}

Expand All @@ -52,8 +47,8 @@ class AccountServiceApi {
var subscribeWidget = acc.getWidget("info");
subscribeWidget.context = {user : user, path : "/accountService/"};

var html = Renderer.renderDefault("page_subscribe", "Information", {
subscribeWidget: subscribeWidget.render()
var html = Renderer.renderDefault("page_print", "Information", {
loginWidget: subscribeWidget.render()
});
Sys.print(html);
}
Expand Down Expand Up @@ -91,8 +86,8 @@ class AccountServiceApi {
var subscribeWidget = acc.getWidget("edit");
subscribeWidget.context = {email : user.email, path : "/accountService/"};

var html = Renderer.renderDefault("page_subscribe", "Information", {
subscribeWidget: subscribeWidget.render()
var html = Renderer.renderDefault("page_print", "Information", {
loginWidget: subscribeWidget.render()
});
Sys.print(html);
}
Expand Down
18 changes: 18 additions & 0 deletions src/services/account/tpl/404.mtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="error-page">
<h2 class="headline text-info"> 404</h2>
<div class="error-content">
<h3><i class="fa fa-warning text-yellow"></i> Oops! Page not found.</h3>
<p>
We could not find the page you were looking for.
Meanwhile, you may <a href='../../index.html'>return to dashboard</a> or try using the search form.
</p>
<form class='search-form'>
<div class='input-group'>
<input type="text" name="search" class='form-control' placeholder="Search"/>
<div class="input-group-btn">
<button type="submit" name="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
</div>
</div><!-- /.input-group -->
</form>
</div><!-- /.error-content -->
</div><!-- /.error-page -->
2 changes: 1 addition & 1 deletion src/services/account/tpl/accueil.mtt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section style="margin-left: 260px;padding-top:20px">
<section>
::if (success)::
::if (success != "")::
<div class="alert alert-success" style="margin-top:10px;">::success::</div>
Expand Down
65 changes: 61 additions & 4 deletions src/services/account/tpl/login.mtt
Original file line number Diff line number Diff line change
@@ -1,4 +1,61 @@
<!--<link rel="stylesheet" href="/beluga/account/css/login"/>-->
<section style="margin-left:260px;">
::loginWidget::
</section>
<!DOCTYPE html>
<html class="bg-black">
<head>
<meta charset="UTF-8">
<title>AdminLTE | Log in</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet"/>
<!-- Theme style -->
<link href="::base_url::/css/AdminLTE.css" rel="stylesheet" type="text/css" />

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body class="bg-black">

<div class="form-box" id="login-box">
<div class="header">Sign In</div>
<form action="::base_url::/beluga/account/login" method="post">
<div class="body bg-gray">
<div class="form-group">
<input type="text" name="login" class="form-control" placeholder="User ID"/>
</div>
<div class="form-group">
<input type="password" name="password" class="form-control" placeholder="Password"/>
</div>
<div class="form-group">
<input type="checkbox" name="remember_me"/> Remember me
</div>
</div>
<div class="footer">
<button type="submit" class="btn bg-olive btn-block">Sign me in</button>

<p><a href="#">I forgot my password</a></p>

<a href="::base_url::/accountService/subscribePage" class="text-center">Subscribe</a>
</div>
</form>

<div class="margin text-center">
<span>Sign in using social networks</span>
<br/>
<button class="btn bg-light-blue btn-circle"><i class="fa fa-facebook"></i></button>
<button class="btn bg-aqua btn-circle"><i class="fa fa-twitter"></i></button>
<button class="btn bg-red btn-circle"><i class="fa fa-google-plus"></i></button>

</div>
</div>


<!-- jQuery 2.0.2 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="::base_url::/js/bootstrap.min.js" type="text/javascript"></script>

</body>
</html>
3 changes: 3 additions & 0 deletions src/services/account/tpl/print.mtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<section>
::loginWidget::
</section>
67 changes: 64 additions & 3 deletions src/services/account/tpl/subscribe.mtt
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
<section style="margin-left:260px;">
::subscribeWidget::
</section>
<!DOCTYPE html>
<html class="bg-black">
<head>
<meta charset="UTF-8">
<title>AdminLTE | Registration Page</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet"/>
<!-- Theme style -->
<!-- Theme style -->
<link href="::base_url::/css/AdminLTE.css" rel="stylesheet" type="text/css" />

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body class="bg-black">

<div class="form-box" id="login-box">
<div class="header">Register to Dominax !</div>
<form action="::base_url::/beluga/account/subscribe" method="post">
<div class="body bg-gray">
<div class="form-group">
<input type="text" name="login" class="form-control" placeholder="Identifiant"/>
</div>
<div class="form-group">
<input type="password" name="password" class="form-control" placeholder="Password"/>
</div>
<div class="form-group">
<input type="password" name="password_conf" class="form-control" placeholder="Retype password"/>
</div>
<div class="form-group">
<input type="email" name="email" class="form-control" placeholder="Mail"/>
</div>
</div>
<div class="footer">

<input type="submit" class="btn bg-olive btn-block">Sign me up</input>

<a href="::base_url::/accountService/loginPage" class="text-center">I already have an account</a>
</div>
</form>

<div class="margin text-center">
<span>Register using social networks</span>
<br/>
<button class="btn bg-light-blue btn-circle"><i class="fa fa-facebook"></i></button>
<button class="btn bg-aqua btn-circle"><i class="fa fa-twitter"></i></button>
<button class="btn bg-red btn-circle"><i class="fa fa-google-plus"></i></button>

</div>
</div>


<!-- jQuery 2.0.2 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="::base_url::/js/bootstrap.min.js" type="text/javascript"></script>

</body>
</html>
2 changes: 1 addition & 1 deletion src/services/market/tpl/market_widget.mtt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section style="margin-left:260px;padding-top:20px;">
<section>
::marketWidget::
</section>
2 changes: 1 addition & 1 deletion src/services/news/tpl/news_page.mtt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section style="margin-left:260px;">
<section>
::newsWidget::
</section>
2 changes: 1 addition & 1 deletion src/services/notification/tpl/notification_page.mtt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section style="margin-left:260px;">
<section>
::notificationWidget::
</section>
2 changes: 1 addition & 1 deletion src/services/survey/tpl/survey_page.mtt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section style="margin-left: 260px; max-width: 900px;">
<section>
::surveyWidget::
</section>
Loading