From aa29a8a769c62b07cc4e6d82fc79846505cc9fa3 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 26 May 2011 17:57:39 -0500 Subject: Added Update and Reset buttons into Dirty dialog. The Dirty dialogs have been combined into IPA.dirty_dialog. It provides the Update and Reset buttons with customizable callback. Previously the widget's dirty status is computed by comparing the old values with the new values. This method is sometimes inaccurate, so the is_dirty() method has been modified to simply return a flag which is set to true if the widget is changed. Ticket #896. --- install/ui/test/widget_tests.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'install/ui/test/widget_tests.js') diff --git a/install/ui/test/widget_tests.js b/install/ui/test/widget_tests.js index f4281e38..f323f969 100644 --- a/install/ui/test/widget_tests.js +++ b/install/ui/test/widget_tests.js @@ -185,13 +185,14 @@ test("IPA.table_widget" ,function(){ test("Testing base widget.", function() { var update_called = false; var spec = { - name:'title', - update:function(){ - update_called = true; - } + name:'title' }; var widget = IPA.widget(spec); + widget.update = function() { + update_called = true; + }; + base_widget_test(widget,'user','test_value'); widget_string_test(widget); ok (update_called, 'Update called'); -- cgit