summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-02-12 17:51:55 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-02-12 17:51:55 +0100
commit735b2ff157de8c52a7a8fe22088a932242753cca (patch)
tree8f65a5a35c525d84653b4aae71ac9258f61e5e16 /js
parent1f388ad3bc7e844bfea566214e442a2f10073146 (diff)
different order for the delete icon, disable export button if there are no feeds
Diffstat (limited to 'js')
-rw-r--r--js/app.js60
1 files changed, 14 insertions, 46 deletions
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 <cosenal@gmail.com>
- # Copyright (c) 2012 - Bernhard Posselt <nukeawhale@gmail.com>
- #
- # 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;