summaryrefslogtreecommitdiffstats
path: root/install/ui/associate.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/associate.js')
-rw-r--r--install/ui/associate.js41
1 files changed, 20 insertions, 21 deletions
diff --git a/install/ui/associate.js b/install/ui/associate.js
index 3ba510f10..5eb84260e 100644
--- a/install/ui/associate.js
+++ b/install/ui/associate.js
@@ -348,7 +348,6 @@ IPA.association_table_widget = function (spec) {
that.create = function(container) {
- var entity = IPA.get_entity(that.entity_name);
var column;
// create a column if none defined
@@ -395,21 +394,6 @@ IPA.association_table_widget = function (spec) {
that.table_setup(container);
- var dialog = IPA.dialog({
- title: IPA.messages.dialogs.dirty_title,
- width: '20em'
- });
-
- dialog.create = function() {
- dialog.container.append(IPA.messages.dialogs.dirty_message);
- };
-
- dialog.add_button(IPA.messages.buttons.ok, function() {
- dialog.close();
- });
-
- dialog.init();
-
var entity = IPA.get_entity(that.entity_name);
var facet_name = IPA.current_facet(entity);
var facet = entity.get_facet(facet_name);
@@ -424,7 +408,17 @@ IPA.association_table_widget = function (spec) {
}
if (facet.is_dirty()) {
+ var dialog = IPA.dirty_dialog({
+ facet: facet
+ });
+
+ dialog.callback = function() {
+ that.show_remove_dialog();
+ };
+
+ dialog.init();
dialog.open(that.container);
+
} else {
that.show_remove_dialog();
}
@@ -443,7 +437,17 @@ IPA.association_table_widget = function (spec) {
}
if (facet.is_dirty()) {
+ var dialog = IPA.dirty_dialog({
+ facet: facet
+ });
+
+ dialog.callback = function() {
+ that.show_add_dialog();
+ };
+
+ dialog.init();
dialog.open(that.container);
+
} else {
that.show_add_dialog();
}
@@ -809,11 +813,6 @@ IPA.association_facet = function (spec) {
that.table.init();
};
- that.is_dirty = function() {
- var pkey = $.bbq.getState(that.entity_name+'-pkey');
- return pkey != that.pkey;
- };
-
that.create_header = function(container) {
that.facet_create_header(container);