SHARE
TWEET

Untitled

a guest Mar 15th, 2014 548 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.         var currentPageId = <SharePointWebControls:NumberField ControlMode="Display" ID="PageID" FieldName="1d22ea11-1e32-424e-89ab-9fedbadb6ce1" runat="server"/>;
  3. </script><WebPartPages:XsltListViewWebPart runat="server" ViewFlag="" ViewSelectorFetchAsync="False" InplaceSearchEnabled="True" ServerRender="False" ClientRender="True" InitialAsyncDataFetch="False" WebId="00000000-0000-0000-0000-000000000000" IsClientRender="False" GhostedXslLink="main.xsl" NoDefaultStyle="" ViewGuid="{8571F3CD-C286-4D4D-89AD-D4B2507A9448}" EnableOriginalValue="False" DisplayName="All Items" ViewContentTypeId="" Default="TRUE" ListUrl="" ListDisplayName="" ListName="{9156CA6E-0CAB-4CF6-B7D9-C477DD15301F}" ListId="9156ca6e-0cab-4cf6-b7d9-c477dd15301f" PageType="PAGE_DEFAULTVIEW" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="False" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" Title="Xslt List View" FrameType="TitleBarOnly" SuppressWebPartChrome="False" Description="" IsIncluded="True" ZoneID="Main" PartOrder="2" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" TitleUrl="/orders/Lists/order_items" DetailLink="/orders/Lists/order_items" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="" IsIncludedFilter="" ExportControlledProperties="False" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_8571f3cd_c286_4d4d_89ad_d4b2507a9448" __MarkupType="vsattributemarkup" __WebPartId="{8571F3CD-C286-4D4D-89AD-D4B2507A9448}" __AllowXSLTEditing="true" __designer:CustomXsl="Fldtypes_mswhTitle.xsl;fldtypes_Ratings.xsl" WebPart="true" Height="" Width=""><ParameterBindings>
  4.   <ParameterBinding Name="dvt_sortdir" Location="Postback;Connection"/>
  5.             <ParameterBinding Name="pageId" Location="Control(PageId,ItemFieldValue)" />
  6.             <ParameterBinding Name="dvt_sortfield" Location="Postback;Connection"/>
  7.             <ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue=""/>
  8.             <ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
  9.             <ParameterBinding Name="OpenMenuKeyAccessible" Location="Resource(wss,OpenMenuKeyAccessible)" />
  10.             <ParameterBinding Name="open_menu" Location="Resource(wss,open_menu)" />
  11.             <ParameterBinding Name="select_deselect_all" Location="Resource(wss,select_deselect_all)" />
  12.             <ParameterBinding Name="idPresEnabled" Location="Resource(wss,idPresEnabled)" /><ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" /></ParameterBindings>
  13. <DataFields>
  14. </DataFields>
  15. <XmlDefinition>
  16. <View Name="{8571F3CD-C286-4D4D-89AD-D4B2507A9448}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Items" Url="/orders/Lists/order_items/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/generic.png?rev=33" >
  17. <Query>
  18. <Where><Eq><FieldRef Name="Order0" LookupId="TRUE" /><Value Type="Integer">{pageId}</Value></Eq></Where>
  19. <OrderBy><FieldRef Name="ID"/></OrderBy></Query><ViewFields><FieldRef Name="Item"/><FieldRef Name="e3lg"/><FieldRef Name="Order0"/></ViewFields><RowLimit Paged="TRUE">30</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default="TRUE">main.xsl</XslLink><Toolbar Type="Standard"/></View></XmlDefinition>
  20. </WebPartPages:XsltListViewWebPart><PublishingWebControls:EditModePanel runat="server">
  21.         <script type="text/javascript">
  22.                 _spBodyOnLoadFunctions.push(function()
  23.                 {
  24.                         var viewId = '{8571F3CD-C286-4D4D-89AD-D4B2507A9448}';
  25.                         var orderColumnName = 'Order0';
  26.  
  27.                         g_SPGridInitInfo[viewId].jsInitObj.canUserAddColumn = false;
  28.                         g_SPGridInitInfo[viewId].jsInitObj.showAddColumn = false;
  29.                         EnsureScriptParams('inplview', 'InitGridFromView', viewId);
  30.                        
  31.                         SP.SOD.executeFunc('spgantt.js', 'SP.GanttControl', function() {
  32.                                 var jsGridContainer = $get("spgridcontainer_" + g_SPGridInitInfo[viewId].jsInitObj.qualifier);
  33.                                 jsGridContainer.jsgrid.HideColumn(orderColumnName);
  34.                                 var columns = jsGridContainer.jsgrid.GetColumns();
  35.                                 for (var i in columns)
  36.                                 {
  37.                                         columns[i].isSortable = false;
  38.                                         columns[i].isAutoFilterable = false;
  39.                                 }
  40.                                 jsGridContainer.jsgrid.UpdateColumns(new SP.JsGrid.ColumnInfoCollection(columns));
  41.                                 jsGridContainer.jsgrid.AttachEvent(SP.JsGrid.EventType.OnEntryRecordPropertyChanged, function(args) {
  42.                                         if (args.fieldKey != orderColumnName)
  43.                                         {
  44.                                                 var update = SP.JsGrid.CreateUnvalidatedPropertyUpdate(args.recordKey,orderColumnName,currentPageId,false);
  45.                                                 setTimeout(function() {jsGridContainer.jsgrid.UpdateProperties([update], SP.JsGrid.UserAction.UserEdit);}, 100);
  46.                                         }
  47.                                 });
  48.                         });
  49.                 });
  50.         </script>
  51. </PublishingWebControls:EditModePanel><PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Display" SupressTag="True">
  52.         <script type="text/javascript">
  53.            SP.SOD.executeFunc('clienttemplates.js', 'SPClientTemplates.TemplateManager', function() {
  54.                         SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
  55.                                 Templates: {
  56.                                         View: function (ctx) {
  57.                                                 return String.format('<div class="cbq-layout-main"><ul class="dfwp-list dfwp-column">{0}</ul></div>', ctx.RenderBody(ctx));
  58.                                         },
  59.                                         Item: function (ctx) {
  60.                                                 return String.format('<li class="dfwp-item"><div class="item"><div class="link-item">{0}</div></div></li>', ctx.CurrentItem['Item'][0].lookupValue);
  61.                                         }
  62.                                 }
  63.                         })
  64.            })
  65.         </script>
  66. </PublishingWebControls:EditModePanel></asp:Content>
RAW Paste Data
Top