How to use the ember-notify.warning function in ember-notify

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 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 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);
				};
github phanime / phanime / phanime / app / controllers / producers / add.js View on Github external
var onFailure = function(response) {

				var msg;
				
				if (response.message) {
					msg = response.message;
				} else {
					msg = "Something went wrong, producer was not added.";
				}

				console.log(msg);
				Notify.warning(msg);
			};
github phanime / phanime / phanime / app / controllers / application.js View on Github external
$.post('/api/v1/requestInvite', {email: email, username: username}, function(data) {
					
					if (data.username) {
						console.log(data.username[0]);
						Notify.warning(data.username[0]);
					}

					if (data.email) {
						Notify.warning(data.email[0]);
					}
					
					if ( data === undefined || data === '' ) {
						Notify.success('Invite request received.');
					}


				}).fail(function() {
					Notify.warning('Something went wrong, invite request was not received.');