From 735b2ff157de8c52a7a8fe22088a932242753cca Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 12 Feb 2013 17:51:55 +0100 Subject: different order for the delete icon, disable export button if there are no feeds --- js/app.js | 60 ++++++++++++++---------------------------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) (limited to 'js') diff --git a/js/app.js b/js/app.js index dd2554653..4ddb6aec4 100644 --- a/js/app.js +++ b/js/app.js @@ -1606,39 +1606,6 @@ */ - angular.module('News').factory('_AddNewController', [ - 'Controller', function(Controller) { - var AddNewController; - return AddNewController = (function(_super) { - - __extends(AddNewController, _super); - - function AddNewController() { - return AddNewController.__super__.constructor.apply(this, arguments); - } - - return AddNewController; - - })(Controller); - } - ]); - - /* - # ownCloud news app - # - # @author Alessandro Cosentino - # @author Bernhard Posselt - # Copyright (c) 2012 - Alessandro Cosentino - # Copyright (c) 2012 - Bernhard Posselt - # - # This file is licensed under the Affero General Public License version 3 or - # later. - # - # See the COPYING-README file - # - */ - - angular.module('News').factory('Controller', function() { var Controller; return Controller = (function() { @@ -1667,8 +1634,8 @@ angular.module('News').controller('SettingsController', [ - '_SettingsController', '$scope', '$rootScope', 'ShowAll', 'PersistenceNews', 'FolderModel', 'FeedModel', 'OPMLParser', function(_SettingsController, $scope, $rootScope, ShowAll, PersistenceNews, FolderModel, FeedModel, OPMLParser) { - return new _SettingsController($scope, $rootScope, PersistenceNews, OPMLParser); + '_SettingsController', '$scope', '$rootScope', 'PersistenceNews', 'OPMLParser', 'FeedModel', function(_SettingsController, $scope, $rootScope, PersistenceNews, OPMLParser, FeedModel) { + return new _SettingsController($scope, $rootScope, PersistenceNews, OPMLParser, FeedModel); } ]); @@ -1684,12 +1651,6 @@ } ]); - angular.module('News').controller('AddNewController', [ - '_AddNewController', '$scope', function(_AddNewController, $scope) { - return new _AddNewController($scope); - } - ]); - /* # ownCloud news app # @@ -2157,16 +2118,14 @@ __extends(SettingsController, _super); - function SettingsController($scope, $rootScope, persistence, opmlParser) { + function SettingsController($scope, $rootScope, persistence, opmlParser, feedModel) { var _this = this; this.$scope = $scope; this.$rootScope = $rootScope; this.persistence = persistence; this.opmlParser = opmlParser; - this.add = false; - this.settings = false; - this.addingFeed = false; - this.addingFolder = false; + this.feedModel = feedModel; + this.$scope.feeds = this.feedModel.getItems(); this.$scope.$on('readFile', function(scope, fileContent) { var structure; structure = _this.opmlParser.parseXML(fileContent); @@ -2175,8 +2134,17 @@ this.$scope.$on('hidesettings', function() { return _this.$scope.showSettings = false; }); + this.$scope["export"] = function() { + return _this["export"](); + }; } + SettingsController.prototype["export"] = function() { + var url; + url = OC.Router.generate('news_export_opml'); + return window.open(url, '_blank'); + }; + SettingsController.prototype.parseOPMLStructure = function(structure, folderId) { var item, onError, onSuccess, _i, _len, _ref, _results, _this = this; -- cgit v1.2.3