Re: [Freeipa-devel] [PATCH] 239 Fixed host adder dialog.
On 8/10/2011 1:57 AM, Petr Vobornik wrote: On 08/09/2011 08:04 PM, Endi Sukma Dewata wrote: On 8/9/2011 7:12 AM, Petr Vobornik wrote: NACK "Add and edit" without existing DNS reverse zone don't redirect to edit page. Field 'fqdn' doesn't exist any more so getting fqdn from field in host.js:280 "fqdn: that.get_field('fqdn').save()" isn't functional. Fixed. Now the fqdn is obtained from the command object. On 8/8/2011 9:17 PM, Adam Young wrote: The JQuery code drawing the table in the create method is cut-and-paste.. It should be possible to make it look right without redrawing the whole table. These two fields should be put into their own section, which can then be responsible for drawing just the rows responsible for these fields, leaving the default behavior for the other rows. As discussed, this will be done separately in this ticket: https://fedorahosted.org/freeipa/ticket/1394 ACK Pushed to master. -- Endi S. Dewata ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 239 Fixed host adder dialog.
On 08/09/2011 08:04 PM, Endi Sukma Dewata wrote: On 8/9/2011 7:12 AM, Petr Vobornik wrote: NACK "Add and edit" without existing DNS reverse zone don't redirect to edit page. Field 'fqdn' doesn't exist any more so getting fqdn from field in host.js:280 "fqdn: that.get_field('fqdn').save()" isn't functional. Fixed. Now the fqdn is obtained from the command object. On 8/8/2011 9:17 PM, Adam Young wrote: The JQuery code drawing the table in the create method is cut-and-paste.. It should be possible to make it look right without redrawing the whole table. These two fields should be put into their own section, which can then be responsible for drawing just the rows responsible for these fields, leaving the default behavior for the other rows. As discussed, this will be done separately in this ticket: https://fedorahosted.org/freeipa/ticket/1394 ACK -- Petr Vobornik ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 239 Fixed host adder dialog.
On 8/9/2011 7:12 AM, Petr Vobornik wrote: NACK "Add and edit" without existing DNS reverse zone don't redirect to edit page. Field 'fqdn' doesn't exist any more so getting fqdn from field in host.js:280 "fqdn: that.get_field('fqdn').save()" isn't functional. Fixed. Now the fqdn is obtained from the command object. On 8/8/2011 9:17 PM, Adam Young wrote: The JQuery code drawing the table in the create method is cut-and-paste.. It should be possible to make it look right without redrawing the whole table. These two fields should be put into their own section, which can then be responsible for drawing just the rows responsible for these fields, leaving the default behavior for the other rows. As discussed, this will be done separately in this ticket: https://fedorahosted.org/freeipa/ticket/1394 -- Endi S. Dewata From 5e5efd13d7c4e713283905980f34201886d14b62 Mon Sep 17 00:00:00 2001 From: Endi S. Dewata Date: Mon, 8 Aug 2011 15:47:38 -0500 Subject: [PATCH] Fixed host adder dialog. The host adder dialog has been modified to show separate fields for hostname and DNS zone. The hostname is a text field and the DNS zone is an editable drop-down list. The fields will have the following behavior: - If the user types a dot into the hostname field, the cursor will automatically move into the DNS zone field. - If the user pastes an FQDN into the hostname field, the value will automatically be split into hostname and DNS zone. - If the user selects a value from the drop-down list, it will only change the DNS zone, not the hostname. Ticket #1457 --- install/ui/host.js | 160 ++-- install/ui/ipa.css | 12 2 files changed, 155 insertions(+), 17 deletions(-) diff --git a/install/ui/host.js b/install/ui/host.js index 3ffcba34be0ea571b4349e7deaa6a3cd0234f00a..05484a030c0199a9aea1d026986651538cca33ec 100644 --- a/install/ui/host.js +++ b/install/ui/host.js @@ -105,21 +105,35 @@ IPA.entity_factories.host = function () { factory: IPA.host_adder_dialog, width: 400, height: 250, -fields:[ +fields: [ { -factory: IPA.dnszone_select_widget, name: 'fqdn', +optional: true, +hidden: true +}, +{ +factory: IPA.text_widget, +name: 'hostname', label: IPA.messages.objects.service.host, +undo: false +}, +{ +factory: IPA.dnszone_select_widget, +name: 'dnszone', +label: IPA.metadata.objects.dnszone.label_singular, editable: true, undo: false }, -{factory:IPA.force_host_add_checkbox_widget}, { -factory:IPA.text_widget, -name:"ip_address", -undo:false, +factory: IPA.force_host_add_checkbox_widget, +name: 'force' +}, +{ +factory: IPA.text_widget, +name: 'ip_address', label: IPA.get_method_option('host_add','ip_address')['label'], -tooltip: IPA.get_method_option('host_add','ip_address')['doc'] +tooltip: IPA.get_method_option('host_add','ip_address')['doc'], +undo: false } ] }). @@ -129,15 +143,128 @@ IPA.entity_factories.host = function () { build(); }; -IPA.host_adder_dialog = function(spec) -{ +IPA.host_adder_dialog = function(spec) { + spec = spec || {}; spec.retry = typeof spec.retry !== 'undefined' ? spec.retry : false; var that = IPA.add_dialog(spec); -that.on_error = function(xhr, text_status, error_thrown) -{ +that.create = function() { + +that.container.addClass('host-adder-dialog'); + +var hostname = that.get_field('hostname'); +var dnszone = that.get_field('dnszone'); + +var table = $('', { +name: 'fqdn' +}).appendTo(that.container); + +var tr = $('').appendTo(table); + +var td = $('', { +name: hostname.name, +title: hostname.label, +text: hostname.label +}).appendTo(tr); + +td = $('', { +name: dnszone.name, +title: dnszone.label, +text: dnszone.label +}).appendTo(tr); + +tr = $('').appendTo(table); + +td = $('').appendTo(tr); +var span = $('', { +name: hostname.name +}).appendTo(td); +hostname.create(span); + +td = $('').appendTo(tr); +span = $('', { +name: dnszone.name +}).appendTo(td); +dnszone.create(span); + +
Re: [Freeipa-devel] [PATCH] 239 Fixed host adder dialog.
On 08/08/2011 11:13 PM, Endi Sukma Dewata wrote: The host adder dialog has been modified to use separate fields for hostname and DNS zone. The hostname is a text field and the DNS zone is an editable drop-down list. The fields will have the following behavior: - If the user types a dot into the hostname field, the cursor will automatically move into the DNS zone field. - If the user pastes an FQDN into the hostname field, the value will automatically be split into hostname and DNS zone. - If the user selects a value from the drop-down list, it will only change the DNS zone, not the hostname. Ticket #1457 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel NACK "Add and edit" without existing DNS reverse zone don't redirect to edit page. Field 'fqdn' doesn't exist any more so getting fqdn from field in host.js:280 "fqdn: that.get_field('fqdn').save()" isn't functional. -- Petr Vobornik ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 239 Fixed host adder dialog.
On 08/08/2011 05:13 PM, Endi Sukma Dewata wrote: The host adder dialog has been modified to use separate fields for hostname and DNS zone. The hostname is a text field and the DNS zone is an editable drop-down list. The fields will have the following behavior: - If the user types a dot into the hostname field, the cursor will automatically move into the DNS zone field. - If the user pastes an FQDN into the hostname field, the value will automatically be split into hostname and DNS zone. - If the user selects a value from the drop-down list, it will only change the DNS zone, not the hostname. Ticket #1457 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel The JQuery code drawing the table in the create method is cut-and-paste.. It should be possible to make it look right without redrawing the whole table. These two fields should be put into their own section, which can then be responsible for drawing just the rows responsible for these fields, leaving the default behavior for the other rows. ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel