check chrome app or use demo data

This commit is contained in:
Tankred Hase 2013-09-11 23:50:20 +02:00
parent fa5c43d7cf
commit 4280de30c8
1 changed files with 10 additions and 3 deletions

View File

@ -15,8 +15,15 @@ define(function(require) {
};
$scope.write = function(replyTo) {
var replyToId = (replyTo) ? replyTo.uid : '';
chrome.app.window.create('index.html#/write/' + replyToId, {
var replyToId = (replyTo) ? replyTo.uid : '',
url = 'index.html#/write/' + replyToId;
if (!window.chrome) {
window.open(url, 'Compose Message', 'toolbar=no,width=800,height=600,left=500,top=200,status=no,scrollbars=no,resize=no');
return;
}
chrome.app.window.create(url, {
'bounds': {
'width': 800,
'height': 600
@ -24,7 +31,7 @@ define(function(require) {
});
};
if (true) {
if (!window.chrome) {
createDummyMails(function(emails) {
$scope.emails = emails;
$scope.select($scope.emails[0]);