From cb70784e6fd864132d8e6f97e2a5c7d179ef5c0b Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 27 Apr 2011 12:17:13 -0500 Subject: Entitlement status. A new facet has been added to show entitlement status and download the registration certificate. --- install/ui/details.js | 49 ++++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 21 deletions(-) (limited to 'install/ui/details.js') diff --git a/install/ui/details.js b/install/ui/details.js index c0b560cd..7fa72eff 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -266,7 +266,7 @@ IPA.details_facet = function(spec) { var that = IPA.facet(spec); - that.label = (IPA.messages && IPA.messages.facets && IPA.messages.facets.details) || spec.label; + that.label = spec.label || IPA.messages && IPA.messages.facets && IPA.messages.facets.details; that.facet_group = spec.facet_group || 'settings'; that.sections = $.ordered_map(); @@ -334,18 +334,7 @@ IPA.details_facet = function(spec) { return pkey; }; - that.create_header = function(container) { - - that.facet_create_header(container); - - that.pkey = $.bbq.getState(that.entity_name+'-pkey'); - var label = IPA.metadata.objects[that.entity_name].label; - - var title = that.title; - title = title.replace('${entity}', label); - title = title.replace('${primary_key}', that.pkey); - - that.set_title(container, title); + that.create_controls = function() { that.reset_button = IPA.action_button({ label: IPA.messages.buttons.reset, @@ -366,11 +355,27 @@ IPA.details_facet = function(spec) { return false; } }).appendTo(that.controls); + }; + + that.create_header = function(container) { + + that.facet_create_header(container); + + that.pkey = $.bbq.getState(that.entity_name+'-pkey'); + var label = IPA.metadata.objects[that.entity_name].label; + + var title = that.title; + title = title.replace('${entity}', label); + title = title.replace('${primary_key}', that.pkey); - that.expand_button = $('', { + that.set_title(container, title); + + that.create_controls(); + + that.expand_button = IPA.action_button({ name: 'expand_all', href: 'expand_all', - text: 'Expand All', + label: 'Expand All', 'class': 'expand-collapse-all', style: 'display: none;', click: function() { @@ -386,10 +391,10 @@ IPA.details_facet = function(spec) { } }).appendTo(that.controls); - that.collapse_button = $('', { + that.collapse_button = IPA.action_button({ name: 'collapse_all', href: 'collapse_all', - text: 'Collapse All', + label: 'Collapse All', 'class': 'expand-collapse-all', click: function() { that.expand_button.css('display', 'inline'); @@ -514,7 +519,7 @@ IPA.details_facet = function(spec) { return false; }; - that.load = function (record) { + that.load = function(record) { that.record = record; var sections = that.sections.values; for (var i=0; i '); + button.prepend(' '); } else { button.addClass('button-without-icon'); } -- cgit