1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-23 01:12:19 -05:00

open new window for write view

This commit is contained in:
Tankred Hase 2013-09-11 21:01:05 +02:00
parent fc878876f4
commit 1974c19a55
3 changed files with 23 additions and 2 deletions

View File

@ -1,7 +1,14 @@
// hey Angular, we're bootstrapping manually! // hey Angular, we're bootstrapping manually!
window.name = 'NG_DEFER_BOOTSTRAP!'; window.name = 'NG_DEFER_BOOTSTRAP!';
require(['angular', 'js/controller/message-list', 'angularRoute', 'angularTouch', 'js/app-config'], function(angular, MessageListCtrl) { require([
'angular',
'js/controller/message-list',
'js/controller/write',
'angularRoute',
'angularTouch',
'js/app-config'
], function(angular, MessageListCtrl, WriteCtrl) {
'use strict'; 'use strict';
var app = angular.module('mail', ['ngRoute', 'ngTouch']); var app = angular.module('mail', ['ngRoute', 'ngTouch']);
@ -14,6 +21,10 @@ require(['angular', 'js/controller/message-list', 'angularRoute', 'angularTouch'
templateUrl: 'tpl/read.html', templateUrl: 'tpl/read.html',
controller: MessageListCtrl controller: MessageListCtrl
}); });
$routeProvider.when('/write/:replyToId', {
templateUrl: 'tpl/write.html',
controller: WriteCtrl
});
$routeProvider.otherwise({ $routeProvider.otherwise({
redirectTo: '/folders/Inbox' redirectTo: '/folders/Inbox'
}); });

View File

@ -13,6 +13,16 @@ define(function(require) {
$scope.selected = email; $scope.selected = email;
}; };
$scope.write = function(replyTo) {
var replyToId = (replyTo) ? replyTo.uid : '';
chrome.app.window.create('index.html#/write/' + replyToId, {
'bounds': {
'width': 800,
'height': 600
}
});
};
if (true) { if (true) {
createDummyMails(function(emails) { createDummyMails(function(emails) {
$scope.emails = emails; $scope.emails = emails;

View File

@ -1,5 +1,5 @@
<div class="buttons"> <div class="buttons">
<div class="circle"> <div ng-click="write()" class="circle">
<div class="icon-new-mail"></div> <div class="icon-new-mail"></div>
</div> </div>