修改任務顯示WrkTaskIp.aspx頁面

來源:互聯網
上載者:User

標籤:

環境:Sharepoint2010

需求:在審批任務頁面中插入或顯示表單或列表內容,讓內容與審核在同一頁面上。

修改檔案:WrkTaskIp.aspx(改前記得備份)

檔案所在的路徑:C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\template\layouts

列表效果:

表單效果:

具體做法:

將WrkTaskIp.aspx與jquery-1.8.3.js兩個件拷貝到C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\template\layouts裡,拷貝前記得備份源檔案。

WrkTaskIp.aspx 代碼:

<%-- _lcid="1033" _version="14.0.4758" _dal="1" --%><%-- _LocalBinding --%><%@ Assembly Name="Microsoft.Office.Workflow.Pages, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%><%@ Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="Microsoft.Office.Workflow.WrkTaskIPPage"   EnableSessionState="true" AutoEventWireup="false"   %> <%@ Import Namespace="Microsoft.SharePoint.WebControls" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="InfoPath" Namespace="Microsoft.Office.InfoPath.Server.Controls" Assembly="Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register TagPrefix="wssuc" TagName="LinksTable" src="/_controltemplates/LinksTable.ascx" %> <%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="/_controltemplates/InputFormSection.ascx" %> <%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="/_controltemplates/InputFormControl.ascx" %> <%@ Register TagPrefix="wssuc" TagName="LinkSection" src="/_controltemplates/LinkSection.ascx" %> <%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="/_controltemplates/ButtonSection.ascx" %> <%@ Register TagPrefix="wssuc" TagName="ActionBar" src="/_controltemplates/ActionBar.ascx" %> <%@ Register TagPrefix="wssuc" TagName="ToolBar" src="/_controltemplates/ToolBar.ascx" %> <%@ Register TagPrefix="wssuc" TagName="ToolBarButton" src="/_controltemplates/ToolBarButton.ascx" %> <%@ Register TagPrefix="wssuc" TagName="Welcome" src="/_controltemplates/Welcome.ascx" %><asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server"></asp:Content><asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:dlc, WrkTask_PageTitle%>" EncodeMethod=‘HtmlEncode‘/></asp:Content><asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">    <a tabindex=1  id=onetidListHlink HREF=<% SPHttpUtility.AddQuote(SPHttpUtility.UrlPathEncode(List.DefaultViewUrl,true),Response.Output);%>><%SPHttpUtility.HtmlEncode(List.Title,Response.Output);%></A>: <% SPHttpUtility.HtmlEncode(m_taskName,Response.Output); %></asp:Content><asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server">    <asp:SiteMapPath SiteMapProvider="SPContentMapProvider" id="ContentMap" SkipLinkText="" runat="server"/></asp:Content><asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"></asp:Content><asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">    <SharePoint:FormComponent TemplateName="WorkflowEditFormToolBar" ControlMode="Edit" runat="server"/>    <table class="ms-informationbar" style="margin-top: 10px;" border="0" cellpadding="2" cellspacing="0"        width="100%"    >        <tr>            <td width="10" valign="center" style="padding: 4px;">                <img IMG SRC="/_layouts/images/Workflows.gif" alt=<%SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(GetLocString("WrkTask_PageTitle")),Response.Output);%>/>            </td>            <td id="itemLink">                <% SPHttpUtility.NoEncode(m_pageDescription,Response.Output); %></td>        </tr>    </table><div style="width:100%;height:250px;border:1px solid #666;overflow-x:hidden; overflow-y:auto"> <iframe width="100%" height="400px" frameborder="no" style="  margin-top:-140px;margin-left:50px;"  id="showItemDisplayForm"></iframe> </div>    <InfoPath:XmlFormView id="XmlFormControl" runat="server"        style="width:100%;"        />    <SharePoint:FormDigest runat=server/><script src="/_layouts/jquery-1.8.3.js"></script>  <script language="javascript">    var showDialog = function () {        var itemlink = $("#itemLink").find("a").attr("href");        var newItemLink;        var v = itemlink.split("/");        v.splice(3, v.length - 3);        var homePageUrl = v.join("/");        if (itemlink.substring(itemlink.length - 4, itemlink.length) == ".xml") {            newItemLink = homePageUrl + "/_layouts/FormServer.aspx?XmlLocation=" + encodeURI(itemlink) + "&DefaultItemOpen=1";        }        else {            newItemLink = itemlink + "&isdlg=1";        }                $("#showItemDisplayForm").attr("src", newItemLink);    }   _spBodyOnLoadFunctionNames.push(‘showDialog‘);  </script></asp:Content>

 

如你有更好的方法,請分享下。

修改任務顯示WrkTaskIp.aspx頁面

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.