[Freeipa-devel] [PATCH] 006 Uncheck checkboxes in association after deletion

Petr Vobornik pvoborni at redhat.com
Fri Aug 19 16:50:02 UTC 2011


On 08/18/2011 10:30 PM, Endi Sukma Dewata wrote:
> On 8/18/2011 8:18 AM, Petr Vobornik wrote:
>> https://fedorahosted.org/freeipa/ticket/1639
>>
>> - added unchecking all checkboxes of table_widget and its derivates to
>> on_load method.
>>
>> line '$('input[name=select]', that.tbody).attr('checked', false);' can
>> be unnecessary because load method is recreating all rows in table. But
>> I sense, it could be useful later.
>>
>> As I was implementing it, I noticed that after removing or adding sudo
>> option it refreshes facet -> all other associations. Don't know if it's
>> a feature or a bug. (sudo.js: 679, 683, 723, 727).
>
> Some issues:
>
> 1. In IPA.table_widget when the select all checkbox is changed the
> tooltip will change too (see line 1265). When the checkbox is changed
> using unselect_all() it doesn't trigger the 'changed' event so the
> tooltip is not updated.
done
>
> I think the code in 1265 can be moved into a separate function and the
> unselect_all() can call this function too. You can replace the loop with
> your code:
> $('input[name=select]', that.tbody).attr('checked', false);
done
>
> 2. In IPA.association_facet the select all checkbox is not unchecked
> because the content is loaded using refresh_table() in line 1017.
done
>
> 3. In IPA.search_facet the select all checkbox is unchecked at line 248.
> It would be better to call the table.unselect_all() from the
> search_facet.load() at line 226.
done
>
> Optional: the code inside search_facet.load() probably could be moved
> into table.load() then the search_facet.load() can call table.load().
done
>
> 4. About the sudo options refreshing the whole facet, it would be nicer
> if we can limit the update to the options table only. This can be fixed
> separately.
>
agree

-- 
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0006-1-Uncheck-checkboxes-in-association-after-deletion.patch
Type: text/x-patch
Size: 5078 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110819/b0dbc179/attachment.bin>


More information about the Freeipa-devel mailing list