How to use ember-notify - 10 common examples

To help you get started, we’ve selected a few ember-notify 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 phanime / phanime / phanime / app / controllers / account / security.js View on Github external
$.post('/api/v1/changePassword/' + this.get('session.currentUser.id'), {existingPassword: this.get('existingPassword'), newPassword: this.get('newPassword')}, function(data) {
					console.log(data);

					if (data.existingPassword) {
						Notify.warning(data.existingPassword);
					} else if (data.user) {
						Notify.success('The password was successfully changed.');
						
						// Reset the fields to null/blank
						self.set('existingPassword', null);
						self.set('newPassword', null);
						self.set('confirmPassword', null);
					}

				});
github adopted-ember-addons / ember-notify / addon / components / ember-notify / message.js View on Github external
init() {
    this._super(...arguments);

    // Indicate that the message is now being displayed
    if (this.message.visible === undefined) {
      // Should really be in didInsertElement but Glimmer doesn't allow this
      this.set('message.visible', true);
    }

    this.run = Runner.create({ disabled: !Notify.testing });
  },
github phanime / phanime / phanime / app / controllers / producers / add.js View on Github external
add_producer: function() {

			var store = this.store;
			var self = this;

			// Some shitty validation, real validation on the server
			if (!this.get('name')) {
				Notify.warning('Please ensure the name of the producer is filled out.');
				return;
			}

			// Temporary way to convert empty string into null
			if (!this.get('description')) {
				this.set('description', null);
			}

			var producer = store.createRecord('producer', {
				producer_logo: this.get('producer_logo'),
				name: this.get('name').trim(),
				slug: this.get('slug'),
				description: this.get('description'),
			});
github phanime / phanime / phanime / app / controllers / account / security.js View on Github external
if (data.existingPassword) {
						Notify.warning(data.existingPassword);
					} else if (data.user) {
						Notify.success('The password was successfully changed.');
						
						// Reset the fields to null/blank
						self.set('existingPassword', null);
						self.set('newPassword', null);
						self.set('confirmPassword', null);
					}

				});


			} else {
				Notify.warning('New Password confirmation failed.');
			}


		}
	}
github adopted-ember-addons / ember-notify / qunit.js View on Github external
import Notify from 'ember-notify';

var App;

// avoid slowing down the tests
Notify.View.reopen({
  closeAfter: 0,
  removeAfter: 0
});

module('ember-notify', {
  setup: function() {
    Ember.run(function() {
      App = Ember.Application.create({
        rootElement: '#ember-testing'
      });
      App.setupForTesting();
      App.injectTestHelpers();
    });
  },
  teardown: function() {
    App.reset();
github phanime / phanime / phanime / app / controllers / account / personal-details.js View on Github external
var onFailure = function() {
					var msg = "Something went wrong, avatar was not updated";
					console.log(msg);
					Notify.warning(msg);
				};
github phanime / phanime / phanime / app / controllers / character.js View on Github external
var onFailure = function() {
				var msg = "Something went wrong, character was not updated.";
				console.log(msg);
				Notify.warning(msg);
			};
github phanime / phanime / phanime / app / controllers / person.js View on Github external
var onFailure = function() {
				var msg = "Something went wrong, person was not updated.";
				console.log(msg);
				Notify.warning(msg);
			};
github phanime / phanime / front / app / controllers / producers / add.js View on Github external
var onFailure = function(producer) {
				console.log('Failed');
				var msg = "Something went wrong, " + producer.get('name') + " was not added.";
				console.log(msg);
				Notify.warning(msg);
			};
github phanime / phanime / phanime / app / controllers / account / personal-details.js View on Github external
var onFailure = function() {
					var msg = "Something went wrong, profile banner was not updated";
					console.log(msg);
					Notify.warning(msg);
				};