Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
rhbz983370 rename parent checkboxes for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Jul 11, 2013
1 parent 150f464 commit 87dfb6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Expand Up @@ -35,7 +35,6 @@
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasValue;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;

Expand All @@ -52,10 +51,9 @@ public class TransFilterView extends Composite implements TransFilterDisplay
Styles style;

@UiField
CheckBox translatedChk, fuzzyChk, untranslatedChk, approvedChk, rejectedChk, hasErrorChk;

@UiField
CheckBox incompleteChk, completeChk;
CheckBox parentIncompleteChk, untranslatedChk, fuzzyChk, rejectedChk,
parentCompleteChk, translatedChk, approvedChk,
hasErrorChk;

private String hintMessage;

Expand Down Expand Up @@ -205,8 +203,8 @@ public void onFilterOptionsChanged(ValueChangeEvent<Boolean> event)

private void updateParentCheckboxes()
{
updateParentCheckboxToMatchChildren(incompleteChk, untranslatedChk, fuzzyChk, rejectedChk);
updateParentCheckboxToMatchChildren(completeChk, translatedChk, approvedChk);
updateParentCheckboxToMatchChildren(parentIncompleteChk, untranslatedChk, fuzzyChk, rejectedChk);
updateParentCheckboxToMatchChildren(parentCompleteChk, translatedChk, approvedChk);
}

private void updateParentCheckboxToMatchChildren(CheckBox parent, CheckBox... children)
Expand Down Expand Up @@ -240,7 +238,7 @@ private static native void setElementIndeterminate(Element elem, boolean indeter
elem.getElementsByTagName('input')[0].indeterminate = indeterminate;
}-*/;

@UiHandler("incompleteChk")
@UiHandler("parentIncompleteChk")
public void onIncompleteChkChanged(ValueChangeEvent<Boolean> event)
{
untranslatedChk.setValue(event.getValue());
Expand All @@ -249,7 +247,7 @@ public void onIncompleteChkChanged(ValueChangeEvent<Boolean> event)
onFilterOptionsChanged(event);
}

@UiHandler("completeChk")
@UiHandler("parentCompleteChk")
public void onCompleteChkChanged(ValueChangeEvent<Boolean> event)
{
translatedChk.setValue(event.getValue());
Expand Down
Expand Up @@ -145,7 +145,7 @@
</li>

<li class="{style.drop-down}">
<g:CheckBox ui:field="incompleteChk" styleName="{style.checkbox}"><ui:msg>Incomplete</ui:msg></g:CheckBox>
<g:CheckBox ui:field="parentIncompleteChk" styleName="{style.checkbox}"><ui:msg>Incomplete</ui:msg></g:CheckBox>
<span class="icon-down-open {style.filterListToggle}"/>
<ul class="{style.filterList}">
<li>
Expand All @@ -161,7 +161,7 @@
</li>

<li class="{style.drop-down}">
<g:CheckBox ui:field="completeChk" styleName="{style.checkbox}"><ui:msg>Complete</ui:msg></g:CheckBox>
<g:CheckBox ui:field="parentCompleteChk" styleName="{style.checkbox}"><ui:msg>Complete</ui:msg></g:CheckBox>
<span class="icon-down-open {style.filterListToggle}"/>
<ul class="{style.filterList}">
<li>
Expand Down

0 comments on commit 87dfb6d

Please sign in to comment.