1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-23 15:58:49 -05:00

Focus window after clicking on notification

This commit is contained in:
Tankred Hase 2014-09-17 14:43:53 +02:00
parent 86a87e26b8
commit 14294a5579
2 changed files with 8 additions and 5 deletions

View File

@ -82,19 +82,19 @@ module.exports = function(grunt) {
watch: {
css: {
files: ['src/sass/**/*.scss'],
tasks: ['dist-css']
tasks: ['dist-css', 'manifest']
},
js: {
files: ['src/js/**/*.js'],
tasks: ['copy:js', 'copy:integration']
tasks: ['copy:js', 'copy:integration', 'manifest']
},
lib: {
files: ['src/lib/**/*.js'],
tasks: ['copy:lib']
tasks: ['copy:lib', 'manifest']
},
app: {
files: ['src/*.js', 'src/**/*.html', 'src/**/*.json', 'src/img/**/*', 'src/font/**/*'],
tasks: ['copy:app', 'copy:ca', 'copy:tpl', 'copy:img', 'copy:font', 'manifest-dev']
tasks: ['copy:app', 'copy:ca', 'copy:tpl', 'copy:img', 'copy:font', 'manifest-dev', 'manifest']
}
},
copy: {

View File

@ -38,7 +38,10 @@ define(function(require) {
body: options.message,
icon: cfg.iconPath
});
notification.onclick = options.onClick;
notification.onclick = function() {
window.focus();
options.onClick();
};
if (options.timeout > 0) {
setTimeout(function() {