Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit e4ff08c

Browse files
committed
change repoinfo
1 parent b3c3098 commit e4ff08c

File tree

4 files changed

+32
-22
lines changed

4 files changed

+32
-22
lines changed

src/main/java/org/gitmining/controller/OverviewController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public ModelAndView getOverviewView(HttpServletRequest request)
4343
public ModelAndView getReposView(HttpServletRequest request)
4444
throws Exception {
4545
String[] tagName = request.getParameter("tag").split("ae");
46+
System.out.println(request.getParameter("tag"));
4647
List<String> tagNameList = new ArrayList<String>();
4748
for (int i = 0; i < tagName.length; i++) {
4849
tagNameList.add(tagName[i]);

src/main/webapp/static/css/main.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ td, b {
5454
}
5555

5656
.ui.inverted.menu .active.item {
57-
border-bottom: 3px solid #009c95
57+
border-bottom: 3px solid #009c95;
5858
}
5959

6060
#myCanvasContainer, #userContainer {
@@ -511,7 +511,7 @@ h4.ui.header .sub.header {
511511

512512
.summary{
513513
float:left;
514-
width:560px;
514+
width:550px;
515515
margin-right:10px;
516516
}
517517

src/main/webapp/static/js/allrepos.js

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,28 @@ $(document).ready(function() {
1616

1717
var tags = "";
1818

19-
$(".ui.choose").each(function() {
19+
var repotype=$("#choosetype").text();
20+
var language="";
21+
var createyear="";
22+
23+
$(".othertype").each(function() {
2024
var text = $(this).text();
21-
tags = tags + text + "ae";
22-
$(this).click(function() {
23-
tags = text;
24-
// $(this).addClass("test").siblings("td").removeClass("test");
25-
window.location.href = "/GithubVisualization/repos?tag=" + tags;
26-
});
27-
});
2825

29-
$(".item .header").each(function() {
3026
$(this).click(function() {
31-
var text = $(this).text();
32-
tags = tags + text + "ae";
33-
// $(this).addClass("test").siblings("td").removeClass("test");
34-
window.location.href = "/GithubVisualization/repos?tag=" + tags;
27+
repotype = text;
28+
window.location.href = "/GithubVisualization/repos?tag=" + repotype;
3529
});
3630
});
3731

32+
//$(".ui").each(function() {
33+
// $(this).click(function() {
34+
// var text = $(this).text();
35+
// tags = tags + text + "ae";
36+
// // $(this).addClass("test").siblings("td").removeClass("test");
37+
// window.location.href = "/GithubVisualization/repos?tag=" + tags;
38+
// });
39+
//});
40+
3841
var app = angular
3942
.module(
4043
'repoapp',
@@ -115,7 +118,7 @@ app.controller('generalCtrl', [
115118
var postData = {
116119
pageIndex : $scope.paginationConf.currentPage,
117120
pageSize : $scope.paginationConf.itemsPerPage,
118-
tag : tags,
121+
tag : repotype,
119122
type: $scope.type
120123
}
121124

@@ -137,7 +140,7 @@ app.controller('generalCtrl', [
137140

138141
app.controller('topCtrl', function($scope, $http) {
139142
var url = '/GithubVisualization/TopTen', data = {
140-
tag : JSON.stringify(tags),
143+
tag : JSON.stringify(repotype),
141144
}, transFn = function(data) {
142145
return $.param(data);
143146
}, postCfg = {

src/main/webapp/velocity/templates/allrepos.vm

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
<div class="ui very relaxed horizontal list">
2020
#foreach($tag in $result.tags)
2121
<div class="item">
22-
#if($result.searchTag.contains($tag.name)) <a
23-
class="ui label teal choose">$!tag.name</a> #else <a
24-
class="ui label">$!tag.name</a> #end
22+
#if($result.searchTag.contains($tag.name))
23+
<a id="choosetype" class="ui label teal">$!tag.name</a>
24+
#else
25+
<a class="ui label othertype">$!tag.name</a>
26+
#end
2527
</div>
2628
#end
2729
</div>
@@ -36,7 +38,11 @@
3638
<div class="ui very relaxed horizontal list">
3739
#foreach($lan in $result.languages)
3840
<div class="item">
39-
<a class="ui label">$!lan</a>
41+
#if($result.searchTag.contains($tag.name))
42+
<a id="chooselan" class="ui label teal">$!tag.name</a>
43+
#else
44+
<a class="ui label otherlan">$!lan</a>
45+
#end
4046
</div>
4147
#end
4248
</div>
@@ -111,7 +117,7 @@
111117
<div class="rightcontainer" ng-controller="topCtrl">
112118
<h3 class="ui teal header">
113119
<i class="github icon"></i>
114-
<div class="content">TOP 10</div>
120+
<div class="content">TOP 5</div>
115121
</h3>
116122
<div class="ui grid" ng-repeat="repo in repos">
117123
<div class="ui segment">

0 commit comments

Comments
 (0)