2

我将沙盒解决方案部署到 Sharepoint 2013 站点,并CustomAction设置为在每个页面上包含我的 javascript 文件,如下所示:

<CustomAction ScriptSrc="MyScriptUrl.js" Location="ScriptLink" Sequence="10000">

这在页面呈现这样的所有页面上都可以正常工作,并且包含我的脚本链接:

...
<script type="text/javascript" src="/_layouts/15/1033/initstrings.js?rev=uNmvBiHdrBzcPQzXRpm%2FnQ%3D%3D"></script>
<script type="text/javascript" src="/_layouts/15/clienttemplates.js?rev=vtrc0n3sjgxKB4WQrCEeaA%3D%3D"></script>
<script type="text/javascript" src="/_layouts/MyApp/MyScriptUrl.js"></script>
...

但是在主页(start.aspx)上,我的链接丢失了,并且包含的​​ js 完全不同:

...
<script type="text/javascript" src="/_layouts/15/init.js?rev=zwpf9CD1m7am6imImmQglQ%3D%3D"></script>
<script type="text/javascript" src="/ScriptResource.axd?d=nnhGXhlC0O1qfk6HXinkGyT_1TJisFpYK2ABJoGzI-IJfbkEQ8O-FNAr_1TgMft0D4TC2OewVZXiRooP_-SU74hHHu0AiGA4sSA3rrm1cvMqv3QRvFv8PafLyLDxWfN1O4qPFJXWfAf3avBHVS0HiXP55em_jNSsNMvRj1GJO4rjzyxg1vBi7IfXVHSWNBK60&amp;t=6119e399"></script>
<script type="text/javascript" src="/_layouts/15/blank.js?rev=ZaOXZEobVwykPO9g8hq%2F8A%3D%3D"></script>
...

(注:当然还有更多的 JS 文件,但我只是想表明有不同的包含)

我究竟做错了什么?

4

0 回答 0