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

Changeset 7128


Ignore:
Timestamp:
May 10, 2008, 6:51:09 PM (12 years ago)
Author:
ebihara
Message:

#2381:tinyMCEを使ったテキストエリアのテンプレート部品を共通化した

Location:
OpenPNE/trunk/webapp/modules/pc/templates
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/modules/pc/templates/h_diary_add.tpl

    r7051 r7128  
    9090({if $inc_entry_point[3]})({$inc_entry_point[3]|smarty:nodefaults|t_url2cmd:'entry_point'|t_cmd:'entry_point'})({/if})
    9191
    92 ({if $smarty.const.OPENPNE_USE_DECORATION})
    93 <script type="text/javascript" src="./js/pne_decoration.js"></script>
    94 <script type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script>
    95 <script type="text/javascript">
    96 //<![CDATA[
    97 function pne_mce_editor_get_config()
    98 {
    99     return {
    100         op_b : {
    101             isEnabled : ({$INC_HEADER_decoration_config.op_b}),
    102             imageURL : "({t_img_url_skin filename=deco_op_b})"
    103         },
    104         op_u : {
    105             isEnabled : ({$INC_HEADER_decoration_config.op_u}),
    106             imageURL : "({t_img_url_skin filename=deco_op_u})"
    107         },
    108         op_s : {
    109             isEnabled : ({$INC_HEADER_decoration_config.op_s}),
    110             imageURL : "({t_img_url_skin filename=deco_op_s})"
    111         },
    112         op_i : {
    113             isEnabled : ({$INC_HEADER_decoration_config.op_i}),
    114             imageURL : "({t_img_url_skin filename=deco_op_i})"
    115         },
    116         op_large : {
    117             isEnabled : ({$INC_HEADER_decoration_config.op_large}),
    118             imageURL : "({t_img_url_skin filename=deco_op_large})"
    119         },
    120         op_small : {
    121             isEnabled : ({$INC_HEADER_decoration_config.op_small}),
    122             imageURL : "({t_img_url_skin filename=deco_op_small})"
    123         },
    124         op_color : {
    125             isEnabled : ({$INC_HEADER_decoration_config.op_color}),
    126             imageURL : "({t_img_url_skin filename=deco_op_color})"
    127         },
    128         op_image : {
    129             isEnabled : ({$smarty.const.OPENPNE_USE_ALBUM}),
    130             imageURL : "({t_img_url_skin filename=deco_op_image})",
    131             contentURL : "({t_url _html=0 m=pc a=page_h_album_insert_dialog})"
    132         }
    133     }
    134 }
    135 //]]>
    136 </script>
    137 <script type="text/javascript" src="./js/pc_emoji_palet/pc_emoji_palet.js"></script>
    138 <input type="radio" name="mce_editor_mode_changer" id="mce_editor_mode_changer_1" onclick="pne_toggle_mce_editor('mce_editor_textarea')" checked="checked" /><label for="mce_editor_mode_changer_1">テキストモード</label>&nbsp;<input type="radio" name="mce_editor_mode_changer" id="mce_editor_mode_changer_2" onclick="pne_toggle_mce_editor('mce_editor_textarea')" /><label for="mce_editor_mode_changer_2">プレビューモード</label>
    139 <div id="mce_editor_buttonmenu">
    140 ({foreach from=$INC_HEADER_decoration_config item=item key=key})
    141 ({if $item})
    142 <a id="mce_textmode_button_({$key})" href="#" onclick="pne_mce_insert_tagname('mce_editor_textarea', '({$key|replace:"_":":"})');"><img src="({t_img_url_skin filename=deco_`$key`})" alt="" /></a>
    143 ({/if})
    144 ({/foreach})
    145 ({if $smarty.const.OPENPNE_USE_ALBUM})
    146 <a id="mce_textmode_button_op_image" href="#" onclick="window.open('({t_url m=pc a=page_h_album_insert_dialog})', '', 'width=600,height=550,toolbar=no,scrollbars=yes,left=10,top=10')"><img src="({t_img_url_skin filename=deco_op_image})" alt="" /></a>
    147 ({/if})
    148 ({if $smarty.const.OPENPNE_EMOJI_DOCOMO_FOR_PC})
    149 <a id="mce_textmode_button_op_emoji_docomo" href="#" onclick="togglePallet('epDocomo');"><img src="({t_img_url_skin filename=deco_op_emoji_docomo})" alt="" /></a>
    150 <script type="text/javascript">
    151 //<![CDATA[
    152 createEmojiPalletDoCoMo();
    153 //]]>
    154 </script>
    155 ({else})
    156 <a id="mce_textmode_button_op_emoji_docomo" href="#" onclick="togglePallet('epDocomo');"><img src="({t_img_url_skin filename=deco_op_emoji_docomo})" alt="" /></a>
    157 <a id="mce_textmode_button_op_emoji_au" href="#" onclick="togglePallet('epAu');"><img src="({t_img_url_skin filename=deco_op_emoji_au})" alt="" /></a>
    158 <a id="mce_textmode_button_op_emoji_softbank" href="#" onclick="togglePallet('epSb');"><img src="({t_img_url_skin filename=deco_op_emoji_softbank})" alt="" /></a>
    159 <script type="text/javascript">
    160 //<![CDATA[
    161 createEmojiPalletDoCoMo();
    162 createEmojiPalletAu();
    163 createEmojiPalletSoftBank();
    164 //]]>
    165 </script>
    166 ({/if})
    167 </div>
     92({ext_include file="inc_tinymce_textarea.tpl" _name="body" _rows="15" _cols="50" _body=$form_val.body|smarty:nodefaults})
    16893
    169 <script type="text/javascript">
    170 //<![CDATA[
    171 pne_mce_editor_init();
    172 //]]>
    173 </script>
    174 
    175 ({/if})
    176 
    177 <textarea id="mce_editor_textarea" name="body" rows="15" cols="50">({$form_val.body})</textarea>
    17894</td>
    17995</tr>
  • OpenPNE/trunk/webapp/modules/pc/templates/h_diary_edit.tpl

    r7051 r7128  
    9292({if $inc_entry_point[3]})({$inc_entry_point[3]|smarty:nodefaults|t_url2cmd:'entry_point'|t_cmd:'entry_point'})</div>({/if})
    9393
    94 ({if $smarty.const.OPENPNE_USE_DECORATION})
    95 <script type="text/javascript" src="./js/pne_decoration.js"></script>
    96 <script type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script>
    97 <script type="text/javascript">
    98 //<![CDATA[
    99 function pne_mce_editor_get_config()
    100 {
    101     return {
    102         op_b : {
    103             isEnabled : ({$INC_HEADER_decoration_config.op_b}),
    104             imageURL : "({t_img_url_skin filename=deco_op_b})"
    105         },
    106         op_u : {
    107             isEnabled : ({$INC_HEADER_decoration_config.op_u}),
    108             imageURL : "({t_img_url_skin filename=deco_op_u})"
    109         },
    110         op_s : {
    111             isEnabled : ({$INC_HEADER_decoration_config.op_s}),
    112             imageURL : "({t_img_url_skin filename=deco_op_s})"
    113         },
    114         op_i : {
    115             isEnabled : ({$INC_HEADER_decoration_config.op_i}),
    116             imageURL : "({t_img_url_skin filename=deco_op_i})"
    117         },
    118         op_large : {
    119             isEnabled : ({$INC_HEADER_decoration_config.op_large}),
    120             imageURL : "({t_img_url_skin filename=deco_op_large})"
    121         },
    122         op_small : {
    123             isEnabled : ({$INC_HEADER_decoration_config.op_small}),
    124             imageURL : "({t_img_url_skin filename=deco_op_small})"
    125         },
    126         op_color : {
    127             isEnabled : ({$INC_HEADER_decoration_config.op_color}),
    128             imageURL : "({t_img_url_skin filename=deco_op_color})"
    129         },
    130         op_image : {
    131             isEnabled : ({$smarty.const.OPENPNE_USE_ALBUM}),
    132             imageURL : "({t_img_url_skin filename=deco_op_image})",
    133             contentURL : "({t_url _html=0 m=pc a=page_h_album_insert_dialog})"
    134         }
    135     }
    136 }
    137 //]]>
    138 </script>
    139 <script type="text/javascript" src="./js/pc_emoji_palet/pc_emoji_palet.js"></script>
    140 <input type="radio" name="mce_editor_mode_changer" id="mce_editor_mode_changer_1" onclick="pne_toggle_mce_editor('mce_editor_textarea')" checked="checked" /><label for="mce_editor_mode_changer_1">テキストモード</label>&nbsp;<input type="radio" name="mce_editor_mode_changer" id="mce_editor_mode_changer_2" onclick="pne_toggle_mce_editor('mce_editor_textarea')" /><label for="mce_editor_mode_changer_2">プレビューモード</label>
    141 
    142 <div id="mce_editor_buttonmenu">
    143 ({foreach from=$INC_HEADER_decoration_config item=item key=key})
    144 ({if $item})
    145 <a id="mce_textmode_button_({$key})" href="#" onclick="pne_mce_insert_tagname('mce_editor_textarea', '({$key|replace:"_":":"})');"><img src="({t_img_url_skin filename=deco_`$key`})" alt="" /></a>&nbsp;
    146 ({/if})
    147 ({/foreach})
    148 ({if $smarty.const.OPENPNE_USE_ALBUM})
    149 <a id="mce_textmode_button_op_image" href="#" onclick="window.open('({t_url m=pc a=page_h_album_insert_dialog})', '', 'width=600,height=550,toolbar=no,scrollbars=yes,left=10,top=10')"><img src="({t_img_url_skin filename=deco_op_image})" alt="" /></a>
    150 ({/if})
    151 ({if $smarty.const.OPENPNE_EMOJI_DOCOMO_FOR_PC})
    152 <a id="mce_textmode_button_op_emoji_docomo" href="#" onclick="togglePallet('epDocomo');"><img src="({t_img_url_skin filename=deco_op_emoji_docomo})" alt="" /></a>
    153 <script type="text/javascript">
    154 //<![CDATA[
    155 createEmojiPalletDoCoMo();
    156 //]]>
    157 </script>
    158 ({else})
    159 <a id="mce_textmode_button_op_emoji_docomo" href="#" onclick="togglePallet('epDocomo');"><img src="({t_img_url_skin filename=deco_op_emoji_docomo})" alt="" /></a>
    160 <a id="mce_textmode_button_op_emoji_au" href="#" onclick="togglePallet('epAu');"><img src="({t_img_url_skin filename=deco_op_emoji_au})" alt="" /></a>
    161 <a id="mce_textmode_button_op_emoji_softbank" href="#" onclick="togglePallet('epSb');"><img src="({t_img_url_skin filename=deco_op_emoji_softbank})" alt="" /></a>
    162 <script type="text/javascript">
    163 //<![CDATA[
    164 createEmojiPalletDoCoMo();
    165 createEmojiPalletAu();
    166 createEmojiPalletSoftBank();
    167 //]]>
    168 </script>
    169 ({/if})
    170 </div>
    171 
    172 <script type="text/javascript">
    173 //<![CDATA[
    174 pne_mce_editor_init();
    175 //]]>
    176 </script>
    177 ({/if})
    178 
    179 <textarea id="mce_editor_textarea" name="body" rows="15" cols="50">({$diary.body})</textarea>
     94({ext_include file="inc_tinymce_textarea.tpl" _name="body" _rows="15" _cols="50" _body=$diary.body|smarty:nodefaults})
    18095</td>
    18196</tr>
Note: See TracChangeset for help on using the changeset viewer.