summaryrefslogtreecommitdiffstats
path: root/install/static/ipa.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-11-15 16:41:21 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2010-11-17 21:50:03 -0500
commit632639b62ddad72e31daa62ef21f992299ec0b8e (patch)
tree0e846397e8d6136678112bf1bd6dd0616066e323 /install/static/ipa.js
parent7abd8c6ecb0a0aafeaac9a4baa1d5db96722a3ab (diff)
downloadfreeipa-632639b62ddad72e31daa62ef21f992299ec0b8e.tar.gz
freeipa-632639b62ddad72e31daa62ef21f992299ec0b8e.tar.xz
freeipa-632639b62ddad72e31daa62ef21f992299ec0b8e.zip
action select
if exactly one entity is selected, it enables the entity-facet links in the action panel, and sets the pkey in bbq to the pkey of the selected
Diffstat (limited to 'install/static/ipa.js')
-rw-r--r--install/static/ipa.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/install/static/ipa.js b/install/static/ipa.js
index 4a01d9fb..6ba8b67e 100644
--- a/install/static/ipa.js
+++ b/install/static/ipa.js
@@ -101,6 +101,7 @@ var IPA = ( function () {
that.entities_by_name[entity.name] = entity;
};
+
that.show_page = function (entity_name, facet_name, other_entity) {
var state = {};
@@ -109,6 +110,19 @@ var IPA = ( function () {
$.bbq.pushState(state);
};
+ that.switch_and_show_page = function (
+ this_entity, facet_name, pkey, other_entity) {
+ if (!pkey){
+ that.show_page(this_entity, facet_name, other_entity);
+ return;
+ }
+ var state = {};
+ state[this_entity+'-pkey'] = pkey;
+ state[this_entity + '-facet'] = facet_name;
+ state[this_entity + '-enroll'] = other_entity ? other_entity : '';
+ $.bbq.pushState(state);
+ };
+
return that;
}());