連接:https://pan.baidu.com/s/1SJXzPeN7qE4O6KB0O5qi2w 密碼:z5ehjavascript
(細節描述:在FormHtmlUtil類中新增一個方法getFilePluploadFormHtml 詳細見升級文件,並找到getFormHTML方法,修改文件類型加載的頁面代碼的方法爲getFilePluploadFormHtml,以下)css
······ }else if(cgFormFieldEntity.getShowType().equals("file")){ html=getFilePluploadFormHtml(cgFormFieldEntity);//獲取實例化plupload組件的頁面代碼 } ······
(細節描述:在CgFormBuildController類中找到getHtmlHead方法,注掉老版JS,替換成新版,修改以下)html
//sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/uploadify/jquery.uploadify-3.1.js\"></script>"); sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/plupload/plupload.full.min.js\"></script>");
(細節描述:在CgformFtlController類中找到addorupdate方法,注掉老版JS,替換成新版,修改以下)html5
//sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/uploadify/jquery.uploadify-3.1.js\"></script>"); sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/plupload/plupload.full.min.js\"></script>");
a.新增宏文件src/main/resources/online/template/ui/uploadPltag.ftl,詳細見升級文件。java
b.修改tag宏文件src/main/resources/online/template/ui/tag.ftl:jquery
<#include "/online/template/ui/treetag.ftl"/> <#include "/online/template/ui/uploadPltag.ftl"/>
c.模板文件中的JS替換,即在src/main/resources/online/template下搜索 「jquery.uploadify-3.1.js」 若頁面有,須要將此JS路徑替換成plug-in/plupload/plupload.full.min.js,而且額外增長一個JS引入:web
<script type="text/javascript" src="plug-in/tools/Map.js"></script>瀏覽器
例如:搜索到文件src/main/resources/online/template/ui/basetag.ftl內有「jquery.uploadify-3.1.js」,代碼以下:app
<#if hasFile==true> <link rel="stylesheet" href="${webRootf!''}plug-in/uploadify/css/uploadify.css" type="text/css"></link> <script type="text/javascript" src="${webRootf!''}plug-in/uploadify/jquery.uploadify-3.1.js"></script> </#if>
現須要將其改爲:webapp
<#if hasFile==true> <link rel="stylesheet" href="${webRootf!''}plug-in/uploadify/css/uploadify.css" type="text/css"></link> <script type="text/javascript" src="${webRootf!''}plug-in/plupload/plupload.full.min.js"></script> <script type="text/javascript" src="${webRootf!''}plug-in/tools/Map.js"></script> </#if>
8.執行升級SQL
update cgform_ftl SET FTL_CONTENT = replace(FTL_CONTENT, 'plug-in/uploadify/jquery.uploadify-3.1.js', 'plug-in/plupload/plupload.full.min.js');