Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DAAExample
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alejandro Borrajo Viéitez
DAAExample
Commits
c079f4af
Commit
c079f4af
authored
Mar 08, 2019
by
Alejandro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a div for switch the view
Adds a new div that allows to switch between views
parent
4c84d151
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
main.html
src/main/webapp/main.html
+39
-2
No files found.
src/main/webapp/main.html
View file @
c079f4af
...
@@ -15,20 +15,26 @@
...
@@ -15,20 +15,26 @@
<a
href=
"#"
class=
"navbar-brand d-flex align-items-center"
>
<a
href=
"#"
class=
"navbar-brand d-flex align-items-center"
>
<strong>
DAA Example
</strong>
<strong>
DAA Example
</strong>
</a>
</a>
<a
href=
"#"
id=
"people"
class=
"navbar-brand d-flex align-items-center"
>
Personas
</a>
<a
href=
"#"
id=
"pets"
class=
"navbar-brand d-flex align-items-center"
>
Mascotas
</a>
<button
id=
"logout"
class=
"btn btn-dark"
>
Cerrar sesión
</button>
<button
id=
"logout"
class=
"btn btn-dark"
>
Cerrar sesión
</button>
</div>
</div>
</div>
</div>
</header>
</header>
<div
class=
"container"
>
<div
class=
"container"
>
<div
id=
"genericContainer"
>
<div
id=
"people-container"
>
<div
id=
"people-container"
>
<h1
class=
"display-5 mt-3 mb-3"
>
Personas
</h1>
<h1
class=
"display-5 mt-3 mb-3"
>
Personas
</h1>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
<script
type=
"text/javascript"
src=
"http://code.jquery.com/jquery-2.2.4.min.js"
></script>
src=
"http://code.jquery.com/jquery-2.2.4.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/dao/people.js"
></script>
<script
type=
"text/javascript"
src=
"js/dao/people.js"
></script>
<script
type=
"text/javascript"
src=
"js/dao/pets.js"
></script>
<script
type=
"text/javascript"
src=
"js/view/pets.js"
></script>
<script
type=
"text/javascript"
src=
"js/view/people.js"
></script>
<script
type=
"text/javascript"
src=
"js/view/people.js"
></script>
<script
type=
"text/javascript"
src=
"js/login.js"
></script>
<script
type=
"text/javascript"
src=
"js/login.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
...
@@ -46,5 +52,36 @@
...
@@ -46,5 +52,36 @@
view
.
init
();
view
.
init
();
});
});
</script>
</script>
<script>
$
(
'#pets'
).
click
(
function
(
event
){
event
.
preventDefault
();
$
(
'#genericContainer'
).
empty
();
$
(
'#genericContainer'
).
append
(
"<div id='pets-container'>"
+
"<h1 class=
\"
display-5 mt-3 mb-3
\"
>Mascotas</h1>"
+
"</div>"
);
var
view
=
new
PetsView
(
new
PetsDAO
(),
'pets-container'
,
'pets-container'
);
view
.
init
();
});
</script>
<script>
$
(
'#people'
).
click
(
function
(
event
)
{
event
.
preventDefault
();
$
(
'#genericContainer'
).
empty
();
$
(
'#genericContainer'
).
append
(
"<div id='people-container'>"
+
"<h1 class=
\"
display-5 mt-3 mb-3
\"
>Personas</h1>"
+
"</div>"
);
let
view
=
new
PeopleView
(
new
PeopleDAO
(),
'people-container'
,
'people-container'
);
view
.
init
();
})
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment