Skip to content

Commit c01876b

Browse files
committed
Fix bugs and update version
1 parent 88f77b0 commit c01876b

File tree

13 files changed

+37
-58
lines changed

13 files changed

+37
-58
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ionic-nodeclub",
33
"private": true,
44
"dependencies": {
5-
"ionic": "driftyco/ionic-bower#1.0.0-rc.4",
5+
"ionic": "driftyco/ionic-bower#1.0.0",
66
"restangular": "~1.5.1",
77
"angular-moment": "~0.9.2",
88
"angular-elastic": "~2.4.2",

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<widget id="me.zko.ionicnodeclub" version="0.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget id="me.zko.ionicnodeclub" version="0.0.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>Ionic Nodeclub</name>
44
<description>
55
一个Nodeclub开源社区系统的手机客户端;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ionic-nodeclub",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "An Ionic project",
55
"dependencies": {},
66
"devDependencies": {

www/app/configs/constant.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ angular.module('ionic-nodeclub')
3131
TOPICS_PAGE_LIMIT: 15 # 每次加载topics为30个
3232
LATEST_REPLIES_DEFAULT_NUM: 30 # 最新回复默认显示30个
3333
POP_REPLIES_TRIGGER_NUM: 10 # 有10个回复以上才显示最赞回复
34-
POP_REPLIES_LIMIT: 5 # 最赞回复默认显示5个
34+
POP_REPLIES_LIMIT: 3 # 最赞回复默认显示3个
3535
TOAST_SHORT_DELAY: 2000 # 短的toast显示时长为2秒
3636
TOAST_LONG_DELAY: 3500 # 长的toast显示时长为3.5秒
3737

www/app/messages/messages.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
66
</ion-nav-buttons>
77
<ion-content overflow-scroll="true">
88

9-
<!--<ion-refresher pulling-text="下拉刷新..."-->
10-
<!--pulling-icon="ion-ios-arrow-down"-->
11-
<!--spinner="spiral"-->
12-
<!--on-refresh="doRefresh()">-->
9+
<!--<ion-refresher on-refresh="doRefresh()">-->
1310
<!--</ion-refresher>-->
1411

1512
<!-- 提示信息 -->
1613
<div class="text-center padding"
1714
ng-if="loading">
18-
<ion-spinner icon="spiral"></ion-spinner>
15+
<ion-spinner></ion-spinner>
1916
<p>加载中...</p>
2017
</div>
2118
<div class="padding text-center"
@@ -45,6 +42,5 @@
4542

4643
<!-- 标记为已读的按钮 -->
4744
<button class="button-float button button-stable icon icon-done-all"
48-
ng-if="!hasnot_read_messages.length"
4945
ng-click="markAsRead()"></button>
5046
</ion-view>

www/app/replies/replies.controller.coffee

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,11 @@ angular.module('ionic-nodeclub')
129129
authService.withAuthUser (authUser) ->
130130
$ionicLoading.show()
131131
topicService.sendReply($stateParams.topicId, $scope.newReply, authUser)
132-
.then $scope.clearNewReply
133-
.finally $ionicLoading.hide
132+
.then ->
133+
$scope.clearNewReply()
134+
$scope.doRefresh()
135+
.finally ->
136+
$ionicLoading.hide()
134137

135138
showSendAction: ->
136139
$ionicActionSheet.show

www/app/replies/replies.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@
1010
</ion-nav-buttons>
1111
<ion-content delegate-handle="replies-handle"
1212
overflow-scroll="true">
13-
<!--<ion-refresher pulling-text="下拉刷新..."-->
14-
<!--pulling-icon="ion-ios-arrow-down"-->
15-
<!--spinner="spiral"-->
16-
<!--on-refresh="doRefresh()">-->
13+
<!--<ion-refresher on-refresh="doRefresh()">-->
1714
<!--</ion-refresher>-->
1815

1916
<!-- 提示信息 -->
2017
<div class="text-center padding"
2118
ng-if="loading">
22-
<ion-spinner icon="spiral"></ion-spinner>
19+
<ion-spinner></ion-spinner>
2320
<p>加载中...</p>
2421
</div>
2522
<div class="padding text-center"

www/app/settings/settings.html

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,17 @@
44
<ion-content>
55
<div class="list">
66

7-
<div class="item item-toggle">
7+
<ion-toggle class="toggle-positive"
8+
ng-model="settings.popRepliesVisible"
9+
ng-change="updateSettings()">
810
是否显示最热回复
9-
<label class="toggle toggle-positive">
10-
<input type="checkbox"
11-
ng-model="settings.popRepliesVisible"
12-
ng-change="updateSettings()">
13-
<div class="track">
14-
<div class="handle"></div>
15-
</div>
16-
</label>
17-
</div>
11+
</ion-toggle>
1812

19-
<div class="item item-toggle">
20-
倒序显示最新回复
21-
<label class="toggle toggle-positive">
22-
<input type="checkbox"
23-
ng-model="settings.latestRepliesDesc"
24-
ng-change="updateSettings()">
25-
<div class="track">
26-
<div class="handle"></div>
27-
</div>
28-
</label>
29-
</div>
13+
<ion-toggle class="toggle-positive"
14+
ng-model="settings.latestRepliesDesc"
15+
ng-change="updateSettings()">
16+
倒序显示最新回复
17+
</ion-toggle>
3018

3119
<div class="item"
3220
ng-if="appVersion">

www/app/topic/topic.controller.coffee

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,28 +53,28 @@ angular.module('ionic-nodeclub')
5353
showTopicAction: ->
5454
$ionicActionSheet.show
5555
buttons: [
56-
text: '话题回复'
56+
text: '在浏览器中打开'
5757
,
58-
text: if !$scope.isCollected then '收藏话题' else '取消收藏'
58+
text: '重新加载'
5959
,
6060
text: '关于作者'
6161
,
62-
text: '刷新一下'
62+
text: if !$scope.isCollected then '收藏话题' else '取消收藏'
6363
,
64-
text: '在浏览器中打开'
64+
text: '回复话题'
6565
]
6666
buttonClicked: (index) ->
6767
switch index
6868
when 0
69-
$state.go 'app.replies', topicId:$stateParams.topicId
69+
window.open "#{API.server}/topic/#{$stateParams.topicId}", '_system'
7070
when 1
71-
collectTopic()
71+
loadTopic(refresh = true)
7272
when 2
7373
$state.go 'app.user', loginname: $scope.topic.author.loginname
7474
when 3
75-
loadTopic(refresh = true)
75+
collectTopic()
7676
else
77-
window.open "#{API.server}/topic/#{$stateParams.topicId}", '_system'
77+
$state.go 'app.replies', topicId:$stateParams.topicId
7878
return true
7979

8080
# 我在获取这个主题的内容

www/app/topic/topic.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@
99
</button>
1010
</ion-nav-buttons>
1111
<ion-content overflow-scroll="true">
12-
<!--<ion-refresher pulling-text="下拉刷新..."-->
13-
<!--pulling-icon="ion-ios-arrow-down"-->
14-
<!--spinner="spiral"-->
15-
<!--on-refresh="doRefresh()">-->
12+
<!--<ion-refresher on-refresh="doRefresh()">-->
1613
<!--</ion-refresher>-->
1714

1815
<!-- 提示信息 -->
1916
<div class="text-center padding"
2017
ng-if="loading">
21-
<ion-spinner icon="spiral"></ion-spinner>
18+
<ion-spinner></ion-spinner>
2219
<p>加载中...</p>
2320
</div>
2421

0 commit comments

Comments
 (0)