Skip to content

The Unified and Autonomous Development Platform

Some styling changes.

robin shined1c8543a85a8
diff --git a/commons.wicket/src/main/java/com/pmease/commons/wicket/behavior/modal/modal.js b/commons.wicket/src/main/java/com/pmease/commons/wicket/behavior/modal/modal.js
index a2919f5689..5575517d1b 100644
--- a/commons.wicket/src/main/java/com/pmease/commons/wicket/behavior/modal/modal.js
+++ b/commons.wicket/src/main/java/com/pmease/commons/wicket/behavior/modal/modal.js
@@ -33,11 +33,11 @@ function showModal(modalId, contentLoader) {
if (!modal.find(">.modal-dialog>.content")[0])
contentLoader();
else
- modal.find("input:visible:first").focus();
+ modal.find("input[type=text], input[type=textarea]").filter(":visible:first").focus();
}
function modalLoaded(modalId) {
- $("#" + modalId).find("input:visible:first").focus();
+ $("#" + modalId).find("input[type=text], input[type=textarea]").filter(":visible:first").focus();
}
function hideModal(modalId) {
diff --git a/commons.wicket/src/main/java/com/pmease/commons/wicket/editable/editable.css b/commons.wicket/src/main/java/com/pmease/commons/wicket/editable/editable.css
index d4f846337d..1ea8140004 100644
--- a/commons.wicket/src/main/java/com/pmease/commons/wicket/editable/editable.css
+++ b/commons.wicket/src/main/java/com/pmease/commons/wicket/editable/editable.css
@@ -10,11 +10,20 @@ table.reflection>tbody>tr>td {
}
table.reflection>tbody>tr>td.name {
font-weight: bold;
- background: #EDEDED;
+ background: #F0F0F0;
text-align: right;
white-space: nowrap;
width: 20%;
}
+table.reflection>tbody>tr:first-child>td.name {
+ border-radius: 4px 4px 0 0;
+}
+table.reflection>tbody>tr:last-child>td.name {
+ border-radius: 0 0 4px 4px;
+}
+table.reflection>tbody>tr:first-child:last-child>td.name {
+ border-radius: 4px;
+}
table.reflection td.value {
font-size: 13px;
}
diff --git a/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/AndOrGateKeeper.java b/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/AndOrGateKeeper.java
index f36240993f..fae40724f2 100644
--- a/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/AndOrGateKeeper.java
+++ b/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/AndOrGateKeeper.java
@@ -3,6 +3,9 @@ package com.pmease.gitop.model.gatekeeper;
import java.util.ArrayList;
import java.util.List;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
import com.pmease.commons.util.trimmable.AndOrConstruct;
import com.pmease.commons.util.trimmable.TrimUtils;
@@ -15,6 +18,8 @@ public abstract class AndOrGateKeeper extends CompositeGateKeeper {
this.gateKeepers = gateKeepers;
}
+ @Valid
+ @NotNull
public List<GateKeeper> getGateKeepers() {
return gateKeepers;
}
diff --git a/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/IfThenGateKeeper.java b/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/IfThenGateKeeper.java
index 05af8908da..9186bd5dfc 100644
--- a/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/IfThenGateKeeper.java
+++ b/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/IfThenGateKeeper.java
@@ -1,6 +1,10 @@
package com.pmease.gitop.model.gatekeeper;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
import com.pmease.commons.editable.annotation.Editable;
+import com.pmease.commons.editable.annotation.TableLayout;
import com.pmease.gitop.model.PullRequest;
import com.pmease.gitop.model.gatekeeper.checkresult.Accepted;
import com.pmease.gitop.model.gatekeeper.checkresult.Blocked;
@@ -11,12 +15,15 @@ import com.pmease.gitop.model.gatekeeper.checkresult.Rejected;
@Editable(name="Check Second Gate Keeper If First Gate Keeper Is Passed", order=300, icon="icon-servers",
description="If first gate keeper is passed, go ahead to check second gate keeper; otherwise, consider "
+ "the whole gate keeper as passed.")
+@TableLayout
public class IfThenGateKeeper extends CompositeGateKeeper {
private GateKeeper ifGate = new DefaultGateKeeper();
private GateKeeper thenGate = new DefaultGateKeeper();
+ @Valid
+ @NotNull
public GateKeeper getIfGate() {
return ifGate;
}
@@ -25,6 +32,8 @@ public class IfThenGateKeeper extends CompositeGateKeeper {
this.ifGate = ifGate;
}
+ @Valid
+ @NotNull
public GateKeeper getThenGate() {
return thenGate;
}
diff --git a/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/NotGateKeeper.java b/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/NotGateKeeper.java
index db2cf24c60..3a3baa02a5 100644
--- a/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/NotGateKeeper.java
+++ b/gitop.model/src/main/java/com/pmease/gitop/model/gatekeeper/NotGateKeeper.java
@@ -1,6 +1,10 @@
package com.pmease.gitop.model.gatekeeper;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
import com.pmease.commons.editable.annotation.Editable;
+import com.pmease.commons.editable.annotation.TableLayout;
import com.pmease.gitop.model.PullRequest;
import com.pmease.gitop.model.gatekeeper.checkresult.Accepted;
import com.pmease.gitop.model.gatekeeper.checkresult.CheckResult;
@@ -9,10 +13,13 @@ import com.pmease.gitop.model.gatekeeper.checkresult.Rejected;
@SuppressWarnings("serial")
@Editable(name="If Contained Gate Keeper Is Not Passed", order=400, icon="icon-servers",
description="This gate keeper will be passed if contained gate keeper is not passed.")
+@TableLayout
public class NotGateKeeper extends CompositeGateKeeper {
private GateKeeper gateKeeper = new DefaultGateKeeper();
+ @Valid
+ @NotNull
public GateKeeper getGateKeeper() {
return gateKeeper;
}