0

我在 sharepoint 2010 中遇到以下问题。出于某种原因,_cts 文件夹显示在所有文档库中,我已经研究了几天,但我没有找到任何原因,所以我现在最好的解决方案是隐藏整行。

请在此处查看屏幕截图。

但是我不确定如何通过 jquery 隐藏它

http://postimage.org/image/6qego8xg3/

<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" xmlns:ddwrt2="urn:frontpage:internal" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:x="http://www.w3.org/2001/XMLSchema">
<SCRIPT type=text/javascript>
      ctx = new ContextInfo();

      var existingHash = '';
      if(window.location.href.indexOf("#") > -1){
        existingHash = window.location.href.substr(window.location.href.indexOf("#"));
      }
      ctx.existingServerFilterHash = existingHash;
      if (ctx.existingServerFilterHash.indexOf("ServerFilter=") == 1) {
        ctx.existingServerFilterHash = ctx.existingServerFilterHash.replace(/-/g, '&').replace(/&&/g, '-');
        var serverFilterRootFolder = GetUrlKeyValue("RootFolder", true,ctx.existingServerFilterHash);
        var currentRootFolder = GetUrlKeyValue("RootFolder", true);
        if("" == serverFilterRootFolder && "" != currentRootFolder)
        {
          ctx.existingServerFilterHash += "&RootFolder=" + currentRootFolder;
        }
        window.location.hash = '';
        window.location.search = '?' + ctx.existingServerFilterHash.substr("ServerFilter=".length + 1);
      }

          ctx.listBaseType = 1;

      ctx.NavigateForFormsPages = false;
      ctx.listTemplate = "30009";
      ctx.listName = "{55607631-9F43-4F52-B759-E9003D258CC0}";
      ctx.view = "{46C9A371-28FF-4003-AA75-46098AA5104B}";
      ctx.listUrlDir = "/apps/x/DocsOut";
      ctx.HttpPath = "http://sharepointluis/apps/x/_vti_bin/owssvr.dll?CS=65001";
      ctx.HttpRoot = "http://sharepointluis/apps/x";
      ctx.imagesPath = "/_layouts/images/";
      ctx.PortalUrl = "";
      ctx.SendToLocationName = "";
      ctx.SendToLocationUrl = "";

          ctx.RecycleBinEnabled = 1;

      ctx.OfficialFileName = "";
      ctx.OfficialFileNames = "";
      ctx.WriteSecurity = "1";
      ctx.SiteTitle = "x";
      ctx.ListTitle = "Outgoing Document";
      if (ctx.PortalUrl == "") ctx.PortalUrl = null;
      ctx.displayFormUrl = "http://sharepointluis/apps/x/_layouts/listform.aspx?PageType=4&ListId={55607631-9F43-4F52-B759-E9003D258CC0}";
      ctx.editFormUrl = "http://sharepointluis/apps/x/_layouts/listform.aspx?PageType=6&ListId={55607631-9F43-4F52-B759-E9003D258CC0}";
      ctx.isWebEditorPreview = 0;
      ctx.ctxId = 9;
      ctx.isXslView = true;

      if (g_ViewIdToViewCounterMap["{46C9A371-28FF-4003-AA75-46098AA5104B}"] == null)
          g_ViewIdToViewCounterMap["{46C9A371-28FF-4003-AA75-46098AA5104B}"]= 9;
      ctx.CurrentUserId = 1073741823;

        ctx.verEnabled = 1;

        ctx.ContentTypesEnabled = true;

      ctx9 = ctx;
      g_ctxDict['ctx9'] = ctx;
    </SCRIPT>

<SCRIPT type=text/vbscript>
    On Error Resume Next
    Set EditDocumentButton = CreateObject("SharePoint.OpenDocuments.3")
    If (IsObject(EditDocumentButton)) Then
        fNewDoc3 = true
    Else
        Set EditDocumentButton = CreateObject("SharePoint.OpenDocuments.2")
        If (IsObject(EditDocumentButton)) Then
            fNewDoc2 = true
        Else
            Set EditDocumentButton = CreateObject("SharePoint.OpenDocuments.1")
        End If
    End If    
    fNewDoc = IsObject(EditDocumentButton)
      </SCRIPT>

