From de6ffba80673543d39ec7ef851fe9d1f7ab3a148 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Sun, 19 Nov 2006 23:01:32 +0000 Subject: Update trunk w/ latest Prototype and script.aculo.us git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/html/javascripts/controls.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'railties/html/javascripts/controls.js') diff --git a/railties/html/javascripts/controls.js b/railties/html/javascripts/controls.js index c81b25c757..8c273f874f 100644 --- a/railties/html/javascripts/controls.js +++ b/railties/html/javascripts/controls.js @@ -1,6 +1,6 @@ -// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// (c) 2005 Ivan Krstic (http://blogs.law.harvard.edu/ivan) -// (c) 2005 Jon Tirsen (http://www.tirsen.com) +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005, 2006 Ivan Krstic (http://blogs.law.harvard.edu/ivan) +// (c) 2005, 2006 Jon Tirsen (http://www.tirsen.com) // Contributors: // Richard Livsey // Rahul Bhargava @@ -473,6 +473,7 @@ Ajax.InPlaceEditor.prototype = { this.element = $(element); this.options = Object.extend({ + paramName: "value", okButton: true, okText: "ok", cancelLink: true, @@ -604,7 +605,7 @@ Ajax.InPlaceEditor.prototype = { var textField = document.createElement("input"); textField.obj = this; textField.type = "text"; - textField.name = "value"; + textField.name = this.options.paramName; textField.value = text; textField.style.backgroundColor = this.options.highlightcolor; textField.className = 'editor_field'; @@ -617,7 +618,7 @@ Ajax.InPlaceEditor.prototype = { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.obj = this; - textArea.name = "value"; + textArea.name = this.options.paramName; textArea.value = this.convertHTMLLineBreaks(text); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; -- cgit v1.2.3