Skip to content

Commit

Permalink
Fix UI retention of mention states
Browse files Browse the repository at this point in the history
  • Loading branch information
PeteGoo committed Jan 24, 2015
1 parent 87343e5 commit c8530c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class SlacknotificationConfigAndBuildTypeListHolder {
private List<SlacknotificationBuildTypeEnabledStatusBean> builds = new ArrayList<SlacknotificationBuildTypeEnabledStatusBean>();
private String enabledEventsListForWeb;
private String enabledBuildsListForWeb;
private boolean mentionChannelEnabled;
private boolean mentionSlackUserEnabled;

public SlacknotificationConfigAndBuildTypeListHolder(SlackNotificationConfig config) {
channel = config.getChannel();
Expand All @@ -30,6 +32,8 @@ public SlacknotificationConfigAndBuildTypeListHolder(SlackNotificationConfig con
for (BuildStateEnum state : config.getBuildStates().getStateSet()){
states.add(new StateBean(state.getShortName(), config.getBuildStates().enabled(state)));
}
mentionChannelEnabled = config.getMentionChannelEnabled();
mentionSlackUserEnabled = config.getMentionSlackUserEnabled();
}

public List<SlacknotificationBuildTypeEnabledStatusBean> getBuilds() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
jQuerySlacknotification('#buildList').append('<p style="border-bottom:solid 1px #cccccc; margin:0; padding:0.5em;"><label><input onclick="updateSelectedBuildTypes();" type=checkbox style="padding-right: 1em;" name="buildTypeId" value="' + this.buildTypeId + '"class="buildType_single">' + this.buildTypeName + '</label></p>');
}
});
jQuerySlacknotification('#mentionChannelEnabled').attr('checked', mentionChannelEnabled.enabled);
jQuerySlacknotification('#mentionSlackUserEnabled').attr('checked', mentionSlackUserEnabled.enabled);
jQuerySlacknotification('#mentionChannelEnabled').attr('checked', slacknotification.mentionChannelEnabled);
jQuerySlacknotification('#mentionSlackUserEnabled').attr('checked', slacknotification.mentionSlackUserEnabled);
}
});
updateSelectedBuildTypes();
Expand Down

0 comments on commit c8530c4

Please sign in to comment.