summaryrefslogtreecommitdiffstats
path: root/install/static/entity.js
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2010-09-23 16:57:11 -0400
committerAdam Young <ayoung@redhat.com>2010-09-23 16:57:11 -0400
commitaf36e5ea900b4414e436eed9d59b608aea84b8da (patch)
tree767c2727e22c10cb7bab4783e5daf0571b3098b0 /install/static/entity.js
parentf1f9c37a55b877caeaeeb2223de8c57b192fab26 (diff)
downloadfreeipa-af36e5ea900b4414e436eed9d59b608aea84b8da.tar.gz
freeipa-af36e5ea900b4414e436eed9d59b608aea84b8da.tar.xz
freeipa-af36e5ea900b4414e436eed9d59b608aea84b8da.zip
Modal dialog for enrollment
The enroll facet has been converted into a dialog box. This dialog box will appear when the user clicks the enroll button above the association list. When the user clicks the enroll button in the dialog box, the new associations will be created, then the list will be refreshed to show the changes. The SerialAssociator and BulkAssociator have been modified to accept an on_success function which will be called when the whole operation is completed successfully. This is used to refresh the list and close the dialog box appropriately. Some other changes were also made to improve code clarity.
Diffstat (limited to 'install/static/entity.js')
-rw-r--r--install/static/entity.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/install/static/entity.js b/install/static/entity.js
index 7adc3921..85bbc074 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -80,6 +80,7 @@ function ipa_entity_setup(jobj)
};
function setup_associate_facet() {
+ var pkey = $.bbq.getState(obj_name + '-pkey', true) || '';
var enroll_obj_name = $.bbq.getState(obj_name + '-enroll', true) || '';
var attr = ipa_get_member_attribute(obj_name, enroll_obj_name);
var columns = [
@@ -88,18 +89,11 @@ function ipa_entity_setup(jobj)
column: attr + '_' + enroll_obj_name
}
];
- var frm = new AssociationList(obj_name, 'enroll', columns, jobj);
+ var frm = new AssociationList(obj_name, pkey, enroll_obj_name, columns, jobj);
ipa_entity_generate_views(obj_name, jobj);
frm.setup();
};
- function setup_enroll_facet() {
- var enroll_obj_name = $.bbq.getState(obj_name + '-enroll', true) || '';
- var pkey = ipa_objs[enroll_obj_name].primary_key;
- var frm = new AssociationForm(obj_name, enroll_obj_name, pkey, jobj);
- frm.setup();
- };
-
jobj.empty();
var facet = $.bbq.getState(obj_name + '-facet', true) || 'search';
@@ -109,8 +103,6 @@ function ipa_entity_setup(jobj)
setup_details_facet();
} else if (facet == 'associate') {
setup_associate_facet();
- } else if (facet == 'enroll') {
- setup_enroll_facet();
}
}