pnotify

Why PNotify option `after_open` doesn't work?

三世轮回 提交于 2019-12-25 01:33:19
问题 I finded similar question But property after_open doesn't work I use webpack and npm pnotify package with next code: entry.js 'use strict'; let PNotify = require('pnotify'); PNotify.prototype.options.styling = 'bootstrap3'; (new PNotify({ //... after_open(ui) {console.log('after_open');}, //... })); Notification show, but without after_open Where is the problem? 回答1: For using callbacks need include (extra pnotify module) 'use strict'; let PNotify = require('pnotify'); require('pnotify/dist

How to set foucs on button in Pnotify

孤者浪人 提交于 2019-12-24 04:49:10
问题 i am using pnotify alert jquery in my project. i am trying to set focus on ok button when dialog box popup. so that user can simply hit enter or space bar to close the dialog box. but unable to do that. This is link of pnotify My code - function AlertAskOk(Heading, Message, type, okclick) { var modal_overlay; info_box = $.pnotify({ title: Heading, text: Message, type: type, buttons: 'ok', okclick: okclick, icon: "picon picon-object-order-raise", delay: 20000, history: false, stack: false, //

Uncaught SyntaxError: Unexpected token = in Google Chrome

笑着哭i 提交于 2019-12-18 05:37:24
问题 I have a javascript function which accept an optional parameter. This works fine in Firefox , but in Google Chrome it shows:- Uncaught SyntaxError: Unexpected token = My Code, function errorNotification(text = "Something went wrong!") { $.pnotify({ title: 'Error', text: text, type: 'error' }); } I have seen lot of similar questions but I can't realize my problem. 回答1: You are using a default parameter feature which is supported only by Firefox now. function errorNotification(text) { text =

Rails turbolinks breaking pnotify

坚强是说给别人听的谎言 提交于 2019-12-10 11:24:53
问题 In my rails application, I have it so that when you vote, subscribe or unsubscribe from a list, it will show a popup using pnotify. This works fine until the user navigates to a different page, and now it is no longer working. This only works when page is loaded or reloaded. I know this is because turbolinks in a rails 4 application but it seems to execute all my other javascript code apart from the pnotify. Additional info.. The subscribe/unsubscribe and vote buttons have the method post and

Rails turbolinks breaking pnotify

心已入冬 提交于 2019-12-06 08:51:20
In my rails application, I have it so that when you vote, subscribe or unsubscribe from a list, it will show a popup using pnotify. This works fine until the user navigates to a different page, and now it is no longer working. This only works when page is loaded or reloaded. I know this is because turbolinks in a rails 4 application but it seems to execute all my other javascript code apart from the pnotify. Additional info.. The subscribe/unsubscribe and vote buttons have the method post and are executed remotely which means I have a seperate file names subscribe.js.erb, unsubscribe.js.erb

Uncaught SyntaxError: Unexpected token = in Google Chrome

此生再无相见时 提交于 2019-11-29 09:14:34
I have a javascript function which accept an optional parameter. This works fine in Firefox , but in Google Chrome it shows:- Uncaught SyntaxError: Unexpected token = My Code, function errorNotification(text = "Something went wrong!") { $.pnotify({ title: 'Error', text: text, type: 'error' }); } I have seen lot of similar questions but I can't realize my problem. Arun P Johny You are using a default parameter feature which is supported only by Firefox now. function errorNotification(text) { text = text || "Something went wrong!"; $.pnotify({ title: 'Error', text: text, type: 'error' }); }