[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm

faziophi faziophi@source.lon-capa.org
Mon, 25 Jan 2010 19:16:08 -0000


faziophi		Mon Jan 25 19:16:08 2010 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  Bug 6184
      Disable WYSIWYG in Construction Space
  
  -- Removes the old FCKEditor initialization JavaScript, so
     only the new CKEditor instances, which are explicity
     created, will generate rich text editors
  
  -- Removes <script> for FCKEditor, which should save some
     bandwidth as it is no longer required.
  
  Comment:  Just in case, I am leaving the actual FCKEditor source
            in CVS for the near future.
  
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.262 loncom/interface/lonhtmlcommon.pm:1.263
--- loncom/interface/lonhtmlcommon.pm:1.262	Sun Jan 24 03:56:09 2010
+++ loncom/interface/lonhtmlcommon.pm	Mon Jan 25 19:16:08 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.262 2010/01/24 03:56:09 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.263 2010/01/25 19:16:08 faziophi Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1240,7 +1240,6 @@
 	my $s="";
 	if (&htmlareabrowser()) {
 		$s.=(<<ENDEDITOR);
-<script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
 <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
 ENDEDITOR
 	}
@@ -1355,32 +1354,7 @@
 		});
 		
 	});
-';
-    
-    foreach my $field (@fields) {
-	$output.='
-	
-{
-	$(document).ready(function() {
-		if (!($("#'.$field.'").hasClass("LC_richAlwaysOn"))) {
-			if (!($("#'.$field.'").hasClass("LC_richAlwaysOff"))) {
-				if (!($("#'.$field.'").hasClass("LC_richDetectHtml"))) {
-					if (!($("#'.$field.'").hasClass("LC_richDefaultOn"))) {
-						if (!($("#'.$field.'").hasClass("LC_richDefaultOff"))) {
-							var oFCKeditor = new FCKeditor("'.$field.'");
-							oFCKeditor.Config["CustomConfigurationsPath"] = 
-							"/fckeditor/loncapaconfig.js";    
-							oFCKeditor.ReplaceTextarea();
-							oFCKeditor.Config["AutoDetectLanguage"] = false;
-							oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'";
-						}
-					}
-				}		
-			}
-		}
-    });
-}';
-    }
+'; 
     $output.="\nwindow.status='Activated Editfields';\n"
             .'// ]]>'."\n"
             .'</script><br />'.