summaryrefslogtreecommitdiffstats
path: root/install/ui/entitle.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-04-28 19:17:58 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-05-05 14:57:45 -0500
commita4aba826a0e1327ba8df05da19d9ad0055d8269d (patch)
tree1c2ee009a6be1c09ef19f0c4e07c60799ce344f1 /install/ui/entitle.js
parentdd89c28654c92c0922900409b37c1abcefc56c84 (diff)
downloadfreeipa-a4aba826a0e1327ba8df05da19d9ad0055d8269d.tar.gz
freeipa-a4aba826a0e1327ba8df05da19d9ad0055d8269d.tar.xz
freeipa-a4aba826a0e1327ba8df05da19d9ad0055d8269d.zip
Added facet container.
Facet container has been added to hold facet header (i.e. title, search fields, buttons, links) and facet content. Each facet now occupies separate container, so it can be shown/hidden without having to redraw the content.
Diffstat (limited to 'install/ui/entitle.js')
-rw-r--r--install/ui/entitle.js66
1 files changed, 19 insertions, 47 deletions
diff --git a/install/ui/entitle.js b/install/ui/entitle.js
index 193468c2a..513cb6b41 100644
--- a/install/ui/entitle.js
+++ b/install/ui/entitle.js
@@ -260,47 +260,14 @@ IPA.entitle.search_facet = function(spec) {
var that = IPA.search_facet(spec);
- that.setup = function(container) {
+ that.create_header = function(container) {
- that.search_facet_setup(container);
-
- var buttons = that.entity_header.buttons;
-
- $('a', buttons).remove();
+ that.facet_create_header(container);
that.register_buttons = $('<span/>', {
style: 'display: none;'
- }).appendTo(buttons);
-
- $('<input/>', {
- type: 'button',
- name: 'register_online',
- value: 'Register'
- }).appendTo(that.register_buttons);
-
- $('<input/>', {
- type: 'button',
- name: 'register_offline',
- value: 'Import'
- }).appendTo(that.register_buttons);
-
- that.consume_buttons = $('<span/>', {
- style: 'display: none;'
- }).appendTo(buttons);
-
- $('<input/>', {
- type: 'button',
- name: 'consume',
- value: 'Consume'
- }).appendTo(that.consume_buttons);
-
- $('<input/>', {
- type: 'button',
- name: 'import',
- value: 'Import'
- }).appendTo(that.consume_buttons);
+ }).appendTo(that.controls);
- var button = $('input[name=register_online]', that.entity_header.buttons);
that.register_online_button = IPA.action_button({
label: 'Register',
icon: 'ui-icon-plus',
@@ -308,10 +275,8 @@ IPA.entitle.search_facet = function(spec) {
var dialog = that.entity.get_dialog('online_registration');
dialog.open(that.container);
}
- });
- button.replaceWith(that.register_online_button);
+ }).appendTo(that.register_buttons);
- button = $('input[name=register_offline]', that.entity_header.buttons);
that.register_offline_button = IPA.action_button({
label: 'Import',
icon: 'ui-icon-plus',
@@ -319,10 +284,12 @@ IPA.entitle.search_facet = function(spec) {
var dialog = that.entity.get_dialog('offline_registration');
dialog.open(that.container);
}
- });
- button.replaceWith(that.register_offline_button);
+ }).appendTo(that.register_buttons);
+
+ that.consume_buttons = $('<span/>', {
+ style: 'display: none;'
+ }).appendTo(that.controls);
- button = $('input[name=consume]', that.entity_header.buttons);
that.consume_button = IPA.action_button({
label: 'Consume',
icon: 'ui-icon-plus',
@@ -331,10 +298,8 @@ IPA.entitle.search_facet = function(spec) {
var dialog = that.entity.get_dialog('consume');
dialog.open(that.container);
}
- });
- button.replaceWith(that.consume_button);
+ }).appendTo(that.consume_buttons);
- button = $('input[name=import]', that.entity_header.buttons);
that.import_button = IPA.action_button({
label: 'Import',
icon: 'ui-icon-plus',
@@ -343,8 +308,15 @@ IPA.entitle.search_facet = function(spec) {
var dialog = that.entity.get_dialog('import');
dialog.open(that.container);
}
- });
- button.replaceWith(that.import_button);
+ }).appendTo(that.consume_buttons);
+ };
+
+ that.show = function() {
+ that.facet_show();
+
+ that.entity.header.set_pkey(null);
+ that.entity.header.back_link.css('visibility', 'hidden');
+ that.entity.header.facet_tabs.css('visibility', 'hidden');
};
that.refresh = function() {