From 2a527234656a08342259ebc30af38b68a592ba8a Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 30 Jun 2011 14:33:33 -0400 Subject: Fixed hard-coded messages. Hard-coded messages in the UI have been replaced with I18n messages. Ticket #1396 --- install/ui/dns.js | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) (limited to 'install/ui/dns.js') diff --git a/install/ui/dns.js b/install/ui/dns.js index 8bc14a30..d689a894 100644 --- a/install/ui/dns.js +++ b/install/ui/dns.js @@ -68,11 +68,11 @@ IPA.entity_factories.dnszone = function() { }, { name: 'type', - label: 'Record Type' + label: IPA.messages.objects.dnsrecord.type }, { name: 'data', - label: 'Data' + label: IPA.messages.objects.dnsrecord.data } ] }). @@ -175,8 +175,12 @@ IPA.dnsrecord_facet = function(spec) { that.add = function() { + var title = IPA.messages.dialogs.add_title; + var label = IPA.metadata.objects.dnsrecord.label_singular; + title = title.replace('${entity}', label); + var dialog = IPA.dialog({ - title: IPA.messages.objects.dnsrecord.add + title: title }); dialog.create = function() { @@ -184,7 +188,7 @@ IPA.dnsrecord_facet = function(spec) { var dl = $('
').appendTo(dialog.container); $('
', { - html: IPA.messages.objects.dnsrecord.resource + html: IPA.get_entity_param('dnsrecord', 'idnsname').label }).appendTo(dl); var dd = $('
').appendTo(dl); @@ -275,23 +279,38 @@ IPA.dnsrecord_facet = function(spec) { }); }); + var title = IPA.messages.dialogs.remove_title; + var label = IPA.metadata.objects.dnsrecord.label; + title = title.replace('${entity}', label); + var dialog = IPA.dialog({ - title: IPA.messages.buttons.remove + title: title }); dialog.create = function() { - var to_delete_table = - $(''+ - ''+ - '
ResourceType
').appendTo(dialog.container); + var table = $('', { + 'class': 'search-table' + }).appendTo(dialog.container); + + var thead = $('').appendTo(table); + + var tr = $('').appendTo(thead); + + $('').appendTo(table); for (var i=0; i').appendTo(to_delete_body); + tr = $('').appendTo(tbody); $('
', { + text: IPA.get_entity_param('dnsrecord', 'idnsname').label + }).appendTo(tr); + + $('', { + text: IPA.messages.objects.dnsrecord.type + }).appendTo(tr); - var to_delete_body = to_delete_table.find('tbody'); + var tbody = $('
', { html: record.resource -- cgit