Commits

Luke Plant  committed 26a9934

Fixed presentation glitches with list of classes.

  • Participants
  • Parent commits 470b97f

Comments (0)

Files changed (2)

File semanticeditor/media/semanticeditor/javascript/wymeditor/plugins/semantic/wymeditor.semantic.js

         .bind(this.wym._options.updateEvent, function(event) {
                   self.formSubmit(event);
               });
-
-    // Fix height of classList (in timeout to give command list time to load)
-    setTimeout(function() {
-                   var h = jQuery(" .wym_area_main").height() -
-                       jQuery(self.wym._options.containersSelector).height() -
-                       jQuery(self.wym._options.layoutCommandsSelector).height() -
-                       jQuery(self.wym._options.classesSelector + " h2").height() -
-                       20; // 20 is a fudge value, probably equal to some marings/paddings
-                   self.classList.css("height", h.toString() + "px");
-               }, 1000);
 };
 
 // Setup document - splits the HTML into 'content HTML' and 'presentation'
         jQuery(this.wym._doc).find('#presmodestyles').remove();
         jQuery(this.wym._iframe.ownerDocument).find('#presmodestyles').remove();
         this.showStylesButton.attr('value', 'Hide styles');
+        // Fix height of list of classes.
+        var h = jQuery(" .wym_area_main").outerHeight() -
+            jQuery(this.wym._options.containersSelector).outerHeight() -
+            jQuery(this.wym._options.layoutCommandsSelector).outerHeight() -
+            20; // fudge factor, padding related?
+        jQuery(this.wym._options.classesSelector).height(h);
+
+
     } else {
         jQuery('<style rel="stylesheet" type="text/css" id="presmodestyles">' +
                'p.secommand { display:none; } ' +

File semanticeditor/media/semanticeditor/javascript/wymeditor/skins/semanticeditor/skin.css

 
 /*CLASSES*/
         .wym_area_right .wym_panel ul {padding-left: 0;}
-        .wym_skin_semanticeditor .wym_classes ul             { overflow-y: auto;
+        .wym_skin_semanticeditor .wym_classes                { overflow-y: auto;
                                                                overflow-x: visible; }
 
 
 .prescontrolheadings option.column  {color: blue; }
 .prescontrolheadings option.row  {color: black; }
 
-/* presentation mode off */
-/*.wym_layout_commands, .wym_classes  {display: none!important;}
-*/
-
 /* the editor controls (containers, commands, classes) */
 
 .wym_section.wym_panel li, .wym_tools li  {display: inline-block; margin-bottom: 4px; font: small-caption;}