Skip to content

Commit

Permalink
增加ngTouchHref;增加scroller
Browse files Browse the repository at this point in the history
  • Loading branch information
binnng committed Aug 6, 2014
1 parent d69da97 commit 9e6e19e
Show file tree
Hide file tree
Showing 30 changed files with 607 additions and 166 deletions.
3 changes: 3 additions & 0 deletions app/scripts/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Mifan = angular.module "mifan", [
"ngResource"
"ngSanitize"
"ngRoute"
"ngTouch"
"ngTouchHref"
"binnng.scroller"
]

Mifan.config ($routeProvider, $locationProvider) ->
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 66 additions & 46 deletions app/scripts/controllers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 26 additions & 13 deletions app/scripts/controllers/head.coffee
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
"use strict"
Mifan.controller "headCtrl", ($scope) ->

$scope.dropdownOpen = no

$scope.toggleDropdown = -> $scope.dropdownOpen = not $scope.dropdownOpen;

$scope.support = ->
alert 1

$scope.navs = [
{page: "home", text: "首页"}
{page: "msg", text: "消息"}
{page: "me", text: "个人主页"}
{page: "friend", text: "朋友"}
{page: "hot", text: "排行"}
{page: "feedback", text: "反馈"}
]




# 导航三角形
$scope.arrowNav = {}
# $scope.arrowNav = {}

$scope.$watch "page", ->
# $scope.$watch "page", ->

switch $scope.page
when "home"
$scope.arrowNav = left: 23, hide: no
when "msg"
$scope.arrowNav = left: 90, hide: no
when "me"
$scope.arrowNav = left: 176, hide: no
when "friend"
$scope.arrowNav = left: 260, hide: no
else
$scope.arrowNav = left: 0, hide: yes
# switch $scope.page
# when "home"
# $scope.arrowNav = left: 23, hide: no
# when "msg"
# $scope.arrowNav = left: 90, hide: no
# when "me"
# $scope.arrowNav = left: 176, hide: no
# when "friend"
# $scope.arrowNav = left: 260, hide: no
# else
# $scope.arrowNav = left: 0, hide: yes
49 changes: 20 additions & 29 deletions app/scripts/controllers/head.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 35 additions & 21 deletions app/scripts/controllers/home_news.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,45 @@
Mifan.controller "homeNews", ($scope) ->
# ajax取到数据进行缓存,用户手动刷新
$scope.content = "最新动态"
console.log "最新动态"

$scope.newsCollect = [
{
a: 1
},
{
a: 2
},
{
a: 2
},
{
a: 2
},
{
a: 2
},
{
a: 2
},
ques:
id: 1
username: "依然大头"
face: "http://mifan.us/cache/user/0/0/48/7dfecd76fb_48_48.png"
text: "女朋友要过生日了,买个什么礼物呢? 具体一些哈~~大谢!"

ans:
id: 2
username: "老婆婆"
face: "http://mifan.us/cache/user/0/0/48/6c9e391e64_48_48.jpg"
text: "买一个上市公司送她,让她做老板。"
}
{
a: 2
},
ques:
id: 1
username: "依然大头"
face: "http://mifan.us/cache/user/0/0/48/7dfecd76fb_48_48.png"
text: "女朋友要过生日了,买个什么礼物呢? 具体一些哈~~大谢!"

ans:
id: 2
username: "老婆婆"
face: "http://mifan.us/cache/user/0/0/48/6c9e391e64_48_48.jpg"
text: "买一个上市公司送她,让她做老板。"
}
{
a: 2
ques:
id: 1
username: "依然大头"
face: "http://mifan.us/cache/user/0/0/48/7dfecd76fb_48_48.png"
text: "女朋友要过生日了,买个什么礼物呢? 具体一些哈~~大谢!"

ans:
id: 2
username: "老婆婆"
face: "http://mifan.us/cache/user/0/0/48/6c9e391e64_48_48.jpg"
text: "买一个上市公司送她,让她做老板。"
}
]
Loading

0 comments on commit 9e6e19e

Please sign in to comment.