Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.76 KB | None | 0 0
  1. <apex:page controller="PLPcontroller" showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
  2.  
  3. <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">
  4. <head>
  5. <meta charset="utf-8" />
  6. <meta http-equiv="x-ua-compatible" content="ie=edge" />
  7. <title>Lidl US</title>
  8. <meta name="viewport" content="width=device-width, initial-scale=1" />
  9. <apex:stylesheet value="{!URLFOR($Resource.LidlSFDesign, 'assets/styles/salesforce-lightning-design-system-vf.min.css')}" />
  10.  
  11. </head>
  12.  
  13. <apex:remoteObjects >
  14. <apex:remoteObjectModel name="ICIX_V1__ICIX_Product__c" jsShorthand="prod" fields="Id,Name,LastModifiedDate,ICIX_V1__ICIX_Product_ID__c,L1dlF0rm0rg__ELWIS_Product_Number__c,L1dlF0rm0rg__Item_Family_Picklist__c,L1dlF0rm0rg__Item_Family__c,L1dlF0rm0rg__Trading_Partner_Formula__c"/>
  15. </apex:remoteObjects>
  16.  
  17.  
  18. <body>
  19.  
  20. <!-- REQUIRED SLDS WRAPPER -->
  21. <div class="Lidl-Scoping">
  22.  
  23.  
  24. <!-- PAGE HEADER -->
  25.  
  26. <div class="slds-page-header" role="banner">
  27. <!-- LAYOUT GRID -->
  28. <div class="slds-grid">
  29.  
  30. <!-- GRID COL -->
  31. <div class="slds-col slds-has-flexi-truncate">
  32. <!-- HEADING AREA -->
  33.  
  34.  
  35.  
  36. <!-- MEDIA OBJECT = IcixProductIcon -->
  37. <div class="slds-media">
  38. <div class="slds-media__icon">
  39. <span class="icix-Products-icon">
  40. <img src="{!URLFOR($Resource.LidlSFDesign, 'assets/icons/custom/custom4_60.png')}" alt="" />
  41. </span>
  42. </div>
  43. <div class="slds-media__body">
  44. <h1 class="slds-page-header__title slds-s-right--small slds-align-relative slds-truncate" title="Product Listing Plan">Product Listing Plan</h1>
  45. </div>
  46. </div>
  47.  
  48. <!-- / MEDIA OBJECT -->
  49. <!-- / HEADING AREA -->
  50. </div>
  51.  
  52. <!-- ACTION BUTTONS -->
  53. <div class="slds-col slds-flex slds-grid slds-align-top slds-checkbox--faux cell-buffer">
  54. <div class="slds-button-group" role="group">
  55. <button class="slds-button slds-button--neutral">Refresh</button>
  56. <button class="slds-button slds-button--neutral">Edit</button>
  57. <button class="slds-button slds-button--neutral">Save</button>
  58. <button class="slds-button slds-button--neutral">
  59. <a href="/apex/FindProduct?retURL=%2Fa0M%2Fo&save_new=1&sfdc.override=1" tabindex="-1" role="presentation" class="slds-truncate"> </a>
  60. New ICIX Product
  61. </button>
  62. <button class="slds-button slds-button--neutral">
  63. More
  64. </button>
  65. </div>
  66. </div>
  67.  
  68. <!-- / ACTION BUTTONS -->
  69.  
  70. </div>
  71. <!-- / LAYOUT GRID -->
  72.  
  73. <!-- PAGE HEADER DETAIL ROW -->
  74.  
  75. <!-- / PAGE HEADER DETAIL ROW -->
  76.  
  77. </div>
  78. <!-- / PAGE HEADER -->
  79.  
  80. <!-- PRIMARY CONTENT WRAPPER -->
  81. <div class="LidlUS">
  82.  
  83. <!-- Product LIST TABLE -->
  84.  
  85. <div id="productList" class="slds-p-vertical--medium">
  86. <table class="slds-table slds-table--bordered">
  87. <thead>
  88. <tr class="slds-text-heading--label">
  89. <th class="slds-cell-shrink">
  90. <label class="slds-checkbox">
  91. <input type="checkbox" name="options" />
  92. <span class="slds-checkbox--faux"></span>
  93. <span class="slds-assistive-text">Select All</span>
  94. </label>
  95. </th>
  96. <th class="slds-is-sortable" scope="col">
  97. <div class="slds-truncate">Product Name
  98. <button class="slds-button slds-button--icon-bare">
  99. <svg aria-hidden="true" class="slds-button__icon slds-button__icon--small">
  100. <use xlink:href="{! URLFOR($Resource.LidlSFDesign, '/assets/icons/utility-sprite/svg/symbols.svg#arrowdown') }"></use>
  101. </svg>
  102. <span class="slds-assistive-text">Sort</span>
  103. </button>
  104. </div>
  105. </th>
  106. <th class="slds-is-sortable" scope="col">
  107. <div class="slds-truncate">Item Family
  108. <button class="slds-button slds-button--icon-bare">
  109. <svg aria-hidden="true" class="slds-button__icon slds-button__icon--small">
  110. <use xlink:href="{! URLFOR($Resource.LidlSFDesign, '/assets/icons/utility-sprite/svg/symbols.svg#arrowdown') }"></use>
  111. </svg>
  112. <span class="slds-assistive-text">Sort</span>
  113. </button>
  114. </div>
  115. </th>
  116. <th class="slds-is-sortable" scope="col">
  117. <div class="slds-truncate">Item Group
  118. <button class="slds-button slds-button--icon-bare">
  119. <svg aria-hidden="true" class="slds-button__icon slds-button__icon--small">
  120. <use xlink:href="{! URLFOR($Resource.LidlSFDesign, '/assets/icons/utility-sprite/svg/symbols.svg#arrowdown') }"></use>
  121. </svg>
  122. <span class="slds-assistive-text">Sort</span>
  123. </button>
  124. </div>
  125. </th>
  126. <th class="slds-is-sortable" scope="col">
  127. <div class="slds-truncate">Trading Partner
  128. <button class="slds-button slds-button--icon-bare">
  129. <svg aria-hidden="true" class="slds-button__icon slds-button__icon--small">
  130. <use xlink:href="{! URLFOR($Resource.LidlSFDesign, '/assets/icons/utility-sprite/svg/symbols.svg#arrowdown') }"></use>
  131. </svg>
  132. <span class="slds-assistive-text">Sort</span>
  133. </button>
  134. </div>
  135. </th>
  136. <th class="slds-is-sortable" scope="col">
  137. <div class="slds-truncate">ELWIS Item Number
  138. <button class="slds-button slds-button--icon-bare">
  139. <svg aria-hidden="true" class="slds-button__icon slds-button__icon--small">
  140. <use xlink:href="{! URLFOR($Resource.LidlSFDesign, '/assets/icons/utility-sprite/svg/symbols.svg#arrowdown') }"></use>
  141. </svg>
  142. <span class="slds-assistive-text">Sort</span>
  143. </button>
  144. </div>
  145. </th>
  146. <th class="slds-cell-shrink"></th>
  147. </tr>
  148. </thead>
  149. </table>
  150. </div>
  151. <!-- / Product LIST TABLE -->
  152.  
  153. </div>
  154. <!-- / PRIMARY CONTENT WRAPPER -->
  155.  
  156. <!-- FOOTER -->
  157. <footer role="contentinfo" class="slds-p-around--large">
  158. <!-- LAYOUT GRID -->
  159. <div class="slds-grid slds-grid--align-spread">
  160. <p class="slds-col">Powered by ICIX</p>
  161. <p class="slds-col">&copy; 2016 ICIX </p>
  162. </div>
  163. <!-- / LAYOUT GRID -->
  164. </footer>
  165. <!-- / FOOTER -->
  166.  
  167. </div>
  168. <!-- / REQUIRED SLDS WRAPPER -->
  169.  
  170. <!-- JAVASCRIPT -->
  171.  
  172. <script>
  173.  
  174. var prods = new SObjectModel.prod();
  175. var productTable = document.getElementById("productTable");
  176.  
  177. // fetching all products and fill the table
  178. function fetchAllProducts(){
  179.  
  180. prod.retrieve({orderby: [{Name: 'DESC'}]},
  181. function(error, records) {
  182. if (error) {
  183. alert(error.message);
  184. } else {
  185. var dataTable = document.createElement('table');
  186. dataTable.className = 'slds-checkbox--faux slds-table slds-table--bordered slds-table--cell-buffer slds-row-hover';
  187. // build table body
  188. var tableBody = dataTable.appendChild(document.createElement('tbody'));
  189. var dataRow, dataRowCell1, dataRowCell2, dataRowCell3, dataRowCell4, dataRowCell5, productName, itemFam, itemGroup, elwisId, tradingPart;
  190. records.forEach(function(record) {
  191. dataRow = tableBody.insertRow();
  192. dataRow.setAttribute("class", "slds-hint-parent");
  193.  
  194. dataRowCell1 = dataRow.insertCell(0);
  195. dataRowCell1.setAttribute("class", "slds-cell-shrink");
  196. dataRowCell1.setAttribute("data-label", "Select Row");
  197.  
  198. var lbl = document.createElement('label');
  199. lbl.setAttribute("class", "slds-checkbox");
  200. lbl.innerHTML = '<input type="checkbox" name="options" /><span class="slds-checkbox--faux"></span><span class="slds-assistive-text">Select Row</span>';
  201. dataRowCell1.appendChild(lbl);
  202. dataRowCell1 = dataRow.insertCell(1);
  203.  
  204. productName = document.createElement('a');
  205. productName.setAttribute('href','/' + record.get("Id"));
  206. productName.innerHTML = record.get("Name");
  207. dataRowCell1.appendChild(productName);
  208. dataRowCell1.setAttribute("data-label", "Product Name");
  209.  
  210. dataRowCell2 = dataRow.insertCell(2);
  211. itemFam = document.createTextNode(record.get("L1dlF0rm0rg__Item_Family_Picklist__c"));
  212. dataRowCell2.appendChild(itemFam);
  213. dataRowCell2.setAttribute("data-label", "Item Family");
  214.  
  215. dataRowCell3 = dataRow.insertCell(3);
  216. itemGroup = document.createTextNode(record.get("L1dlF0rm0rg__Item_Family__c"));
  217. dataRowCell3.appendChild(itemGroup);
  218. dataRowCell3.setAttribute("data-label", "Item Group");
  219.  
  220. dataRowCell4 = dataRow.insertCell(4);
  221. elwisId = document.createTextNode(record.get("L1dlF0rm0rg__ELWIS_Product_Number__c"));
  222. dataRowCell4.appendChild(elwisId);
  223. dataRowCell4.setAttribute("data-label", "Elwis Item Number");
  224.  
  225. dataRowCell5 = dataRow.insertCell(5);
  226. tradingPart = document.createTextNode(record.get("L1dlF0rm0rg__Trading_Partner_Formula__c"));
  227. dataRowCell5.appendChild(tradingPart);
  228. dataRowCell5.setAttribute("data-label", "Trading Partner");
  229.  
  230.  
  231. dataRowCell1 = dataRow.insertCell(6);
  232. dataRowCell1.setAttribute("class", "slds-cell-shrink");
  233. dataRowCell1.setAttribute("data-label", "Actions");
  234.  
  235. var btn = document.createElement('button');
  236. btn.setAttribute("class", "slds-button slds-button--icon-border-filled slds-button--icon-x-small");
  237. btn.innerHTML = "<svg aria-hidden="true" class="slds-button__icon slds-button__icon--hint slds-button__icon--small"><use xlink:href="{! URLFOR($Resource.LidlSFDesign, '/assets/icons/utility-sprite/svg/symbols.svg#down') }"></use></svg><span class="slds-assistive-text">Show More</span>";
  238. dataRowCell1.appendChild(btn);
  239. });
  240. }
  241. }
  242. );
  243.  
  244. </script>
  245. <!-- / JAVASCRIPT -->
  246.  
  247. </body>
  248. </html>
  249. </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement