Merge branch 'phone_like_fix'
This commit is contained in:
commit
d9255068b7
|
@ -1,5 +1,5 @@
|
|||
@app.controller 'ArchivesController',[ '$scope', '$http', '$location', '$timeout', '$cookies', ($scope, $http, $location, $timeout, $cookies)->
|
||||
url = $location.absUrl() + ".json"
|
||||
url = window.location.pathname + ".json"
|
||||
start_with = $cookies.start_with if window.location.pathname == $cookies.start_with_type
|
||||
$http
|
||||
url: url
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
@app.controller 'CommentsController', ['$scope', '$http', '$location', '$timeout', ($scope, $http, $location, $timeout)->
|
||||
url = $location.absUrl() + "/comments.json"
|
||||
@app.controller 'CommentsController', ['$scope', '$http', '$location', '$timeout', '$cookies', ($scope, $http, $location, $timeout, $cookies)->
|
||||
url = window.location.pathname + "/comments.json"
|
||||
|
||||
$scope.name = $cookies.name
|
||||
$scope.email = $cookies.email
|
||||
|
||||
$http.get(url).success (data)->
|
||||
console.log data
|
||||
$scope.comments = data
|
||||
|
||||
$scope.publish_success = null
|
||||
|
||||
$scope.submit = ->
|
||||
$scope.submitting = true
|
||||
$cookies.name = $scope.name
|
||||
$cookies.email = $scope.email
|
||||
comment = { content: $scope.content, name: $scope.name, email: $scope.email }
|
||||
$http.post(url, comment)
|
||||
.success (res)->
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@app.controller 'LikesController', ['$scope', '$http', '$location', '$cookies', ($scope, $http, $location, $cookies)->
|
||||
url = $location.absUrl() + "/likes"
|
||||
url = window.location.pathname + "/likes"
|
||||
|
||||
$http.get url
|
||||
.success (res)->
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
if $scope.like
|
||||
$http
|
||||
url: $location.absUrl() + "/likes/#{$scope.like}/is_liked"
|
||||
url: window.location.pathname + "/likes/#{$scope.like}/is_liked"
|
||||
method: 'GET'
|
||||
.success (res)->
|
||||
if res == 'true'
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
line-height: 1.5;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
code {
|
||||
|
|
Loading…
Reference in New Issue