Commit a950019511fff36c24cfefc22e0e3cc537a9567f
Exists in
master
Merge branch '2.5' of git@github.com:demoiselle/framework.git into 2.5
Showing
10 changed files
with
27 additions
and
63 deletions
Show diff stats
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/bookmark-edit.html
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="pt-br"> | 2 | <html lang="pt-br"> |
3 | - | ||
4 | <head> | 3 | <head> |
5 | -<meta charset="utf-8"> | ||
6 | -<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
7 | -<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | ||
8 | - | ||
9 | -<title>Bookmark Edit</title> | ||
10 | - | ||
11 | -<link rel="stylesheet" href="css/bootstrap.min.css"> | ||
12 | -<link rel="stylesheet" href="css/bookmark.css"> | 4 | + <meta charset="utf-8"> |
5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
7 | + <title>Bookmark Edit</title> | ||
8 | + <link rel="stylesheet" href="css/bootstrap.min.css"> | ||
9 | + <link rel="stylesheet" href="css/bookmark.css"> | ||
13 | </head> | 10 | </head> |
14 | - | ||
15 | <body> | 11 | <body> |
16 | <div class="container"> | 12 | <div class="container"> |
17 | <div id="menu"></div> | 13 | <div id="menu"></div> |
@@ -20,19 +16,16 @@ | @@ -20,19 +16,16 @@ | ||
20 | <label for="id">ID</label> <span id="id-text" class="form-control-static"></span> | 16 | <label for="id">ID</label> <span id="id-text" class="form-control-static"></span> |
21 | <input id="id" type="hidden"> | 17 | <input id="id" type="hidden"> |
22 | </div> | 18 | </div> |
23 | - | ||
24 | <div class="form-group"> | 19 | <div class="form-group"> |
25 | <label for="description">Description</label> | 20 | <label for="description">Description</label> |
26 | <input id="description" type="text" class="form-control"> | 21 | <input id="description" type="text" class="form-control"> |
27 | <div id="description-message" class="label label-danger"></div> | 22 | <div id="description-message" class="label label-danger"></div> |
28 | </div> | 23 | </div> |
29 | - | ||
30 | <div class="form-group"> | 24 | <div class="form-group"> |
31 | <label for="link">Link</label> | 25 | <label for="link">Link</label> |
32 | <input id="link" type="text" class="form-control"> | 26 | <input id="link" type="text" class="form-control"> |
33 | <div id="link-message" class="label label-danger"></div> | 27 | <div id="link-message" class="label label-danger"></div> |
34 | </div> | 28 | </div> |
35 | - | ||
36 | <div class="form-group"> | 29 | <div class="form-group"> |
37 | <button id="save" class="btn btn-primary">Salvar</button> | 30 | <button id="save" class="btn btn-primary">Salvar</button> |
38 | <button id="delete" class="btn btn-danger" hidden="true">Excluir</button> | 31 | <button id="delete" class="btn btn-danger" hidden="true">Excluir</button> |
@@ -41,7 +34,6 @@ | @@ -41,7 +34,6 @@ | ||
41 | </form> | 34 | </form> |
42 | </div> | 35 | </div> |
43 | <p class="demoiselle">Aplicação de exemplo do Demoiselle 2.5.0</p> | 36 | <p class="demoiselle">Aplicação de exemplo do Demoiselle 2.5.0</p> |
44 | - | ||
45 | <script src="js/lib/jquery-2.1.0.min.js" type="text/javascript"></script> | 37 | <script src="js/lib/jquery-2.1.0.min.js" type="text/javascript"></script> |
46 | <script src="js/lib/bootstrap.min.js" type="text/javascript"></script> | 38 | <script src="js/lib/bootstrap.min.js" type="text/javascript"></script> |
47 | <script src="js/lib/purl.js" type="text/javascript"></script> | 39 | <script src="js/lib/purl.js" type="text/javascript"></script> |
@@ -50,5 +42,4 @@ | @@ -50,5 +42,4 @@ | ||
50 | <script src="js/proxy/bookmark.js" type="text/javascript"></script> | 42 | <script src="js/proxy/bookmark.js" type="text/javascript"></script> |
51 | <script src="js/controller/bookmark-edit.js" type="text/javascript"></script> | 43 | <script src="js/controller/bookmark-edit.js" type="text/javascript"></script> |
52 | <script src="js/controller/menu.js" type="text/javascript"></script> | 44 | <script src="js/controller/menu.js" type="text/javascript"></script> |
53 | - | ||
54 | </body> | 45 | </body> |
55 | \ No newline at end of file | 46 | \ No newline at end of file |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/bookmark-list.html
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="pt-br"> | 2 | <html lang="pt-br"> |
3 | - | ||
4 | <head> | 3 | <head> |
5 | -<meta charset="utf-8"> | ||
6 | -<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
7 | -<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | ||
8 | - | ||
9 | -<title>Bookmark List</title> | ||
10 | - | ||
11 | -<link rel="stylesheet" href="css/bootstrap.min.css"> | ||
12 | -<link rel="stylesheet" href="css/bookmark.css"> | ||
13 | -<link rel="stylesheet" href="css/datatables.css"> | 4 | + <meta charset="utf-8"> |
5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
7 | + <title>Bookmark List</title> | ||
8 | + <link rel="stylesheet" href="css/bootstrap.min.css"> | ||
9 | + <link rel="stylesheet" href="css/bookmark.css"> | ||
10 | + <link rel="stylesheet" href="css/datatables.css"> | ||
14 | </head> | 11 | </head> |
15 | - | ||
16 | <body> | 12 | <body> |
17 | <div class="container"> | 13 | <div class="container"> |
18 | <div id="menu"></div> | 14 | <div id="menu"></div> |
@@ -31,7 +27,6 @@ | @@ -31,7 +27,6 @@ | ||
31 | </table> | 27 | </table> |
32 | </div> | 28 | </div> |
33 | <p class="demoiselle">Aplicação de exemplo do Demoiselle 2.5.0</p> | 29 | <p class="demoiselle">Aplicação de exemplo do Demoiselle 2.5.0</p> |
34 | - | ||
35 | <script src="js/lib/jquery-2.1.0.min.js" type="text/javascript"></script> | 30 | <script src="js/lib/jquery-2.1.0.min.js" type="text/javascript"></script> |
36 | <script src="js/lib/bootstrap.min.js"></script> | 31 | <script src="js/lib/bootstrap.min.js"></script> |
37 | <script src="js/lib/jquery.dataTables.js"></script> | 32 | <script src="js/lib/jquery.dataTables.js"></script> |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/home.html
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head> | 3 | <head> |
4 | -<meta charset="UTF-8"> | ||
5 | -<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
6 | -<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
7 | - | ||
8 | -<title>Bookmark</title> | ||
9 | - | ||
10 | -<link href="css/bootstrap.min.css" rel="stylesheet"> | ||
11 | -<link href="css/bookmark.css" rel="stylesheet"> | 4 | + <meta charset="UTF-8"> |
5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
7 | + <title>Bookmark</title> | ||
8 | + <link href="css/bootstrap.min.css" rel="stylesheet"> | ||
9 | + <link href="css/bookmark.css" rel="stylesheet"> | ||
12 | </head> | 10 | </head> |
13 | <body> | 11 | <body> |
14 | <div class="container"> | 12 | <div class="container"> |
15 | <div id="menu"></div> | 13 | <div id="menu"></div> |
16 | <div class="jumbotron"> | 14 | <div class="jumbotron"> |
17 | <h3> | 15 | <h3> |
18 | - Bem-vindo à aplicação de exemplo Bookmark usando arquétipo html-rest. <br /> Este é o seu ponto de partida, portanto sinta-se à vontade para | ||
19 | - modificar esta aplicação. | 16 | + Bem-vindo à aplicação de exemplo Bookmark usando arquétipo html-rest. <br /> |
17 | + Este é o seu ponto de partida, portanto sinta-se à vontade para modificar esta aplicação. | ||
20 | </h3> | 18 | </h3> |
21 | </div> | 19 | </div> |
22 | </div> | 20 | </div> |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/index.html
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-edit.js
1 | $(function() { | 1 | $(function() { |
2 | 2 | ||
3 | - // Carregando o menu na página home | ||
4 | $("#menu").load("menu.html", function() { | 3 | $("#menu").load("menu.html", function() { |
5 | - | ||
6 | AuthProxy.getUser(getUserOk, getUserFailed); | 4 | AuthProxy.getUser(getUserOk, getUserFailed); |
7 | - | ||
8 | $("#logout").on("click", function() { | 5 | $("#logout").on("click", function() { |
9 | sessionStorage.removeItem('credentials'); | 6 | sessionStorage.removeItem('credentials'); |
10 | location.href = "home.html"; | 7 | location.href = "home.html"; |
11 | }); | 8 | }); |
12 | - | ||
13 | }); | 9 | }); |
14 | 10 | ||
15 | $("#delete").hide(); | 11 | $("#delete").hide(); |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/bookmark-list.js
1 | $(function() { | 1 | $(function() { |
2 | 2 | ||
3 | - // Carregando o menu na página home | ||
4 | $("#menu").load("menu.html", function() { | 3 | $("#menu").load("menu.html", function() { |
5 | - | ||
6 | AuthProxy.getUser(getUserOk, getUserFailed); | 4 | AuthProxy.getUser(getUserOk, getUserFailed); |
7 | - | ||
8 | $("#logout").on("click", function() { | 5 | $("#logout").on("click", function() { |
9 | sessionStorage.removeItem('credentials'); | 6 | sessionStorage.removeItem('credentials'); |
10 | location.href = "home.html"; | 7 | location.href = "home.html"; |
11 | }); | 8 | }); |
12 | - | ||
13 | }); | 9 | }); |
14 | 10 | ||
15 | $("#new").focus(); | 11 | $("#new").focus(); |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/home.js
1 | $(function() { | 1 | $(function() { |
2 | 2 | ||
3 | - // Carregando o menu na página home | ||
4 | $("#menu").load("menu.html", function() { | 3 | $("#menu").load("menu.html", function() { |
5 | - | ||
6 | AuthProxy.getUser(getUserOk, getUserFailed); | 4 | AuthProxy.getUser(getUserOk, getUserFailed); |
7 | - | ||
8 | $("#logout").on("click", function() { | 5 | $("#logout").on("click", function() { |
9 | sessionStorage.removeItem('credentials'); | 6 | sessionStorage.removeItem('credentials'); |
10 | location.href = "home.html"; | 7 | location.href = "home.html"; |
11 | }); | 8 | }); |
12 | - | ||
13 | }); | 9 | }); |
14 | 10 | ||
15 | }); | 11 | }); |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/js/controller/login.js
@@ -8,21 +8,16 @@ $(function() { | @@ -8,21 +8,16 @@ $(function() { | ||
8 | 'username' : $("#username").val().trim(), | 8 | 'username' : $("#username").val().trim(), |
9 | 'password' : $("#password").val().trim() | 9 | 'password' : $("#password").val().trim() |
10 | }; | 10 | }; |
11 | - | ||
12 | AuthProxy.login(form, loginOk, loginFail); | 11 | AuthProxy.login(form, loginOk, loginFail); |
13 | }); | 12 | }); |
14 | - | ||
15 | }); | 13 | }); |
16 | 14 | ||
17 | -// Função utilitária | ||
18 | function make_base_auth(user, password) { | 15 | function make_base_auth(user, password) { |
19 | var tok = user + ':' + password; | 16 | var tok = user + ':' + password; |
20 | var hash = btoa(tok); | 17 | var hash = btoa(tok); |
21 | return "Basic " + hash; | 18 | return "Basic " + hash; |
22 | } | 19 | } |
23 | 20 | ||
24 | -// Funções de Callback | ||
25 | - | ||
26 | function loginOk(data) { | 21 | function loginOk(data) { |
27 | sessionStorage.setItem('credentials', make_base_auth($("#username").val().trim(), $("#password").val().trim())); | 22 | sessionStorage.setItem('credentials', make_base_auth($("#username").val().trim(), $("#password").val().trim())); |
28 | location.href = "home.html"; | 23 | location.href = "home.html"; |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/login.html
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
6 | <meta name="viewport" content="width=device-width, initial-scale=1"> | 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
7 | - <title>Notifica | Login</title> | 7 | + <title>Bookmark</title> |
8 | <link href="css/bootstrap.min.css" rel="stylesheet"> | 8 | <link href="css/bootstrap.min.css" rel="stylesheet"> |
9 | <link href="css/bookmark.css" rel="stylesheet"> | 9 | <link href="css/bookmark.css" rel="stylesheet"> |
10 | </head> | 10 | </head> |
archetype/html-rest/src/main/resources/archetype-resources/src/main/webapp/menu.html
1 | <nav class="navbar navbar-default" role="navigation"> | 1 | <nav class="navbar navbar-default" role="navigation"> |
2 | <div class="container-fluid"> | 2 | <div class="container-fluid"> |
3 | - <!-- Brand and toggle get grouped for better mobile display --> | ||
4 | <div class="navbar-header"> | 3 | <div class="navbar-header"> |
5 | <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> | 4 | <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> |
6 | <span class="sr-only">Toggle navigation</span> | 5 | <span class="sr-only">Toggle navigation</span> |
@@ -10,8 +9,6 @@ | @@ -10,8 +9,6 @@ | ||
10 | </button> | 9 | </button> |
11 | <a class="navbar-brand" href="home.html">Bookmark</a> | 10 | <a class="navbar-brand" href="home.html">Bookmark</a> |
12 | </div> | 11 | </div> |
13 | - | ||
14 | - <!-- Collect the nav links, forms, and other content for toggling --> | ||
15 | <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> | 12 | <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
16 | <ul class="nav navbar-nav"> | 13 | <ul class="nav navbar-nav"> |
17 | <li class="dropdown"> | 14 | <li class="dropdown"> |
@@ -26,6 +23,6 @@ | @@ -26,6 +23,6 @@ | ||
26 | <li id="username"></li> | 23 | <li id="username"></li> |
27 | <li><a id="logout" href="#">Sair</a></li> | 24 | <li><a id="logout" href="#">Sair</a></li> |
28 | </ul> | 25 | </ul> |
29 | - </div><!-- /.navbar-collapse --> | ||
30 | - </div><!-- /.container-fluid --> | 26 | + </div> |
27 | + </div> | ||
31 | </nav> | 28 | </nav> |
32 | \ No newline at end of file | 29 | \ No newline at end of file |