From 46137fdf898690836ae61e54b1cb2711492287f3 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 16 May 2011 22:23:20 -0500 Subject: jQuery ordered map. The ordered map is a jQuery extension for creating a collection which can be accessed both as an ordered list and as a map. This collection can be used to store various objects including entities, fields, columns, and dialogs. A test suite for this class has been added as well. Ticket #1232 --- install/ui/dialog.js | 59 +++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) (limited to 'install/ui/dialog.js') diff --git a/install/ui/dialog.js b/install/ui/dialog.js index 2c9fdb0e..9cba47fd 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -40,8 +40,7 @@ IPA.dialog = function(spec) { that.buttons = {}; - that.fields = []; - that.fields_by_name = {}; + that.fields = $.ordered_map(); that.sections = []; @@ -52,8 +51,9 @@ IPA.dialog = function(spec) { that.__defineSetter__("entity_name", function(entity_name){ that._entity_name = entity_name; - for (var i=0; i').appendTo(that.container); - for (var i=0; i').appendTo(table); @@ -172,8 +174,9 @@ IPA.dialog = function(spec) { * Setup behavior */ that.setup = function() { - for (var i=0; i