From 65bd82eaa1a0d8e377b58ebc6b5d96ea9364c993 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 19 Jul 2012 14:47:48 +0200 Subject: IDs and names for dialogs It's hard to detect if or which type dialog is displayed becouse not all dialogs have IDs. On dialog open, it's id or name (if id is not set) is used for containing element id. Many of dialog types were missing id or name so name was added to each dialog type. In HTML, element's id should be unique. Our framework allows opening two dialogs with the same id. It may lead to state where getElementById method may have unpredicted behaviour. Therefore attribute 'data-name' with dialog's name was added to dialog's containing element. Automation framework can search more reliable by using this attribute instead of id. https://fedorahosted.org/freeipa/ticket/2853 --- install/ui/add.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'install/ui/add.js') diff --git a/install/ui/add.js b/install/ui/add.js index eafcd0d5..4ca0f041 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -27,6 +27,8 @@ IPA.entity_adder_dialog = function(spec) { spec = spec || {}; + spec.name = spec.name || 'entity_adder_dialog'; + var that = IPA.dialog(spec); that.method = spec.method || 'add'; -- cgit