Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.04 KB | None | 0 0
  1. <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
  2. <head>
  3. <title>Customer Zwei Zeilen</title>
  4. <!--[if gte mso 9]>
  5. <xml>
  6. <mso:CustomDocumentProperties>
  7. <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
  8. <mso:ManagedPropertyMapping msdt:dt="string">
  9. 'Link URL'{Link-URL}:'Path','Line 1'{Zeile 1}:'Title','Line 2'{Zeile 2}:'','FileExtension','SecondaryFileExtension'
  10. </mso:ManagedPropertyMapping>
  11. <mso:MasterPageDescription msdt:dt="string">
  12. Diese Elementanzeigevorlage zeigt ein kleines Miniaturansichtssymbol neben einem Link des Elementtitels an mit einer zusätzlichen Zeile, die für eine benutzerdefinierte, verwaltete Eigenschaft zur Verfügung steht.
  13. </mso:MasterPageDescription>
  14. <mso:ContentTypeId msdt:dt="string">
  15. 0x0101002039C03B61C64EC4A04F5361F385106603
  16. </mso:ContentTypeId>
  17. <mso:TargetControlType msdt:dt="string">
  18. ;#Content Web Parts;#<
  19. /mso:TargetControlType>
  20. <mso:HtmlDesignAssociated msdt:dt="string">
  21. 1
  22. </mso:HtmlDesignAssociated>
  23. </mso:CustomDocumentProperties>
  24. </xml>
  25. <![endif]-->
  26. </head>
  27. <body>
  28. <!--
  29. Warning: Do not try to add HTML to this section. Only the contents of the first <div>
  30. inside the <body> tag will be used while executing Display Template code. Any HTML that
  31. you add to this section will NOT become part of your Display Template.
  32. -->
  33. <script>
  34. $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
  35. </script>
  36. <!--
  37. Use the div below to author your Display Template. Here are some things to keep in mind:
  38. * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
  39. inside a comment.
  40.  
  41. * Use the values assigned to your variables using an "underscore pound equals"
  42. (_#= ... =#_) token.
  43. -->
  44. <div id="TwoLines">
  45. <!--#_
  46. var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_2lines_");
  47. var linkURL = $getItemValue(ctx, "Link URL");
  48. linkURL.overrideValueRenderer($urlHtmlEncodeValueObject);
  49. var iconURL = Srch.ContentBySearch.getIconSourceFromItem(ctx.CurrentItem);
  50. var fields = iconURL.split('/');
  51. var leer = fields[0];
  52. var layout = fields[1];
  53. var hive = fields[2];
  54. var images = fields[3];
  55. var fileIcon = fields[4];
  56. switch(fileIcon){
  57. case "icpdf.png": fileIconUrl="/sites/intranet/_catalogs/masterpage/customer/Images/file-pdf.png";
  58. console.log("PDF")
  59. break;
  60. case "icdocx.png": fileIconUrl="/sites/intranet/_catalogs/masterpage/customer/Images/File-word.png";
  61. console.log("Word")
  62. break;
  63. default: fileIconUrl="/sites/intranet/_catalogs/masterpage/customer/Images/file.png";
  64. console.log("Default")
  65. };
  66. var line1 = $getItemValue(ctx, "Line 1");
  67. var line2 = $getItemValue(ctx, "Line 2");
  68. line1.overrideValueRenderer($contentLineText);
  69. line2.overrideValueRenderer($contentLineText);
  70.  
  71. var containerId = encodedId + "container";
  72. var pictureLinkId = encodedId + "pictureLink";
  73. var pictureId = encodedId + "picture";
  74. var dataContainerId = encodedId + "dataContainer";
  75. var line1LinkId = encodedId + "line1Link";
  76. var line1Id = encodedId + "line1";
  77. var line2Id = encodedId + "line2";
  78. _#-->
  79. <div class="Customer-Item" id="_#= containerId =#_" data-displaytemplate="Item2Lines">
  80. <a class="cbs-ItemLink">
  81. <img class="Customer-Thumbnail" src="_#= $urlHtmlEncodeString(fileIconUrl) =#_"/>
  82. </a>
  83. <div class="cbs-Detail">
  84. <a class="cbs-Line1Link ms-noWrap ms-displayBlock" href="_#= linkURL =#_">
  85. _#= line1 =#_
  86. </a>
  87. </div>
  88. </div>
  89. </div>
  90. </body>
  91. </html>
  92.  
  93. <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
  94. <head>
  95. <title>Customer-Slider</title>
  96.  
  97. <!--[if gte mso 9]><xml>
  98. <mso:CustomDocumentProperties>
  99. <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
  100. <mso:MasterPageDescription msdt:dt="string">Diese Steuerelement-Anzeigevorlage zeigt eine Bildschirmpräsentation mit Bildern an, die alle 5 Sekunden einen Satz von Elementen durchläuft. Es wird immer ein Element gleichzeitig angezeigt, wobei der Titel des Elements das Bild überlagert.</mso:MasterPageDescription>
  101. <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106601</mso:ContentTypeId>
  102. <mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
  103. <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
  104. </mso:CustomDocumentProperties>
  105. </xml><![endif]-->
  106. </head>
  107.  
  108. <body>
  109.  
  110. <!--
  111. Warning: Do not try to add HTML to this section. Only the contents of the first <div>
  112. inside the <body> tag will be used while executing Display Template code. Any HTML that
  113. you add to this section will NOT become part of your Display Template.
  114. -->
  115. <script>
  116. $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
  117. </script>
  118.  
  119. <!--
  120. Use the div below to author your Display Template. Here are some things to keep in mind:
  121. * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
  122. inside a comment.
  123.  
  124. * Use the values assigned to your variables using an "underscore pound equals"
  125. (_#= ... =#_) token.
  126. -->
  127.  
  128. <div id="Customer-Slideshow">
  129. <!--#_
  130. var $noResults = Srch.ContentBySearch.getControlTemplateEncodedNoResultsMessage(ctx.ClientControl);
  131.  
  132. if (!$isNull(ctx.ClientControl) &&
  133. !$isNull(ctx.ClientControl.shouldRenderControl) &&
  134. !ctx.ClientControl.shouldRenderControl())
  135. {
  136. return "";
  137. }
  138. ctx.ListDataJSONGroupsKey = "ResultTables";
  139.  
  140. window.cbs_Slideshow_init = function(controlDiv){
  141. if(!controlDiv.timer){
  142. cbs_Slideshow_setSlideStatus(controlDiv.children[0].children[0], controlDiv.children[2].children[0], true);
  143. var timer = document.createAttribute("timer");
  144. controlDiv.setAttributeNode(timer);
  145.  
  146. cbs_addMouseHandlers(controlDiv);
  147.  
  148. var numResults = ctx.ClientControl.get_numberOfItems();
  149. if($isNull(window._slideShowCount))
  150. {
  151. window._slideShowCount = {};
  152. }
  153. window._slideShowCount[controlDiv.id] = numResults;
  154.  
  155. var startIndex = cbs_getStyle(controlDiv, 'direction') != 'rtl' ? 0 : numResults - 1;
  156. cbs_Slideshow_changeSlide(controlDiv, startIndex);
  157. cbs_Slideshow_timer(controlDiv, startIndex);
  158. }
  159. };
  160.  
  161. window.cbs_addMouseHandlers = function(slideshow)
  162. {
  163. if($isNull(slideshow) || $isNull(slideshow.children) || slideshow.children.length == 0 ||
  164. $isNull(slideshow.children[0].children) || slideshow.children[0].children.length == 0){
  165. return;
  166. }
  167. var slideItems = slideshow.children[0].children;
  168. for(var slideNum = 0; slideNum < slideItems.length; slideNum++){
  169.  
  170. (function()
  171. {
  172. var currentSlideNumber = slideNum;
  173. var slideItem = slideItems[currentSlideNumber];
  174. cbs_addEventListener(slideItem, 'mouseover', function(){ clearTimeout(slideshow.timer); });
  175. cbs_addEventListener(slideItem, 'mouseout', function(){ cbs_Slideshow_changeSlide(slideshow, currentSlideNumber); });
  176. })();
  177. }
  178. }
  179.  
  180. window.cbs_Slideshow_timer = function(controlDiv, currentIdx){
  181. var TimerDelayMilliSeconds = 5000;
  182. if($isNull(controlDiv) || controlDiv.children.length == 0){
  183. setTimeout(function(){cbs_Slideshow_timer(controlDiv, currentIdx); controlDiv = null; currentIdx = null;}, TimerDelayMilliSeconds);
  184. return;
  185. }
  186.  
  187. currentIdx += cbs_getStyle(controlDiv, 'direction') != 'rtl' ? 1 : -1;
  188. var numResults = window._slideShowCount[controlDiv.id];
  189. if(currentIdx >= numResults){
  190. currentIdx = 0;
  191. }
  192. else if(currentIdx < 0)
  193. {
  194. currentIdx = numResults - 1;
  195. }
  196. clearTimeout(controlDiv.timer);
  197. controlDiv.timer = setTimeout(function(){cbs_Slideshow_changeSlide(controlDiv, currentIdx); controlDiv = null; currentIdx = null;}, TimerDelayMilliSeconds);
  198. };
  199.  
  200. window.cbs_Slideshow_onclick = function(target, idx){
  201. var slideshow = target.parentNode.parentNode;
  202.  
  203. clearTimeout(slideshow.timer);
  204. cbs_Slideshow_changeSlide(slideshow, idx);
  205. };
  206.  
  207. window.cbs_Slideshow_changeSlide = function(slideshow, slideIndex){
  208. if($isNull(slideshow)){return;}
  209. if($isNull(slideshow.children) || slideshow.children.length == 0){cbs_Slideshow_timer(slideshow, slideIndex); return;}
  210.  
  211. var slideItems = slideshow.children[0].children;
  212. var buttonItems = slideshow.children[2].children;
  213. var numResults = slideItems.length;
  214. for(var k = 0; k < numResults; k++){
  215. if(k == slideIndex) {continue;}
  216. var buttonElement = k < buttonItems.length ? buttonItems[k] : null;
  217. cbs_Slideshow_setSlideStatus(slideItems[k], buttonElement, false);
  218. }
  219. if(slideIndex >= 0 && slideIndex < numResults){
  220. var buttonElement = slideIndex < buttonItems.length ? buttonItems[slideIndex] : null;
  221. cbs_Slideshow_setSlideStatus(slideItems[slideIndex], buttonElement, true);
  222. }
  223.  
  224. cbs_Slideshow_timer(slideshow, slideIndex);
  225. };
  226.  
  227. window.cbs_Slideshow_setSlideStatus = function(slideElement, buttonElement, isActive){
  228. if(!$isNull(slideElement)){
  229. slideElement.style.display = isActive ? "block" : "none";
  230. }
  231. if(!$isNull(buttonElement)){
  232. var activeButtonClassName = "Customer-SlideshowPagingLink-Active";
  233. var inactiveButtonClassName = "Customer-SlideshowPagingLink-Inactive";
  234. var oldClassName = isActive ? inactiveButtonClassName : activeButtonClassName;
  235. var newClassName = isActive ? activeButtonClassName : inactiveButtonClassName;
  236. buttonElement.className = buttonElement.className.replace(oldClassName, newClassName);
  237. }
  238. }
  239.  
  240. window.cbs_getStyle = function(element,propertyName)
  241. {
  242. var styleValue = null;
  243. if($isNull(element)){return styleValue;}
  244.  
  245. if (element.currentStyle){
  246. styleValue = element.currentStyle[propertyName];
  247. }
  248. else if (window.getComputedStyle){
  249. styleValue = document.defaultView.getComputedStyle(element,null).getPropertyValue(propertyName);
  250. }
  251. return styleValue;
  252. }
  253.  
  254. window.cbs_addEventListener = function(element, eventName, func)
  255. {
  256. if(!$isNull(element) && !$isEmptyString(eventName) && !$isNull(func))
  257. {
  258. if(!$isNull(element.addEventListener))
  259. {
  260. element.addEventListener(eventName, func);
  261. }
  262. else if (!$isNull(element.attachEvent))
  263. {
  264. eventName = eventName.indexOf("on") == 0 ? eventName : "on" + eventName;
  265. element.attachEvent(eventName, func);
  266. }
  267. }
  268. }
  269.  
  270. var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_slideShow_");
  271. var itemsContainerId = encodedId + "container";
  272. var pagingOverlayId = encodedId + "pagingOverlay";
  273. var pagingBarId = encodedId + "pagingBar";
  274. var pagingMoreId = encodedId + "pagingMore";
  275.  
  276. ctx.OnPostRender = [];
  277.  
  278. ctx.OnPostRender.push(function(){
  279. var slideshows = document.querySelectorAll(".Customer-Slideshow");
  280.  
  281. for(var i = 0; i < slideshows.length; i++){
  282. cbs_Slideshow_init(slideshows[i]);
  283. }
  284. });
  285. _#-->
  286. <div class="Customer-Slideshow" id="_#= encodedId =#_" data-displaytemplate="ControlSlideshow">
  287. <div class="Customer-SlideshowItems" id="_#= itemsContainerId =#_">
  288. _#= ctx.RenderGroups(ctx) =#_
  289. </div>
  290. <!--#_
  291. if (ctx.ClientControl.get_shouldShowNoResultMessage()){
  292. _#-->
  293. <div class="Customer-SlideShow-noResults">_#= $noResults =#_</div>
  294. <!--#_
  295. }
  296. _#-->
  297. <div class="Customer-SlideshowPagingBarOverlay" id="_#= pagingOverlayId =#_"></div>
  298. <div class="Customer-SlideshowPagingBar" id="_#= pagingBarId =#_">
  299. <!--#_
  300. var MaxNumOfResults = 12;
  301. var numResults = ctx.ClientControl.get_numberOfItems();
  302. var numResultsToShowPaging = Math.min(numResults, MaxNumOfResults);
  303. for(var i = 0; i < numResultsToShowPaging; i++){
  304. var anchorId = encodedId + "pagingControl" + i;
  305. _#-->
  306. <a class="Customer-SlideshowPagingLink-Inactive" href="javascript:{}" onclick="cbs_Slideshow_onclick(this, _#= i =#_);" id="_#= anchorId =#_">
  307. <span>&nbsp;</span>
  308. </a>
  309. <!--#_
  310. }
  311. if(numResults > numResultsToShowPaging){
  312. _#-->
  313. <div class="Customer-SlideshowPaging-More" id="_#= pagingMoreId =#_">
  314. <span>&hellip;</span>
  315. </div>
  316. <!--#_
  317. }
  318. _#-->
  319. </div>
  320. </div>
  321. </div>
  322. </body>
  323. </html>
  324.  
  325. <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
  326. <head>
  327. <title>Customer News</title>
  328. <!--[if gte mso 9]><xml>
  329. <mso:CustomDocumentProperties>
  330. <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
  331. <mso:ManagedPropertyMapping msdt:dt="string">'Picture URL'{Bild-URL}:'PublishingImage;PictureURL;PictureThumbnailURL','Link URL'{Link-URL}:'Path','Line 1'{Titel}:'Title','Line 2'{Text}:'Body;Description','Line 3'{Autor}:'CreatedBy;Author','Line 4'{Erstellt}:'Created'</mso:ManagedPropertyMapping>
  332. <mso:MasterPageDescription msdt:dt="string">Diese Elementanzeigevorlage zeigt ein Bild des Elements mit der Aufloesung 150 x 150 auf der linken Seite an. Rechts sind Titel, Erstellungsdatum und Anrisstext zu finden.</mso:MasterPageDescription>
  333. <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
  334. <mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
  335. <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
  336. </mso:CustomDocumentProperties>
  337. </xml><![endif]-->
  338. </head>
  339.  
  340. <body>
  341. <!--
  342. Warning: Do not try to add HTML to this section. Only the contents of the first <div>
  343. inside the <body> tag will be used while executing Display Template code. Any HTML that
  344. you add to this section will NOT become part of your Display Template.
  345. -->
  346. <script>
  347. $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
  348. </script>
  349. <!--
  350. Use the div below to author your Display Template. Here are some things to keep in mind:
  351. * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
  352. inside a comment.
  353. * Use the values assigned to your variables using an "underscore pound equals"
  354. (_#= ... =#_) token.
  355. -->
  356. <div id="Customer_Item_Picture3Lines">
  357. <!--#_
  358. var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_picture3Lines_");
  359. var linkURL = $getItemValue(ctx, "Link URL");
  360. linkURL.overrideValueRenderer($urlHtmlEncodeValueObject);
  361. var line1 = $getItemValue(ctx, "Line 1");
  362. var line2 = $getItemValue(ctx, "Line 2");
  363. var line3 = $getItemValue(ctx, "Line 3");
  364. var line4 = $getItemValue(ctx, "Line 4");
  365. var pictureURL = $getItemValue(ctx, "Picture URL");
  366. var pictureId = encodedId + "picture";
  367. var pictureMarkup = Srch.ContentBySearch.getPictureMarkup(pictureURL, 150, 150, ctx.CurrentItem, "cbs-picture3LinesImg", line1, pictureId);
  368. line1.overrideValueRenderer($contentLineText);
  369. line2.overrideValueRenderer($contentLineText);
  370. line3.overrideValueRenderer($contentLineText);
  371. line4.overrideValueRenderer($contentLineText);
  372. var containerId = encodedId + "container";
  373. var pictureLinkId = encodedId + "pictureLink";
  374. var pictureContainerId = encodedId + "pictureContainer";
  375. var dataContainerId = encodedId + "dataContainer";
  376. var line1LinkId = encodedId + "line1Link";
  377. var line1Id = encodedId + "line1";
  378. var line2Id = encodedId + "line2";
  379. var line3Id = encodedId + "line3";
  380. var line4Id = encodedId + "line4";
  381. var dataDisplayTemplateTitle = "ItemPicture3Lines";
  382. _#-->
  383.  
  384. <div class="container-fluid" id="Customer-Slider-Container">
  385. <div class="row">
  386. <div class="col-3" id="Customer-Slider-Left">
  387. <div class="Customer-Slider-Image">
  388. <a class="Customer-Slider_Image-Link" href="_#= linkURL =#_" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureLinkId =#_">
  389. _#= pictureMarkup =#_
  390. </a>
  391. </div>
  392. </div>
  393. <div class="col-9" id="Customer-Slider-Right">
  394. <div class="row">
  395. <div class="col-12" id="Customer-Slider-Title">
  396. <a href="_#= linkURL =#_">
  397. <h2 class="Customer-Slider-Title-Link" id="_#= line1Id =#_" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_">
  398. _#= line1 =#_
  399. </h2>
  400. </a>
  401. </div>
  402. <div class="col-12" id="Customer-Slider-Date">
  403. _#= line4 =#_
  404. </div>
  405. <div class="col-12" id="Customer-Slider-Body">
  406. _#= STSHtmlDecode(line2.value) =#_
  407. </div>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </body>
  414. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement