summaryrefslogtreecommitdiffstats
path: root/js/app/controllers
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-19 12:31:54 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-19 12:31:54 +0200
commit67e00e798d85d897e4793077aa14bcb4fb3d1765 (patch)
tree1a808c1a9a2330ffc5f201bcf62fb546cc658a7d /js/app/controllers
parented3990b46bcb048963bbfcb567656e82d8686796 (diff)
added javascript for uploading google reader json files
Diffstat (limited to 'js/app/controllers')
-rw-r--r--js/app/controllers/settingscontroller.coffee12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/app/controllers/settingscontroller.coffee b/js/app/controllers/settingscontroller.coffee
index a1632a761..ef282c900 100644
--- a/js/app/controllers/settingscontroller.coffee
+++ b/js/app/controllers/settingscontroller.coffee
@@ -37,4 +37,16 @@ angular.module('News').controller 'SettingsController',
console.error error
$scope.error = true
+
+ $scope.importGoogleReader = (fileContent) =>
+ $scope.jsonError = false
+ ShowAll.setShowAll(true)
+
+ try
+ parsedJSON = JSON.parse(fileContent)
+ FeedBusinessLayer.importGoogleReader(parsedJSON)
+ catch error
+ console.error error
+ $scope.jsonError = true
+
] \ No newline at end of file