<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/ico" href="https://www.datatables.net/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0,
user-scalable=no">
<title>budget</title>
<link href="https://cdn.datatables.net/fixedcolumns/3.3.0/css/fixedColumns.dataTables.min.css"
rel="stylesheet" type="text/css">
<link href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css"
rel="stylesheet" type="text/css">
<link href="https://cdn.datatables.net/responsive/2.2.3/css/responsive.dataTables.min.css"
rel="stylesheet" type="text/css">
<link href="https://cdn.datatables.net/buttons/1.6.1/css/buttons.dataTables.min.css"
rel="stylesheet" type="text/css">
<link href="https://cdn.datatables.net/select/1.3.0/css/select.dataTables.min.css"
rel="stylesheet" type="text/css">
<link href="https://cdn.datatables.net/keytable/2.5.1/css/keyTable.dataTables.min.css"
rel="stylesheet" type="text/css">
<link href="../../css/editor.dataTables.min.css" rel="stylesheet" type="text/css">
<link href="../resources/syntax/shCore.css" rel="stylesheet" type="text/css">
<link href="https://editor.datatables.net/extensions/Editor/css/editor.dataTables.min.css"
rel="stylesheet" type="text/css">
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://nightly.datatables.net/js/jquery.dataTables.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.6.1/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/select/1.3.0/js/dataTables.select.min.js"></script>
<script src="../../js/dataTables.editor.min.js"></script>
<script src="../resources/syntax/shCore.js"></script>
<script src="../resources/demo.js"></script>
<!-- <script src="../resources/editor-demo.js"></script> -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="//cdn.datatables.net/buttons/1.5.0/js/buttons.html5.min.js"></script>
<script src="//cdn.datatables.net/buttons/1.5.0/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/select/1.3.0/js/dataTables.select.min.js"></script>
<script src="https://cdn.datatables.net/keytable/2.5.0/js/dataTables.keyTable.min.js"></script>
<script src="https://cdn.datatables.net/fixedcolumns/3.2.6/js/dataTables.fixedColumns.min.js">
</script>
</head>
<body class="dt-example">
<div class="container">
<div class="w3-container">
<div class="w3-container w3-teal">
<h1>Timebudget</h1>
</div>
<br>
<table id="example" class="display hoover striped" cellspacing="0" style="width:100%">
<thead>
<tr>
<th class="select-checkbox">Vælg</th><!-- 0 -->
<th>Nr</th>
<th>Fag/aktivitet</th>
<th>Ej i skema</th>
<th>Bem.</th>
<th>Hold</th>
<th>Underviser </th>
<th>Timer</th>
<th>Faktor</th>
<th>Lekt.</th>
<th>Fordelt</th>
<th>31</th>
<th>32</th><!-- 12 -->
<th>33</th>
<th>34</th>
<th>35</th>
<th>36</th>
<th>37</th>
<th>38</th>
<th>39</th>
<th>40</th>
<th>41</th>
<th>42</th><!-- 22 -->
<th>43</th>
<th>44</th>
<th>45</th>
<th>46</th>
<th>47</th>
<th>48</th>
<th>49</th>
<th>50</th>
<th>51</th>
<th>52</th><!-- 32 -->
<th>53</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th><!-- 42 -->
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
<th>14</th>
<th>15</th>
<th>16</th>
<th>17</th>
<th>18</th>
<th>19</th><!-- 52 -->
<th>20</th>
<th>21</th>
<th>22</th>
<th>23</th>
<th>24</th>
<th>25</th>
<th>26</th>
<th>27</th><!-- 60 -->
</tr>
</thead>
<tbody>
<td></th><!-- 0 -->
<td>1</td>
<td>Ferie</td>
<td></td>
<td>Ingen</td>
<td>abe18, abe19a, abe19b, abm18, abm19a, abm19b, BYG18, BYG19, JG18, JG19, JH18, JH19, JK18, JK19, JP18, JP19, JS18, JS19, LA18, LA19, MN18, MN19a, MN19b </td>
<td>AJA, ANDE, CHA, CHPI, CVL, EHB, EHO, ELG, ESO, FA, HHBF, HMS, IFI, INUSO, IVRO, JAPO, JCHO, JENB, JH, JPED, JRHO, KIST, KLJO, LANG, LJMN, LV, LVA, MJ, MJEP, MKLI, NIH, NYH, OHJ, SAON, SIDS, STFO, ZZZ</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>32</td>
<td>33</td>
<td>34</td>
<td>35</td>
<td>36</td>
<td>37</td>
<td>38</td>
<td>39</td>
<td>40</td>
<td>41</td>
<td>42</td>
<td>43</td>
<td>44</td>
<td>45</td>
<td>46</td>
<td>47</td>
<td>48</td>
<td>49</td>
<td>50</td>
<td>51</td>
<td>52</td>
<td>53</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td><!-- 42 -->
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td><!-- 52 -->
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td>26</td>
<td>27</td>
</tbody>
</table>
</div>
</body>
</html>
var editor;
var intVal = function ( i ) {//sikrer at null også kan lægges sammen med tal. Fri for at vise nul
return typeof i === 'string' ?
i.replace(/[\$,]/g, '')*1 :
typeof i === 'number' ?
i : 0;
};
$(document).ready(function() {
var table = $('#example').DataTable( {
autoWidth: false,
table: "#example",
scrollCollapse: true,
scrollX: true,
columns: [ // Checkbox select column, kode til check-box, kolonne 0
{ data: null, defaultContent: '', className: 'select-checkbox', orderable: false},
{ data: "budget.nr"},//column 1
{ data: "budget.fag" },
{ data: "skema",
render: function ( data, type, row ) {
if ( type === 'display' ) {
return '<input type="checkbox" class="editor-active">';
}
return data;
},
className: "dt-body-center"
},
{ data: "budget.bem"},
{ data: "laerer", width: "25%", render: "[, ].init" },//koden der kan vise flere lærere
{ data: "hold", width: "200px", render: "[, ].init" },//koden der kan vise flere hold
{ data: null,//TIMER: = faktor * fordelt
render: function ( data, type, row ) {
var num = (row.budget.faktor *
(intVal(row.budget.u31)+intVal(row.budget.u32)+intVal(row.budget.u33)
+intVal(row.budget.u34)+intVal(row.budget.u35)+intVal(row.budget.u36)
+intVal(row.budget.u37)+intVal(row.budget.u38)+intVal(row.budget.u39)
+intVal(row.budget.u40)+intVal(row.budget.u41)+intVal(row.budget.u42)
+intVal(row.budget.u43)+intVal(row.budget.u44)+intVal(row.budget.u45)
+intVal(row.budget.u46)+intVal(row.budget.u47)+intVal(row.budget.u48)
+intVal(row.budget.u49)+intVal(row.budget.u50)+intVal(row.budget.u51)
+intVal(row.budget.u52)+intVal(row.budget.u53)+intVal(row.budget.u1)
+intVal(row.budget.u2)+intVal(row.budget.u3)+intVal(row.budget.u4)
+intVal(row.budget.u5)+intVal(row.budget.u6)+intVal(row.budget.u7)
+intVal(row.budget.u8)+intVal(row.budget.u9)+intVal(row.budget.u10)
+intVal(row.budget.u11)+intVal(row.budget.u12)+intVal(row.budget.u13)
+intVal(row.budget.u14)+intVal(row.budget.u15)+intVal(row.budget.u16)
+intVal(row.budget.u17)+intVal(row.budget.u18)+intVal(row.budget.u19)
+intVal(row.budget.u20)+intVal(row.budget.u21)+intVal(row.budget.u22)
+intVal(row.budget.u23)+intVal(row.budget.u24)+intVal(row.budget.u25)
+intVal(row.budget.u26)+intVal(row.budget.u27)));
var n = num.toFixed(0);//reducerer num til n med 0 decimaler
return n;
}
},
{ data: "budget.faktor", render: $.fn.dataTable.render.number( '.', ',', 2) },
{ data: "budget.lektioner"},
{ data: null,//FORDELT summer uger på tværs
render: function ( data, type, row ) {
return (intVal(row.budget.u31)+intVal(row.budget.u32))+intVal(row.budget.u33)
+intVal(row.budget.u34)+intVal(row.budget.u35)+intVal(row.budget.u36)
+intVal(row.budget.u37)+intVal(row.budget.u38)+intVal(row.budget.u39)
+intVal(row.budget.u40)+intVal(row.budget.u41)+intVal(row.budget.u42)
+intVal(row.budget.u43)+intVal(row.budget.u44)+intVal(row.budget.u45)
+intVal(row.budget.u46)+intVal(row.budget.u47)+intVal(row.budget.u48)
+intVal(row.budget.u49)+intVal(row.budget.u50)+intVal(row.budget.u51)
+intVal(row.budget.u52)+intVal(row.budget.u53)+intVal(row.budget.u1)
+intVal(row.budget.u2)+intVal(row.budget.u3)+intVal(row.budget.u4)
+intVal(row.budget.u5)+intVal(row.budget.u6)+intVal(row.budget.u7)
+intVal(row.budget.u8)+intVal(row.budget.u9)+intVal(row.budget.u10)
+intVal(row.budget.u11)+intVal(row.budget.u12)+intVal(row.budget.u13)
+intVal(row.budget.u14)+intVal(row.budget.u15)+intVal(row.budget.u16)
+intVal(row.budget.u17)+intVal(row.budget.u18)+intVal(row.budget.u19)
+intVal(row.budget.u20)+intVal(row.budget.u21)+intVal(row.budget.u22)
+intVal(row.budget.u23)+intVal(row.budget.u24)+intVal(row.budget.u25)
+intVal(row.budget.u26)+intVal(row.budget.u27);
}
},
{ data: "budget.u31",
"sortable":false, searchable: false},
{ data: "budget.u32",
"sortable":false, searchable: false },
{ data: "budget.u33",
"sortable":false, searchable: false },
{ data: "budget.u34",
"sortable":false, searchable: false },
{ data: "budget.u35",
"sortable":false, searchable: false },
{ data: "budget.u36",
"sortable":false, searchable: false },
{ data: "budget.u37",
"sortable":false, searchable: false },
{ data: "budget.u38",
"sortable":false, searchable: false },
{ data: "budget.u39",
"sortable":false, searchable: false },
{ data: "budget.u40",
"sortable":false, searchable: false },
{ data: "budget.u41",
"sortable":false, searchable: false },
{ data: "budget.u42",
"sortable":false, searchable: false },
{ data: "budget.u43",
"sortable":false, searchable: false },
{ data: "budget.u44",
"sortable":false, searchable: false },
{ data: "budget.u45",
"sortable":false, searchable: false },
{ data: "budget.u46",
"sortable":false, searchable: false },
{ data: "budget.u47",
"sortable":false, searchable: false },
{ data: "budget.u48",
"sortable":false, searchable: false },
{ data: "budget.u49",
"sortable":false, searchable: false },
{ data: "budget.u50",
"sortable":false, searchable: false },
{ data: "budget.u51",
"sortable":false, searchable: false },
{ data: "budget.u52",
"sortable":false, searchable: false },
{ data: "budget.u53",
"sortable":false, searchable: false },
{ data: "budget.u1",
"sortable":false, searchable: false },
{ data: "budget.u2",
"sortable":false, searchable: false },
{ data: "budget.u3",
"sortable":false, searchable: false },
{ data: "budget.u4",
"sortable":false, searchable: false },
{ data: "budget.u5",
"sortable":false, searchable: false },
{ data: "budget.u6",
"sortable":false, searchable: false },
{ data: "budget.u7",
"sortable":false, searchable: false },
{ data: "budget.u8",
"sortable":false, searchable: false },
{ data: "budget.u9",
"sortable":false, searchable: false },
{ data: "budget.u10",
"sortable":false, searchable: false },
{ data: "budget.u11",
"sortable":false, searchable: false },
{ data: "budget.u12",
"sortable":false, searchable: false },
{ data: "budget.u13",
"sortable":false, searchable: false },
{ data: "budget.u14",
"sortable":false, searchable: false },
{ data: "budget.u15",
"sortable":false, searchable: false },
{ data: "budget.u16",
"sortable":false, searchable: false },
{ data: "budget.u17",
"sortable":false, searchable: false },
{ data: "budget.u18",
"sortable":false, searchable: false },
{ data: "budget.u19",
"sortable":false, searchable: false },
{ data: "budget.u20",
"sortable":false, searchable: false },
{ data: "budget.u21",
"sortable":false, searchable: false },
{ data: "budget.u22",
"sortable":false, searchable: false },
{ data: "budget.u23",
"sortable":false, searchable: false },
{ data: "budget.u24",
"sortable":false, searchable: false },
{ data: "budget.u25",
"sortable":false, searchable: false },
{ data: "budget.u26",
"sortable":false, searchable: false },
{ data: "budget.u27",
"sortable":false, searchable: false }//ingen komma sidste gang
],
order: [[0, 'asc']]
} );
} );
You can jump to the latest bin by adding /latest
to your URL
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + [ | Indents selected lines |
ctrl + ] | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Clone Bin |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |