From 093f9a58e85141f965ad7293359c95ac4ee6d621 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Wed, 2 Oct 2013 13:11:18 +0200 Subject: [PATCH] move gmail folders to app-config --- src/js/app-config.js | 23 ++++++++++++++++++++++- src/js/controller/navigation.js | 26 ++++---------------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/js/app-config.js b/src/js/app-config.js index d833e863..f1b7063b 100644 --- a/src/js/app-config.js +++ b/src/js/app-config.js @@ -26,7 +26,28 @@ define([], function() { secure: true, port: 465, host: 'smtp.gmail.com' - } + }, + folders: [{ + type: 'Inbox', + count: undefined, + path: 'INBOX' + }, { + type: 'Sent', + count: undefined, + path: '[Gmail]/Gesendet' + }, { + type: 'Outbox', + count: undefined, + path: 'OUTBOX' + }, { + type: 'Drafts', + count: undefined, + path: '[Gmail]/Entw&APw-rfe' + }, { + type: 'Trash', + count: undefined, + path: '[Gmail]/Papierkorb' + }] } }; diff --git a/src/js/controller/navigation.js b/src/js/controller/navigation.js index b1c4e1d7..a5a4882c 100644 --- a/src/js/controller/navigation.js +++ b/src/js/controller/navigation.js @@ -1,29 +1,11 @@ -define(function() { +define(function(require) { 'use strict'; + var folders = require('js/app-config').config.gmail.folders; + var NavigationCtrl = function($scope) { $scope.navOpen = false; - $scope.folders = [{ - type: 'Inbox', - count: undefined, - path: 'INBOX' - }, { - type: 'Sent', - count: undefined, - path: '[Gmail]/Gesendet' - }, { - type: 'Outbox', - count: undefined, - path: 'OUTBOX' - }, { - type: 'Drafts', - count: undefined, - path: '[Gmail]/Entw&APw-rfe' - }, { - type: 'Trash', - count: undefined, - path: '[Gmail]/Papierkorb' - }]; + $scope.folders = folders; $scope.openNav = function() { $scope.navOpen = true;