This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"Name":"109x EXAMPLE PO running total each POItem with PO Total","Active":true,"Notes":"Custom Prepare example to gather running total for the PO and running total for ALL POs in this list\nHTML example using ayCurrency","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}} \n\t<p>PO: {{ Serial }}</p>\n\t\t{{#each Items}}\n\t\t<p> LineTotalViz: {{ ayCurrency LineTotalViz}}, RunningTotal: {{ ayCurrency PORunningTotal }} <p/>\n\t\t{{/each}}\n\t<p>This PO total dollar amount: {{ ayCurrency ThisPODollarAmount }}</p>\n\t<hr> \n\t\n\t{{/each}}\n <h2> ALL POS: {{ayCurrency AllPORunningTotal}} </h2>\n\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n //Declare a temporary variable to hold the running total\n \nlet AllPODollarAmount = 0;\n\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the TotalDollarAmount variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPODollarAmount = 0;\n for (Item of EachPO.Items)\n {\n\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPODollarAmount += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPODollarAmount;\n }\n EachPO.ThisPODollarAmount=ThisPODollarAmount;\n AllPODollarAmount += ThisPODollarAmount;\n }\n\n //Add the AllPODollarAmount variable to the reportData so it can be \n //accessed in the report template \n reportData.AllPORunningTotal=AllPODollarAmount;\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"Name":"109x EXAMPLE PO Barcode using built in helper","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<h2>Example: Bar code helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t{{#each ayReportData}}\n\tPO #: {{Serial}}\n\t<div>\n\t\tPO # as \"CODE-128\" BarCode:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tPO # as \"QR\" Code:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSample \"UPC-A\" Code (PO # wouldn't be a valid UPC code so hard coded the numbers 712345678904 as example here):<br/>\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<br/>\n\t<hr/>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000}
|
||||
@@ -0,0 +1 @@
|
||||
{"Name":"109x EXAMPLE PO Basic table layout ","Active":true,"Notes":"example of displaying a Parent value when the #each references a Child, use a ../ in front of the Property name in the mustaches\nexample PDF Options Header & Footer; ","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\t\n\t<table>\t\t\n\t<thead><!-- this indicates start of your table header section -->\n\t\t<tr><!-- this indicates start of one row in your thead -->\n\t\t\t<th>column header 1</th> <!-- The text in <th> elements are bold and centered by default, can also override by setting specifics in your CSS -->\n\t\t\t<th>column header 2</th>\n\t\t\t<th>column header 3</th>\n\t\t\t<th>column header 4</th>\n\t\t</tr><!-- this indicates end of that one row in your thead -->\n\t</thead><!-- this indicates end of your table header section -->\n\t{{#each ayReportData}}<!-- this #each encompasses the area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<!-- if want the header repeated for every PO, the #each to encompass the thead area too, otherwise encompass the tbody -->\t\n\t<tbody>\t<!-- this indicates start of your table body section -->\t\n\t\t{{#each Items}} <!-- this #each encompasses the area that repeats for each Child object (i.e. each PO Item) in your Sample Data -->\n\t\t\t<tr><!-- this indicates start of one row in your tbody -->\n\t\t\t\t<td>TBODY PO# {{../Serial}}</td> <!-- to display a Parent value when the #each references a Child, use a ../ in front of the Property name in the mustaches -->\n\t\t\t\t<td class=\"fontgreen\">TBODY Part #: {{PartViz}} </td> <!-- to display a value when the #each references a Child, encompass the Property name in mustaches -->\n\t\t\t\t<td>TBODY Qty Ordered: {{QuantityOrdered}}</td><!-- The text in <td> elements are regular and left-aligned by default, can also set specifics in your CSS -->\n\t\t\t\t<td>TBODY Serials: {{Serials}}</td><!-- in this instance, Serials with an S refers to the serials received for that PO Item -->\n\t\t\t</tr>\n\t\t{{/each}}<!-- this closes the emcompassed area that repeats for each Child object (i.e. each PO Item) in your Sample Data -->\t\t\n\t</tbody><!-- this indicates end of your table body section -->\n\t{{/each}}<!-- this closes the emcompassed area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<tfoot class=\"footertext\"><!-- this applies specific CSS class attributes to all of tfoot and its td's -->\n\t\t<tr>\n\t\t\t<td>footer stuff 1</td>\n\t\t\t<td colspan=\"2\">expands across two columns with or without having to have text</td><!-- this inline colspan spans multiple columns -->\n\t\t\t<td>footer stuff 3</td>\n\t\t</tr>\n\t</tfoot><!-- this indicates end of your table footer section -->\t\t\n\t</table>\t\t\n</body>\n</html>","Style":"table { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 18pt;\n width: 100%;\n }\n\ntbody tr {\n width: 100%;\n}\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n.footertext {\n font-size: 20pt;\n font-style: italic;\n background-color: pink;\n}\n\n.fontgreen {\n color: green;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt;width: 94%; text-align:left; \"> Todays date: <span class=\"date\"></span> set in PDF Options</span>","FooterTemplate":"<span style=\"font-size:6pt;width: 94%; text-align: right; \"> set in PDF Options Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
@@ -0,0 +1 @@
|
||||
{"Name":"109x EXAMPLE PO Custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<h2>Example: custom fields usage </h2>\n\t\t<p>See help documentation for details</p>\n\t\t<hr>\n\t</div>\n\t<div >\n\t\t{{#each ayReportData}} <!-- this #each is for iterating through each PO, note further below its corresponding /each to close -->\n\t\t<h2>PO # (internal key is Serial, to indicate a unique number ): {{ Serial }} </h2><br/>\n\t\tTags (if any tags, otherwise will show blank if none): {{Tags}} <br/>\n\t\t<h3>Custom fields </h3>\n\t\t<p class=\"example\">Custom field items can be accessed via the main object's CustomFields property and then by dot notation for each of the 16 possible custom fields as .c1 to .c16 \n\t\tIf a custom field is unused it will return a blank for that item.</p>\n\t\t<p class=\"example\">(note, example assumes generated sample data and that c1 and c5 have data)</p>\n\t\t<strong>Custom c1 as DateTime: {{ ayDateTime CustomFields.c1}}</strong> <br/>\n\t\t<strong>custom c5 as Number: {{ ayDecimal CustomFields.c5}}</strong> <br/>\t\t\n\n\t\t\t{{#each Items}} <!-- this #each is for iterating through each po items, note further below its corresponding /each to close -->\n\t\t\t<h2>For each PO Item (non custom fields) </h2>\t\n\t\t\tPurchaseOrderCost as is in database: {{ PurchaseOrderCost}} <br/>\t\t\n\t\t\tPurchaseOrderCost as Decimal Number (defaults to three decimal places): {{ ayDecimal PurchaseOrderCost}} <br/>\t\t\n\t\t\tPurchaseOrderCost as Currency: {{ ayCurrency PurchaseOrderCost}} <br/>\t\t\t\n\t\t\t{{/each}} <!-- this /each closes the iterating through each po items -->\n\t\t\t<hr />\n\t\t{{/each}} <!-- this /each closes the iterating through each PO -->\n\t\t<hr >\n\n\t</div>\n\n</body>\n\n</html>","Style":".example {\n color: blue;\n}\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"Name":"109x EXAMPLE PO Wiki displayed","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<h2>Example: WIKI / markdown field usage </h2>\n\t<p>See help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h1>FOR PO# {{Serial}} from vendor: {{VendorViz}}</h1>\n\t<h1>Below is Wiki for above PO:</h1>\n\t<div>\n\t{{ ayWiki Wiki }}\n\t</div>\n\t<hr>\n\t{{/each}}\n\t\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"Name":"109x EXAMPLE PO comparing qty ordered to qty received for each poitem","Active":true,"Notes":"example custom Helper if_eq to compare ordered to received, if same show in green. if NOT same, show in red.\nexample use of HTML if else /if - if serials present then show, else show preset text","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\n\t\n\t<table>\n \n <thead>\n <tr>\n <td>PO#:</td>\n <td>Part#:</td>\n <td>QTY Ordered:</td>\n <td>QTY Received:</td>\n <td>Serials Received:</td>\n </tr>\n </thead>\n {{#each ayReportData}}\n <tbody> \n {{#each Items}} \n <tr> <!--note the additional Helper created #if_eq with which to do a direct comparison -->\n <td>{{../Serial}}</td> <!-- reference the 'parent' scope by placing ../ in front of the property name -->\n <td>{{PartViz}} </td> <!-- whereas this is within 'Items' so no prefix of ../ -->\n <td>{{QuantityOrdered}}</td>\n\n <!-- if_eq else statements below basically does: if received equals ordered display in green, if not equal, displays in red -->\n {{#if_eq QuantityOrdered QuantityReceived}}<td class=\"fontgreen\">same as ordered {{QuantityReceived}}</td> {{else}}<td class=\"fontred\">different than ordered {{QuantityReceived}}</td>{{/if_eq}}\n\t\t\t\t\t<!-- if else statements below basically does: if poitem has any serial numbers display, else if no serial display that preset text in red -->\n {{#if Serials}}<td>{{Serials}}</td>{{else}}<td class=\"fontblue\">no serials documented</td>{{/if}}\n </tr>\n {{/each}}\n </tbody>\n {{/each}}\n </table>\n\t\n</body>\n</html>","Style":".example {\n color: blue;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 16pt;\n width: 100%;\n }\n\ntbody td {\n width: 20%; /* spans each column even width */\n}\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\n\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"Name":"109x EXAMPLE PO show parent value AND child value on SAME row","Active":true,"Notes":"example HTML mustache for displaying parent property (i.e. the PO number) when \"in\" Child iteration (PO items)","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\n\t\n\t<table>\n {{#each ayReportData}}\n <thead>\n <tr>\n <td>MAIN HEADER PO#: {{Serial}}</td> <!-- note NO ../ in front of the variable name here as this #each references the object directly -->\n <td>MAIN HEADER empty1</td>\n <td>MAIN HEADER empty2</td>\n </tr>\n </thead>\n <tbody> \n {{#each Items}} \n \n <tr>\n \n <td>TBODY PO# {{../Serial}}</td> <!-- note the ../ in front of the variable name when calling a variable from 'above' the Items array of the object -->\n <td>TBODY Part #: {{PartViz}} </td>\n <td>TBODY Qty Ordered: {{QuantityOrdered}}</td> <!-- whereas these are from the #each Items array of the object -->\n \n </tr>\n {{/each}}\n </tbody>\n {{/each}}\n </table>\n\t\n</body>\n</html>","Style":".example {\n color: blue;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 16pt;\n width: 100%;\n }\n\ntbody tr {\n width: 100%;\n}\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} ","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt;width: 94%; text-align:left; \"> (from PDF Options) Printed date: <span class=\"date\"></span></span>","FooterTemplate":"<span style=\"font-size:6pt;width: 94%; text-align: right; \"> set in PDF Options Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
@@ -0,0 +1 @@
|
||||
{"Name":"109x EXAMPLE PO show tags dependent on custom Helpers","Active":true,"Notes":"example custom Helpers functions if has tag X then show Y, else return something else like preset text\nexample in custom Helper if want to use CSS styling, how to correctly wrap in a safestring","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<h2>Example: Helpers to show if has a specific Tag / Custom fields usage </h2>\n\t<p>See the specific Helpers in this report template, and the help documentation for additional details</p>\n\n\t<table>\n\t\t{{#each ayReportData}}\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th> </th>\n\t\t\t\t<th> </th>\n\t\t\t</tr>\n\t\t</thead> \n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<th>For PO#:</th> <!--th styles this as a heading column -->\n\t\t\t\t<th>{{ Serial }}</th><!--th styles this as a heading column -->\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Display 1st Tag only:</td><!--td styles this as a data column -->\n\t\t\t\t<td>{{ Tags.[0]}} </td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called ayReportData's to display all tags for this PO:</td>\n\t\t\t\t<td class=\"blueMe\">{{ Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'gold':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'brown':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag2 Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'yellow':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag3 Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>If CustomFields.c1 has value, will display greenfont else will display redfont</td>\n\t\t\t\t{{#if CustomFields.c1}} <td class='greenMe' >{{CustomFields.c1}}</td> {{else}} <td class='redMe' >nope nothing here</td> {{/if}}\n\t\t\t</tr>\n\t\t\t{{#each Items}}\n\t\t\t<tr>\n\t\t\t\t<td>For each POitem will display in redfont if QuantyReceived is false, undefined, null, \"\", 0, or []</td>\n\t\t\t\t{{#if QuantityReceived}} <td class='greenMe' >For {{PartViz}} have received: {{QuantityReceived}}</td> {{else}} <td class='redMe' >Nothing received yet for {{PartViz}}</td> {{/if}}\n\t\t\t</tr>\n\t\t\t{{/each}}\n\t\t</tbody>\n\t\t{{/each}}\n\t</table>\n \n</body>\n\n</html>","Style":".redMe {\n color: red;\n}\n\n.greenMe {\n color: green;\n}\n\n\n.blueMe {\n color: blue;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 18pt;\n width: 100%;\n }\n\n\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} ","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"Handlebars.registerHelper('isInTag', function (Tags) \n{\n for (var i=0; i<Tags.length; i++) \n\t{\n if (Tags[i].match('gold'))\n\t\t{ \n return 'gold'; \n\t\t}\n }\n return 'no gold tag';\n});\n\nHandlebars.registerHelper('isInTag2', function (Tags) \n{\n for (var i=0; i<Tags.length; i++) \n\t{\n if (Tags[i].match('brown'))\n\t\t{ \n\t\t\treturn 'THE WORD or part of brown IS IN HERE';\n\t\t}\n }\n return 'NOPE part of full word with \\'brown\\' is NOT HERE';\n});\n\nHandlebars.registerHelper('isInTag3', function (Tags) \n{\n for (var i=0; i<Tags.length; i++) \n\t{\n if (Tags[i].match('yellow'))\n\t\t{ \n\t\t\treturn new Handlebars.SafeString(\"<p class='greenMe' >\" + \"yellow is in here!! see how this shows in greenfont!\" +\"</p>\"); //if want to use CSS styling, be sure to wrap in a safestring\n\t\t}\n }\n return 'Nope yellow isn\\'t in tags for this poitem'; //if don't want to return any element at all, comment this else aspect out fully\n});\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE API use and meta data","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Meta data and API usage</h2>\n\t<p>See help documentation for details</p>\n\t\n\t<div>\n\t\t<h4>ayServerMetaData</h4>\n\t\t{{ ayJSON ayServerMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayClientMetaData</h4>\n\t\t{{ ayJSON ayClientMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportMetaData</h4>\n\t\t{{ ayJSON ayReportMetaData }}\n\t</div>\n\n\n\t<div>\n\t\t<h4>myData</h4>\n\t\t<h5>(Fetched dynamically from API route <strong>enum-list/list/AyaType</strong>)</h5>\n\t\t{{ ayJSON myData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportData</h4>\n\t\t{{#each ayReportData}}\n\t\t<h2>{{ Name }}</h2>\n\t\t<div>Notes: <span class=\"example\">{{ Notes }}</span></div>\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders \n\n //Example of using API GET method to fetch data from API server and make it available to the report template\n\n //Put the data into the main report data object so it's available to the template\n reportData.myData={ServerInfo:await ayGetFromAPI(\"server-info\")};\n\n //Example API POST method to fetch data from api server\n let searchPostData={phrase: \"Fresh\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
||||
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE Bar code helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Bar code helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>\n\t\tSerial as \"CODE-128\" BarCode:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSerial as \"QR\" Code:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSample \"UPC-A\" Code (Serial wouldn't be a valid UPC code so hard coded here):<br/>\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<br/>\n\t<hr/>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE Logo helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: LOGO </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p>Note: you must upload a logo via the Global Settings form in order to see them here</p>\n\n\t<h4>Small logo</h4>\n\t{{ ayLogo \"small\" }}\n\n\t<h4>Medium logo</h4>\n\t{{ ayLogo \"medium\" }}\n\n\t<h4>Large logo</h4>\n\t{{ ayLogo \"large\" }}\n\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
||||
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE PDF Options page number","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":"","JsPrerender":"","JsHelpers":"","RenderType":0,"HeaderTemplate":" <span style=\"font-size:12px;color:blue; \"> Header: Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></span>","FooterTemplate":" <span style=\"font-size:12px;color:green; \"> Footer: Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"40px","MarginOptionsLeft":"40px","MarginOptionsRight":"40px","MarginOptionsTop":"40px","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.0000}
|
||||
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE Translation helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\n\t<h2>Example: Translation helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t<div>\n\t\t<h4>ayReportData</h4>\n\t\t{{#each ayReportData}}\n\t\t<h2>{{ayT 'WidgetName' }}: {{ Name }}</h2>\n\t\t<div>{{ayT 'WidgetSerial' }}:{{ Serial }}</div>\n\t\t<div>{{ayT 'WidgetDollarAmount' }}:{{ DollarAmount }}</div>\n\t\t<div>{{ayT 'WidgetStartDate' }}:{{ StartDate }}</div>\n\t\t<div>{{ayT 'WidgetNotes' }}:{{ Notes }}</div>\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Fetch translation keys required for report \n //Server will get the translations that match the current logged in user's language\n //Only translation keys pre-fetched here will be available for use with the ayT translation helper\n\n //NOTE: you *must* await the call to ayGetTranslations or they will not be present for the report template use\n\n await ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
||||
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE WIKI helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: WIKI / markdown field usage </h2>\n\t<p>See help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h1>Object name:</h1>\n\t{{ Name }}\n\t<h1>Object WIKI:</h1>\n\t{{ ayWiki Wiki }}\n\t{{/each}}\n</body>\n\n</html>","Style":"","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\n","RenderType":0}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE custom fields","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\n\t\t<h2>Non custom fields </h2>\n\t\tName: {{ Name }} <br/>\n\t\tDollarAmount as Number: {{ ayDecimal DollarAmount}} <br/>\n\n\t\t<h2>Custom fields </h2>\n\t\t<p>Custom field items can be accessed via the main object's CustomFields property and then by dot notation for each of the 16 possible custom fields as .c1 to .c16 \n\t\tIf a custom field is unused it will return a blank for that item.\n\t\t(note, example assumes generated sample data and that c1 and c5 have data)</p>\n\t\tCustom c1 as DateTime: {{ ayDateTime CustomFields.c1}} <br/>\n\t\tcustom c5 as Number: {{ ayDecimal CustomFields.c5}} <br/>\t\n\t\t<hr />\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":"","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"","RenderType":0}
|
||||
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE localization helpers","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Localization helpers </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t<h3>Client locale settings used</h3>\n\t\tBrowser TimeZone: {{ ayClientMetaData.TimeZoneName }}<br/>\n\t\tBrowser LanguageName: {{ ayClientMetaData.LanguageName }}<br/>\n\t\tHour12: {{ ayClientMetaData.Hour12 }}<br/>\n\t\tCurrencyName: {{ ayClientMetaData.CurrencyName }}<br/>\n\t</div>\n\t<div>\n\t\t{{#each ayReportData}}\n\t\t<h2>Name: {{ Name }}</h2>\n\t\tStartDate as DateTime: {{ ayDateTime StartDate}} <br/>\n\t\tStartDate as Date : {{ ayDate StartDate}} <br/>\n\t\tStartDate as Time: {{ ayTime StartDate}} <br/>\n\t\tDollarAmount as Currency: {{ ayCurrency DollarAmount}} <br/>\n\t\tDollarAmount as Number: {{ ayDecimal DollarAmount}} <br/>\n\t\t<hr />\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
||||
@@ -1 +0,0 @@
|
||||
{"Name":"EXAMPLE modify data before rendering","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}}\n\tName: {{ Name }}, DollarAmount: {{ ayCurrency DollarAmount }}, RunningTotal: {{ ayCurrency MyRunningTotal }} <br/>\n\t{{/each}}\n\n\t<h2>Total dollar amount: {{ ayCurrency MyTotalDollarAmount }}\n</body>\n\n</html>","Style":"","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n //Declare a temporary variable to hold the running total\n let TotalDollarAmount = 0;\n\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the TotalDollarAmount variable\n for (MyItem of reportData.ayReportData) {\n\n //make sure it has a value before attempting to add it to the running total\n if (MyItem.DollarAmount != null) {\n TotalDollarAmount += MyItem.DollarAmount;\n }\n\n //add a new key to each record in the reportData object named \"MyRunningTotal\" with the running total so far\n MyItem.MyRunningTotal=TotalDollarAmount;\n }\n\n //Add the TotalDollarAmount variable to the reportData so it can be \n //accessed in the report template\n reportData.MyTotalDollarAmount=TotalDollarAmount;\n\n return reportData;\n}","JsHelpers":"","RenderType":0}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"Name":"SAMPLE one object prints per page","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\n\t<h2>Example: Translation helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p> this will show on the first page only as is HTML code BEFORE the #each aspect which is used for iteration</p>\n\t<p> if want this on its own page unto itself, wrap it also in a class that does a page-break</p>\n\n{{#each ayReportData}} <!-- the #each aspect MUST encompass the section where the class is that forces page break -->\n\t<div class=\"singlePage\" >\t\t\n\t\t<h2>{{ayT 'WidgetName' }}: {{ Name }}</h2>\n\t\t<div>{{ayT 'WidgetSerial' }}:{{ Serial }}</div>\n\t\t<div class=\"example\" >{{ayT 'WidgetDollarAmount' }}:{{ DollarAmount }}</div>\n\t\t<div>{{ayT 'WidgetStartDate' }}:{{ StartDate }}</div>\n\t\t<div>{{ayT 'WidgetNotes' }}:{{ Notes }}</div>\t\t\n\t</div>\n{{/each}}\n\n\n</body>\n\n</html>","Style":".example {\n color: blue;\n}\n\n\n.singlePage\n{\npage-break-after: always;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Fetch translation keys required for report \n //Server will get the translations that match the current logged in user's language\n //Only translation keys pre-fetched here will be available for use with the ayT translation helper\n\n //NOTE: you *must* await the call to ayGetTranslations or they will not be present for the report template use\n\n await ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
|
||||
@@ -1 +0,0 @@
|
||||
{"Name":"SAMPLE showing IF ELSE inline html","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>this is an examle report template that shows value of Count <span class='redFont'>in red if has 0 or null</span>, or shows <span class='greenFont'>green if has ANY value</span></p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\t\t<h3>Name: {{ Name }} </h3>\n\t\t{{#if Count}}<p class='greenFont'>Count is: {{ Count }}</p>{{else}} <p class='redFont'>has 0 or null</p>{{/if}}\n\t\t<hr>\t\t\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".redFont {\r\n color: red;\r\n}\r\n\r\n.greenFont {\r\n color: green;\r\n}\r\n","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
|
||||
@@ -1 +0,0 @@
|
||||
{"Name":"SAMPLE showing tag only if has specific tagword","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\n\t\tName: {{ Name }} <br/>\n\t\t\n\t\t<p>Tags: </p>\n\t\t<p>Displays first tag :::::{{ Tags.[0]}} </p>\n\t\t<p>Displays all tags for this object::::: {{ Tags}} </p>\n\t\t<p>Displays if has brown in its tags::::: {{ isInTag2 Tags}} </p>\n\t\t<p> Count: {{Count}}</p>\n\t\t\n\t\t<! below example of using #if helper to show if is true or has value, or show in green if if false, undefined, null, \"\", 0, or [] >\n\t\t<ul>\n\t\t\t {{#if CustomFields.c4}} <li class='redMe' >true custom fields c4 is true</li> {{else}} <li class='greenMe' >custom fields c4 is false</li> {{/if}}\n\t\t\t <li>Actual Count value: {{Count}} </li>\n\t\t\t {{#if Count}} <li class='redMe' >renders in red font if 'Count' has any value </li> {{else}} <li class='greenMe' >renders in green font if false, undefined, null, \"\", 0, or []</li> {{/if}}\n\t\t</ul>\n\n\t\t<p>{{isInTag3 Tags}} </p>\n\t\t\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".redMe {\r\n color: red;\r\n}\r\n\r\n.greenMe {\r\n color: green;\r\n}\r\n\r\n.redfont {\r\n color: red;\r\n}","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"\r\n\r\nHandlebars.registerHelper('isInTag', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brown'))\r\n\t\t{ \r\n return 'brown'; \r\n\t\t}\r\n }\r\n return 'no brown';\r\n});\r\n\r\nHandlebars.registerHelper('isInTag2', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brow'))\r\n\t\t{ \r\n\t\t\treturn 'THE WORD or part of word BROW IS IN HERE';\r\n\t\t}\r\n }\r\n return 'NOPE part of full word with \\'brow\\' is NOT HERE';\r\n});\r\n\r\nHandlebars.registerHelper('isInTag3', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brow'))\r\n\t\t{ \r\n\t\t\treturn new Handlebars.SafeString(\"<p class='redMe' >\" + \"brownbrwnbrown is in here!!!!!!!!!!!!\" +\"</p>\");\r\n\t\t}\r\n }\r\n return 'some other text'; //if don't want to return any element at all, comment this else aspect out fully\r\n});\r\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user