Skip to content

Commit

Permalink
gwt: Hide course selection box when there's only one course.
Browse files Browse the repository at this point in the history
  • Loading branch information
calin-iorgulescu committed Mar 10, 2015
1 parent e636622 commit 584839b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,17 @@ public HeaderWidget(User user) {
@Override
public void addCourse(String name, String id) {
coursesList.addItem(name, id);
if (coursesList.getItemCount() == 2) {
coursesList.setVisible(true);
coursesList.setVisible(true);
}
}

@Override
public void clearCourses() {
coursesList.clear();
coursesList.setVisible(false);
courseSelection.setVisible(false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@
<div class="logo"></div>
</g:HTML>
<g:FlowPanel styleName="{style.listWrapper}">
<g:Label ui:field="courseSelection" styleName="{style.courseListIndication}">alegeti cursul</g:Label>
<g:Label ui:field="courseSelection" styleName="{style.courseListIndication}"></g:Label>
<g:ListBox ui:field="coursesList" visibleItemCount='1' styleName="{style.list}" />
</g:FlowPanel>
</g:HorizontalPanel>
<g:HorizontalPanel ui:field="rightPanel" styleName="{style.rightPanel}">
<g:Label ui:field="usernameLabel" styleName="{style.username}">nume.prenume</g:Label>
<g:Anchor ui:field="logoutButton" styleName="fillButton">logout</g:Anchor>
<g:Label ui:field="usernameLabel" styleName="{style.username}"></g:Label>
<g:Anchor ui:field="logoutButton" styleName="fillButton"></g:Anchor>
</g:HorizontalPanel>
<g:SimplePanel styleName="{style.clear}"></g:SimplePanel>
</g:FlowPanel>
Expand Down

0 comments on commit 584839b

Please sign in to comment.