From b86785faec723343be710e1c79409358ac9165d6 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 25 Feb 2010 15:39:51 -0600 Subject: [PATCH] fixed saving code editor without toggling --- www/extras/yui-webgui/build/code-editor/code-editor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/extras/yui-webgui/build/code-editor/code-editor.js b/www/extras/yui-webgui/build/code-editor/code-editor.js index 41f593506..7908dff6d 100755 --- a/www/extras/yui-webgui/build/code-editor/code-editor.js +++ b/www/extras/yui-webgui/build/code-editor/code-editor.js @@ -316,6 +316,9 @@ ; YAHOO.widget.CodeEditor = function (id, cfg) { + // TODO: Make a cfg for off by default + this.editorState = "on"; + // Disable Editor configs that don't apply cfg["animate"] = false; cfg["dompath"] = false; @@ -399,12 +402,12 @@ if ( cfg["toggleButton"] ) { var editor = this; + // Add toggle button var button = document.createElement("input"); button.type = "button"; button.value = "Toggle Editor"; - button.editorState = "on"; Event.addListener( button, "click", function () { if ( editor.editorState == "off" ) {