merge.
This commit is contained in:
commit
d0aab2d0c6
2
Makefile
2
Makefile
@ -4,6 +4,8 @@ TEST_MODS = $(wildcard test/*.erl)
|
|||||||
TEST_BEAMS = $(TEST_MODS:test/%.erl=test/%.beam)
|
TEST_BEAMS = $(TEST_MODS:test/%.erl=test/%.beam)
|
||||||
TS_ROOT=/usr/lib/yaws/jdb-labs/timestamper
|
TS_ROOT=/usr/lib/yaws/jdb-labs/timestamper
|
||||||
|
|
||||||
|
default: compile
|
||||||
|
|
||||||
all : compile test
|
all : compile test
|
||||||
|
|
||||||
compile : $(BEAMS)
|
compile : $(BEAMS)
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
start() ->
|
start() ->
|
||||||
ok = application:load(mnesia),
|
ok = application:load(mnesia),
|
||||||
ok = application:set_env(mnesia, dir, "/usr/lib/yaws"),
|
ok = application:set_env(mnesia, dir, "/home/jdbernard/projects/timestamper/web-app/db/test"),
|
||||||
ok = mnesia:start(),
|
ok = mnesia:start(),
|
||||||
error_logger:info_report("TimeStampter app started."),
|
error_logger:info_report("TimeStampter app started."),
|
||||||
ok.
|
ok.
|
||||||
|
@ -16,11 +16,10 @@ joe_user() -> #ts_user{username=joeuser, name="Joe User", pwd="ohmy",
|
|||||||
|
|
||||||
% ======== TESTS ======== %
|
% ======== TESTS ======== %
|
||||||
|
|
||||||
new_delete_test_() ->
|
%new_delete_test_() ->
|
||||||
% test data
|
% test data
|
||||||
JoeUser = joe_user(),
|
%JoeUser = joe_user(),
|
||||||
|
|
||||||
{setup, fun setup/0, fun cleanup/1, {inorder, [
|
|
||||||
?_test(new(JoeUser)),
|
|
||||||
?_test(lookup(JoeUser#ts_user.username, JoeUser)),
|
|
||||||
|
|
||||||
|
%{setup, fun setup/0, fun cleanup/1, {inorder, [
|
||||||
|
% ?_test(new(JoeUser)),
|
||||||
|
% ?_test(lookup(JoeUser#ts_user.username, JoeUser)),
|
||||||
|
@ -241,8 +241,6 @@ body {
|
|||||||
|
|
||||||
#login-dialog {
|
#login-dialog {
|
||||||
font-size: small; }
|
font-size: small; }
|
||||||
#login-dialog label, #login-dialog input {
|
|
||||||
display: block; }
|
|
||||||
#login-dialog input.text {
|
#login-dialog input.text {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
@ -256,3 +254,9 @@ body {
|
|||||||
|
|
||||||
#ui-dialog-title-login-dialog, .ui-dialog-buttonset {
|
#ui-dialog-title-login-dialog, .ui-dialog-buttonset {
|
||||||
font-size: medium; }
|
font-size: medium; }
|
||||||
|
|
||||||
|
.signup {
|
||||||
|
display: none; }
|
||||||
|
|
||||||
|
#signup-checkbox {
|
||||||
|
display: inline; }
|
||||||
|
@ -307,7 +307,7 @@ body {
|
|||||||
#login-dialog {
|
#login-dialog {
|
||||||
font-size: small;
|
font-size: small;
|
||||||
|
|
||||||
label, input { display: block }
|
//label, input { display: block }
|
||||||
input.text {
|
input.text {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
@ -324,3 +324,7 @@ body {
|
|||||||
#ui-dialog-title-login-dialog, .ui-dialog-buttonset {
|
#ui-dialog-title-login-dialog, .ui-dialog-buttonset {
|
||||||
font-size: medium;
|
font-size: medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.signup { display: none; }
|
||||||
|
|
||||||
|
#signup-checkbox { display: inline; }
|
||||||
|
@ -7,8 +7,15 @@
|
|||||||
<link rel="stylesheet" media="screen" href="/css/ts-screen.css" type="text/css"/>
|
<link rel="stylesheet" media="screen" href="/css/ts-screen.css" type="text/css"/>
|
||||||
<!-- Needed for IE, but I'm not going to support IE with this tool. -->
|
<!-- Needed for IE, but I'm not going to support IE with this tool. -->
|
||||||
<!--<script type="text/javascript" src="/js/json2.js"></script>-->
|
<!--<script type="text/javascript" src="/js/json2.js"></script>-->
|
||||||
|
<!-- PROD -->
|
||||||
|
<!--
|
||||||
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
|
||||||
|
-->
|
||||||
|
<!-- DEV -->
|
||||||
<script type="text/javascript" src="/js/jquery-1.5.min.js"></script>
|
<script type="text/javascript" src="/js/jquery-1.5.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery-ui-1.8.10.custom.min.js"></script>
|
<script type="text/javascript" src="/js/jquery-ui-1.8.10.custom.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="/js/underscore-min.js"></script>
|
<script type="text/javascript" src="/js/underscore-min.js"></script>
|
||||||
<script type="text/javascript" src="/js/ICanHaz.js"></script>
|
<script type="text/javascript" src="/js/ICanHaz.js"></script>
|
||||||
<script type="text/javascript" src="/js/ts.js"></script>
|
<script type="text/javascript" src="/js/ts.js"></script>
|
||||||
@ -168,9 +175,28 @@
|
|||||||
<label for="login-name">Username:</label>
|
<label for="login-name">Username:</label>
|
||||||
<input type="text" name="login-name" id="login-name"
|
<input type="text" name="login-name" id="login-name"
|
||||||
class="text ui-widget-content ui-corner-all"></input>
|
class="text ui-widget-content ui-corner-all"></input>
|
||||||
|
<div class="signup">
|
||||||
|
<label for="signup-fullname">Full name:</label>
|
||||||
|
<input type="text" name="signup-fullname" id="signup-fullname"
|
||||||
|
class="text ui-widget-content ui-corner-all"></input>
|
||||||
|
<label for="signup-email">eMail address:</label>
|
||||||
|
<input type="text" name="signup-email" id="signup-email"
|
||||||
|
class="text ui-widget-content ui-corner-all"></input>
|
||||||
|
</div>
|
||||||
<label for="login-password">Password:</label>
|
<label for="login-password">Password:</label>
|
||||||
<input type="password" name="login-password" id="login-password"
|
<input type="password" name="login-password" id="login-password"
|
||||||
class="text ui-widget-content ui-corner-all"></input>
|
class="text ui-widget-content ui-corner-all"></input>
|
||||||
|
|
||||||
|
<div class="signup">
|
||||||
|
<label for="confirm-password">Confirm password:</label>
|
||||||
|
<input type="password" name="confirm-password" id="confirm-password"
|
||||||
|
class="text ui-widget-content ui-corner-all"></input>
|
||||||
|
</div>
|
||||||
|
<label for="signup-checkbox">
|
||||||
|
<input type="checkbox" id="signup-checkbox" name="signup-checkbox"
|
||||||
|
onclick="toggleSignUp(event)"/>
|
||||||
|
I'm a new user!
|
||||||
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
26
www/js/ts.js
26
www/js/ts.js
@ -9,6 +9,8 @@ var moreEntriesbar;
|
|||||||
var currentEntryOffset = 0;
|
var currentEntryOffset = 0;
|
||||||
var loadLength = 20;
|
var loadLength = 20;
|
||||||
|
|
||||||
|
var loginTop;
|
||||||
|
|
||||||
/* Setup after the document is ready for manipulation. */
|
/* Setup after the document is ready for manipulation. */
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
@ -22,7 +24,9 @@ $(document).ready(function(){
|
|||||||
height: 300,
|
height: 300,
|
||||||
width: 300,
|
width: 300,
|
||||||
modal: true,
|
modal: true,
|
||||||
buttons: { Login: function(){login()} }
|
buttons: {
|
||||||
|
"Sign Up": function(){signup()},
|
||||||
|
Login: function(){login()} }
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: add a hook to AJAX requests to check for 401 unauth
|
// TODO: add a hook to AJAX requests to check for 401 unauth
|
||||||
@ -73,6 +77,26 @@ function login() {
|
|||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleSignUp(event) {
|
||||||
|
var signUpCB = $("#signup-checkbox");
|
||||||
|
|
||||||
|
if (signUpCB.attr("checked")) {
|
||||||
|
loginTop = $("#login-dialog").dialog("widget").offset().top;
|
||||||
|
$("#login-dialog").animate({height: 350}, 500);
|
||||||
|
$("#login-dialog").dialog("widget").animate({top: loginTop - 200}, 500);
|
||||||
|
$(".signup").slideDown("slow");
|
||||||
|
} else {
|
||||||
|
$("#login-dialog").animate({height: 180}, 500);
|
||||||
|
$("#login-dialog").dialog("widget").animate({top: loginTop}, 500);
|
||||||
|
$(".signup").slideUp("slow");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function signUp() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* End the current user session and expire any session credentials we
|
/* End the current user session and expire any session credentials we
|
||||||
* have aquired. */
|
* have aquired. */
|
||||||
function logout(event) {
|
function logout(event) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
ebin_dir = /home/jdbernard/projects/timestamper/web-app/ebin
|
ebin_dir = /home/jdbernard/projects/timestamper/web-app/ebin
|
||||||
#include_dir = /home/jdbernard/projects/timestamper/web-app/src
|
#include_dir = /home/jdbernard/projects/timestamper/web-app/src
|
||||||
|
|
||||||
runmod = timestamper
|
runmod = timestamper_dev
|
||||||
|
|
||||||
<server timestamper.jdb-labs-local>
|
<server timestamper.jdb-labs-local>
|
||||||
port = 8000
|
port = 8000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user