display quotation marks within a variable freemarker - netsuite advanced pdf - netsuite

I'm trying to show results in the PDF from the netsuite database, however some results have quotation marks, so the results are incomplete, try adding "? Html" at the end of each variable, but do not It affects the column that I want.
I hope and you can help me, greetings!
Netsuite Advanced PDF template - Freemarker
<table cellmargin="5"><#list results as result><tr>
<td style="width: 150px;">
<#if result.custitem_gg_item_image?length != 0><img src="https://----com${result.custitem_gg_item_image}" style="width: 125px; height: 125px;"/><#else><img src="https:/---.com" style="width: 125px; height: 125px;"/></#if>
</td>
<td><strong style="font-size: 12pt"><u><span>${result.itemid?html}</span></u></strong><br/><br/><strong style="font-size: 10pt"><span>${result.displayname?html}</span></strong><br/><br/>
<#if result.purchasedescription?length != 0><span>${result.purchasedescription?html}</span><#else><span>${result.salesdescription?html}</span></#if></td>
</tr>
</#list>
</table>

Just having a quotation mark in the field values shouldn't cause any issues. Do you also have html in the sales and purchase descriptions? Normally you should not do that -- leave the html for the storedetaileddescription field.
If your issue is actually html in the descriptions then see this answer: Remove HTML tags in Freemarker Template

Related

Hiding unfilled fields in pdf/html templates via source code

I'd like to make certain fields invisible/disappear when remain unfilled.
i.e. Email:
This will result in the email text field not being printed out
Here is an example of how I do that. It's a custom field, on mine, but the logic is the same. The ?has_content piece is what tests for data in the field.
<#if record.custbody_bill_to_email?has_content>
<tr>
<td style="width: 147px;"><span style="font-size:10px;"><strong>Email</strong></span></td>
<td style="width: 175px;"><span style="font-size:11px;">${record.custbody_bill_to_email}</span></td>
</tr>
</#if>

Node - Cheerio - Find element that contains specific text

I am trying to get "text that I want" from the site with this structure of code:
<td class="x">
<h3 class="x"> number </h3>
<p>
text that I want;
</p>
</td>
If there will be one td with class "x" then I will do this:
$('td.x > p > a').text()
and get text that I want, but the problem is that on this site there are a lot of "td" and "h3" elements with the same class "x". The only difference is that each time the text that is in "h3" element is a different number and I know what number is in "h3" element on the place where is my link. For example:
<td class="x">
<h3 class="x"> **125** </h3>
<p>
text that I want;
</p>
</td>
The question is - is it possible to choose selector based on the text that is inside - in my example I know that in code there is h3 element with text "125" or maybe is better way to get text from "a" element in my case.
Contains is the selector you're looking for
$('h3:contains("**125**")')
This will select h3 that has the text you wanted

Initialize from html table

I have been trying to make an org chart using the code from this example http://www.getorgchart.com/Demos/Initialize-From-HTML-Table
I am making my table dynamically from xml data (planning to do this for many different xml files so thats why I haven't hardcoded the table). The result does not look right and I'm not sure whats going wrong. I suspect that maybe its trying to make the org chart before my table is made. I have no console errors and I get a plain blue screen with the search bar and arrows when I try to run everything.
Here is my html code:
https://pastebin.com/6b1d0gEC
<body onload="getXML()">
<div id = "conditions"></div>
<div style="float: right; width: 10%; height:100%; text-align:center; display: none;" ></div>
<table id="orgChartData" >
<tr>
<th>title</th>
</tr>
<tr>
Here is my JS code
https://pastebin.com/c7fFerqH
Here is the XML im using to generate the table
https://pastebin.com/0k3xQ5Th

Replace Woocommerce Attribute name with an icon or an image

I'm using the Divi theme along with WC.
I have created 3 product attributes for my tea shop.
I wish to display an image on the front end rather that the name (or label) of the attribute.
For instance, instead of reading Steeping Temperature, I would like to display the image of a thermometer.
I am not a programmer / developper.
Please help
Steph
it is posible to use
after
in css for add an icon to each title of attributes.
#attribute45896{
content:" ";
background-image:url('http://rapido.ir/wp-content/uploads/2017/02/blue.png');
background-size:30px;
background-position:left center;
background-repeat:no-repeat;
padding-left:40px}
<table>
<tbody>
<tr class="alt">
<th id="attribute45896">color:</th>
<td><ul class="jcaa_attr_select jcaa_size_small jcaa_rounded_corners">
<li style="list-style:none;">red
</li>
</ul>
</td>
</tr>
</tbody>
<table>
but woocommerce do not set an auto id or random class to attributes.

JavaFX hide text of column in tableview

I have a tableview and I want to show an image in the first column. My problem is I can't sort the column then. My idea is to set text in the column too and hide the text so it is only for the correct sorting set. Is there a way to do that? Or what other solutions are possible for my problem?
I think this is the perfect example what you wants to do.Still let me know if you have any issue.
Check here
I would have a look at TableColumn.setCellValueFactory() and TableColumn.setCellFactory(). The further is used to provide the actual cell value (used for sorting!), the latter is used to provide the rendering.
In other words: If you need the sort order, you must not change the content, but only the Cell rendering. The methods mentioned above let you do exactly this.
Hope that helps ...
You could do it with just CSS using text-indent. You would also need to set the image as a css background. You did not provide an code of your table, but below is some example:
HTML:
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td class="hidetext image">Text 1</td>
<td>Some text to show</td>
</tr>
<tr>
<td class="hidetext image">Text 2</td>
<td>Some text to show</td>
</tr>
<tr>
<td class="hidetext image">Text 3</td>
<td>Some text to show</td>
</tr>
<tr>
<td class="hidetext image">Text 4</td>
<td>Some text to show</td>
</tr>
</table>
CSS:
.hidetext {text-indent:-9000px}
.image {background:url(http://www.madisoncopy.com/images/jpeg.jpg) no-repeat;}
See how in the left column the text does not show (but it is actually there just indented off the screen).
See this fiddle: http://jsfiddle.net/D297P/

Resources