o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1364463051.326255:@value"Ã{I" class:EFI"ProcessedAsset; FI"logical_path; FI"'ueditor/dialogs/emotion/emotion.js; TI" pathname; FI"j/Users/jasl/workspace/ruby/ueditor_rails/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.js; TI"content_type; FI"application/javascript; FI" mtime; FI"2013-02-04T14:01:38+08:00; FI"length; FiYI"digest; F"%ffc68f9c0031b5ac2064ef605dd938a2I"source; FI"Ywindow.onload = function () { editor.setOpt({ emotionLocalization:false }); emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/"; emotion.SmileyBox = createTabList( emotion.tabNum ); emotion.tabExist = createArr( emotion.tabNum ); initImgName(); initEvtHandler( "tabHeads" ); }; function initImgName() { for ( var pro in emotion.SmilmgName ) { var tempName = emotion.SmilmgName[pro], tempBox = emotion.SmileyBox[pro], tempStr = ""; if ( tempBox.length ) return; for ( var i = 1; i <= tempName[1]; i++ ) { tempStr = tempName[0]; if ( i < 10 ) tempStr = tempStr + '0'; tempStr = tempStr + i + '.gif'; tempBox.push( tempStr ); } } } function initEvtHandler( conId ) { var tabHeads = $G( conId ); for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) { var tabObj = tabHeads.childNodes[i]; if ( tabObj.nodeType == 1 ) { domUtils.on( tabObj, "click", (function ( index ) { return function () { switchTab( index ); }; })( j ) ); j++; } } switchTab( 0 ); $G( "tabIconReview" ).style.display = 'none'; } function InsertSmiley( url, evt ) { var obj = { src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url }; obj.data_ue_src = obj.src; editor.execCommand( 'insertimage', obj ); if ( !evt.ctrlKey ) { dialog.popup.hide(); } } function switchTab( index ) { autoHeight( index ); if ( emotion.tabExist[index] == 0 ) { emotion.tabExist[index] = 1; createTab( 'tab' + index ); } //获å–å‘ˆçŽ°å…ƒç´ å¥æŸ„数组 var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ), tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ), i = 0, L = tabHeads.length; //éšè—æ‰€æœ‰å‘ˆçŽ°å…ƒç´ for ( ; i < L; i++ ) { tabHeads[i].className = ""; tabBodys[i].style.display = "none"; } //æ˜¾ç¤ºå¯¹åº”å‘ˆçŽ°å…ƒç´ tabHeads[index].className = "focus"; tabBodys[index].style.display = "block"; } function autoHeight( index ) { var iframe = dialog.getDom( "iframe" ), parent = iframe.parentNode.parentNode; switch ( index ) { case 0: iframe.style.height = "380px"; parent.style.height = "392px"; break; case 1: iframe.style.height = "220px"; parent.style.height = "232px"; break; case 2: iframe.style.height = "260px"; parent.style.height = "272px"; break; case 3: iframe.style.height = "300px"; parent.style.height = "312px"; break; case 4: iframe.style.height = "140px"; parent.style.height = "152px"; break; case 5: iframe.style.height = "260px"; parent.style.height = "272px"; break; case 6: iframe.style.height = "230px"; parent.style.height = "242px"; break; default: } } function createTab( tabName ) { var faceVersion = "?v=1.1", //ç‰ˆæœ¬å· tab = $G( tabName ), //获å–å°†è¦ç”Ÿæˆçš„Divå¥æŸ„ imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获å–显示表情和预览表情的路径 positionLine = 11 / 2, //ä¸é—´æ•° iWidth = iHeight = 35, //图片长宽 iColWidth = 3, //è¡¨æ ¼å‰©ä½™ç©ºé—´çš„æ˜¾ç¤ºæ¯”ä¾‹ tableCss = emotion.imageCss[tabName], cssOffset = emotion.imageCssOffset[tabName], textHTML = ['
' ); textHTML.push( '' ); textHTML.push( '' ); textHTML.push( '' ); } else { textHTML.push( ' | ' ); } textHTML.push( ' | ' ); } textHTML.push( '