The Unified and Autonomous Development Platform
why so strange
robin shine22ed7d26008c
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/comment.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/comment.cssindex f4440560b0..ed4662df54 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/comment.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/comment.css@@ -16,7 +16,6 @@ div.replies {padding-left: 16px;}div.replies>table>tbody>tr>td {- vertical-align: top;border-top: 1px dashed #CCC;padding: 8px 0 8px 0;background: #F5F5F5;diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/commitlist/commit-list.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/commitlist/commit-list.cssindex b606f3b0ca..ce423fa4fe 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/commitlist/commit-list.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/commitlist/commit-list.css@@ -1,12 +1,8 @@-.commit-list table {- width: 100%;-}.commit-list td {padding-top: 8px;padding-bottom: 8px;color: #999;border-top: 1px dashed #BBB;- vertical-align: top;}.commit-list td.avatar {width: 1px;diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/TextDiffPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/TextDiffPanel.htmlindex c6aede4b2a..a8313066ab 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/TextDiffPanel.html+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/TextDiffPanel.html@@ -11,7 +11,7 @@<wicket:container wicket:id="diffLines"></wicket:container></table></div>- <form wicket:id="newComments" class="hidden new-comment leave-confirm">+ <form wicket:id="newComments" class="new-comment leave-confirm"><textarea wicket:id="input" rows="10" class="form-control focusable"></textarea><div wicket:id="feedback"></div><div class="actions">diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/TextDiffPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/TextDiffPanel.javaindex ee84d7819f..77b56b11c8 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/TextDiffPanel.java+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/TextDiffPanel.java@@ -139,7 +139,7 @@ public class TextDiffPanel extends Panel {int oldLineNo = params.getParameterValue("oldLineNo").toInt();int newLineNo = params.getParameterValue("newLineNo").toInt();- Form<?> newComment = new Form<Void>(newComments.newChildId());+ final Form<?> newComment = new Form<Void>(newComments.newChildId());newComment.setOutputMarkupId(true);final CommentInput input;@@ -151,6 +151,9 @@ public class TextDiffPanel extends Panel {@Overridepublic void onClick(AjaxRequestTarget target) {+ newComment.remove();+ String script = String.format("gitplex.textdiff.cancelAddComment('%s');", newComment.getMarkupId());+ target.appendJavaScript(script);}}.add(new DirtyIgnoreBehavior()));@@ -171,10 +174,12 @@ public class TextDiffPanel extends Panel {}.add(new DirtyIgnoreBehavior()));newComments.add(newComment);- target.add(newComment);- String script = String.format("gitplex.textdiff.placeNewComment('%s', '%s', %d, %d);",++ String script = String.format("gitplex.textdiff.beforeAddComment('%s', '%s', %d, %d);",getMarkupId(), newComment.getMarkupId(), oldLineNo, newLineNo);- target.appendJavaScript(script);+ target.prependJavaScript(script);++ target.add(newComment);}@Override@@ -325,7 +330,7 @@ public class TextDiffPanel extends Panel {builder.append("<span class='add-comment'>");String script = String.format("document.getElementById('%s').addComment(%d, %d);",getMarkupId(), oldLineNo, newLineNo);- builder.append("<a href=\"javascript:").append(script).append("\">").append("</a></span>");+ builder.append("<a href=\"javascript:").append(script).append("\">").append("<i class='fa fa-plus'></i></a></span>");}private void appendEqual(StringBuilder builder, DiffBlock block, int lineIndex, int lastContextSize) {diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/text-diff.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/text-diff.cssindex 1d03a6b63a..567954f819 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/text-diff.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/text-diff.css@@ -13,7 +13,6 @@margin-right: 0;}.text-diff>.body {- width: 100%;font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;font-size: 12px;table-layout: fixed;@@ -21,12 +20,14 @@.text-diff>.body>tbody>tr>td.number {padding: 0 8px;border-left: 1px solid #EEE;- border-right: 1px solid #EEE;text-align: right;font-size: 12px;color: #BBB;}-.text-diff>.body>tbody>tr>td:first-child {+.text-diff>.body>tbody>tr>td.content {+ border-left: 1px solid #EEE;+}+.text-diff>.body>tbody>tr>td:FIRST-CHILD {border-left: none !important;}.text-diff>.body>tbody>tr.expander>td.skipped {@@ -43,6 +44,7 @@color: #888;padding: 6px 8px;background: #edf2f9;+ border: 1px solid red;}.text-diff>.body>tbody>tr.expander>td.expander>a:hover {background: #4078c0;@@ -51,9 +53,9 @@.text-diff>.body>tbody>tr.line>td.old.number {background: #ffdddd;border-left: 1px solid #f1c0c0;- border-right: 1px solid #f1c0c0;}.text-diff>.body>tbody>tr.line>td.old.content {+ border-left: 1px solid #f1c0c0;background: #ffecec;}.text-diff>.body>tbody>tr.line>td.old .delete {@@ -62,9 +64,9 @@.text-diff>.body>tbody>tr.line>td.new.number {background: #dbffdb;border-left: 1px solid #c1e9c1;- border-right: 1px solid #c1e9c1;}.text-diff>.body>tbody>tr.line>td.new.content {+ border-left: 1px solid #c1e9c1;background: #eaffea;}.text-diff>.body>tbody>tr.line>td.new .insert {@@ -93,14 +95,13 @@background: #F9F9F9;}.text-diff>.body>tbody>tr>td.content>span.add-comment {- position: relative;- display: inline-block;+ position: absolute;+ display: none;}.text-diff>.body>tbody>tr>td.content>span.add-comment>a {- display: none;+ display: block;position: absolute;left: -8px;- top: -12px;border-radius: 3px;color: white;background: #087AD8;@@ -112,9 +113,23 @@.text-diff>.body>tbody>tr>td.content>span.add-comment>a:hover {font-size: 16px;left: -9px;- top: -13px;+ top: -1px;padding-top: 2px;}-.text-diff>.body>tbody>tr:hover>td.content>span.add-comment>a {- display: block;+.text-diff>.body>tbody>tr>td.content:hover>span.add-comment,+.text-diff>.body>tbody>tr>td.number:hover+.content>span.add-comment {+ display: inline-block;+}+.text-diff>.body>tbody>tr.comments>td.content.comments {+ white-space: normal;+ word-wrap: normal;+ padding: 12px;+ border-top: 1px solid #EEE;+ border-bottom: 1px solid #EEE;+}+.text-diff>.body>tbody>tr:FIRST-CHILD>td {+ border-top: none !important;+}+.text-diff>.body>tbody>tr:LAST-CHILD>td {+ border-bottom: none !important;}diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/text-diff.js b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/text-diff.jsindex 9aede67916..afb8787940 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/text-diff.js+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/blob/text/text-diff.js@@ -11,7 +11,7 @@ gitplex.textdiff = {$line.find("a.add-comment").hide();});},- placeNewComment: function(containerId, newCommentId, oldLineNo, newLineNo) {+ beforeAddComment: function(containerId, commentId, oldLineNo, newLineNo) {var $container = $("#" + containerId);var $content;@@ -22,30 +22,27 @@ gitplex.textdiff = {var $line = $content.closest(".line");var $commentLine = $("<tr class='line comments'></tr>").insertAfter($line);- if ($line.children.length == 3)- $commentLine.append("<td colspan='3' class='content'></td>");+ if ($line.children().length == 3)+ $commentLine.append("<td colspan='3' class='content comments'></td>");else if (oldLineNo != -1 && newLineNo != -1)- $commentLine.append("<td colspan='4' class='content'></td>");+ $commentLine.append("<td colspan='4' class='content comments'></td>");else if (oldLineNo != -1)- $commentLine.append("<td colspan='2' class='content'></td><td colspan='2'> </td>");+ $commentLine.append("<td colspan='2' class='content comments'></td><td class='number'> </td><td class='content'> </td>");else- $commentLine.append("<td colspan='2'> </td><td colspan='2' class='content'></td>");+ $commentLine.append("<td class='number'> </td><td class='content'> </td><td colspan='2' class='content comments'></td>");- var $newComment = $("#" + newCommentId);- $commentLine.children(".content").replaceWith($newComment);- $newComment.removeClass("hidden");- $line.find("a.add-comment").hide();+ $commentLine.children(".content.comments").append("<div id=" + commentId + "></div>");++ $line.find(".add-comment").addClass("hidden");},afterAddComment: function(index) {var $line = $("#diffline-" + index);$line.next().find("td").append($("#comment-diffline-" + index));},- cancelAddComments: function(index) {- $("#comments-placeholder").append($("#add-comment"));- var $line = $("#diffline-" + index);- $line.next().remove();- $line.find("a.add-comment").show();- $("#add-comment").areYouSure({"silent": "true"});+ cancelAddComment: function(commentId) {+ var $commentLine = $("#" + commentId).closest(".line");+ $commentLine.prev().find(".add-comment").removeClass("hidden");+ $commentLine.remove();},afterRemoveComments: function(index) {$("#comment-diffline-" + index).closest("tr").remove();diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/pullrequest/verificationstatus/verification-status.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/pullrequest/verificationstatus/verification-status.cssindex 06dc0a35a6..8420843835 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/pullrequest/verificationstatus/verification-status.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/pullrequest/verificationstatus/verification-status.css@@ -3,7 +3,6 @@}table.verifications td {- vertical-align: top;white-space: nowrap;color: #444;}diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/filelist/file-list.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/filelist/file-list.cssindex 215ebf48b5..87d8fd754f 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/filelist/file-list.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/filelist/file-list.css@@ -1,13 +1,9 @@.file-list {overflow: auto;}-.file-list>table {- width: 100%;-}.file-list>table>tbody>tr>td {padding: 6px 12px;border-top: 1px solid #EEE;- vertical-align: top;}.file-list>table>tbody>tr>td.path, .file-list>table>tbody>tr>td.last-commit.author,.file-list>table>tbody>tr>td.last-commit.when {diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/base/base.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/base/base.cssindex 9f4004001c..9faf6de01b 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/base/base.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/base/base.css@@ -21,6 +21,12 @@ a.fa {text-decoration: none;color: #666;}+table {+ width: 100%;+}+table>tbody>tr>td {+ vertical-align: top;+}table.table>thead>tr>th>a {color: black;text-decoration: underline;@@ -30,7 +36,7 @@ textarea {resize: vertical;}form>.actions {- margin-top: 20px;+ margin-top: 12px;}form>.actions>.btn {margin-right: 8px;diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/layout/layout.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/layout/layout.cssindex 0490970b40..fce6255ba7 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/layout/layout.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/layout/layout.css@@ -77,12 +77,6 @@ html, body {margin: 0 -15px;}-.sidebar>table {- width: 100%;-}-.sidebar>table>tbody>tr>td {- vertical-align: top;-}.sidebar>table>tbody>tr>td.nav {padding: 20px 0;width: 1px;diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/branches/compare/branch-compare.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/branches/compare/branch-compare.cssindex 751b870c65..141a5e84a3 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/branches/compare/branch-compare.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/branches/compare/branch-compare.css@@ -11,9 +11,6 @@#branch-compare>.body>.branches {margin-bottom: 20px;}-#branch-compare>.body>.branches td {- vertical-align: top;-}#branch-compare>.body>.branches td>div.title {font-size: 18px;margin-bottom: 8px;diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/newrequest/new-request.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/newrequest/new-request.cssindex d54987fce3..6fb5c13b93 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/newrequest/new-request.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/newrequest/new-request.css@@ -11,9 +11,6 @@#new-request>.body>.branches {margin-bottom: 20px;}-#new-request>.body>.branches td {- vertical-align: top;-}#new-request>.body>.branches td>div.title {font-size: 18px;margin-bottom: 8px;@@ -35,11 +32,7 @@margin-bottom: 8px;}-#new-request>.body>.status>.can-send form>table {- width: 100%;-}#new-request>.body>.status>.can-send form>table td {- vertical-align: top;padding: 16px 0;border-top: 1px dashed #BBB;border-bottom: 1px dashed #BBB;diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/request-detail.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/request-detail.cssindex 85add2f96c..c95f193add 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/request-detail.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestdetail/request-detail.css@@ -7,14 +7,8 @@#request-detail>div:last-child {margin-bottom: 0;}-#request-detail table {- width: 100%;-}-#request-detail td {- vertical-align: top;-}#request-detail .md-editor {- margin-bottom: 16px;+ margin-bottom: 12px;}#request-detail>.head {diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestlist/request-list.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestlist/request-list.cssindex 60ec288256..5d322cf316 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestlist/request-list.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/pullrequest/requestlist/request-list.css@@ -12,11 +12,7 @@margin-right: 20px;}-#request-list table.body {- width: 100%;-}#request-list table.body>tbody>tr>td {- vertical-align: top;border: 3px solid #EEE;}#request-list td.filter {diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/setting/gatekeeper/gate-keeper.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/setting/gatekeeper/gate-keeper.cssindex 0562ea8a82..ff79d49693 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/setting/gatekeeper/gate-keeper.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/setting/gatekeeper/gate-keeper.css@@ -112,11 +112,7 @@font-size: 13px !important;color: #444444;}-.gate-keeper table.children {- width: 100%;-}.gate-keeper td.child {- vertical-align: top;padding-right: 12px;}.gate-keeper table.children>tbody>tr>td.child:last-child {@@ -125,12 +121,6 @@.gate-keeper.panel .panel-body {overflow:auto;}-.gate-keeper table.ifthen {- width: 100%;-}-.gate-keeper td.ifthen {- vertical-align: top;-}.gate-keeper td.ifthen.connector {width:1px;}