summaryrefslogtreecommitdiffstats
path: root/modules-available/roomplanner/js/grid.js
diff options
context:
space:
mode:
authorSimon Rettberg2016-09-09 19:04:40 +0200
committerSimon Rettberg2016-09-09 19:04:40 +0200
commitd1c2f87f2fa4e66f81f86ec72560b633712c613f (patch)
tree8fea027e97c48f73bc762fdd24c7bf7ec4cb28a2 /modules-available/roomplanner/js/grid.js
parent[locations/statistics] Make machine counting more consistent (diff)
downloadslx-admin-d1c2f87f2fa4e66f81f86ec72560b633712c613f.tar.gz
slx-admin-d1c2f87f2fa4e66f81f86ec72560b633712c613f.tar.xz
slx-admin-d1c2f87f2fa4e66f81f86ec72560b633712c613f.zip
[roomplanner] Implement marking tutor on plan
Diffstat (limited to 'modules-available/roomplanner/js/grid.js')
-rw-r--r--modules-available/roomplanner/js/grid.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules-available/roomplanner/js/grid.js b/modules-available/roomplanner/js/grid.js
index 2cca26cd..4957517c 100644
--- a/modules-available/roomplanner/js/grid.js
+++ b/modules-available/roomplanner/js/grid.js
@@ -78,6 +78,17 @@ if (!roomplanner) var roomplanner = {
}
});
},
+ initTutor: function(el) {
+ if ($(el).attr('itemtype') !== 'pc') return;
+ $(el).append('<div class="tutorHandle glyphicon glyphicon-blackboard"></div>');
+ $(el).find('.tutorHandle').click(function() {
+ var wasTutor = ($(this).parent().attr('istutor') === 'true');
+ $('[itemtype="pc"]').removeAttr('istutor');
+ if (!wasTutor) {
+ $(this).parent().attr('istutor', 'true');
+ }
+ });
+ },
initTooltip: function(el) {
if ($(el).attr('itemtype') == 'pc') {
var tip = "<b>Rechnerdaten</b><br>";
@@ -339,6 +350,7 @@ if (!roomplanner) var roomplanner = {
roomplanner.initTooltip(el);
roomplanner.initRotation(el);
roomplanner.initDelete(el);
+ roomplanner.initTutor(el);
});
roomplanner.grid.scale(roomplanner.settings.scale);