success: function(model) {
					// Saving destroys a models submodels, as per this Backbone bug ticket...
					// https://github.com/jeromegn/Backbone.localStorage/issues/131
					// So we're reloading rather than self.render();
					// TODO: But - this seems to corrupt the screen regions
					//	Representation Tab -> Save -> Representation Tab -> Edit -> Cancel ???
					//Backbone.history.loadUrl();
					navigate('edit');

					overlay.alert('Your profile has been saved.');

				},
 overlay.alert('Your business card has been sent.', function() {
     //self.clearForm();
     navigate('contacts');
 });
 overlay.alert('Email address belongs to existing user', function() {
   navigate('contacts');
 });
 overlay.alert(msg, function() {
     navigate('contacts');
 });
 overlay.alert('The contact has been added.', function() {
     //self.clearForm();
     navigate('contacts');
 });
 closeMe: function() {
     window.location.hash = '#';
     navigate('/');
 }
Esempio n. 7
0
 sendMessage: function() {
 	navigate('messages', { rcpt: this.model.get("username") });
 },
 overlay.confirm('You are about to delete this project. Are you sure?', function(yes) {
     if (yes) {
         self.model.destroy();
         navigate('projects');
     }
 });