summaryrefslogtreecommitdiffstats
path: root/modules-available/roomplanner/js/grid.js
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-01 13:25:39 +0100
committerSimon Rettberg2017-12-01 13:25:39 +0100
commitd11ebcb652fb76391928bbbc0c338d4a5737e3a9 (patch)
tree404420d63e8c0162aac9773e10a761d4aca545ab /modules-available/roomplanner/js/grid.js
parent[roomplanner] Fallback to ip if hostname is empty (diff)
downloadslx-admin-d11ebcb652fb76391928bbbc0c338d4a5737e3a9.tar.gz
slx-admin-d11ebcb652fb76391928bbbc0c338d4a5737e3a9.tar.xz
slx-admin-d11ebcb652fb76391928bbbc0c338d4a5737e3a9.zip
[roomplanner] Sort already placed machines to the bottom
Diffstat (limited to 'modules-available/roomplanner/js/grid.js')
-rw-r--r--modules-available/roomplanner/js/grid.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules-available/roomplanner/js/grid.js b/modules-available/roomplanner/js/grid.js
index 334057bf..466e42aa 100644
--- a/modules-available/roomplanner/js/grid.js
+++ b/modules-available/roomplanner/js/grid.js
@@ -74,10 +74,13 @@ if (!roomplanner) var roomplanner = {
initDelete: function(el) {
$(el).append('<div class="deleteHandle glyphicon glyphicon-remove-sign"></div>');
$(el).find('.deleteHandle').click(function() {
- if ($(this).parent().attr('itemtype') == "pc") {
+ if ($(this).parent().attr('itemtype') === "pc") {
var self = this;
BootstrapDialog.confirm(__('are you sure'),function(result) {
if (result) {
+ if (onPcDelete) {
+ onPcDelete($(self).parent().attr('muuid'));
+ }
$(self).parent().remove();
}
});
@@ -169,8 +172,8 @@ if (!roomplanner) var roomplanner = {
var mw = $(this).resizable("option","maxWidth");
var mh = $(this).resizable("option","maxHeight");
- var hLimit = ($(this).attr('scalable') == 'v');
- var vLimit = ($(this).attr('scalable') == 'h');
+ var hLimit = ($(this).attr('scalable') === 'v');
+ var vLimit = ($(this).attr('scalable') === 'h');
if(collides.length) {
$(collides).each(function(idx,item) {