<TBODY>
<TR>
<TD><IFRAME style="DISPLAY: none" id=FilterIframe9 height=0 src="javascript:false;" width=0 name=FilterIframe9 FilterLink="?"></IFRAME>
<TABLE id=onetidDoclibViewTbl0 class=ms-listviewtable border=0 cellSpacing=0 summary="Outgoing Document " cellPadding=1 width="100%" xmlns:o="urn:schemas-microsoft-com:office:office" o:WebQuerySourceHref="http://sharepointluis/apps/x/_vti_bin/owssvr.dll?CS=65001&amp;XMLDATA=1&amp;RowLimit=0&amp;View={46C9A371-28FF-4003-AA75-46098AA5104B}" handleDeleteInit="true">
<TBODY>
<TR class="ms-viewheadertr ms-vhltr" vAlign=top>
<TH class=ms-vh-icon scope=col><INPUT class=s4-selectAllCbx title="Select or deselect all items" onclick=ToggleAllItems(event,this,9) value="" type=checkbox></TH>
<TH class=ms-vh2 onmouseover=OnChildColumn(this) scope=col noWrap>
<DIV class=ms-vh-div name="Edit" SortFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=Edit&amp;SortDir=Asc" ResultType="" FieldType="Computed" DisplayName="Edit" CTXNum="9" FilterDisableMessage="" Filterable="FALSE" FilterDisable="" SortDisable="" Sortable="FALSE">Edit</DIV></TH>
<TH class=ms-vh2 onmouseover=OnChildColumn(this) scope=col noWrap>
<DIV class=ms-vh-div name="DocIcon" SortFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=DocIcon&amp;SortDir=Asc" ResultType="" FieldType="Computed" DisplayName="Type" CTXNum="9" FilterDisableMessage="" Filterable="" FilterDisable="" SortDisable="" Sortable=""><A id=diidSortDocIcon onfocus=OnFocusFilter(this) onclick="javascript:return OnClickFilter(this,event);" href="javascript: " SortingFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=DocIcon&amp;SortDir=Asc">Type<IMG class=ms-hidden border=0 alt="Use SHIFT+ENTER to open the menu (new window)." src="/_layouts/images/blank.gif" width=1 height=1></A><IMG border=0 alt="" src="/_layouts/images/blank.gif"><IMG border=0 alt="" src="/_layouts/images/blank.gif"></DIV>
<DIV class=s4-ctx><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TH>
<TH oncontextmenu="" class=ms-vh2 onmouseover=OnChildColumn(this) onmouseout="" onclick="" scope=col noWrap>
<DIV class=ms-vh-div name="LinkFilename" SortFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=LinkFilename&amp;SortDir=Asc" ResultType="" FieldType="Computed" DisplayName="Name" CTXNum="9" FilterDisableMessage="" Filterable="FALSE" FilterDisable="" SortDisable="" Sortable=""><A id=diidSortLinkFilename onfocus=OnFocusFilter(this) onclick="javascript:return OnClickFilter(this,event);" href="javascript: " SortingFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=LinkFilename&amp;SortDir=Asc">Name<IMG class=ms-hidden border=0 alt="Use SHIFT+ENTER to open the menu (new window)." src="/_layouts/images/blank.gif" width=1 height=1></A><IMG border=0 alt="" src="/_layouts/images/blank.gif"><IMG border=0 alt="" src="/_layouts/images/blank.gif"></DIV>
<DIV style="LINE-HEIGHT: 32px; MARGIN: 0px; HEIGHT: 32px; TOP: 0px; LEFT: 278px" class=s4-ctx shown="false"><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"><IMG style="VISIBILITY: hidden" alt="Open Menu" src="/_layouts/images/ecbarw.png" width=7 height=4></A><SPAN>&nbsp;</SPAN></DIV></TH>
<TH class=ms-vh2 onmouseover=OnChildColumn(this) scope=col noWrap>
<DIV class=ms-vh-div name="SentDate" SortFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=SentDate&amp;SortDir=Asc" ResultType="" FieldType="DateTime" DisplayName="SentDate" CTXNum="9" FilterDisableMessage="" Filterable="" FilterDisable="" SortDisable="" Sortable=""><A id=diidSortSentDate onfocus=OnFocusFilter(this) onclick="javascript:return OnClickFilter(this,event);" href="javascript: " SortingFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=SentDate&amp;SortDir=Asc">SentDate<IMG class=ms-hidden border=0 alt="Use SHIFT+ENTER to open the menu (new window)." src="/_layouts/images/blank.gif" width=1 height=1></A><IMG border=0 alt="" src="/_layouts/images/blank.gif"><IMG border=0 alt="" src="/_layouts/images/blank.gif"></DIV>
<DIV class=s4-ctx><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TH>
<TH oncontextmenu="" class=ms-vh2 onmouseover=OnChildColumn(this) onmouseout="" onclick="" scope=col noWrap>
<DIV class=ms-vh-div name="ContentType" SortFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=ContentType&amp;SortDir=Asc" ResultType="" FieldType="Computed" DisplayName="Content Type" CTXNum="9" FilterDisableMessage="" Filterable="" FilterDisable="" SortDisable="" Sortable="FALSE">Content Type</DIV>
<DIV style="LINE-HEIGHT: 32px; MARGIN: 0px; HEIGHT: 32px; TOP: 0px; LEFT: 591px" class=s4-ctx shown="false"><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"><IMG style="VISIBILITY: hidden" alt="Open Menu" src="/_layouts/images/ecbarw.png" width=7 height=4></A><SPAN>&nbsp;</SPAN></DIV></TH>
<TH class=ms-vh2 onmouseover=OnChildColumn(this) scope=col noWrap>
<DIV class=ms-vh-div name="OutgoingDocumentType" SortFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=OutgoingDocumentType&amp;SortDir=Asc" ResultType="" FieldType="TaxonomyFieldType" DisplayName="OutgoingDocumentType" CTXNum="9" FilterDisableMessage="" Filterable="" FilterDisable="" SortDisable="" Sortable=""><A id=diidSortOutgoingDocumentType onfocus=OnFocusFilter(this) onclick="javascript:return OnClickFilter(this,event);" href="javascript: " SortingFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=OutgoingDocumentType&amp;SortDir=Asc">OutgoingDocumentType<IMG class=ms-hidden border=0 alt="Use SHIFT+ENTER to open the menu (new window)." src="/_layouts/images/blank.gif" width=1 height=1></A><IMG border=0 alt="" src="/_layouts/images/blank.gif"><IMG border=0 alt="" src="/_layouts/images/blank.gif"></DIV>
<DIV class=s4-ctx><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TH>
<TH class=ms-vh2 onmouseover=OnChildColumn(this) scope=col noWrap>
<DIV class=ms-vh-div name="OutgoingMailType" SortFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=OutgoingMailType&amp;SortDir=Asc" ResultType="" FieldType="TaxonomyFieldType" DisplayName="OutgoingMailType" CTXNum="9" FilterDisableMessage="" Filterable="" FilterDisable="" SortDisable="" Sortable=""><A id=diidSortOutgoingMailType onfocus=OnFocusFilter(this) onclick="javascript:return OnClickFilter(this,event);" href="javascript: " SortingFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=OutgoingMailType&amp;SortDir=Asc">OutgoingMailType<IMG class=ms-hidden border=0 alt="Use SHIFT+ENTER to open the menu (new window)." src="/_layouts/images/blank.gif" width=1 height=1></A><IMG border=0 alt="" src="/_layouts/images/blank.gif"><IMG border=0 alt="" src="/_layouts/images/blank.gif"></DIV>
<DIV class=s4-ctx><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TH>
<TH class=ms-vh2 onmouseover=OnChildColumn(this) scope=col noWrap>
<DIV class=ms-vh-div name="OutgoingDocumentStatus" SortFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=OutgoingDocumentStatus&amp;SortDir=Asc" ResultType="" FieldType="TaxonomyFieldType" DisplayName="OutgoingDocumentStatus" CTXNum="9" FilterDisableMessage="" Filterable="" FilterDisable="" SortDisable="" Sortable=""><A id=diidSortOutgoingDocumentStatus onfocus=OnFocusFilter(this) onclick="javascript:return OnClickFilter(this,event);" href="javascript: " SortingFields="View={46c9a371-28ff-4003-aa75-46098aa5104b}&amp;SortField=OutgoingDocumentStatus&amp;SortDir=Asc">OutgoingDocumentStatus<IMG class=ms-hidden border=0 alt="Use SHIFT+ENTER to open the menu (new window)." src="/_layouts/images/blank.gif" width=1 height=1></A><IMG border=0 alt="" src="/_layouts/images/blank.gif"><IMG border=0 alt="" src="/_layouts/images/blank.gif"></DIV>
<DIV class=s4-ctx><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TH></TR>
<TR class=ms-itmhover iid="9,1,1" setEdgeBorder="true">
<TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="_cts&#13;&#10;  " value="" type=checkbox _setup="true"></TD>
<TD class=ms-vb-icon><A onclick="EditItemWithCheckoutAlert(event, 'http://sharepointluis/apps/x/_layouts/listform.aspx?PageType=6&amp;ListId={55607631-9F43-4F52-B759-E9003D258CC0}&amp;ID=1', '0', '0', '%2Fapps%x%2FDocsOut%2F%5Fcts', 'http://sharepointluis/apps/x', '', '1073741823');return false;" href="http://sharepointluis/apps/x/_layouts/listform.aspx?PageType=6&amp;ListId={55607631-9F43-4F52-B759-E9003D258CC0}&amp;ID=1" target=_self><IMG border=0 alt=Edit src="/_layouts/images/edititem.gif"></A></TD>
<TD class=ms-vb-icon><A onmousedown="VerifyFolderHref(this, event, '','FALSE','1', '', '', '')" onclick="return HandleFolder(this,event,&quot;/apps/x/DocsOut/Forms/LastModified.aspx?RootFolder=&quot; + escapeProperly(&quot;/apps/x/DocsOut/_cts&quot;) + '&amp;FolderCTID=0x010100709EF428D547F5428D5B747B7761A269&amp;View={46C9A371-28FF-4003-AA75-46098AA5104B}','TRUE','FALSE','','FALSE','1','','','','','1073741823','0','0','0x7fffffffffffffff');" href="/apps/x/DocsOut/Forms/LastModified.aspx?RootFolder=%2Fapps%x%2FDocsOut%2F%5Fcts&amp;FolderCTID=0x010100709EF428D547F5428D5B747B7761A269&amp;View={46C9A371-28FF-4003-AA75-46098AA5104B}"><IMG title="Folder: _cts" border=0 alt="Folder: _cts" src="/_layouts/images/folder.gif"></A></TD>
<TD class=ms-vb-title onmouseover=OnChildItem(this) height="100%">
<DIV id=1 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkFilename" CTXName="ctx9"><A onfocus=OnLink(this) onmousedown="&#13;&#10;                  javascript:VerifyFolderHref(this,event,'','FALSE','1','','','');return false;&#13;&#10;                " onclick="&#13;&#10;                  return HandleFolder(this,event,&quot;/apps/x/DocsOut/Forms/LastModified.aspx?RootFolder=&quot; + escapeProperly(&quot;/apps/x/DocsOut/_cts&quot;) + '&amp;FolderCTID=0x010100709EF428D547F5428D5B747B7761A269&amp;View={46C9A371-28FF-4003-AA75-46098AA5104B}','TRUE','FALSE','','FALSE','1','','','','','1073741823','0','0','0x7fffffffffffffff');&#13;&#10;                " href="/apps/x/DocsOut/Forms/LastModified.aspx?RootFolder=%2Fapps%x%2FDocsOut%2F%5Fcts&amp;FolderCTID=0x010100709EF428D547F5428D5B747B7761A269&amp;View={46C9A371-28FF-4003-AA75-46098AA5104B}">_cts</A></DIV>
<DIV style="LINE-HEIGHT: 22px; MARGIN: 0px; HEIGHT: 22px; TOP: 34px; LEFT: 278px" class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;" shown="false"><SPAN>&nbsp;</SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"><IMG style="VISIBILITY: hidden" alt="Open Menu" src="/_layouts/images/ecbarw.png" width=7 height=4></A><SPAN>&nbsp;</SPAN></DIV></TD>
<TD class=ms-vb2><NOBR></NOBR></TD>
<TD class=ms-vb2>Document</TD>
<TD class=ms-vb2></TD>
<TD class=ms-vb2></TD>
<TD class="ms-vb2 ms-vb-lastCell"></TD></TR></TBODY></TABLE>
<SCRIPT type=text/javascript>HideListViewRows("onetidDoclibViewTbl0");</SCRIPT>
</TD></TR></TBODY></TABLE>
4

1 回答 1

1

像这样?

$('#msomenuid2').closest('tr').remove();

编辑:

$('td:contains("_cts")').closest('tr').remove();

编辑2:

$('td > div[ctsname]').filter(function() {
    return $(this).text() == '_cts';
}).closest('tr').remove();
于 2012-12-07T10:28:37.483 回答