On 04/27/2011 04:39 PM, Endi Sukma Dewata wrote:
On 4/27/2011 12:56 PM, Adam Young wrote:



Currently we have this DOM structure:

<div id='user' class='entity-container'>
<div class='entity-header'>
<div class='entity-title'/>
<span class='action-controls'/>
<div class='entity-title'/>
<input id='pkey' type='hidden'/>
<span class='entity-search'/>
<div class='entity-container-user' class='entity-container'>
<div class='entity-tabs'/>
<div class='content'>
<div id='search_container' class='facet_container'>
</div>
</div>
</div>
</div>

1. The nested entity-container is confusing and probably will make CSS adjustment harder. The entity content should be in the same level as entity header.

2. The _container suffix for the facet container name is unnecessary because it already has a facet_container class.

3. The use of id attribute could lead to conflicts. It's better to use a name attribute and a class. Querying the element can be done with this selector:

   $('.facet[name=search]', ...)

4. Rename action-controls to entity-controls for consistency.

5. Rename facet_container to facet-container for consistency.

6. The hidden pkey can be stored in the entity object instead of DOM.

The DOM structure will look like this:

<div name='user' class='entity'>
<div class='entity-header'>
<div class='entity-title'/>
<div class='entity-controls'/>
<div class='entity-search'/>
<div class='entity-tabs'/>
</div>
<div class='entity-content'>
<div name='search' class='facet'>
<div class='facet-header'/>
<div class='facet-content'/>
</div>
<div name='details' class='facet'/>
</div>
</div>

What do you think? We can do this in a separate patch if it's too complicated.



Very clean: I like it a lot. I'd like to do it as a separate patch, just to keep clear what we are doing.


_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to