Commits

Michael Shepanski  committed cc7ba1a

Fix references to this.options; Dont rename the options variable.

  • Participants
  • Parent commits 30fa130

Comments (0)

Files changed (1)

File wysiwym/wysiwym.js

     // Initialize the help syntax dropdown
     this.initializeHelp = function() {
         if (this.options.helpEnabled) {
-            this.options.containerHelp = options.containerHelp;
             if (this.options.containerHelp == undefined)
                 this.options.containerHelp = $("<div></div>").insertAfter(this.textarea);
             this.options.containerHelp.addClass(this.HELPCLASS);
 
     // Initialize the Help Toggle Button
     this.initializeHelpToggle = function() {
-        var options = this.options;
-        if (options.helpToggle) {
-            this.options.helpToggleElem = options.helpToggleElem;
+        if (this.options.helpToggle) {
             if (this.options.helpToggleElem == undefined)
-                this.options.helpToggleElem = $("<a href='#'>"+ options.helpTextShow +"</a>");
+                this.options.helpToggleElem = $("<a href='#'>"+ this.options.helpTextShow +"</a>");
             this.options.helpToggleElem.addClass(this.HELPTOGGLECLASS);
             this.options.helpToggleElem.bind('click', function() {
-                if (options.containerHelp.is(':visible')) {
-                    options.containerHelp.slideUp('fast');
-                    $(this).text(options.helpTextShow);
+                if (this.options.containerHelp.is(':visible')) {
+                    this.options.containerHelp.slideUp('fast');
+                    $(this).text(this.options.helpTextShow);
                 } else {
-                    options.containerHelp.slideDown('fast');
-                    $(this).text(options.helpTextHide);
+                    this.options.containerHelp.slideDown('fast');
+                    $(this).text(this.options.helpTextHide);
                 }
                 return false;
             });
-            options.containerHelp.before(this.options.helpToggleElem).hide();
+            this.options.containerHelp.before(this.options.helpToggleElem).hide();
         }
     };