atcheck/mapka/WYKLADOWCA/wyborsali.js

59 lines
1.3 KiB
JavaScript
Raw Normal View History

2019-12-08 22:33:37 +01:00
mapka = {
'A-18' : [
'cccccccc',
'_',
'cccccc',
'cccccc', ],
'A-17' : [
'ccccccc',
'_',
'cccccc',
'cccccc',],
'A-16' : [
'cccccc',
'_',
'cccccc',
'cccccc',]
};
$(document).ready(function() {
var roomNumber = 'A-17';
$("select").change(function () {
var $str = "";
$("select option:selected").each(function () {
$str += $(this).text();
if ($str == "A-17") {
roomNumber = 'A-17';
} else if ($str == "A-16") {
roomNumber = 'A-16';
} else if ($str == "A-18"){
roomNumber = 'A-18';
}
});
}).trigger("change");
$('#seat-map').load('wyborsali.html #seat-map', function() {
var sc = $('#seat-map').seatCharts({
map: mapka[roomNumber],
naming : {
rows: ['1','','2','3'],
top : false,
getLabel : function (character, row, column) {
if (row == '1') {
return column;
} else if (row == '2') {
return column;
} else if (row == '3') {
return column;
}
},
}
});
});
});