From f6ee5cf6802a602e3248e7948f270a17f3dcad7e Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Tue, 11 Jun 2013 16:41:37 -0400 Subject: [PATCH] rename view.save() to view.setValues() to make it clearer that it doesn't persist values to the server --- cms/templates/textbooks.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cms/templates/textbooks.html b/cms/templates/textbooks.html index 874c1b5cf9..4c31adb5c4 100644 --- a/cms/templates/textbooks.html +++ b/cms/templates/textbooks.html @@ -117,7 +117,7 @@ CMS.Views.TextbookEdit = Backbone.View.extend({ return this; }, events: { - "submit": "saveAndClose", + "submit": "setAndClose", "click .action-cancel": "cancel", "click .action-add-chapter": "createChapter" }, @@ -131,10 +131,10 @@ CMS.Views.TextbookEdit = Backbone.View.extend({ }, createChapter: function(e) { if(e && e.preventDefault) { e.preventDefault(); } - this.save(); + this.setValues(); this.model.get('chapters').add([{}]); }, - save: function() { + setValues: function() { var name = this.$("#textbook-name-input").val(); var textbook = this.model; textbook.set("name", name); @@ -147,9 +147,9 @@ CMS.Views.TextbookEdit = Backbone.View.extend({ }); return this; }, - saveAndClose: function(e) { + setAndClose: function(e) { if(e && e.preventDefault) { e.preventDefault(); } - this.save(); + this.setValues(); msg = new CMS.Models.SystemFeedback({ intent: "saving", title: gettext("Saving…")