From e0215421208d853e853f9c7b66add1e145982fbc Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 22 Nov 2011 17:33:09 +0100 Subject: Removing sections as special type of object Sections are changed into pure widget objects. Introduced IPA.composite_widget, basic widget for widget nesting (it's using IPA.widget_container). It's base class for section widgets. TODO: change old custom sections into custom fields and widgets. Note: usage of section in HBAC and SUDO is kept - whole logic will be removed in #1515 patch. https://fedorahosted.org/freeipa/ticket/2040 --- install/ui/dialog.js | 152 +++++++++++++++++++-------------------------------- 1 file changed, 55 insertions(+), 97 deletions(-) (limited to 'install/ui/dialog.js') diff --git a/install/ui/dialog.js b/install/ui/dialog.js index 73c9b6cc..c03bf801 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -65,24 +65,9 @@ IPA.dialog = function(spec) { that.width = spec.width || 500; that.height = spec.height; + that.widgets = IPA.widget_container(); + that.fields = IPA.field_container({ container: that }); that.buttons = $.ordered_map(); - that.sections = $.ordered_map(); - - var init = function() { - - var sections = spec.sections || []; - - for (var i=0; i', { - name: section.name, + name: widget.name, 'class': 'dialog-section' }).appendTo(that.container); - section.create(div); + widget.create(div); } }; @@ -258,10 +181,10 @@ IPA.dialog = function(spec) { }; that.save = function(record) { - var sections = that.sections.values; - for (var i=0; i