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:
parent
fc878876f4
commit
1974c19a55
@ -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'
|
||||||
});
|
});
|
||||||
|
@ -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;
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user