From be7f4d7fa6f877a1fe595cf737535da3dcba57ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Mon, 1 Jun 2015 19:00:15 +0200 Subject: [PATCH] Feature #3748: Save the jquery selector when the form-panel is attached --- .../public/app/utils/form-panels/form-panel.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sunstone/public/app/utils/form-panels/form-panel.js b/src/sunstone/public/app/utils/form-panels/form-panel.js index c54ecbf5f5..98789909fd 100644 --- a/src/sunstone/public/app/utils/form-panels/form-panel.js +++ b/src/sunstone/public/app/utils/form-panels/form-panel.js @@ -23,9 +23,9 @@ define(function(require) { function _insert(context) { var that = this; - $("#wizardForms", context).append(that.htmlWizard()); + this.wizardElement = $(that.htmlWizard()).appendTo( $("#wizardForms", context) ); if (that.htmlAdvanced) { - $("#advancedForms", context).append(that.htmlAdvanced()); + this.advancedElement = $(that.htmlAdvanced()).appendTo( $("#advancedForms", context) ); } context.off('invalid.fndtn.abide', '#' + that.formPanelId + 'Wizard'); @@ -65,11 +65,11 @@ define(function(require) { } function _reset(context) { - $('#' + this.formPanelId + "Wizard").remove(); + this.wizardElement.remove(); if (this.htmlAdvanced) { - $('#' + this.formPanelId + "Advanced").remove(); + this.advancedElement.remove(); } - + this.insert(context); }