mirror of
https://github.com/moparisthebest/mail
synced 2024-11-23 01:12:19 -05:00
Focus window after clicking on notification
This commit is contained in:
parent
86a87e26b8
commit
14294a5579
@ -82,19 +82,19 @@ module.exports = function(grunt) {
|
|||||||
watch: {
|
watch: {
|
||||||
css: {
|
css: {
|
||||||
files: ['src/sass/**/*.scss'],
|
files: ['src/sass/**/*.scss'],
|
||||||
tasks: ['dist-css']
|
tasks: ['dist-css', 'manifest']
|
||||||
},
|
},
|
||||||
js: {
|
js: {
|
||||||
files: ['src/js/**/*.js'],
|
files: ['src/js/**/*.js'],
|
||||||
tasks: ['copy:js', 'copy:integration']
|
tasks: ['copy:js', 'copy:integration', 'manifest']
|
||||||
},
|
},
|
||||||
lib: {
|
lib: {
|
||||||
files: ['src/lib/**/*.js'],
|
files: ['src/lib/**/*.js'],
|
||||||
tasks: ['copy:lib']
|
tasks: ['copy:lib', 'manifest']
|
||||||
},
|
},
|
||||||
app: {
|
app: {
|
||||||
files: ['src/*.js', 'src/**/*.html', 'src/**/*.json', 'src/img/**/*', 'src/font/**/*'],
|
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: {
|
copy: {
|
||||||
|
@ -38,7 +38,10 @@ define(function(require) {
|
|||||||
body: options.message,
|
body: options.message,
|
||||||
icon: cfg.iconPath
|
icon: cfg.iconPath
|
||||||
});
|
});
|
||||||
notification.onclick = options.onClick;
|
notification.onclick = function() {
|
||||||
|
window.focus();
|
||||||
|
options.onClick();
|
||||||
|
};
|
||||||
|
|
||||||
if (options.timeout > 0) {
|
if (options.timeout > 0) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user