summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2011-11-30 15:27:58 +0100
committerEndi S. Dewata <edewata@redhat.com>2011-12-05 16:01:56 +0000
commit2759ea29616f14716016c0e62d13909694b2bf0b (patch)
tree82f24d670c8c7fe19e669ee326e4a5add26e6563 /install
parent9a09916108539f0d9f70257983666254c0cde67e (diff)
downloadfreeipa-2759ea29616f14716016c0e62d13909694b2bf0b.tar.gz
freeipa-2759ea29616f14716016c0e62d13909694b2bf0b.tar.xz
freeipa-2759ea29616f14716016c0e62d13909694b2bf0b.zip
Modifying automount to work with new concept
https://fedorahosted.org/freeipa/ticket/2040
Diffstat (limited to 'install')
-rw-r--r--install/ui/automount.js12
-rw-r--r--install/ui/widget.js13
2 files changed, 19 insertions, 6 deletions
diff --git a/install/ui/automount.js b/install/ui/automount.js
index 8d4f26bb..67a58a53 100644
--- a/install/ui/automount.js
+++ b/install/ui/automount.js
@@ -241,11 +241,11 @@ IPA.automountmap_adder_dialog = function(spec) {
that.create = function() {
that.entity_adder_dialog_create();
- var method_field = that.fields.get_field('method');
- var indirect_section = that.get_section('indirect');
+ var method_widget = that.widgets.get_widget('general.method');
+ var indirect_section = that.widgets.get_widget('indirect');
var key_field = that.fields.get_field('key');
- var direct_input = $('input[value="add"]', method_field.container);
+ var direct_input = $('input[value="add"]', method_widget.container);
direct_input.change(function() {
that.method = 'add';
@@ -253,7 +253,7 @@ IPA.automountmap_adder_dialog = function(spec) {
indirect_section.set_visible(false);
});
- var indirect_input = $('input[value="add_indirect"]', method_field.container);
+ var indirect_input = $('input[value="add_indirect"]', method_widget.container);
indirect_input.change(function() {
that.method = 'add_indirect';
@@ -267,9 +267,9 @@ IPA.automountmap_adder_dialog = function(spec) {
that.reset = function() {
that.dialog_reset();
- var method_field = that.fields.get_field('method');
+ var method_widget = that.widgets.get_widget('general.method');
- var direct_input = $('input[value="add"]', method_field.container);
+ var direct_input = $('input[value="add"]', method_widget.container);
direct_input.click();
};
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 49e65545..79b03519 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -46,6 +46,15 @@ IPA.widget = function(spec) {
that.clear = function() {
};
+ that.set_visible = function(visible) {
+
+ if (visible) {
+ that.container.show();
+ } else {
+ that.container.hide();
+ }
+ };
+
that.widget_create = that.create;
return that;
@@ -1823,6 +1832,8 @@ IPA.collapsible_section = function(spec) {
that.create = function(container) {
+ that.widget_create(container);
+
that.header = $('<h2/>', {
name: that.name,
title: that.label
@@ -1875,6 +1886,8 @@ IPA.details_table_section = function(spec) {
that.composite_widget_create = function(container) {
+ that.widget_create(container);
+
var table = $('<table/>', {
'class': 'section-table'
}).appendTo(container);