C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1042\CORE.JS
폴더의 해당 파일을 열고.(영문판이면 1033 폴더)
function DispDocItemEx(ele, fTransformServiceOn, fShouldTransformExtension, fTransformHandleUrl, strProgId)
위 함수를 찾는다.
해당 함수 내용에 아래내용 추가
var _ele;
if (_ele = ele.toString()){
if (_ele_ext = _ele.substring(_ele.lastIndexOf('.')+1).toLowerCase()){
/* list of office docs */
var arr_office_ext = newArray('doc','xls','dot','dotx','dotm','bmp','gif','jpeg','jpg','csv','docm','docx','docmhtml',
'docxml','dothtml','gcsx','ico','mdb','mde','mdn','png','pot','pothtml','potm','potx','pps', 'ppsx',
'ppt','pptm','pptx','pub','potm','ppam','ppsm','xlb','xlc','xls','xlsx','xlsm','xlt','xltm','xlsb','xlam','xltx','xlw','xlxml');
var _i;
var b_office_doc = false;
/* check for ext in array */
for (_i=0; _i < arr_office_ext.length; _i++) {
if (arr_office_ext[_i] === _ele_ext){
//alert(_ele);
b_office_doc = true;
break;
}
}
/* send only if office ext */
if (b_office_doc){
/* Open the doc via download.aspx (supress sp editing) */
STSNavigate(ctx.HttpRoot + '/_layouts/download.aspx?SourceUrl=' + _ele);
/* Kill the “regular” sp handling of the doc (edit mode)
onClick(true) and simply download the doc. */
return false;
}
}
}