Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.342 and 1.343

version 1.342, 2013/03/11 19:46:13 version 1.343, 2013/04/30 15:10:22
Line 1280  sub htmlareaselectactive { Line 1280  sub htmlareaselectactive {
             }              }
         }          }
     }      }
   
       my %lt = &Apache::lonlocal::texthash(
                 'plain'       => 'Plain text',
                 'rich'        => 'Rich formatting',
                 'plain_title' => 'Disable rich text formatting and edit in plain text',
                 'rich_title'  => 'Enable rich text formatting (bold, italic, etc.)',
             );
   
     $output.='      $output.='
           
     function containsBlockHtml(id) {      function containsBlockHtml(id) {
Line 1308  sub htmlareaselectactive { Line 1316  sub htmlareaselectactive {
     var rt_enabled  = $(this).hasClass("LC_enable_rt");      var rt_enabled  = $(this).hasClass("LC_enable_rt");
         if (rt_enabled) {          if (rt_enabled) {
     startRichEditor(id);      startRichEditor(id);
  $("#LC_rt_"+id).html("<b>&laquo; Plain text</b>");   $("#LC_rt_"+id).html("<b>&laquo; '.$lt{'plain'}.'</b>");
  $("#LC_rt_"+id).attr("title", "Disable rich text formatting and edit in plain text");   $("#LC_rt_"+id).attr("title", "'.$lt{'plain_title'}.'");
  $("#LC_rt_"+id).addClass("LC_disable_rt");   $("#LC_rt_"+id).addClass("LC_disable_rt");
  $("#LC_rt_"+id).removeClass("LC_enable_rt");   $("#LC_rt_"+id).removeClass("LC_enable_rt");
     } else {      } else {
  destroyRichEditor(id);   destroyRichEditor(id);
  $("#LC_rt_"+id).html("<b>Rich formatting &raquo;</b>");   $("#LC_rt_"+id).html("<b>'.$lt{'rich'}.' &raquo;</b>");
  $("#LC_rt_"+id).attr("title", "Enable rich text formatting (bold, italic, etc.)");   $("#LC_rt_"+id).attr("title", "'.$lt{'rich_title'}.'");
  $("#LC_rt_"+id).addClass("LC_enable_rt");   $("#LC_rt_"+id).addClass("LC_enable_rt");
  $("#LC_rt_"+id).removeClass("LC_disable_rt");   $("#LC_rt_"+id).removeClass("LC_disable_rt");
  }';   }';
Line 1336  sub htmlareaselectactive { Line 1344  sub htmlareaselectactive {
  var id = $(this).attr("id");   var id = $(this).attr("id");
                         var rt_enabled = containsBlockHtml(id);                          var rt_enabled = containsBlockHtml(id);
  if(rt_enabled) {   if(rt_enabled) {
  $(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Disable rich text formatting and edit in plain text\" class=\"LC_disable_rt\"><b>&laquo; Plain text</b></a></div>");   $(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"'.$lt{'plain_title'}.'\" class=\"LC_disable_rt\"><b>&laquo; '.$lt{'plain'}.'</b></a></div>");
  startRichEditor(id);   startRichEditor(id);
  $("#LC_rt_"+id).click(editorHandler);   $("#LC_rt_"+id).click(editorHandler);
  }   }
  else {   else {
  $(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Enable rich text formatting (bold, italic, etc.)\" class=\"LC_enable_rt\"><b>Rich formatting &raquo;</b></a></div>");   $(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"'.$lt{'rich_title'}.'\" class=\"LC_enable_rt\"><b>'.$lt{'rich'}.' &raquo;</b></a></div>");
  $("#LC_rt_"+id).click(editorHandler);   $("#LC_rt_"+id).click(editorHandler);
  }';   }';
     if ($dragmath_prefix ne '') {      if ($dragmath_prefix ne '') {
Line 1355  sub htmlareaselectactive { Line 1363  sub htmlareaselectactive {
  });   });
  $(".LC_richDefaultOn").each(function() {   $(".LC_richDefaultOn").each(function() {
  var id = $(this).attr("id");   var id = $(this).attr("id");
  $(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Disable rich text formatting and edit in plain text\" class=\"LC_disable_rt\"><b>&laquo; Plain text</b></a></div>");   $(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"'.$lt{'plain_title'}.'\" class=\"LC_disable_rt\"><b>&laquo; '.$lt{'plain'}.'</b></a></div>");
  startRichEditor(id);   startRichEditor(id);
  $("#LC_rt_"+id).click(editorHandler);   $("#LC_rt_"+id).click(editorHandler);
  });   });
  $(".LC_richDefaultOff").each(function() {   $(".LC_richDefaultOff").each(function() {
  var id = $(this).attr("id");   var id = $(this).attr("id");
  $(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Enable rich text formatting (bold, italic, etc.)\" class=\"LC_enable_rt\"><b>Rich formatting &raquo;</b></a></div>");   $(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"'.$lt{'rich_title'}.'\" class=\"LC_enable_rt\"><b>'.$lt{'rich'}.' &raquo;</b></a></div>");
  $("#LC_rt_"+id).click(editorHandler);   $("#LC_rt_"+id).click(editorHandler);
  });   });
   

Removed from v.1.342  
changed lines
  Added in v.1.343


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>