{I" class:ETI"ProcessedAsset;FI"logical_path;TI")blogelator/routes/posts_new_route.js;FI" pathname;TI"j/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/routes/posts_new_route.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+[¥SI" length;TiFI" digest;TI"%e970172c13645054e4a53f69018a4aa1;FI" source;TI"F(function() { "use strict"; App.PostsNewRoute = Ember.Route.extend({ actions: { willTransition: function(transition) { var record = this.get('controller.content'); // Allow transition if nothing is entered if (Ember.isEmpty(record.get('title')) && Ember.isEmpty(record.get('bodyMarkdown')) ) { record.destroyRecord(); return true; } // Confirm transition if there are unsaved changes if (record.get('isNew')) { if (confirm("Are you sure you want to lose unsaved changes?")) { record.destroyRecord(); return true; } else { transition.abort(); } } else { if (record.get('isDirty')) { if (confirm("Are you sure you want to lose unsaved changes?")) { record.rollback(); return true; } else { transition.abort(); } } else { return true; } } } }, model: function() { return this.store.createRecord('post'); }, renderTemplate: function() { this.render(); this.render('posts/_form_action_bar', { into: 'application', outlet: 'footer' }); } }); })(); ;TI"dependency_digest;TI"%71808526dc509556912c9285ddcc1f5a;FI"required_paths;T[I"j/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/routes/posts_new_route.js;FI"dependency_paths;T[{I" path;TI"j/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/routes/posts_new_route.js;FI" mtime;TI"2014-03-09T12:31:07-05:00;TI" digest;TI"%e970172c13645054e4a53f69018a4aa1;FI" _version;TI"%a56df69ef97ba4d9f1a23bf9b0add58a;F