diff options
author | Michael Scherle | 2017-01-27 21:25:31 +0100 |
---|---|---|
committer | Michael Scherle | 2017-01-27 21:25:31 +0100 |
commit | 8bbebbee64ec5b2ea19855ab2e5a616daa27241e (patch) | |
tree | 4e85c329b7b2c5c317043b10ccc5b0ad41ce8e01 /modules-available/locationinfo/frontend | |
parent | frontent: started on 4k screen impelementation, nothing to see here right now (diff) | |
download | slx-admin-8bbebbee64ec5b2ea19855ab2e5a616daa27241e.tar.gz slx-admin-8bbebbee64ec5b2ea19855ab2e5a616daa27241e.tar.xz slx-admin-8bbebbee64ec5b2ea19855ab2e5a616daa27241e.zip |
frontend: added function to generate parent div
Diffstat (limited to 'modules-available/locationinfo/frontend')
-rw-r--r-- | modules-available/locationinfo/frontend/panel.html | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/modules-available/locationinfo/frontend/panel.html b/modules-available/locationinfo/frontend/panel.html index 8b1a4d1a..c3316603 100644 --- a/modules-available/locationinfo/frontend/panel.html +++ b/modules-available/locationinfo/frontend/panel.html @@ -83,8 +83,9 @@ </style> <script type='text/javascript'> $(document).ready(function () { + generateParent("body",1,"Parent"); for(var i= 0;i<10;i++) { - generateChild(i, "test " + i); + generateChild("parent_1",i, "test " + i); } updateRoomUsage(7,7,7,7,7); updateCourseText(7,"asd"); @@ -105,7 +106,7 @@ $("#div_Time_"+id).text(time); } - function generateChild(id,name) { + function generateChild(target,id,name) { var text="<div class='border'>" + "<div class='child paperEffect'>" + "<div class='headerFont'>"+name+"</div>" + @@ -117,10 +118,19 @@ "</div>" + "<div id = 'div_course"+id+"'class='courseFont'>Course Name</div>" + "<div id = 'div_Time_"+id+"'class='courseFont'>14:23</div></div></div>"; - $("body").append(text); + $("#"+target).append(text); } + function generateParent(target,id,name) { + var text="<div class='border'>" + + "<div class='child paperEffect'>" + + "<div class='headerFont'>"+name+"</div>" + + "<div id='parent_"+ id +"'</div>"+ + "</div></div>"; + $(target).append(text); + } + </script> </head> <body class="main"> |