Skip to content

Commit

Permalink
add js for signin
Browse files Browse the repository at this point in the history
  • Loading branch information
briangu committed Jun 8, 2013
1 parent d8ddf7e commit 107a030
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
19 changes: 12 additions & 7 deletions examples/src/main/resources/signin/index.html
Expand Up @@ -54,19 +54,19 @@
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://twitter.github.io/bootstrap/assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://twitter.github.io/bootstrap/assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://twitter.github.io/bootstrap/assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="http://twitter.github.io/bootstrap/assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="http://twitter.github.io/bootstrap/assets/ico/favicon.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://twitter.github.io/bootstrap/assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="http://twitter.github.io/bootstrap/assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="http://twitter.github.io/bootstrap/assets/ico/favicon.png">
</head>

<body>

<div class="container">

<form class="form-signin">
<form class="form-signin" id="form-signin" action="/login" method="POST">
<h2 class="form-signin-heading">Please sign in</h2>
<input type="text" class="input-block-level" placeholder="Email address">
<input type="password" class="input-block-level" placeholder="Password">
<input type="text" class="input-block-level" placeholder="Email address" name="user_email">
<input type="password" class="input-block-level" placeholder="Password" name="user_password">
<label class="checkbox">
<input type="checkbox" value="remember-me"> Remember me
</label>
Expand All @@ -80,6 +80,11 @@ <h2 class="form-signin-heading">Please sign in</h2>
<!-- Placed at the end of the document so the pages load faster -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>

<script src="/js/main.js"></script>
<script type="text/javascript">
$(document).ready(function() {
appMain();
});
</script>

</body></html>
9 changes: 9 additions & 0 deletions examples/src/main/resources/signin/js/main.js
@@ -0,0 +1,9 @@
var appMain = function (initdata) {
'use strict';

// $('#form-signin').submit(function() {
// alert('Handler for .submit() called.');
// return false;
// });
}

Expand Up @@ -23,4 +23,7 @@ object SslSecureServerExample {

class SslSecureServer(hostname: String, resource: String, keyStoreManager: KeyStoreManager) extends SSLServer(hostname, resource, keyStoreManager) {
get("/hello", { args => Response("world") })
post("/login", { args =>
Response("hello")
})
}

0 comments on commit 107a030

Please sign in to comment.