標籤:style http color 使用 os 檔案 io 問題
在使用TFS的Web管理,建立工作時在編輯器中添加附件,成功之後在編輯器中經常無法正常顯示(沒有使用機器名訪問TFS伺服器、或者跟伺服器不同的域或者使用外網地址訪問等)。
首先找到:
Microsoft Team Foundation Server 12.0\Application Tier\Web Services\web.config檔案中的
<compilation defaultLanguage="c#" explicit="true" debug="true"> 查看debug配置是true還是false
如果是true說明是偵錯模式,找到:Microsoft Team Foundation Server 12.0\Application Tier\Web Services/_static/tfs/12/_scripts/TFS/debug/WorkItemTracking/Scripts/TFS.WorkItemTracking.Controls.js
設定為false,找到:Microsoft Team Foundation Server 12.0\Application Tier\Web Services/_static/tfs/12/_scripts/TFS/min/WorkItemTracking/Scripts/TFS.WorkItemTracking.Controls.js
在該檔案下搜尋:editor.insertImage(attachedFile.Url);需要修改為:editor.insertImage(attachedFile.Url.replace(/http:\/\/[^/]+/ig, ""));
加入修改的檔案是壓縮的js檔案,壓縮過的檔案已經對變數或參數進行了重新命名:
如:g.insertImage(a.Url);
那麼需要搜尋insertImage,找到代碼格式如上邊描述的,然後修改為:g.insertImage(a.Url.replace(/http:\/\/[^/]+/ig, ""));