歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 29, 2024, 08:09:45 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  開發  |  外掛程式  |  請問tinymce的insertresources - 已解決 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 請問tinymce的insertresources - 已解決  (閱讀 8517 次)
giayiu
新手見習
*
文章: 4


檢視個人資料
« 於: 二月 20, 2006, 06:01:11 下午 »

請問一下,我換成tinymce之後要插入資料夾的資源時,都會被快顯封鎖擋掉,
可是其它功能都可以正常跳出popup視窗,而且舊的htmlarea也一樣可以正常跳出,
請問有辦法將它修正嗎?謝謝!
« 最後編輯時間: 二月 26, 2006, 03:36:17 下午 由 giayiu » 已記錄
giayiu
新手見習
*
文章: 4


檢視個人資料
« 回覆文章 #1 於: 二月 25, 2006, 11:20:14 下午 »

等待多日好像沒有辦法搞定,所以我親自下去看了一看,本來打算照其它樣板重寫一個,
結果讓我發現錯誤的地方了。
在js/tinymce/jscripts/tiny_mce/plugins/insertresource/editor_plugin.js當中:
TinyMCE_insertresource_getControlHTML的部份, 其中
        switch (control_name) {^M
                case "insertresource":^M
                        return '<img id="{$editor_id}_insertresource" .....
的地方, return的部份沒有透過標準的方法來啟動, 所以我換成下面的寫法就完成了!
不會被瀏覽器擋下來了。
return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertResource\',true);" target="_self" onmousedown="return false;"><img id="{$editor_id}_insertresource" src="{$pluginurl}/images/insertresource.gif" title="{$lang_insertresource_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
已記錄
giayiu
新手見習
*
文章: 4


檢視個人資料
« 回覆文章 #2 於: 二月 25, 2006, 11:27:29 下午 »

順便修正一個popup視窗開出來後按下關閉卻關不掉的問題:
templates/admin/resourcelist.template:
尾段當中:
<div id="list_action_bar">
  {include file="$admintemplatepath/adminpager.template" style=list}
  {if $htmlarea}
    <a href="javascript:onCancel()">{$locale->tr("close")}</a>
  {else}
    <a href="javascript:window.close()">{$locale->tr("close")}</a>
  {/if}
</div>
將 onCancel 換成 tinyMCEPopup.close():
<a href="javascript:tinyMCEPopup.close()">{$locale->tr("close")}</a>
已記錄
頁: [1]
LifeType 中文開發論壇  |  開發  |  外掛程式  |  請問tinymce的insertresources - 已解決 « 上篇主題 下篇主題 »
    前往: