--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
... | ... | @@ -3224,7 +3224,7 @@ |
3224 | 3224 |
|
3225 | 3225 |
.project-btn-item { |
3226 | 3226 |
a { |
3227 |
- width: 196px; |
|
3227 |
+ width: 90%; |
|
3228 | 3228 |
margin-bottom: 15px; |
3229 | 3229 |
} |
3230 | 3230 |
} |
... | ... | @@ -6811,3 +6811,49 @@ |
6811 | 6811 |
#new-file-link { |
6812 | 6812 |
margin: 0 5px; |
6813 | 6813 |
} |
6814 |
+ |
|
6815 |
+.two-column-icon { |
|
6816 |
+ display: inline-block; |
|
6817 |
+ line-height: 30px; |
|
6818 |
+ margin-left: 10px; |
|
6819 |
+ i { |
|
6820 |
+ font-size: 16px; |
|
6821 |
+ margin-right: 5px; |
|
6822 |
+ line-height: 20px; |
|
6823 |
+ } |
|
6824 |
+ |
|
6825 |
+ label { |
|
6826 |
+ padding-top: 7px; |
|
6827 |
+ } |
|
6828 |
+} |
|
6829 |
+ |
|
6830 |
+.absoluteAndLeftMargin { |
|
6831 |
+ position: absolute; |
|
6832 |
+ margin-left: 260px; |
|
6833 |
+} |
|
6834 |
+ |
|
6835 |
+.page-nums { |
|
6836 |
+ margin-left: -120px !important; |
|
6837 |
+} |
|
6838 |
+ |
|
6839 |
+#pageslide { |
|
6840 |
+ /* These styles MUST be included. Do not change. */ |
|
6841 |
+ display: none; |
|
6842 |
+ position: absolute; |
|
6843 |
+ position: fixed; |
|
6844 |
+ top: 0; |
|
6845 |
+ height: 100%; |
|
6846 |
+ z-index: 999999; |
|
6847 |
+ |
|
6848 |
+ /* Specify the width of your pageslide here */ |
|
6849 |
+ width: 50%; |
|
6850 |
+ padding: 1px; |
|
6851 |
+ |
|
6852 |
+ /* These styles are optional, and describe how the pageslide will look */ |
|
6853 |
+ background-color: #333; |
|
6854 |
+ color: #FFF; |
|
6855 |
+ -webkit-box-shadow: inset 0 0 5px 5px #222; |
|
6856 |
+ -moz-shadow: inset 0 0 5px 5px #222; |
|
6857 |
+ //box-shadow: inset 0 0 5px 5px #222; |
|
6858 |
+ box-shadow: 2px 2px 8px #000; |
|
6859 |
+} |
--- app/assets/stylesheets/less/_responsive.less
+++ app/assets/stylesheets/less/_responsive.less
... | ... | @@ -433,6 +433,9 @@ |
433 | 433 |
} |
434 | 434 |
} |
435 | 435 |
} |
436 |
+ .page-nums { |
|
437 |
+ margin-left: 0; |
|
438 |
+ } |
|
436 | 439 |
} |
437 | 440 |
|
438 | 441 |
@media all and (max-width:1199px){ |
... | ... | @@ -534,7 +537,6 @@ |
534 | 537 |
} |
535 | 538 |
.project-header-outer { |
536 | 539 |
max-width: 1199px; |
537 |
- min-width: 1000px; |
|
538 | 540 |
|
539 | 541 |
.project-header-inner { |
540 | 542 |
.project-header-wrap { |
... | ... | @@ -546,8 +548,6 @@ |
546 | 548 |
|
547 | 549 |
.project-menu-outer { |
548 | 550 |
max-width: 1199px; |
549 |
- min-width: 1000px; |
|
550 |
- padding:0 10px; |
|
551 | 551 |
|
552 | 552 |
.project-menu-inner { |
553 | 553 |
width: 95%; |
--- app/views/board/list.scala.html
+++ app/views/board/list.scala.html
... | ... | @@ -1,22 +1,8 @@ |
1 | 1 |
@** |
2 |
-* Yobi, Project Hosting SW |
|
2 |
+* Yona, 21st Century Project Hosting SW |
|
3 | 3 |
* |
4 |
-* Copyright 2012 NAVER Corp. |
|
5 |
-* http://yobi.io |
|
6 |
-* |
|
7 |
-* @author Sangcheol Hwang |
|
8 |
-* |
|
9 |
-* Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
-* you may not use this file except in compliance with the License. |
|
11 |
-* You may obtain a copy of the License at |
|
12 |
-* |
|
13 |
-* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
-* |
|
15 |
-* Unless required by applicable law or agreed to in writing, software |
|
16 |
-* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
-* See the License for the specific language governing permissions and |
|
19 |
-* limitations under the License. |
|
4 |
+* Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+* https://yona.io |
|
20 | 6 |
**@ |
21 | 7 |
@(title:String, project:Project, page:com.avaje.ebean.Page[Posting], param:BoardApp.SearchCondition, notices:List[models.Posting]) |
22 | 8 |
|
... | ... | @@ -49,11 +35,14 @@ |
49 | 35 |
<input name="filter" class="textbox" type="text" placeholder="@Messages("project.searchPlaceholder")" value="@param.filter"> |
50 | 36 |
<button type="submit" class="search-btn"><i class="yobicon-search"></i></button> |
51 | 37 |
</div> |
52 |
- <div class="board-labels"> |
|
53 |
- @if(!IssueLabel.findByProject(project).isEmpty){ |
|
54 |
- @issue.partial_select_label(IssueLabel.findByProject(project), param.labelIdSet, "", "", project) |
|
38 |
+ @defining(IssueLabel.findByProject(project)) { labels => |
|
39 |
+ @if(!labels.isEmpty) { |
|
40 |
+ <div class="board-labels"> |
|
41 |
+ @issue.partial_select_label(labels, param.labelIdSet, "", "", project) |
|
42 |
+ </div> |
|
43 |
+ } |
|
55 | 44 |
} |
56 |
- </div> |
|
45 |
+ @common.twoColumnModeCheckboxArea(false) |
|
57 | 46 |
</form> |
58 | 47 |
<div class="pull-right"> |
59 | 48 |
<a href="@routes.BoardApp.newPostForm(project.owner, project.name)" class="ybtn ybtn-success">@Messages("post.write")</a> |
... | ... | @@ -101,6 +90,8 @@ |
101 | 90 |
@help.keymap("boardList", project) |
102 | 91 |
</div> |
103 | 92 |
</div> |
93 |
+<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery.pageslide.js")"></script> |
|
94 |
+<script type="text/javascript" src="@routes.Assets.at("javascripts/service/yona.twoColumnMode.js")"></script> |
|
104 | 95 |
<script type="text/javascript"> |
105 | 96 |
$(document).ready(function() { |
106 | 97 |
$yobi.loadModule("board.List", { |
--- app/views/board/partial_list.scala.html
+++ app/views/board/partial_list.scala.html
... | ... | @@ -1,29 +1,15 @@ |
1 | 1 |
@** |
2 |
-* Yobi, Project Hosting SW |
|
2 |
+* Yona, 21st Century Project Hosting SW |
|
3 | 3 |
* |
4 |
-* Copyright 2013 NAVER Corp. |
|
5 |
-* http://yobi.io |
|
6 |
-* |
|
7 |
-* @author Suwon Chae |
|
8 |
-* |
|
9 |
-* Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
-* you may not use this file except in compliance with the License. |
|
11 |
-* You may obtain a copy of the License at |
|
12 |
-* |
|
13 |
-* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
-* |
|
15 |
-* Unless required by applicable law or agreed to in writing, software |
|
16 |
-* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
-* See the License for the specific language governing permissions and |
|
19 |
-* limitations under the License. |
|
4 |
+* Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+* https://yona.io |
|
20 | 6 |
**@ |
21 | 7 |
@(post:models.Posting, project:Project) |
22 | 8 |
|
23 | 9 |
@import utils.JodaDateUtil |
24 | 10 |
@import utils.TemplateHelper._ |
25 | 11 |
@defining(User.findByLoginId(post.authorLoginId)){ user => |
26 |
-<li class="post-item"> |
|
12 |
+<li class="post-item title" href="@routes.BoardApp.post(project.owner, project.name, post.getNumber)"> |
|
27 | 13 |
<a href="@routes.UserApp.userInfo(user.loginId)" class="avatar-wrap mlarge hide-in-mobile" data-toggle="tooltip" data-placement="bottom" title="@user.loginId"> |
28 | 14 |
<img src="@user.avatarUrl(64)" alt="@user.name" width="32" height="32"/> |
29 | 15 |
</a> |
--- app/views/common/scripts.scala.html
+++ app/views/common/scripts.scala.html
... | ... | @@ -151,7 +151,7 @@ |
151 | 151 |
|
152 | 152 |
yobi.OriginalMessage.hide($("[data-via-email]")); |
153 | 153 |
|
154 |
- $('.logo, .title > a, .project-menu-nav > li > a, .show-progress-bar, .project-breadcrumb > span > a, .project-name > a, a[class="title"]').on('click', function(){ |
|
154 |
+ $('.logo, .title > a, .project-menu-nav > li > a, .show-progress-bar, .project-breadcrumb > span > a, .project-name > a, a[class="title"]').on('click.progressbar', function(){ |
|
155 | 155 |
NProgress.set(0.7); |
156 | 156 |
NProgress.start(); |
157 | 157 |
}); |
+++ app/views/common/twoColumnModeCheckboxArea.scala.html
... | ... | @@ -0,0 +1,20 @@ |
1 | +@** | |
2 | +* Yona, 21st Century Project Hosting SW | |
3 | +* | |
4 | +* Copyright Yona & Yobi Authors & NAVER Corp. | |
5 | +* https://yona.io | |
6 | +**@ | |
7 | +@(requireLeftMargin: Boolean = true) | |
8 | + | |
9 | +@additionalCssForLeftMargin = @{ | |
10 | + if(requireLeftMargin) { | |
11 | + "pull-left absoluteAndLeftMargin" | |
12 | + } else { | |
13 | + "" | |
14 | + } | |
15 | +} | |
16 | +<div class="@additionalCssForLeftMargin two-column-icon mr10 hide-in-mobile" id="two-column-mode-checkbox" title='@Messages("common.two.column.mode")' data-content='@Messages("common.two.column.mode.desc")'> | |
17 | + <label class="checkbox"> | |
18 | + <input id="two-column-mode" type="checkbox"> <i class="yobicon-explorerwindow"></i> | |
19 | + </label> | |
20 | +</div> |
--- app/views/git/list.scala.html
+++ app/views/git/list.scala.html
... | ... | @@ -1,22 +1,8 @@ |
1 | 1 |
@** |
2 |
-* Yobi, Project Hosting SW |
|
2 |
+* Yona, 21st Century Project Hosting SW |
|
3 | 3 |
* |
4 |
-* Copyright 2013 NAVER Corp. |
|
5 |
-* http://yobi.io |
|
6 |
-* |
|
7 |
-* @author Keesun Baik |
|
8 |
-* |
|
9 |
-* Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
-* you may not use this file except in compliance with the License. |
|
11 |
-* You may obtain a copy of the License at |
|
12 |
-* |
|
13 |
-* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
-* |
|
15 |
-* Unless required by applicable law or agreed to in writing, software |
|
16 |
-* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
-* See the License for the specific language governing permissions and |
|
19 |
-* limitations under the License. |
|
4 |
+* Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+* https://yona.io |
|
20 | 6 |
**@ |
21 | 7 |
@(project: Project, page: com.avaje.ebean.Page[PullRequest], |
22 | 8 |
condition: controllers.PullRequestApp.SearchCondition, requestType: String) |
... | ... | @@ -31,8 +17,12 @@ |
31 | 17 |
|
32 | 18 |
@common.select2() |
33 | 19 |
|
20 |
+<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery.pageslide.js")"></script> |
|
21 |
+<script type="text/javascript" src="@routes.Assets.at("javascripts/service/yona.twoColumnMode.js")"></script> |
|
34 | 22 |
<script type="text/javascript"> |
35 | 23 |
$(document).ready(function(){ |
24 |
+ _initTwoColumnMode(); |
|
25 |
+ |
|
36 | 26 |
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; |
37 | 27 |
var isSafari = navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1; |
38 | 28 |
// Workaround for pjax bug result from bfcache |
--- app/views/git/partial_list.scala.html
+++ app/views/git/partial_list.scala.html
... | ... | @@ -1,22 +1,8 @@ |
1 | 1 |
@** |
2 |
-* Yobi, Project Hosting SW |
|
2 |
+* Yona, 21st Century Project Hosting SW |
|
3 | 3 |
* |
4 |
-* Copyright 2013 NAVER Corp. |
|
5 |
-* http://yobi.io |
|
6 |
-* |
|
7 |
-* @author Keesun Baik |
|
8 |
-* |
|
9 |
-* Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
-* you may not use this file except in compliance with the License. |
|
11 |
-* You may obtain a copy of the License at |
|
12 |
-* |
|
13 |
-* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
-* |
|
15 |
-* Unless required by applicable law or agreed to in writing, software |
|
16 |
-* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
-* See the License for the specific language governing permissions and |
|
19 |
-* limitations under the License. |
|
4 |
+* Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+* https://yona.io |
|
20 | 6 |
**@ |
21 | 7 |
@(project: Project, page: com.avaje.ebean.Page[PullRequest]) |
22 | 8 |
|
... | ... | @@ -28,7 +14,7 @@ |
28 | 14 |
@if(page.getList.size> 0){ |
29 | 15 |
@for(req <- page.getList.iterator) { |
30 | 16 |
@defining(User.findByLoginId(req.contributor.loginId)){ user => |
31 |
- <li class="post-item"> |
|
17 |
+ <li class="post-item title" href="@routes.PullRequestApp.pullRequest(req.toProject.owner, req.toProject.name, req.number)"> |
|
32 | 18 |
<div class="span10 span-hard-wrap"> |
33 | 19 |
<a href="@routes.UserApp.userInfo(user.loginId)" class="avatar-wrap mlarge" data-toggle="tooltip" data-placement="top" title="@user.loginId"> |
34 | 20 |
@if(user.avatarUrl == UserApp.DEFAULT_AVATAR_URL){ |
--- app/views/git/partial_search.scala.html
+++ app/views/git/partial_search.scala.html
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 |
} |
46 | 46 |
|
47 | 47 |
<div pjax-container class="row-fluid cb"> |
48 |
- <div class="span2 search-wrap hide-in-mobile" style="padding-top:0;"> |
|
48 |
+ <div class="left-menu span2 search-wrap hide-in-mobile" style="padding-top:0;"> |
|
49 | 49 |
<form id="search" name="search" action="@searchFormAction(condition.category)" method="get"> |
50 | 50 |
<div class="search"> |
51 | 51 |
<div class="search-bar"> |
... | ... | @@ -88,6 +88,7 @@ |
88 | 88 |
@partial_recently_pushed_branches(PushedBranch.findByOwnerAndOriginalProject(UserApp.currentUser, project)) |
89 | 89 |
} |
90 | 90 |
} |
91 |
+ @common.twoColumnModeCheckboxArea() |
|
91 | 92 |
<div class="pull-right"> |
92 | 93 |
<a href="@routes.PullRequestApp.newPullRequestForm(project.owner, project.name)" class="ybtn ybtn-success"> |
93 | 94 |
@Messages("pullRequest.new") |
--- app/views/issue/list.scala.html
+++ app/views/issue/list.scala.html
... | ... | @@ -20,6 +20,8 @@ |
20 | 20 |
@common.select2() |
21 | 21 |
@common.calendar() |
22 | 22 |
|
23 |
+<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery.pageslide.js")"></script> |
|
24 |
+<script type="text/javascript" src="@routes.Assets.at("javascripts/service/yona.twoColumnMode.js")"></script> |
|
23 | 25 |
<script type="text/javascript"> |
24 | 26 |
$(function(){ |
25 | 27 |
// issue.List |
--- app/views/issue/my_list.scala.html
+++ app/views/issue/my_list.scala.html
... | ... | @@ -19,6 +19,8 @@ |
19 | 19 |
@views.html.issue.my_partial_search(title, currentPage, param, project) |
20 | 20 |
</div> |
21 | 21 |
</div> |
22 |
+ <script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery.pageslide.js")"></script> |
|
23 |
+ <script type="text/javascript" src="@routes.Assets.at("javascripts/service/yona.twoColumnMode.js")"></script> |
|
22 | 24 |
<script type="text/javascript"> |
23 | 25 |
$(function(){ |
24 | 26 |
$yobi.loadModule("issue.List"); |
--- app/views/issue/my_partial_list.scala.html
+++ app/views/issue/my_partial_list.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
@for(issue <- issueList){ |
19 | 19 |
@defining(issue.project){ project => |
20 | 20 |
@defining(User.findByLoginId(issue.authorLoginId)){ user => |
21 |
- <li class="post-item" id="issue-item-@issue.id"> |
|
21 |
+ <li class="post-item title" id="issue-item-@issue.id" href="@routes.IssueApp.issue(project.owner, project.name, issue.getNumber)"> |
|
22 | 22 |
<div class="span10 span-hard-wrap"> |
23 | 23 |
<a href="@routes.UserApp.userInfo(user.loginId)" class="avatar-wrap mlarge hide-in-mobile" data-toggle="tooltip" data-placement="bottom" title="@user.loginId"> |
24 | 24 |
@if(user.avatarUrl == UserApp.DEFAULT_AVATAR_URL){ |
--- app/views/issue/my_partial_search.scala.html
+++ app/views/issue/my_partial_search.scala.html
... | ... | @@ -1,22 +1,8 @@ |
1 | 1 |
@** |
2 |
-* Yobi, Project Hosting SW |
|
2 |
+* Yona, 21st Century Project Hosting SW |
|
3 | 3 |
* |
4 |
-* Copyright 2014 NAVER Corp. |
|
5 |
-* http://yobi.io |
|
6 |
-* |
|
7 |
-* @author Suwon Chae |
|
8 |
-* |
|
9 |
-* Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
-* you may not use this file except in compliance with the License. |
|
11 |
-* You may obtain a copy of the License at |
|
12 |
-* |
|
13 |
-* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
-* |
|
15 |
-* Unless required by applicable law or agreed to in writing, software |
|
16 |
-* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
-* See the License for the specific language governing permissions and |
|
19 |
-* limitations under the License. |
|
4 |
+* Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+* https://yona.io |
|
20 | 6 |
**@ |
21 | 7 |
@(title: String, currentPage: com.avaje.ebean.Page[Issue], param:models.support.SearchCondition, project:Project) |
22 | 8 |
|
... | ... | @@ -34,7 +20,7 @@ |
34 | 20 |
} |
35 | 21 |
|
36 | 22 |
<div pjax-container class="row-fluid issue-list-wrap"> |
37 |
- <div class="span2 span-hard-wrap"> |
|
23 |
+ <div class="left-menu span2 span-hard-wrap"> |
|
38 | 24 |
<div class="inner advanced"> |
39 | 25 |
@my_partial_list_quicksearch(param) |
40 | 26 |
|
... | ... | @@ -67,6 +53,7 @@ |
67 | 53 |
</div> |
68 | 54 |
</div> |
69 | 55 |
<div class="span10 span-hard-wrap" id="span10"> |
56 |
+ @common.twoColumnModeCheckboxArea() |
|
70 | 57 |
<ul class="nav nav-tabs nm"> |
71 | 58 |
@for(state <- Array(State.OPEN, State.CLOSED)) { |
72 | 59 |
<li @if(param.state == state.state) { class="active" } data-pjax> |
--- app/views/issue/partial_list.scala.html
+++ app/views/issue/partial_list.scala.html
... | ... | @@ -19,14 +19,14 @@ |
19 | 19 |
<ul class="post-list-wrap row-fluid"> |
20 | 20 |
@for(issue <- issueList){ |
21 | 21 |
@defining(User.findByLoginId(issue.authorLoginId)){ user => |
22 |
- <li class="post-item" id="issue-item-@issue.id" data-item="issue-item" data-value="@user.loginId @issue.getNumber @issue.title"> |
|
22 |
+ <li class="post-item title" id="issue-item-@issue.id" data-item="issue-item" data-value="@user.loginId @issue.getNumber @issue.title" href="@routes.IssueApp.issue(project.owner, project.name, issue.getNumber)"> |
|
23 | 23 |
<div class="span9 span-hard-wrap"> |
24 | 24 |
@if(ProjectUser.isMember(UserApp.currentUser().id, project.id)){ |
25 | 25 |
<label for="issue-@issue.id" class="mass-update-check hide-in-mobile"> |
26 | 26 |
<input id="issue-@issue.id" type="checkbox" name="checked-issue" data-toggle="issue-checkbox" data-issue-id="@issue.id" data-issue-labels="@issueLabels(issue)"> |
27 | 27 |
</label> |
28 | 28 |
} |
29 |
- <label for="issue-@issue.id" class="issue-item-row"> |
|
29 |
+ <div for="issue-@issue.id" class="issue-item-row"> |
|
30 | 30 |
<a href="@routes.UserApp.userInfo(user.loginId)" class="avatar-wrap mlarge hide-in-mobile" data-toggle="tooltip" data-placement="top" title="@user.loginId"> |
31 | 31 |
<img src="@User.findByLoginId(issue.authorLoginId).avatarUrl(64)" alt="@user.name" width="32" height="32"/> |
32 | 32 |
</a> |
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 |
<a href="#" class="label issue-label list-label active" data-category-id="@label.category.id" data-label-id="@label.id">@label.name</a> |
78 | 78 |
} |
79 | 79 |
</div> |
80 |
- </label> |
|
80 |
+ </div> |
|
81 | 81 |
</div> |
82 | 82 |
<div class="span3 hide-in-mobile"> |
83 | 83 |
<div class="mt5 pull-right"> |
--- app/views/issue/partial_list_wrap.scala.html
+++ app/views/issue/partial_list_wrap.scala.html
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 |
} |
38 | 38 |
|
39 | 39 |
<div pjax-container class="row-fluid issue-list-wrap"> |
40 |
- <div class="span2 span-hard-wrap"> |
|
40 |
+ <div class=" left-menu span2 span-hard-wrap"> |
|
41 | 41 |
@partial_list_quicksearch(param, project) |
42 | 42 |
@partial_searchform(param, project) |
43 | 43 |
</div> |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 |
<div class="pull-right"> |
46 | 46 |
<a href="@routes.IssueApp.newIssueForm(project.owner, project.name)" class="ybtn ybtn-success">@Messages("issue.menu.new")</a> |
47 | 47 |
</div> |
48 |
- |
|
48 |
+ @common.twoColumnModeCheckboxArea() |
|
49 | 49 |
<ul class="nav nav-tabs nm"> |
50 | 50 |
@for(state <- Array(State.OPEN, State.CLOSED)) { |
51 | 51 |
<li @if(param.state == state.state) { class="active" } data-pjax> |
--- app/views/organization/group_board_list.scala.html
+++ app/views/organization/group_board_list.scala.html
... | ... | @@ -1,22 +1,8 @@ |
1 | 1 |
@** |
2 |
-* Yobi, Project Hosting SW |
|
2 |
+* Yona, 21st Century Project Hosting SW |
|
3 | 3 |
* |
4 |
-* Copyright 2015 NAVER Corp. |
|
5 |
-* http://yobi.io |
|
6 |
-* |
|
7 |
-* @author Suwon Chae |
|
8 |
-* |
|
9 |
-* Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
-* you may not use this file except in compliance with the License. |
|
11 |
-* You may obtain a copy of the License at |
|
12 |
-* |
|
13 |
-* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
-* |
|
15 |
-* Unless required by applicable law or agreed to in writing, software |
|
16 |
-* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
-* See the License for the specific language governing permissions and |
|
19 |
-* limitations under the License. |
|
4 |
+* Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+* https://yona.io |
|
20 | 6 |
**@ |
21 | 7 |
@(title:String, organization:Organization, page:com.avaje.ebean.Page[Posting], param:BoardApp.SearchCondition, notices:List[models.Posting]) |
22 | 8 |
|
... | ... | @@ -56,6 +42,7 @@ |
56 | 42 |
<input name="filter" class="textbox group-board" type="text" placeholder="@Messages("title.searchByKeyword")" value="@param.filter"> |
57 | 43 |
<button type="submit" class="search-btn"><i class="yobicon-search"></i></button> |
58 | 44 |
</div> |
45 |
+ @common.twoColumnModeCheckboxArea(false) |
|
59 | 46 |
</form> |
60 | 47 |
</div> |
61 | 48 |
|
... | ... | @@ -99,6 +86,8 @@ |
99 | 86 |
|
100 | 87 |
</div> |
101 | 88 |
</div> |
89 |
+<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery.pageslide.js")"></script> |
|
90 |
+<script type="text/javascript" src="@routes.Assets.at("javascripts/service/yona.twoColumnMode.js")"></script> |
|
102 | 91 |
<script type="text/javascript"> |
103 | 92 |
$(document).ready(function() { |
104 | 93 |
$yobi.loadModule("board.List", { |
--- app/views/organization/group_board_list_partial.scala.html
+++ app/views/organization/group_board_list_partial.scala.html
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 |
@import utils.JodaDateUtil |
24 | 24 |
@import utils.TemplateHelper._ |
25 | 25 |
@defining(User.findByLoginId(post.authorLoginId)){ user => |
26 |
-<li class="post-item"> |
|
26 |
+<li class="post-item title" href="@routes.BoardApp.post(project.owner, project.name, post.getNumber)"> |
|
27 | 27 |
<a href="@routes.UserApp.userInfo(user.loginId)" class="avatar-wrap mlarge hide-in-mobile" data-toggle="tooltip" data-placement="top" title="@user.loginId"> |
28 | 28 |
@if(user.avatarUrl == UserApp.DEFAULT_AVATAR_URL){ |
29 | 29 |
<img src="@urlToPicture(user.email, 32)"> |
--- app/views/organization/group_issue_list.scala.html
+++ app/views/organization/group_issue_list.scala.html
... | ... | @@ -1,22 +1,8 @@ |
1 | 1 |
@** |
2 |
-* Yobi, Project Hosting SW |
|
2 |
+* Yona, 21st Century Project Hosting SW |
|
3 | 3 |
* |
4 |
-* Copyright 2015 NAVER Corp. |
|
5 |
-* http://yobi.io |
|
6 |
-* |
|
7 |
-* @author Suwon Chae |
|
8 |
-* |
|
9 |
-* Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
-* you may not use this file except in compliance with the License. |
|
11 |
-* You may obtain a copy of the License at |
|
12 |
-* |
|
13 |
-* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
-* |
|
15 |
-* Unless required by applicable law or agreed to in writing, software |
|
16 |
-* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
-* See the License for the specific language governing permissions and |
|
19 |
-* limitations under the License. |
|
4 |
+* Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+* https://yona.io |
|
20 | 6 |
**@ |
21 | 7 |
@(title: String, currentPage: com.avaje.ebean.Page[Issue], param: |
22 | 8 |
models.support.SearchCondition, organization: Organization) |
... | ... | @@ -31,6 +17,8 @@ |
31 | 17 |
@views.html.organization.group_issue_search_partial(title, currentPage, param, organization) |
32 | 18 |
</div> |
33 | 19 |
</div> |
20 |
+ <script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery.pageslide.js")"></script> |
|
21 |
+ <script type="text/javascript" src="@routes.Assets.at("javascripts/service/yona.twoColumnMode.js")"></script> |
|
34 | 22 |
<script type="text/javascript"> |
35 | 23 |
$(function(){ |
36 | 24 |
$yobi.loadModule("issue.List"); |
--- app/views/organization/group_issue_list_partial.scala.html
+++ app/views/organization/group_issue_list_partial.scala.html
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 |
<ul class="post-list-wrap"> |
32 | 32 |
@for(issue <- issueList){ |
33 | 33 |
@defining(User.findByLoginId(issue.authorLoginId)){ user => |
34 |
- <li class="post-item" id="issue-item-@issue.id"> |
|
34 |
+ <li class="post-item title" id="issue-item-@issue.id" href="@routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber)"> |
|
35 | 35 |
<div class="span10 span-hard-wrap"> |
36 | 36 |
<a href="@routes.UserApp.userInfo(user.loginId)" class="avatar-wrap mlarge hide-in-mobile" data-toggle="tooltip" data-placement="top" title="@user.loginId"> |
37 | 37 |
@if(user.avatarUrl == UserApp.DEFAULT_AVATAR_URL){ |
--- app/views/organization/group_issue_search_partial.scala.html
+++ app/views/organization/group_issue_search_partial.scala.html
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
<div pjax-container class="row-fluid issue-list-wrap"> |
37 |
- <div class="span2 span-hard-wrap"> |
|
37 |
+ <div class="left-menu span2 span-hard-wrap"> |
|
38 | 38 |
<div class="inner advanced"> |
39 | 39 |
@group_issue_list_quicksearch(param) |
40 | 40 |
|
... | ... | @@ -64,6 +64,7 @@ |
64 | 64 |
</div> |
65 | 65 |
</div> |
66 | 66 |
<div class="span10 span-hard-wrap" id="span10"> |
67 |
+ @common.twoColumnModeCheckboxArea() |
|
67 | 68 |
<ul class="nav nav-tabs nm"> |
68 | 69 |
@for(state <- Array(State.OPEN, State.CLOSED)) { |
69 | 70 |
<li @if(param.state == state.state) { class="active" }> |
--- conf/messages
+++ conf/messages
... | ... | @@ -189,6 +189,8 @@ |
189 | 189 |
common.time.second = {0} second ago |
190 | 190 |
common.time.seconds = {0} seconds ago |
191 | 191 |
common.time.today = Today |
192 |
+common.two.column.mode = Two Column Mode |
|
193 |
+common.two.column.mode.desc = Splits list and body into columns respectively |
|
192 | 194 |
emails.click.link = To check email, please click this link. |
193 | 195 |
emails.main.email = Primary email address |
194 | 196 |
emails.main.email.descr = Your primary email address will be used to send you notifications or reset your passwords. |
--- conf/messages.ko-KR
+++ conf/messages.ko-KR
... | ... | @@ -190,6 +190,8 @@ |
190 | 190 |
common.time.second = {0}초 전 |
191 | 191 |
common.time.seconds = {0}초 전 |
192 | 192 |
common.time.today = 오늘 |
193 |
+common.two.column.mode = Two Column Mode |
|
194 |
+common.two.column.mode.desc = 리스트와 본문을 각각 컬럼으로 분할해서 보여줍니다 |
|
193 | 195 |
common.unselect = 선택안함 |
194 | 196 |
emails.click.link = 이메일을 확인하려면 다음 링크를 클릭하세요. |
195 | 197 |
emails.main.email = 대표 이메일 |
--- public/javascripts/lib/jquery.pageslide.js
+++ public/javascripts/lib/jquery.pageslide.js
... | ... | @@ -1,0 +1,220 @@ |
1 |
+/* |
|
2 |
+ * jQuery pageSlide |
|
3 |
+ * Version 2.0.1 |
|
4 |
+ * https://github.com/tacitknowledge/jquery-pageslide |
|
5 |
+ * |
|
6 |
+ * |
|
7 |
+ * |
|
8 |
+ * |
|
9 |
+ * Copyright (c) 2011 Scott Robbin (srobbin.com) |
|
10 |
+ * Modified by Tacit Knowledge for CommonJS and AMD integration 2015 |
|
11 |
+ * Dual licensed under the MIT and GPL licenses. |
|
12 |
+ */ |
|
13 |
+ |
|
14 |
+(function(factory){ |
|
15 |
+ if (typeof define === 'function' && define.amd) { |
|
16 |
+ define(function () { |
|
17 |
+ return factory; |
|
18 |
+ }); |
|
19 |
+ } else if (typeof module === 'object' && typeof module.exports === 'object') { |
|
20 |
+ exports = factory; |
|
21 |
+ } else { |
|
22 |
+ factory(jQuery); |
|
23 |
+ } |
|
24 |
+})(function($){ |
|
25 |
+ // Not inintializing second time |
|
26 |
+ if ($.fn.pageslide) { |
|
27 |
+ return; |
|
28 |
+ } |
|
29 |
+ // Convenience vars for accessing elements |
|
30 |
+ var $body = $('body'), |
|
31 |
+ $pageslide = $('#pageslide'); |
|
32 |
+ |
|
33 |
+ var _sliding = false, // Mutex to assist closing only once |
|
34 |
+ _lastCaller; // Used to keep track of last element to trigger pageslide |
|
35 |
+ |
|
36 |
+ // If the pageslide element doesn't exist, create it |
|
37 |
+ if( $pageslide.length == 0 ) { |
|
38 |
+ $pageslide = $('<div />').attr( 'id', 'pageslide' ) |
|
39 |
+ .css( 'display', 'none' ) |
|
40 |
+ .appendTo( $body ); |
|
41 |
+ } |
|
42 |
+ |
|
43 |
+ /* |
|
44 |
+ * Private methods |
|
45 |
+ */ |
|
46 |
+ function _load( url, useIframe ) { |
|
47 |
+ // Are we loading an element from the page or a URL? |
|
48 |
+ if ( url.indexOf("#") === 0 ) { |
|
49 |
+ // Load a page element |
|
50 |
+ $(url).clone(true).appendTo( $pageslide.empty() ).show(); |
|
51 |
+ } else { |
|
52 |
+ // Load a URL. Into an iframe? |
|
53 |
+ if( useIframe ) { |
|
54 |
+ var iframe = $("<iframe />").attr({ |
|
55 |
+ src: url, |
|
56 |
+ frameborder: 0, |
|
57 |
+ hspace: 0 |
|
58 |
+ }) |
|
59 |
+ .css({ |
|
60 |
+ width: "100%", |
|
61 |
+ height: "100%" |
|
62 |
+ }); |
|
63 |
+ |
|
64 |
+ $pageslide.html( iframe ); |
|
65 |
+ } else { |
|
66 |
+ $pageslide.load( url ); |
|
67 |
+ } |
|
68 |
+ |
|
69 |
+ $pageslide.data( 'localEl', false ); |
|
70 |
+ |
|
71 |
+ } |
|
72 |
+ } |
|
73 |
+ |
|
74 |
+ // Function that controls opening of the pageslide |
|
75 |
+ function _start( direction, speed ) { |
|
76 |
+ var slideWidth = $pageslide.outerWidth( true ), |
|
77 |
+ bodyAnimateIn = {}, |
|
78 |
+ slideAnimateIn = {}; |
|
79 |
+ |
|
80 |
+ // If the slide is open or opening, just ignore the call |
|
81 |
+ if( $pageslide.is(':visible') || _sliding ) return; |
|
82 |
+ _sliding = true; |
|
83 |
+ |
|
84 |
+ switch( direction ) { |
|
85 |
+ case 'left': |
|
86 |
+ $pageslide.css({ left: 'auto', right: '-' + slideWidth + 'px' }); |
|
87 |
+ // bodyAnimateIn['margin-left'] = '-=' + slideWidth; |
|
88 |
+ slideAnimateIn['right'] = '+=' + slideWidth; |
|
89 |
+ break; |
|
90 |
+ default: |
|
91 |
+ $pageslide.css({ left: '-' + slideWidth + 'px', right: 'auto' }); |
|
92 |
+ bodyAnimateIn['margin-left'] = '+=' + slideWidth; |
|
93 |
+ slideAnimateIn['left'] = '+=' + slideWidth; |
|
94 |
+ break; |
|
95 |
+ } |
|
96 |
+ |
|
97 |
+ // Animate the slide, and attach this slide's settings to the element |
|
98 |
+ $body.animate(bodyAnimateIn, speed); |
|
99 |
+ $pageslide.show() |
|
100 |
+ .animate(slideAnimateIn, speed, function() { |
|
101 |
+ _sliding = false; |
|
102 |
+ }); |
|
103 |
+ } |
|
104 |
+ |
|
105 |
+ /* |
|
106 |
+ * Declaration |
|
107 |
+ */ |
|
108 |
+ $.fn.pageslide = function(options) { |
|
109 |
+ var $elements = this; |
|
110 |
+ |
|
111 |
+ // On click |
|
112 |
+ $elements.on('click.pageslide', function(e) { |
|
113 |
+ var $self = $(this), |
|
114 |
+ settings = $.extend({ href: $self.attr('href') }, options); |
|
115 |
+ |
|
116 |
+ // Prevent the default behavior and stop propagation |
|
117 |
+ e.preventDefault(); |
|
118 |
+ e.stopPropagation(); |
|
119 |
+ |
|
120 |
+ if ( $pageslide.is(':visible') && $self[0] == _lastCaller ) { |
|
121 |
+ // If we clicked the same element twice, toggle closed |
|
122 |
+ $.pageslide.close(); |
|
123 |
+ } else { |
|
124 |
+ // Open |
|
125 |
+ $.pageslide( settings ); |
|
126 |
+ |
|
127 |
+ // Record the last element to trigger pageslide |
|
128 |
+ _lastCaller = $self[0]; |
|
129 |
+ } |
|
130 |
+ }); |
|
131 |
+ }; |
|
132 |
+ |
|
133 |
+ /* |
|
134 |
+ * Default settings |
|
135 |
+ */ |
|
136 |
+ $.fn.pageslide.defaults = { |
|
137 |
+ speed: 200, // Accepts standard jQuery effects speeds (i.e. fast, normal or milliseconds) |
|
138 |
+ direction: 'right', // Accepts 'left' or 'right' |
|
139 |
+ modal: false, // If set to true, you must explicitly close pageslide using $.pageslide.close(); |
|
140 |
+ iframe: true, // By default, linked pages are loaded into an iframe. Set this to false if you don't want an iframe. |
|
141 |
+ href: null // Override the source of the content. Optional in most cases, but required when opening pageslide programmatically. |
|
142 |
+ }; |
|
143 |
+ |
|
144 |
+ /* |
|
145 |
+ * Public methods |
|
146 |
+ */ |
|
147 |
+ |
|
148 |
+ // Open the pageslide |
|
149 |
+ $.pageslide = function( options ) { |
|
150 |
+ // Extend the settings with those the user has provided |
|
151 |
+ var settings = $.extend({}, $.fn.pageslide.defaults, options); |
|
152 |
+ |
|
153 |
+ // Are we trying to open in different direction? |
|
154 |
+ if( $pageslide.is(':visible') && $pageslide.data( 'direction' ) != settings.direction) { |
|
155 |
+ $.pageslide.close(function(){ |
|
156 |
+ _load( settings.href, settings.iframe ); |
|
157 |
+ _start( settings.direction, settings.speed ); |
|
158 |
+ }); |
|
159 |
+ } else { |
|
160 |
+ _load( settings.href, settings.iframe ); |
|
161 |
+ if( $pageslide.is(':hidden') ) { |
|
162 |
+ _start( settings.direction, settings.speed ); |
|
163 |
+ } |
|
164 |
+ } |
|
165 |
+ |
|
166 |
+ $pageslide.data( settings ); |
|
167 |
+ } |
|
168 |
+ |
|
169 |
+ // Close the pageslide |
|
170 |
+ $.pageslide.close = function( callback ) { |
|
171 |
+ var $pageslide = $('#pageslide'), |
|
172 |
+ slideWidth = $pageslide.outerWidth( true ), |
|
173 |
+ speed = $pageslide.data( 'speed' ), |
|
174 |
+ bodyAnimateIn = {}, |
|
175 |
+ slideAnimateIn = {} |
|
176 |
+ |
|
177 |
+ // If the slide isn't open, just ignore the call |
|
178 |
+ if( $pageslide.is(':hidden') || _sliding ) return; |
|
179 |
+ _sliding = true; |
|
180 |
+ |
|
181 |
+ switch( $pageslide.data( 'direction' ) ) { |
|
182 |
+ case 'left': |
|
183 |
+ // bodyAnimateIn['margin-left'] = '+=' + slideWidth; |
|
184 |
+ slideAnimateIn['right'] = '-=' + slideWidth; |
|
185 |
+ break; |
|
186 |
+ default: |
|
187 |
+ bodyAnimateIn['margin-left'] = '-=' + slideWidth; |
|
188 |
+ slideAnimateIn['left'] = '-=' + slideWidth; |
|
189 |
+ break; |
|
190 |
+ } |
|
191 |
+ |
|
192 |
+ $pageslide.animate(slideAnimateIn, speed); |
|
193 |
+ $body.animate(bodyAnimateIn, speed, function() { |
|
194 |
+ $pageslide.hide(); |
|
195 |
+ _sliding = false; |
|
196 |
+ if( typeof callback != 'undefined' ) callback(); |
|
197 |
+ }); |
|
198 |
+ |
|
199 |
+ $(".left-menu").show(200); |
|
200 |
+ } |
|
201 |
+ |
|
202 |
+ /* Events */ |
|
203 |
+ |
|
204 |
+ // Don't let clicks to the pageslide close the window |
|
205 |
+ $pageslide.on('click.pageslide', function(e) { |
|
206 |
+ e.stopPropagation(); |
|
207 |
+ }); |
|
208 |
+ |
|
209 |
+ // Close the pageslide if the document is clicked or the users presses the ESC key, unless the pageslide is modal |
|
210 |
+ $(document).bind('click keyup', function(e) { |
|
211 |
+ // If this is a keyup event, let's see if it's an ESC key |
|
212 |
+ if( e.type == "keyup" && e.keyCode != 27) return; |
|
213 |
+ |
|
214 |
+ // Make sure it's visible, and we're not modal |
|
215 |
+ if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) ) { |
|
216 |
+ $.pageslide.close(); |
|
217 |
+ } |
|
218 |
+ }); |
|
219 |
+ |
|
220 |
+}); |
--- public/javascripts/service/yobi.board.List.js
+++ public/javascripts/service/yobi.board.List.js
... | ... | @@ -1,23 +1,4 @@ |
1 |
-/** |
|
2 |
- * Yobi, Project Hosting SW |
|
3 |
- * |
|
4 |
- * Copyright 2012 NAVER Corp. |
|
5 |
- * http://yobi.io |
|
6 |
- * |
|
7 |
- * @author Ahn Hyeok Jun |
|
8 |
- * |
|
9 |
- * Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
- * you may not use this file except in compliance with the License. |
|
11 |
- * You may obtain a copy of the License at |
|
12 |
- * |
|
13 |
- * http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
- * |
|
15 |
- * Unless required by applicable law or agreed to in writing, software |
|
16 |
- * distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
- * See the License for the specific language governing permissions and |
|
19 |
- * limitations under the License. |
|
20 |
- */ |
|
1 |
+ |
|
21 | 2 |
(function(ns){ |
22 | 3 |
|
23 | 4 |
var oNS = $yobi.createNamespace(ns); |
... | ... | @@ -44,6 +25,7 @@ |
44 | 25 |
_initPagination(htOptions); |
45 | 26 |
_initImplicitTitlePrefix(); |
46 | 27 |
_listHoverEffect(); |
28 |
+ _initTwoColumnMode(); |
|
47 | 29 |
} |
48 | 30 |
|
49 | 31 |
function _listHoverEffect(){ |
--- public/javascripts/service/yobi.issue.List.js
+++ public/javascripts/service/yobi.issue.List.js
... | ... | @@ -46,6 +46,7 @@ |
46 | 46 |
_initPjax(); |
47 | 47 |
_initImplicitTitlePrefix(); |
48 | 48 |
_listHoverEffect(); |
49 |
+ _initTwoColumnMode(); |
|
49 | 50 |
|
50 | 51 |
htInitialOptions = htOptions || {}; |
51 | 52 |
} |
... | ... | @@ -250,6 +251,7 @@ |
250 | 251 |
_initImplicitTitlePrefix(); |
251 | 252 |
_addEventAtOrganizationIssueSearchPage(); |
252 | 253 |
_listHoverEffect(); |
254 |
+ _initTwoColumnMode(); // yona.twoColumnMode.js |
|
253 | 255 |
} |
254 | 256 |
|
255 | 257 |
function _listHoverEffect(){ |
+++ public/javascripts/service/yona.twoColumnMode.js
... | ... | @@ -0,0 +1,59 @@ |
1 | +/** | |
2 | + * Yona, 21st Century Project Hosting SW | |
3 | + * <p> | |
4 | + * Copyright Yona & Yobi Authors & NAVER Corp. | |
5 | + * https://yona.io | |
6 | + **/ | |
7 | +function _initTwoColumnMode(){ | |
8 | + var $twoColumnMode = $("#two-column-mode"); | |
9 | + var useTwoColumnMode = localStorage.getItem('useTwoColumnMode'); | |
10 | + var $title = $('.title'); | |
11 | + | |
12 | + $('#two-column-mode-checkbox').popover({trigger: "hover", placement: "top", delay: { show: 1000, hide: 100 }}); | |
13 | + | |
14 | + if( useTwoColumnMode === 'true'){ | |
15 | + attachPageSlideEvent($twoColumnMode, $title); | |
16 | + bindFrameLoading(); | |
17 | + } else { | |
18 | + $twoColumnMode.prop('checked', false); | |
19 | + $('.post-item').css("cursor", ""); | |
20 | + unbindEvents(); | |
21 | + } | |
22 | + | |
23 | + $twoColumnMode.on('click', function () { | |
24 | + console.log('this.checked', this.checked); | |
25 | + if(this.checked){ | |
26 | + localStorage.setItem('useTwoColumnMode', true); | |
27 | + attachPageSlideEvent($twoColumnMode, $title); | |
28 | + bindFrameLoading(); | |
29 | + } else { | |
30 | + localStorage.setItem('useTwoColumnMode', false); | |
31 | + $('.post-item').css("cursor", ""); | |
32 | + unbindEvents(); | |
33 | + } | |
34 | + }); | |
35 | + | |
36 | + //////////////////////////// | |
37 | + | |
38 | + function attachPageSlideEvent(twoColumnMode, title){ | |
39 | + twoColumnMode.prop('checked', true); | |
40 | + title.pageslide({direction: "left"}); | |
41 | + $('.post-item').css("cursor", "pointer"); | |
42 | + } | |
43 | + | |
44 | + function unbindEvents() { | |
45 | + $title.unbind('click.pageslide'); | |
46 | + $title.unbind('click.iframeLoading'); | |
47 | + } | |
48 | + | |
49 | + function bindFrameLoading() { | |
50 | + $title.on('click.iframeLoading', function () { | |
51 | + $(".left-menu").hide(200); | |
52 | + setTimeout(function () { | |
53 | + $('#pageslide > iframe').ready(function () { | |
54 | + NProgress.done(); | |
55 | + }); | |
56 | + }, 100); | |
57 | + }); | |
58 | + } | |
59 | +} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?