mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 10:52:17 -05:00
open new window for write view
This commit is contained in:
parent
fc878876f4
commit
1974c19a55
@ -1,7 +1,14 @@
|
||||
// hey Angular, we're bootstrapping manually!
|
||||
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';
|
||||
|
||||
var app = angular.module('mail', ['ngRoute', 'ngTouch']);
|
||||
@ -14,6 +21,10 @@ require(['angular', 'js/controller/message-list', 'angularRoute', 'angularTouch'
|
||||
templateUrl: 'tpl/read.html',
|
||||
controller: MessageListCtrl
|
||||
});
|
||||
$routeProvider.when('/write/:replyToId', {
|
||||
templateUrl: 'tpl/write.html',
|
||||
controller: WriteCtrl
|
||||
});
|
||||
$routeProvider.otherwise({
|
||||
redirectTo: '/folders/Inbox'
|
||||
});
|
||||
|
@ -13,6 +13,16 @@ define(function(require) {
|
||||
$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) {
|
||||
createDummyMails(function(emails) {
|
||||
$scope.emails = emails;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="buttons">
|
||||
<div class="circle">
|
||||
<div ng-click="write()" class="circle">
|
||||
<div class="icon-new-mail"></div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user