2013-09-17 13:11:30 -04:00
|
|
|
define(function() {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var NavigationCtrl = function($scope) {
|
|
|
|
$scope.navOpen = false;
|
|
|
|
|
|
|
|
$scope.openNav = function() {
|
|
|
|
$scope.navOpen = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.closeNav = function() {
|
|
|
|
$scope.navOpen = false;
|
|
|
|
};
|
2013-09-18 16:05:51 -04:00
|
|
|
|
|
|
|
$scope.write = function(replyTo) {
|
|
|
|
var replyToId = (replyTo) ? replyTo.uid : '',
|
|
|
|
url = 'index.html#/write/' + replyToId;
|
|
|
|
|
|
|
|
if (window.chrome && chrome.app.window) {
|
|
|
|
chrome.app.window.create(url, {
|
|
|
|
'bounds': {
|
2013-09-19 06:36:57 -04:00
|
|
|
'width': 720,
|
|
|
|
'height': 680
|
2013-09-18 16:05:51 -04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-09-19 06:36:57 -04:00
|
|
|
window.open(url, 'Compose Message', 'toolbar=no,width=720,height=680,left=500,top=200,status=no,scrollbars=no,resize=no');
|
2013-09-18 16:05:51 -04:00
|
|
|
};
|
2013-09-17 13:11:30 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
return NavigationCtrl;
|
|
|
|
});
|