Skip to content

Commit

Permalink
Enable to jump to organizationPage by clicking orgThumbnail or orgNam…
Browse files Browse the repository at this point in the history
…e in members management page
  • Loading branch information
7coco committed Sep 25, 2016
1 parent bec1ac2 commit 2b5defd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
13 changes: 11 additions & 2 deletions social_bookmark/PHH_Bookmark/view/membersManagement.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<div id="all">
<div id="org">
<div id="img">
<img src="<%= orgThumbnail %>">
<a name="<%= orgId %>" class="orgId"><img src="<%= orgThumbnail %>"></a>
</div>
<div id="nameintro">
<h2 id="orgName"><%= orgName %></h2>
<h2 id="orgName"><a name="<%= orgId%>" class="orgId"><%= orgName %></a></h2>
<div id="introduction">
<%= orgIntroduction %>
</div>
Expand Down Expand Up @@ -106,6 +106,10 @@

<form action="/PHH_Bookmark/membersManagement/leave" method="post" name="leave">
</form>

<form action="/PHH_Bookmark/organizationPage/submitOrgId" method="post" name="submitOrgId">
<input type="hidden" name="result">
</form>
</main>
</body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Expand All @@ -119,6 +123,7 @@
var $button = $(".button");
var $helpimg = $('#helpimg');
var $inviteExplainBody = $('#inviteExplainBody');
var $orgId = $('.orgId');
$inviteExplainBody.css('display', 'none');
Expand All @@ -144,6 +149,10 @@
$leaveButton.click(function(){
document.leave.submit();
});
$orgId.click(function(){
document.submitOrgId.result.value = this.name;
document.submitOrgId.submit();
});
$helpimg.hover(function(){
$helpimg.after('<p id="displayHelp">ヘルプを表示</p>');
}, function(){
Expand Down
2 changes: 1 addition & 1 deletion social_bookmark/PHH_Bookmark/view/topPage.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
$orgId2.click(function(){
document.submitOrgId.result.value = this.name;
document.submitOrgId.submit();
})
});
document.body.addEventListener('click',function(e){
var mouseX = e.pageX;
var mouseY = e.pageY;
Expand Down
1 change: 1 addition & 0 deletions social_bookmark/routes/membersManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ router.get('/', (req, res) => {
orgThumbnail,
orgIntroduction,
myUserName,
orgId,
});
});
});
Expand Down

0 comments on commit 2b5defd

Please sign in to comment.