From c8eb76766afc8755e709cdba62586a8ab1ad65c9 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 21 Jun 2011 15:05:44 -0500 Subject: Converted entity header into facet header. The content and the size of entity header changes depending on the facet being displayed, so the entity header has been converted into a facet header to allow better control via CSS. The DNS record facet has been updated to use the same styling and support scrolling. To help styling and testing, all buttons have been assigned a name. --- install/ui/entitle.js | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'install/ui/entitle.js') diff --git a/install/ui/entitle.js b/install/ui/entitle.js index 13e83ca61..66e5e2a61 100644 --- a/install/ui/entitle.js +++ b/install/ui/entitle.js @@ -326,6 +326,7 @@ IPA.entitle.entity = function(spec) { IPA.entitle.details_facet = function(spec) { spec = spec || {}; + spec.disable_back_link = true; var that = IPA.details_facet(spec); @@ -336,22 +337,26 @@ IPA.entitle.details_facet = function(spec) { }).appendTo(that.controls); that.register_online_button = IPA.action_button({ + name: 'register', label: 'Register', icon: 'ui-icon-plus', click: function() { var dialog = that.entity.get_dialog('online_registration'); dialog.open(that.container); + return false; } }).appendTo(that.register_buttons); that.register_online_button.css('display', 'none'); /* that.register_offline_button = IPA.action_button({ + name: 'import', label: 'Import', icon: 'ui-icon-plus', click: function() { var dialog = that.entity.get_dialog('offline_registration'); dialog.open(that.container); + return false; } }).appendTo(that.register_buttons); @@ -359,14 +364,6 @@ IPA.entitle.details_facet = function(spec) { */ }; - 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', 'visible'); - }; - that.refresh = function() { var summary = $('span[name=summary]', that.container).empty(); @@ -415,6 +412,7 @@ IPA.entitle.details_facet = function(spec) { IPA.entitle.search_facet = function(spec) { spec = spec || {}; + spec.disable_facet_tabs = false; spec.selectable = false; var that = IPA.search_facet(spec); @@ -428,36 +426,32 @@ IPA.entitle.search_facet = function(spec) { }).appendTo(that.controls); that.consume_button = IPA.action_button({ + name: 'consume', label: 'Consume', icon: 'ui-icon-plus', click: function() { var dialog = that.entity.get_dialog('consume'); dialog.open(that.container); + return false; } }).appendTo(that.consume_buttons); that.consume_button.css('display', 'none'); that.import_button = IPA.action_button({ + name: 'import', label: 'Import', icon: 'ui-icon-plus', click: function() { var dialog = that.entity.get_dialog('import'); dialog.open(that.container); + return false; } }).appendTo(that.consume_buttons); that.import_button.css('display', 'none'); }; - 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', 'visible'); - }; - that.refresh = function() { function on_success(data, text_status, xhr) { -- cgit