Plugin Directory

Changeset 356205


Ignore:
Timestamp:
03/06/2011 06:34:30 PM (15 years ago)
Author:
tkriplean
Message:

changing how sentence parsing is handled

Location:
reflect/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • reflect/trunk/css/reflect.css

    r340539 r356205  
    1313#reflected a {
    1414  cursor: pointer; }
    15 #reflected .username {
    16   font-size: 75%;
    17   margin-left: 4px;
    18   color: #555555; }
    19   #reflected .username a:hover {
    20     color: #555555; }
    2115#reflected button {
    2216  border: 1px outset;
     
    2519#reflected .rf_comment.highlight_state .rf_comment_wrapper .rf_comment_text_wrapper .bullet_footer_wrapper {
    2620  display: none; }
    27 #reflected .rf_comment.highlight_state .rf_comment_wrapper .rf_comment_text_wrapper a.sentence {
     21#reflected .rf_comment.highlight_state .rf_comment_wrapper .rf_comment_text_wrapper .sentence {
    2822  cursor: pointer;
    2923  text-decoration: none; }
    30   #reflected .rf_comment.highlight_state .rf_comment_wrapper .rf_comment_text_wrapper a.sentence:hover {
     24  #reflected .rf_comment.highlight_state .rf_comment_wrapper .rf_comment_text_wrapper .sentence:hover {
    3125    text-decoration: underline !important; }
    3226#reflected .rf_comment .rf_comment_wrapper {
     
    6054#reflected .rf_comment_wrapper .rf_comment_summary {
    6155  width: 42%; }
     56  #reflected .rf_comment_wrapper .rf_comment_summary .username {
     57    font-size: 75%;
     58    margin-left: 4px;
     59    color: #555555; }
    6260  #reflected .rf_comment_wrapper .rf_comment_summary ol, #reflected .rf_comment_wrapper .rf_comment_summary ul, #reflected .rf_comment_wrapper .rf_comment_summary ol li, #reflected .rf_comment_wrapper .rf_comment_summary ul li {
    6361    margin: 0;
  • reflect/trunk/js/reflect.js

    r340539 r356205  
    11271127                        .wrapInner( $j( '<table id="rf_comment_wrapper-'
    11281128                                + this.id + '" class="rf_comment_wrapper" />' ) );
     1129               
     1130                //so that we don't try to break apart urls into different sentences...
     1131                comment_text.find('a').addClass('exclude_from_reflect');
    11291132
    11301133                this.elements = {
     
    13661369            },
    13671370            add_response : function ( response_info ) {
    1368                 params = {
     1371                var params = {
    13691372                    media_dir : Reflect.api.server.media_dir,
    13701373                    user : response_info.u,
     
    16101613
    16111614                    }
     1615                   
    16121616                    // segment sentences we can index them during highlighting
     1617                   
    16131618                    comment.elements.comment_text.wrap_sentences();
    16141619                    comment.elements.comment_text.find( '.sentence' )
  • reflect/trunk/js/third_party/jquery.highlight.js

    r340539 r356205  
    5353
    5454jQuery.fn.wrap_sentences = function (words, options) {
    55     var settings = { className: 'sentence', element: 'a',
     55    var settings = { className: 'sentence', element: 'span',
    5656                     caseSensitive: false, wordsOnly: false };
    5757    jQuery.extend(settings, options);
    5858   
    59     //var pattern = "(\S.+?[.!?])(?=\s+|$)";
    6059    var pattern = "[^\.\?!]+[\.\?!]";
    6160   
     
    6463    return jQuery._wrap_sentences(this[0], re, settings.element, settings.className);
    6564};
    66 
    67 jQuery.fn.de_sentence = function (options) {
    68     var settings = { className: 'sentence', element: 'a' };
    69     jQuery.extend(settings, options);
    70 
    71     return this.find(settings.element + "." + settings.className).each(function () {
    72         var parent = this.parentNode;
    73         parent.replaceChild(this.firstChild, this);
    74         parent.normalize();
    75     }).end();
    76 };
Note: See TracChangeset for help on using the changeset viewer.