Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set and get displayMode in config page.
Default value is 1 (Truncate)
  • Loading branch information
ialbors-pfc committed Jun 24, 2014
1 parent 87a6f5b commit 1e6b966
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/hudson/plugins/nextexecutions/NextBuilds.java
Expand Up @@ -105,6 +105,7 @@ public static class DescriptorImpl extends Descriptor<NextBuilds> {
private String dateFormat;
private Boolean filterByView;
private Boolean showPossibleWidget;
private Integer displayMode;

public DescriptorImpl() {
load();
Expand Down Expand Up @@ -132,6 +133,13 @@ public boolean getShowPossibleWidget() {
}


public Integer getDisplayMode() {
if(displayMode == null) {
return 1;
}
return displayMode;
}

public String getDefault() {
return "dd/MM/yyyy HH:mm";
}
Expand All @@ -146,6 +154,7 @@ public boolean configure(StaplerRequest req, JSONObject json)
dateFormat = json.getString("dateFormat");
filterByView = json.getBoolean("filterByView");
showPossibleWidget = json.getBoolean("showPossibleWidget");
displayMode = json.getInt("displayMode");
save();
return true;
}
Expand Down

0 comments on commit 1e6b966

Please sign in to comment.