From 235f210481bbe2b4662f3c938574b0929ad4eda5 Mon Sep 17 00:00:00 2001 From: yafeilee Date: Tue, 1 Apr 2014 23:29:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E4=BF=AE=E5=9D=91,=20?= =?UTF-8?q?=E4=B8=8D=E4=BD=BF=E7=94=A8=20ngmin,=20=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 1 - app/assets/javascripts/angularjs/about.js.coffee | 3 ++- app/assets/javascripts/angularjs/admin_posts.js.coffee | 3 ++- app/assets/javascripts/angularjs/admin_sessions.js.coffee | 3 ++- app/assets/javascripts/angularjs/archives.js.coffee | 3 ++- app/assets/javascripts/angularjs/comments.js.coffee | 3 ++- app/assets/javascripts/angularjs/likes.js.coffee | 3 ++- app/assets/javascripts/angularjs/qrcodes.js.coffee | 3 ++- 8 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index c248dad..ab2ee66 100644 --- a/Gemfile +++ b/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' diff --git a/app/assets/javascripts/angularjs/about.js.coffee b/app/assets/javascripts/angularjs/about.js.coffee index 9840c1f..1a19898 100644 --- a/app/assets/javascripts/angularjs/about.js.coffee +++ b/app/assets/javascripts/angularjs/about.js.coffee @@ -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 +] diff --git a/app/assets/javascripts/angularjs/admin_posts.js.coffee b/app/assets/javascripts/angularjs/admin_posts.js.coffee index ec2dc01..6364f2e 100644 --- a/app/assets/javascripts/angularjs/admin_posts.js.coffee +++ b/app/assets/javascripts/angularjs/admin_posts.js.coffee @@ -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 +] diff --git a/app/assets/javascripts/angularjs/admin_sessions.js.coffee b/app/assets/javascripts/angularjs/admin_sessions.js.coffee index 4b9360a..fe70983 100644 --- a/app/assets/javascripts/angularjs/admin_sessions.js.coffee +++ b/app/assets/javascripts/angularjs/admin_sessions.js.coffee @@ -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 +] diff --git a/app/assets/javascripts/angularjs/archives.js.coffee b/app/assets/javascripts/angularjs/archives.js.coffee index a7271ee..185614f 100644 --- a/app/assets/javascripts/angularjs/archives.js.coffee +++ b/app/assets/javascripts/angularjs/archives.js.coffee @@ -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 +] diff --git a/app/assets/javascripts/angularjs/comments.js.coffee b/app/assets/javascripts/angularjs/comments.js.coffee index 028050b..c347577 100644 --- a/app/assets/javascripts/angularjs/comments.js.coffee +++ b/app/assets/javascripts/angularjs/comments.js.coffee @@ -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) +] diff --git a/app/assets/javascripts/angularjs/likes.js.coffee b/app/assets/javascripts/angularjs/likes.js.coffee index 78d1fda..1c85fb5 100644 --- a/app/assets/javascripts/angularjs/likes.js.coffee +++ b/app/assets/javascripts/angularjs/likes.js.coffee @@ -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 +] diff --git a/app/assets/javascripts/angularjs/qrcodes.js.coffee b/app/assets/javascripts/angularjs/qrcodes.js.coffee index c55e2fa..e95ec76 100644 --- a/app/assets/javascripts/angularjs/qrcodes.js.coffee +++ b/app/assets/javascripts/angularjs/qrcodes.js.coffee @@ -1,3 +1,4 @@ -@app.controller 'QRCodesController', ($scope)-> +@app.controller 'QRCodesController', [ '$scope', ($scope)-> $scope.show = -> $scope.qrcode = ! $scope.qrcode +]