Merge branch 'angularjs_production_fix'
This commit is contained in:
commit
927e7f49d5
1
Gemfile
1
Gemfile
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -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)
|
||||
]
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
@app.controller 'QRCodesController', ($scope)->
|
||||
@app.controller 'QRCodesController', [ '$scope', ($scope)->
|
||||
$scope.show = ->
|
||||
$scope.qrcode = ! $scope.qrcode
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue