ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 7228


Ignore:
Timestamp:
May 15, 2008, 6:33:03 PM (11 years ago)
Author:
ebihara
Message:

#2386:無駄なDOMアクセスをおこなっていたのを修正

Location:
OpenPNE/trunk/public_html/js/pc_emoji_palet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/public_html/js/pc_emoji_palet/pc_emoji_palet.js

    r7156 r7228  
    77{document.write('<div id="epSb" style="display:none"></div>');}
    88function renderEmojiPallet(carrier)
    9 {var doc=document;var pl=palletList[carrier];var emoji_set=pl.emoji;Element.addClassName(pl.id,"isLoadEmojiImage");for(var num in emoji_set){var emoji=emoji_set[num];var emoji_end=emoji.end;for(var i=emoji.start;i<=emoji_end;i++){var src="./skin/default/img/emoji/"+pl.shortname+"/"+pl.shortname+i+".gif";var alt="["+pl.shortname+":"+i+"]";var div=doc.getElementById(pl.id);var img=doc.createElement("img");img.setAttribute("src",src);img.setAttribute("alt",alt);img.onclick=function(){var emoji_code=this.getAttribute("alt");putEmojiToSelf(emoji_code);};div.appendChild(img);}}
     9{var doc=document;var pl=palletList[carrier];var emoji_set=pl.emoji;var div=doc.getElementById(pl.id);Element.addClassName(pl.id,"isLoadEmojiImage");for(var num in emoji_set){var emoji=emoji_set[num];var emoji_end=emoji.end;for(var i=emoji.start;i<=emoji_end;i++){var src="./skin/default/img/emoji/"+pl.shortname+"/"+pl.shortname+i+".gif";var alt="["+pl.shortname+":"+i+"]";var img=doc.createElement("img");img.setAttribute("src",src);img.setAttribute("alt",alt);img.onclick=function(){var emoji_code=this.getAttribute("alt");putEmojiToSelf(emoji_code);};div.appendChild(img);}}
    1010Element.removeClassName(pl.id,"processLoadEmojiImage");}
    1111function output(){document.write('<div id="emoji_pallet" class="padding_ss" style="width:439px;">');if(selfPallet){document.write('絵文字入力 ');document.write('<a href="#" onclick=\'togglePallet("epDocomo"); return false;\'>DoCoMo</a>');if(useAu)document.write(' <a href="#" onclick=\'togglePallet("epAu"); return false;\'>AU</a>');if(useSb)document.write(' <a href="#" onclick=\'togglePallet("epSb"); return false;\'>SoftBank</a>');createEmojiPalletDoCoMo();if(useAu){createEmojiPalletAu();}
  • OpenPNE/trunk/public_html/js/pc_emoji_palet/pc_emoji_palet.js.src

    r7156 r7228  
    6868    var pl = palletList[carrier];
    6969    var emoji_set = pl.emoji;
     70    var div = doc.getElementById(pl.id);
    7071
    7172    Element.addClassName(pl.id, "isLoadEmojiImage");
     
    7879            var alt = "[" + pl.shortname + ":" + i + "]";
    7980
    80             var div = doc.getElementById(pl.id);
    8181            var img = doc.createElement("img");
    8282            img.setAttribute("src", src);
Note: See TracChangeset for help on using the changeset viewer.