Skip to content

Commit e6745da

Browse files
author
Gaolu Li
committed
added group name to repo item on mouseenter
1 parent de1afae commit e6745da

5 files changed

Lines changed: 31 additions & 5 deletions

File tree

‎cache.manifest‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# Build: 20161024100152
2+
# Build: 20161130111813
33

44
CACHE:
55
resources/fonts/Dressedless_Three.svg

‎index.html‎

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

‎static/app/html/main.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h5><span class="label label-primary">real-world usage</span> <span class="label
2727
</div>
2828
</div>
2929
<form action="javascript:void(0);">
30-
<input type="search" name="search" class="form-control" placeholder="haze 雾霾">
30+
<input type="search" name="search" class="form-control" placeholder="XMAS 圣诞节">
3131
</form>
3232
<span class="input-group-btn">
3333
<button class="btn btn-secondary search" type="button" data-toggle="tooltip" data-placement="left" data-trigger="manual" title="Click here to show more">

‎static/app/src/AppBundle.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,6 +1896,7 @@
18961896
els.bookmarkModalContent.on('click', '.repo-item .group-menu', renderBookmarkRepoGroupMenu);
18971897
els.bookmarkModalContent.on('click', '.repo-item .tag-menu', renderBookmarkRepoTagMenu);
18981898
els.bookmarkModalContent.on('mouseenter mouseleave ontouchstart ontouchend', '.repo-item', renderBookmarkRepoTagDots);
1899+
els.bookmarkModalContent.on('mouseenter', '.repo-item', renderBookmarkRepoTitle);
18991900
els.bookmarkModalContent.on('keyup','.repo-group-item>.hd .search input',renderBookmarkSearchRepos);
19001901
els.bookmarkModalContent.on('click','.repo-group-item>.hd .search submit',renderBookmarkSearchRepos);
19011902
els.bookmarkUserModal.on('click', '.submit', function(){
@@ -2098,6 +2099,18 @@
20982099
el.find('.add-repo[data-id="'+key.id+'"]')[key.repoIds.indexOf(id)==-1?'removeAttr':'attr']('data-selected',true);
20992100
});
21002101
}
2102+
2103+
function renderBookmarkRepoTitle(){
2104+
var el = $(this),
2105+
id = el.attr('data-repoid'),
2106+
groups = [];
2107+
els.lastBookmarkGroupsData.forEach(function(key){
2108+
key.repoIds.indexOf(id)!=-1 && groups.push(key.name);
2109+
});
2110+
2111+
el.attr('title', groups.length? ('Group: '+ groups.join(', ')): '');
2112+
}
2113+
21012114
function renderBookmarkRepoTagDots(e){
21022115
var el = $(this),
21032116
id = el.attr('data-repoid'),

‎static/app/src/view/BookmarkView.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function bindEvent() {
7171
els.bookmarkModalContent.on('click', '.repo-item .group-menu', renderBookmarkRepoGroupMenu);
7272
els.bookmarkModalContent.on('click', '.repo-item .tag-menu', renderBookmarkRepoTagMenu);
7373
els.bookmarkModalContent.on('mouseenter mouseleave ontouchstart ontouchend', '.repo-item', renderBookmarkRepoTagDots);
74+
els.bookmarkModalContent.on('mouseenter', '.repo-item', renderBookmarkRepoTitle);
7475
els.bookmarkModalContent.on('keyup','.repo-group-item>.hd .search input',renderBookmarkSearchRepos);
7576
els.bookmarkModalContent.on('click','.repo-group-item>.hd .search submit',renderBookmarkSearchRepos);
7677
els.bookmarkUserModal.on('click', '.submit', function(){
@@ -273,6 +274,18 @@ function renderBookmarkRepoTagMenu(){
273274
el.find('.add-repo[data-id="'+key.id+'"]')[key.repoIds.indexOf(id)==-1?'removeAttr':'attr']('data-selected',true);
274275
});
275276
}
277+
278+
function renderBookmarkRepoTitle(){
279+
var el = $(this),
280+
id = el.attr('data-repoid'),
281+
groups = [];
282+
els.lastBookmarkGroupsData.forEach(function(key){
283+
key.repoIds.indexOf(id)!=-1 && groups.push(key.name);
284+
});
285+
286+
el.attr('title', groups.length? ('Group: '+ groups.join(', ')): '');
287+
}
288+
276289
function renderBookmarkRepoTagDots(e){
277290
var el = $(this),
278291
id = el.attr('data-repoid'),

0 commit comments

Comments
 (0)