Cannot delete list item ....

Nov 13, 2008 at 4:25 PM
i´ve got a problem...
 
i cannot delete an item of the list that is listed in my ECQ webpart...

i think its a bug, have anyone fix it ??
Feb 12, 2009 at 5:23 PM

Hi Ishai Sagi,

I have added a CEWP webaprt on the same page as ECQWP and have added a java script for Cutom context menu. I have added a javascript for delete function which deletes the document from document library and send that to recycle bin and that works but it doesn't work when
the url of my site is behind TAM - Tivoli Access Manager. so in other words, unsecure site with ECQWP Delete function from CEWP works
fine but with security it gives problem. What it does  - when I click on delete and press OK to confirm that I want to send the item
to recycle bin, it doesn't delete and takes user to that document library and as user doesn't have access to document library, it gives
the error - Access denied..

Please help.
Thanks in advance.
Maulee

Below is the script that I have added in CEWP:

<script language = "Javascript">
function DeleteReport()
    {
     if (! IsContextSet())
      return;
 currentItemFileUrl=GetAttributeFromItemTable(itemTable, "Url", "ServerUrl");
    var currentItemUrl=GetAttributeFromItemTable(itemTable, "Url", "ServerUrl");
    var currentItenUnescapedUrl=unescapeProperly(currentItemFileUrl);
    var currentItemEscapedFileUrl=escapeProperly(currentItenUnescapedUrl);

     var ctx=currentCtx;
     var ciid=currentItemID;
var protocolsplit = location.href.split('//');
var urlsplit = protocolsplit[1].split('/');

     if (confirm(true ? L_STSRecycleConfirm_Text : L_STSDelConfirm_Text))
     {

if (protocolsplit[0] == "http:")
{
      SubmitFormPost(ctx.HttpRoot + ctx.HttpPath
+"&Cmd=Delete&List="+ctx.listName+"&ID="+ciid+"&NextUsing="+GetSource()+ "&owsfileref=" + currentItemEscapedFileUrl);
}
else
{
      SubmitFormPost(protocolsplit[0] + "//" + urlsplit[0] + ctx.HttpRoot + ctx.HttpPath
+"&Cmd=Delete&List="+ctx.listName+"&ID="+ciid+"&NextUsing="+GetSource()+ "&owsfileref=" + currentItemEscapedFileUrl);

}

}
    };
function Custom_AddDocLibMenuItems(m, ctx)
{
var RootFolder=GetRootFolder(ctx);
//Menu1
currentItemFileUrl=GetAttributeFromItemTable(itemTable, "Url", "ServerUrl");
var currentItemUrl=GetAttributeFromItemTable(itemTable, "Url", "ServerUrl");
if (currentItemFileUrl !=null)
{
var currentItenUnescapedUrl=unescapeProperly(currentItemFileUrl);
var currentItemEscapedFileUrl=escapeProperly(currentItenUnescapedUrl);
}
var currentItemUrl=GetAttributeFromItemTable(itemTable, "Url", "ServerUrl");
var httpRootWithSlash=ctx.HttpRoot.substr(0);
if (httpRootWithSlash[httpRootWithSlash.length-1] !='/')httpRootWithSlash+='/';
var slashLoc=-1;
var fileUrl="";
slashLoc=httpRootWithSlash.substring(8).indexOf('/')+8;
var fileUrl=escapeProperly(httpRootWithSlash.substr(0, slashLoc))+currentItemUrl;
var serverFileRedir=itemTable.getAttribute("SRed");
if ((serverFileRedir !=null) &&
(serverFileRedir !="") &&
(serverFileRedir !="1"))
{
if (serverFileRedir.substring(0,1) !="1")
   {
    fileUrl=serverFileRedir;
   }
   else
   {
    fileUrl=serverFileRedir.substring(1);
   }
  }

var L_DeleteItem_Text="Delete";
strDisplayText=L_DeleteItem_Text;
  strAction="DeleteReport()";
  strImagePath=ctx.imagesPath+"delitem.gif";
  menuOption=CAMOpt(m, strDisplayText, strAction, strImagePath, null, 300);
  menuOption.id="ID_DeleteItem";
return true;
}

</script>

 Please please guide...