summaryrefslogtreecommitdiffstats
path: root/install/static/search.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/search.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/search.js')
-rw-r--r--install/static/search.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/install/static/search.js b/install/static/search.js
index 040508734..a107209b1 100644
--- a/install/static/search.js
+++ b/install/static/search.js
@@ -100,6 +100,28 @@ function ipa_search_widget(spec) {
return false;
};
+ that.select_changed = function(){
+ var count = 0;
+ var pkey;
+ $('input[name=select]:checked', that.tbody).each(function(input){
+ count += 1;
+ pkey = $(this).val();
+ });
+ if(count == 1){
+ $('.action-panel li.entity-facet').
+ removeClass('entity-facet-disabled');
+ var state = {};
+ $('.action-panel input[id=pkey]').val(pkey);
+ }else{
+ $('.action-panel li.entity-facet').
+ addClass('entity-facet-disabled');
+ $('.action-panel input').val(null);
+
+ }
+ return false;
+ }
+
+
that.remove = function(container) {
var values = that.get_selected_values();
@@ -199,6 +221,8 @@ function ipa_search_facet(spec) {
spec = spec || {};
+ spec.display_class = 'search-facet';
+
var that = ipa_facet(spec);
that.init = spec.init || init;