Skip to content

The Unified and Autonomous Development Platform

Avoid screen flashes when navigate through files.

robin shine9d46424477ee
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/avatar/avatar.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/avatar/avatar.css
index 88325c9f3b..d67786a685 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/avatar/avatar.css
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/avatar/avatar.css
@@ -1,6 +1,5 @@
img.avatar {
display: inline-block;
- vertical-align: middle;
border-radius: 3px;
height: 24px;
width: 24px;
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/TreeList.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/TreeList.html
index 85781c91cb..e915d81af4 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/TreeList.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/TreeList.html
@@ -1,26 +1,28 @@
<wicket:panel>
- <table class="tree-list">
- <tr class="last-commit">
- <td colspan="3">
- <div wicket:id="lastCommit"></div>
- </td>
- </tr>
- <tr wicket:id="parent" class="parent">
- <td colspan="3">
- <a wicket:id="link"><i class="fa fa-level-up"></i> <span>..</span></a>
- </td>
- </tr>
- <tr wicket:id="children" class="child">
- <td class="path">
- <i wicket:id="pathIcon"></i>
- <a wicket:id="pathLink"><span wicket:id="label"></span></a>
- </td>
- <td class="last-commit summary">
- </td>
- <td class="last-commit age">
- </td>
- </tr>
- </table>
+ <div class="tree-list">
+ <table>
+ <tr class="last-commit">
+ <td colspan="3">
+ <div wicket:id="lastCommit"></div>
+ </td>
+ </tr>
+ <tr wicket:id="parent" class="parent">
+ <td colspan="3">
+ <a wicket:id="link"><i class="fa fa-level-up"></i> <span>..</span></a>
+ </td>
+ </tr>
+ <tr wicket:id="children" class="child">
+ <td class="path">
+ <i wicket:id="pathIcon"></i>
+ <a wicket:id="pathLink"><span wicket:id="label"></span></a>
+ </td>
+ <td wicket:id="lastCommitSummary" class="last-commit summary">
+ </td>
+ <td class="last-commit age">
+ </td>
+ </tr>
+ </table>
+ </div>
<wicket:fragment wicket:id="lastCommitFrag">
<div wicket:id="message" class="message"></div>
<div class="other-info clearfix">
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/TreeList.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/TreeList.java
index 5ade2358f0..5f5ae9c76c 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/TreeList.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/TreeList.java
@@ -196,6 +196,11 @@ public class TreeList extends GenericPanel<String> {
else
pathLink.add(new Label("label", pathInfo.getName()));
item.add(pathLink);
+
+ if (item.getIndex() == 0)
+ item.add(new Label("lastCommitSummary", "Loading last commit info..."));
+ else
+ item.add(new Label("lastCommitSummary"));
}
});
@@ -250,8 +255,11 @@ public class TreeList extends GenericPanel<String> {
public Component getLoadingComponent(String markupId) {
IRequestHandler handler = new ResourceReferenceRequestHandler(
AbstractDefaultAjaxBehavior.INDICATOR);
- return new Label(markupId, "<img src=\"" +
- RequestCycle.get().urlFor(handler) + "\"/> Loading latest commit...").setEscapeModelStrings(false);
+ return new Label(markupId, ""
+ + "<div class='message'>"
+ + " <img src='" + RequestCycle.get().urlFor(handler) + "'/> Loading latest commit..."
+ + "</div>"
+ + "<div class='other-info'>&nbsp;</div>").setEscapeModelStrings(false);
}
@Override
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/tree-list.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/tree-list.css
index a6533829ae..7f42e1d7e2 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/tree-list.css
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/tree-list.css
@@ -1,12 +1,47 @@
-table.tree-list {width: 100%; border: 1px solid #DDD;}
-table.tree-list>tbody>tr>td {padding: 6px 8px; border-top: 1px solid #EEE; vertical-align: top;}
-table.tree-list>tbody>tr:first-child>td {border-top: none;}
-table.tree-list tr.child .last-commit a, .tree-list .last-commit {color: #666;}
-table.tree-list tr.parent td {padding: 3px 12px;}
-table.tree-list tr.parent td a i {margin-right: 2px;}
-table.tree-list tr.parent td a span {font-size: 18px;}
-table.tree-list tr.last-commit td {background: #F2F2F2;}
-table.tree-list tr.last-commit td .message {margin-bottom: 16px;}
-table.tree-list tr.last-commit td .other-info {background: white; margin: -6px -8px; padding: 6px 8px; color: #888;}
-table.tree-list tr.last-commit td .other-info .name {font-weight: bold; color: #555;}
-table.tree-list tr.last-commit td .other-info a {color: #555;}
\ No newline at end of file
+.tree-list {
+ border: 1px solid #DDD;
+ border-radius: 4px;
+}
+.tree-list>table {
+ width: 100%;
+}
+.tree-list>table>tbody>tr>td {
+ padding: 6px 8px;
+ border-top: 1px solid #EEE;
+ vertical-align: top;
+}
+.tree-list>table>tbody>tr:first-child>td {
+ border-top: none;
+}
+.tree-list>table tr.child .last-commit a, .tree-list>table .last-commit {
+ color: #666;
+}
+.tree-list>table tr.parent td {
+ padding: 3px 12px;
+}
+.tree-list>table tr.parent td a i {
+ margin-right: 2px;
+}
+.tree-list>table tr.parent td a span {
+ font-size: 18px;
+}
+.tree-list>table tr.last-commit td {
+ padding: 0;
+}
+.tree-list>table tr.last-commit td .message {
+ background: #F2F2F2;
+ border-radius: 4px 4px 0 0;
+ padding: 8px;
+}
+.tree-list>table tr.last-commit td .other-info {
+ color: #888;
+ padding: 6px 8px;
+ height: 36px;
+}
+.tree-list>table tr.last-commit td .other-info .name {
+ font-weight: bold;
+ color: #555;
+}
+.tree-list>table tr.last-commit td .other-info a {
+ color: #555;
+}
\ No newline at end of file
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/tree-list.js b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/tree-list.js
index f2ae92edff..7cd0ea912f 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/tree-list.js
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/treelist/tree-list.js
@@ -1,6 +1,6 @@
gitplex.treelist = {
renderLastCommits: function(containerId, lastCommits) {
- var $table = $("#" + containerId).find("table.tree-list");
+ var $table = $("#" + containerId).find(".tree-list>table");
$table.find("tr.child").each(function() {
var $row = $(this);
var path = $row.find("td.path span").text();
@@ -10,7 +10,7 @@ gitplex.treelist = {
var lastCommit = lastCommits[path];
var $summary = $row.children(".last-commit.summary");
- $summary.append("<a href='" + lastCommit.url + "'>" + lastCommit.summary + "</a>");
+ $summary.empty().append("<a href='" + lastCommit.url + "'>" + lastCommit.summary + "</a>");
$row.children(".last-commit.age").append(lastCommit.age);
});
}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/repository.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/repository.css
index 31124581ad..83afcb225e 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/repository.css
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/repository.css
@@ -21,7 +21,7 @@
#repository>.head>.clone>input {
font-size: 12px;
width: 200px;
- border: 1px solid #BBB;
+ border: 1px solid #D8D8D8;
background: #EEE;
border-radius: 3px 0 0 3px;
padding-left: 4px;
@@ -31,7 +31,7 @@
#repository>.head>.clone>button {
font-size: 12px;
margin-left: -5px;
- border: 1px solid #BBB;
+ border: 1px solid #D8D8D8;
background: #EEE;
height: 22px;
border-radius: 0 3px 3px 0;