Changeset 588


Ignore:
Timestamp:
04/15/09 20:44:35 (3 years ago)
Author:
jf.hovinne
Message:

Fixed CSS parsing. Added wym_box_ class name.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/test/wym_stylesheet.css

    r563 r588  
    1919 
    2020/* PARA: Date */ 
    21 .date p{ 
     21p.date { 
    2222  color: #ccf; 
    2323  /* background-color: #ff9; border: 2px solid #ee9; */ 
     
    2525 
    2626/* PARA: Hidden note */ 
    27 .hidden-note p /* p[@class!="important"] */ { 
     27p.hidden-note /* p[@class!="important"] */ { 
    2828     display: none; 
    2929    /* color: #999; border: 2px solid #ccc; */ 
     
    3131 
    3232/* PARA: Important */ 
    33 .important p /* p[@class!="hidden-note"] */ { 
     33p.important /* p[@class!="hidden-note"] */ { 
    3434    color: red; font-weight: bold; 
    3535    /* color: red; font-weight: bold; border: 2px solid red; */ 
    3636} 
    3737 
    38 .border img { 
     38img.border { 
    3939    border: 1px solid #ccc; 
    4040    /* border: 4px solid #ccc; */ 
     
    4242 
    4343/* LIST: Special */ 
    44 .special ul, 
    45 .special ol { 
     44ul.special, 
     45ol.special { 
    4646    color: green; 
    4747    /** / background-color: #fc9; border: 2px solid red; /**/ 
  • trunk/src/wymeditor/jquery.wymeditor.js

    r587 r588  
    735735 
    736736      //load wymbox 
    737       this._box = jQuery(this._element).hide().after(this._options.boxHtml).next(); 
     737      this._box = jQuery(this._element).hide().after(this._options.boxHtml).next().addClass('wym_box_' + this._index); 
    738738 
    739739      //store the instance index in the wymbox element 
     
    35813581  } 
    35823582 
    3583   this.addSpecialPattern("\\\x2e[a-z-_0-9]+[\\sa-z1-6]*", 'WymCss', 'WymCssStyleDeclaration'); 
     3583  this.addSpecialPattern("[\\sa-z1-6]*\\\x2e[a-z-_0-9]+", 'WymCss', 'WymCssStyleDeclaration'); 
    35843584 
    35853585  this.addEntryPattern("/\\\x2a", 'WymCss', 'WymCssComment'); 
     
    35893589  this.addExitPattern("\x7d", 'WymCssStyle'); 
    35903590 
    3591   this.addEntryPattern("/\\\x2a", 'WymCssStyle', 'WymCssFeddbackStyle'); 
    3592   this.addExitPattern("\\\x2a/", 'WymCssFeddbackStyle'); 
     3591  this.addEntryPattern("/\\\x2a", 'WymCssStyle', 'WymCssFeedbackStyle'); 
     3592  this.addExitPattern("\\\x2a/", 'WymCssFeedbackStyle'); 
    35933593 
    35943594  return this; 
     
    36543654}; 
    36553655 
    3656 WYMeditor.WymCssParser.prototype.WymCssFeddbackStyle = function(match, status) 
     3656WYMeditor.WymCssParser.prototype.WymCssFeedbackStyle = function(match, status) 
    36573657{ 
    36583658  if(status == WYMeditor.LEXER_UNMATCHED){ 
     
    36673667 
    36683668  var tag = ''; 
    3669   if(match.indexOf(' ') > 0){ 
    3670     var parts = match.split(' '); 
    3671     this._current_element = parts[0]; 
    3672     var tag = parts[1]; 
     3669  if(match.indexOf('.') > 0){ 
     3670    var parts = match.split('.'); 
     3671    this._current_element = parts[1]; 
     3672    var tag = parts[0]; 
    36733673  }else{ 
    36743674    this._current_element = match; 
Note: See TracChangeset for help on using the changeset viewer.