Merge branch 'angularjs_production_fix'

This commit is contained in:
yafeilee 2014-04-01 23:30:10 +08:00
commit 927e7f49d5
8 changed files with 14 additions and 8 deletions

View File

@ -25,7 +25,6 @@ gem 'carrierwave-mongoid'
gem 'html_truncator'
gem 'nokogiri'
gem 'angularjs-rails'
gem 'ngmin-rails'
gem 'figaro'
gem 'rqrcode-with-patches', require: 'rqrcode'
gem 'sidekiq'

View File

@ -1,4 +1,4 @@
@app.controller 'AboutController', ($scope)->
@app.controller 'AboutController', [ '$scope', ($scope)->
$scope.type = null
$scope.click = (v)->
@ -8,3 +8,4 @@
$scope.type = v
$scope.weixin_click = ->
$scope.weixin = !$scope.weixin
]

View File

@ -1,4 +1,4 @@
@app.controller 'AdminPostsController', ($scope, $http, $location, $timeout, $cookies, $sce)->
@app.controller 'AdminPostsController', [ '$scope', '$http', '$location', '$timeout', '$cookies', ($scope, $http, $location, $timeout, $cookies)->
$scope.body_active = true
@ -18,3 +18,4 @@
$scope.labels += ", #{new_labels}"
else
$scope.labels = new_labels
]

View File

@ -1,4 +1,4 @@
@app.controller 'AdminSessionsController', ($scope, $http, $timeout)->
@app.controller 'AdminSessionsController', [ '$scope', '$http', '$timeout', ($scope, $http, $timeout)->
url = '/admin/sessions'
$scope.login = ->
@ -17,3 +17,4 @@
$timeout ->
$scope.error_msg = null
, 5000
]

View File

@ -1,4 +1,4 @@
@app.controller 'ArchivesController', ($scope, $http, $location, $timeout, $cookies)->
@app.controller 'ArchivesController',[ '$scope', '$http', '$location', '$timeout', '$cookies', ($scope, $http, $location, $timeout, $cookies)->
url = $location.absUrl() + ".json"
start_with = $cookies.start_with if window.location.pathname == $cookies.start_with_type
$http
@ -40,3 +40,4 @@
$scope.start_with = start_with
$cookies.start_with_type = window.location.pathname
$cookies.start_with = start_with
]

View File

@ -1,4 +1,4 @@
@app.controller 'CommentsController', ($scope, $http, $location, $timeout)->
@app.controller 'CommentsController', ['$scope', '$http', '$location', '$timeout', ($scope, $http, $location, $timeout)->
url = $location.absUrl() + "/comments.json"
$http.get(url).success (data)->
@ -23,3 +23,4 @@
.error (data)->
alert(data)
]

View File

@ -1,4 +1,4 @@
@app.controller 'LikesController', ($scope, $http, $location, $cookies)->
@app.controller 'LikesController', ['$scope', '$http', '$location', '$cookies', ($scope, $http, $location, $cookies)->
url = $location.absUrl() + "/likes"
$http.get url
@ -35,3 +35,4 @@
# anyway, clear cookie
delete $cookies["like"]
$scope.like = null
]

View File

@ -1,3 +1,4 @@
@app.controller 'QRCodesController', ($scope)->
@app.controller 'QRCodesController', [ '$scope', ($scope)->
$scope.show = ->
$scope.qrcode = ! $scope.qrcode
]