How to use the pnotify.prototype function in pnotify

To help you get started, we’ve selected a few pnotify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bluecolor / octopus / frontend / src / lib / notify.js View on Github external
import PNotify from 'pnotify'
import 'pnotify/dist/pnotify.desktop'

PNotify.prototype.options.styling = 'fontawesome'
PNotify.desktop.permission()

const success = (message) => {
  new PNotify({ // eslint-disable-line no-new
    title: 'Success',
    type: 'success',
    text: message
  })
}

const error = (message) => {
  new PNotify({ // eslint-disable-line no-new
    title: 'Error',
    type: 'error',
    text: message
  })
github voxmedia / autotune / appjs / views / application.js View on Github external
"use strict";

var $ = require('jquery'),
    _ = require('underscore'),
    Backbone = require('backbone'),
    PNotify = require('pnotify'),
    logger = require('../logger'),
    helpers = require('../helpers'),
    BaseView = require('./base_view');

// Set PNotify to use bootstrap
PNotify.prototype.options.styling = "bootstrap3";
// Load PNotify buttons component
require('pnotify/src/pnotify.buttons');

var Application = BaseView.extend(require('./mixins/links.js'), {
  className: 'container-fluid',
  template: require('../templates/application.ejs'),
  alertDefaults: {
    addclass: "stack-bottomright",
    stack: { dir1: "up", dir2: "left", firstpos1: 25, firstpos2: 25 },
    buttons: { sticker: false }
  },

  afterInit: function() {
    // Show or hide spinner on loading events
    this.listenTo(this.app, 'loadingStart', this.spinStart, this);
    this.listenTo(this.app, 'loadingStop', this.spinStop, this);
github tagbangers / wallride / wallride-ui-admin / src / app.js View on Github external
import 'froala-editor/css/plugins/image.css';
import 'froala-editor/css/plugins/image_manager.css';
import 'froala-editor/css/plugins/line_breaker.css';
import 'froala-editor/css/plugins/quick_insert.css';
import 'froala-editor/css/plugins/table.css';
import 'froala-editor/css/plugins/video.css';

import moment from 'moment';
window.moment = moment;

import 'select2';
import 'select2/select2.css';

import PNotify from 'pnotify';
import 'pnotify/dist/pnotify.css';
PNotify.prototype.options.styling = "bootstrap3";
window.PNotify = PNotify;

import './resources/js/jquery.shiftcheckbox';
import './resources/js/jquery.mjs.nestedSortable';
import './resources/js/common'

import './resources/css/flaticon.css';
import './resources/css/wallride.css';