File: seatingChart.html

package info (click to toggle)
node-knockout-sortable 1.2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 248 kB
  • sloc: javascript: 1,530; makefile: 5
file content (64 lines) | stat: -rw-r--r-- 2,412 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Seating Chart</title>
    <link rel="stylesheet" href="seatingChart.css" />
</head>
<body>
    <div>Seating Assignments</div>
    <div class="note">Rules: no more than 4 students per table. Must have at least one student of each gender at a full table.</div>
    <div id="main" data-bind="foreach: tables">
        <div class="table">
            <span data-bind="text: students.id"></span>
            <div class="seats" data-bind="sortable: { data: students, allowDrop: $root.isTableFull }">
                <div class="student" data-bind="text: name"></div>
            </div>
            <div class="count" data-bind="text: students().length + '/' + $root.maximumStudents, css: { ready: students().length < $root.maximumStudents }"></div>
        </div>
    </div>

    <div id="extra">
        <div>Available Students</div>
        <div class="new" data-bind="sortable: availableStudents">
            <div class="student" data-bind="text: name"></div>
        </div>
    </div>

    <div id="message" data-bind="flash: lastAction"></div>
    <div id="error" data-bind="flash: lastError"></div>

    <div id="master">
        <div>Master List</div>
        <table>
            <tr>
                <th></th>
                <th>Seat One</th>
                <th>Seat Two</th>
                <th>Seat Three</th>
                <th>Seat Four</th>
            </tr>
            <tbody data-bind="foreach: tables">
                <tr>
                    <th data-bind="text: students.id"></th>
                    <!-- ko foreach: students -->
                    <td data-bind="text: name"></td>
                    <!-- /ko -->
                </tr>
            </tbody>
            <tr>
                <th>Available</th>
                <!-- ko foreach: availableStudents -->
                <td data-bind="text: name"></td>
                <!-- /ko -->
            </tr>
        </table>
    </div>

    <script type='text/javascript' src='../ext/jquery-1.9.1.js'></script>
    <script type="text/javascript" src="../ext/jquery-ui.js"></script>
    <script type='text/javascript' src="../ext/knockout-3.5.1.js"></script>
    <script type='text/javascript' src="../build/knockout-sortable.min.js"></script>
    <script type='text/javascript' src="seatingChart.js"></script>
</body>
</html>