Opened 12 years ago

Closed 12 years ago

#170 closed defect (fixed)

Stylesheet-Select of DynamicCSS-Plugin is not filled when there is more than one editor.

Reported by: michael.hosse@… Owned by: gogo
Priority: normal Milestone:
Component: Plugin_Stylist Version:
Severity: normal Keywords: DynamicCSS
Cc:

Description

The decision to update the select-box or not to update is made with some class vars. But this does not work. The vars have to be instance vars because the content-structure of an editor can be the same as the content-structure in another editor. Here is a patch for this:

Index: C:/workspace/xinha/plugins/DynamicCSS/dynamiccss.js
===================================================================
--- C:/workspace/xinha/plugins/DynamicCSS/dynamiccss.js	(revision 83)
+++ C:/workspace/xinha/plugins/DynamicCSS/dynamiccss.js	(working copy)
@@ -14,9 +14,9 @@
   var self = this;
 
         /*var cssArray=null;
-        var cssLength=0;
+        var cssLength=0;*/
         var lastTag=null;
-        var lastClass=null;*/
+        var lastClass=null;
 
   var css_class = {
     id         : "DynamicCSS-class",
@@ -184,9 +184,9 @@
         var tagName = parent.tagName.toLowerCase();
         var className = parent.className;
 
-        if(DynamicCSS.lastTag!=tagName || DynamicCSS.lastClass!=className){
-            DynamicCSS.lastTag=tagName;
-            DynamicCSS.lastClass=className;
+        if(this.lastTag!=tagName || this.lastClass!=className){
+            this.lastTag=tagName;
+            this.lastClass=className;
 
             var select = editor._toolbarObjects[obj.id].element;
 

Change History (1)

comment:1 Changed 12 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

Applied in changeset:113

Note: See TracTickets for help on using tickets.