2013-10-22 57 views

回答

0

許多文章說,我們必須修改core.js但也有其他的解決方案,你可以添加到您的視圖

<script type="text/javascript"> 
function Custom_AddListMenuItems(m, ctx) { 
    var strDelete = "Delete API"; 
    var imgDelete = ''; 
    var strDeleteAction = "deleteThisSelectedListItem();"; 
    CAMOpt(m, strDelete, strDeleteAction, imgDelete); 
    CAMSep(m); 

    return true;  
} 

function deleteThisSelectedListItem() { 

    if (!IsContextSet()) 
     return; 
    var ctx = currentCtx; 
    var ciid = currentItemID; 
    if (confirm(ctx.RecycleBinEnabled ? Strings.STS.L_STSRecycleConfirm_Text : Strings.STS.L_STSDelConfirm_Text)) { 
     SubmitFormPost(ctx.HttpPath + "&Cmd=Delete&List=" + ctx.listName + "&ID=" + ciid + "&NextUsing=" + GetSource()); 
    } 
} 

} 

可以menuin javascript函數Custom_AddListMenuItems創建自定義

相關問題