From b61039216c8ab2c639b1fb8d1b8ca817bedd22b3 Mon Sep 17 00:00:00 2001 From: Ruben Daniels Date: Tue, 20 Oct 2015 18:53:03 +0000 Subject: [PATCH] Small fixes to settings and forms --- plugins/c9.core/settings.js | 7 ++++--- plugins/c9.ide.ui/forms.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/c9.core/settings.js b/plugins/c9.core/settings.js index 27bee4f8..0331c92c 100644 --- a/plugins/c9.core/settings.js +++ b/plugins/c9.core/settings.js @@ -391,13 +391,14 @@ define(function(require, exports, module) { } if (hash[key] === value) return; - + + var oldValue = hash[key]; hash[key] = value; // Tell everyone this property changed - emit(parts.join("/"), value); + emit(parts.join("/"), value, oldValue); // Tell everyone it's parent changed - emit(query, value); + emit(query, value, oldValue); // Tell everyone the root type changed (user, project, state) scheduleAnnounce(parts[0], userData); diff --git a/plugins/c9.ide.ui/forms.js b/plugins/c9.ide.ui/forms.js index ba36edb7..35ee4fb4 100644 --- a/plugins/c9.ide.ui/forms.js +++ b/plugins/c9.ide.ui/forms.js @@ -421,8 +421,8 @@ define(function(require, exports, module) { }); } - if (options.name) { - node.setAttribute("id", options.name); + if (options.id || options.name) { + node.setAttribute("id", options.id || options.name); elements[node.name] = node; }