Changeset 356213
- Timestamp:
- 03/06/2011 07:15:16 PM (15 years ago)
- Location:
- reflect/trunk/js
- Files:
-
- 2 edited
-
reflect.js (modified) (5 diffs)
-
third_party/jquery.highlight.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
reflect/trunk/js/reflect.js
r356205 r356213 918 918 } 919 919 920 921 /*try {922 ctext923 .animateHighlight( Reflect.utils.get_inverted_background_color( ctext, cc ), 4000, 'color' );924 } catch ( err ) {925 console.log(err);926 }*/927 928 920 }, 929 921 from_highlight : function ( bullet_obj, canceled ) { … … 1002 994 if ( str ) { 1003 995 return $j('<div/>') 1004 .text(str )996 .text(str.replace(/\\"/g, '"')) 1005 997 .html(); 1006 998 } else { … … 1050 1042 return '#555'; 1051 1043 } 1052 } 1044 }, 1045 1046 1047 1053 1048 }, 1054 1049 … … 1615 1610 1616 1611 // segment sentences we can index them during highlighting 1617 1618 1612 comment.elements.comment_text.wrap_sentences(); 1619 1613 comment.elements.comment_text.find( '.sentence' ) … … 1694 1688 } ); 1695 1689 1696 $j.fn.animateHighlight = function(highlightColor, duration, property) {1697 var highlightBg = highlightColor || "#FFFF9C";1698 var animateMs = duration || 1500;1699 var css_property = property || "backgroundColor";1700 var originalBg = this.css(property);1701 this.stop().css("background-color", highlightBg).animate({property: originalBg}, animateMs);1702 };1703 -
reflect/trunk/js/third_party/jquery.highlight.js
r356205 r356213 1 1 /* 2 * jQuery Highlight plugin3 2 * 4 * Modified version of Bartek Szopka's jQuery Highlight (http://bartaz.github.com/sandbox.js/jquery.highlight.html)5 * Copyright (c) 2009 Bartek Szopka 3 * Heavily modified version of Bartek Szopka's jQuery Highlight (http://bartaz.github.com/sandbox.js/jquery.highlight.html) 4 * Copyright (c) 2009 Bartek Szopka. Adapted by Travis Kriplean for Reflect. 6 5 * 7 6 * Licensed under MIT license. … … 23 22 var wordNode = node.splitText(match.index); 24 23 wordNode.splitText(match[0].length); 25 26 }else if(jQuery.trim(node.nodeValue).length == 0){27 return 0;28 }else{24 25 } else if(jQuery.trim(node.nodeValue).length == 0){ 26 return 0; 27 }else{ 29 28 var wordNode = node.splitText(0); 30 //wordNode.splitText(wordNode.length);31 29 } 32 30
Note: See TracChangeset
for help on using the changeset viewer.