Render flux:field.inline.fal from page in content - fedext

I have defined a a FAL resource in my page template
<flux:field.inline.fal name="imageLinkboxMenu"
clear="true"
label="FAL image"
showThumbs="true"
allowedExtensions="jpg,jpeg,gif,png"
maxItems="1"/>
Now i want display this image in a conent element which refers to this page. I'm not able to get the page resource. I tried a
<flux:form.data field="tx_fed_page_flexform" table="pages" uid="{root}" as="fluxPageData">
{fluxPageData.imageLinkboxMenu}
</flux:form.data>
Which only returns 1. I also tried to acces the field via v:page.resource.fal which can not work from my point of view since this does not extract the data from the XML
<v:resource.image identifier="{v:page.resources.fal(field: 'imageLinkboxMenu') -> v:iterator.extract(key: 'id') -> v:iterator.first()}" as="resources" />
Any hints for me?

After some trial and error I finally got it work. The trick was to add to uid of the page. So I ended up with something like
<v:resource.image identifier="{v:page.resources.fal(field: 'imageLinkboxLogo', uid: '{root}') -> v:iterator.extract(key: 'id')}" />

I don't now why but it not work for some translation pages. I receive empty area. Aslo here https://fluidtypo3.org/viewhelpers/flux/master/Field/Inline/FalViewHelper.html we see Usage warning. So i recommend alternatively, you could use <flux:field.file>.

Related

How to look for user who updated JIRA issue using jira-python?

I don't seem to have the permissions to view the transitions on issues.
The commonly used snippet: [(t['id'],t['name']) for t in j.transitions(issue)] returns an empty list on a valid issue. I can see the issue, its transitions from the Web interface.
When the issue is in the "Fixed" state, I would like to find which user changed it from "Assigned" to "Fixed". Here is my workflow:
How do I achieve this with python-jira?
Insert the following. I use python-3 so you may have to adjust your print statement formats.
issue = jira.issue('project-682', expand='changelog') changelog =
issue.changelog
for history in changelog.histories:
for item in history.items:
if item.field == 'status':
print ('Date:',history.created,' From:',item.fromString, 'To:',item.toString, ' By: ',history.author)

Prestashop all translatable-field display none for product page

Just new in Prestashop (1.6.0.6), I've a problem with my product page in admin. All translatable-field are to display:none (I inspect the code with chrome).
So when I want to create a new product I can't because the name field is required.
I thought that it was simple to find the .js whose do that but it isn't.
If somebody could help me, I would be happy.
Thank you for your help
Hi,
I make some searches and see that the function hideOtherLanguage(id) hide and show translatable-field element.
function hideOtherLanguage(id)
{
console.log(id_language);
$('.translatable-field').hide();
$('.lang-' + id).show();
var id_old_language = id_language;
id_language = id;
if (id_old_language != id)
changeEmployeeLanguage();
updateCurrentText();
}
When I set the Id to 1 (default language), it works. It seems that when I load the page, the function is called twice and the last calling, the id value is undefined. So the show() function will not work.
If somebody could help me. Thank you.
In my console, I see only one error
undefined is not a function.
under index.php / Line 1002
...
$("#product_form").validate({
...
But I find the form.tpl template and set this lines in comment but nothing change.
EDIT: According to comment on this link http://forge.prestashop.com/browse/PSCFV-2928 this can possibly be caused by corrupted installation file(s) - so when on clean install - try to re-download and reinstall...
...otherwise:
I got into a similar problem - in module admin page, when creating configuration form using PrestaShop's HelperForm. I will provide most probable cases and their possible solutions.
The solution for HelperForm was tested on PS 1.6.0.14
Generally there are 2 cases when this will happen.
First, you have to check what html you recieve.
=> Display source code - NOT in developer tools/firebug/etc...!
=> I really mean the pure recieved (JavaScript untouched) html.
Check if your translatable-fields have already the inline style "display: none":
Case 1 - fields already have inline style(s) for "display: none"
This means the template/html was already prepared this way - most probably in some TPL file I saw codes similar to these:
<div class="translatable-field lang-{$language.id_lang}"
{if $language.id_lang != $id_lang_default}style="display:none"{/if}>
Or particularly in HelperForm template:
<div class="translatable-field lang-{$language.id_lang}"
{if $language.id_lang != $defaultFormLanguage}style="display:none"{/if}>
Case 1 is the most easy to solve, you just have to find, where to set this default language.
Solutions
HelperForm
Look where you've (or someone else) prepared the HelperForm object - something like:
$formHelper = new HelperForm();
...
Somewhere there will be something like $formHelper->default_form_language = ...;
My wrong first solution was to get default form language from context - which might not be set:
$this->context->controller->default_form_language; //THIS IS WRONG!
The correct way is to get the default language from configuration - something like:
$default_lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
$formHelper->default_form_language = $default_lang->id;
...this particularly solved my problem...
Other form-creations
If there is something else than HelperForm used for form creations, the problem is still very similar.
You have to find where in files(probably tpls) is a condition for printing display:none for your case - then find where is the check-against-variable set and set it correctly yourself.
Case 2 - fields don't have inline style(s) for "display: none"
This means it is done after loading HTML by JavaScript. There are two options:
There is a call for hideOtherLanguage(), but there is wrongly set input language - that means no language will be displayed and all hidden.Solution for this one can be often solved by solving Case 1 (see above). In addition there can be programming error in not setting the after-used language id variable at all... then you would have to set it yourself (assign in JavaScript).
Some script calls some sort of .hide() on .translatable-field - you will have to search for it the hard way and remove/comment it out.
PS: Of course you can set the language to whatever you want, it is just common to set it to default language, because it is the most easier and the most clear way how to set it.

docusign - adding tabs to the document using API: It only adds signhere tab and ignores all other

I am trying to add dateSingedTab, fullNameTab,signHereTab to my document. When I send the document, docusign is only adding the signHereTab and ignoring other tabs. Here is my xml. Can you please help.
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<emailSubject>API Call for adding signature request to document and sending</emailSubject>
<status>sent</status>
<documents>
<document>
<documentId>1</documentId>
<name>documentName</name>
</document>
</documents>
<recipients>
<signers>
<signer>
<recipientId>1</recipientId>
<email>custEmail</email>
<name>recipientNameCust</name>
<routingOrder>1</routingOrder>
<tabs>
<dateSignedTabs>
<dateSignedTab>
<anchorString>SIGNED on behalf of the Customer</anchorString>
<anchorXOffset>100</anchorXOffset>
<anchorYOffset>300</anchorYOffset>
<anchorIgnoreIfNotPresent>false</anchorIgnoreIfNotPresent>
<anchorUnits>Pixels</anchorUnits>
<documentId>1</documentId>
<recipientId>1</recipientId>
<tabLabel>Date Signed</tabLabel>
<name>Date Signed</name>
</dateSignedTab>
</dateSignedTabs>
<fullNameTabs>
<fullNameTab>
<anchorString>SIGNED on behalf of the Customer</anchorString>
<anchorXOffset>100</anchorXOffset>
<anchorYOffset>100</anchorYOffset>
<anchorIgnoreIfNotPresent>false</anchorIgnoreIfNotPresent>
<anchorUnits>Pixels</anchorUnits>
<documentId>1</documentId>
<recipientId>1</recipientId>
<tabLabel>Full Name</tabLabel>
<name>Full Name</name>
</fullNameTab>
</fullNameTabs>
<signHereTabs>
<signHere>
<anchorString>SIGNED on behalf of the Customer</anchorString>
<anchorXOffset>0</anchorXOffset>
<anchorYOffset>50</anchorYOffset>
<anchorIgnoreIfNotPresent>false</anchorIgnoreIfNotPresent>
<anchorUnits>Pixels</anchorUnits>
<documentId>1</documentId>
<recipientId>1</recipientId>
<tabLabel>Sign Here</tabLabel>
<name>Sign Here</name>
</signHere>
</signHereTabs>
</tabs>
</signer>
</signers>
</recipients></envelopeDefinition>
I got the tags wrong in above xml. I corrected them and they work fine. dateSignedTab is not correct, it should be dateSigned. Also fullNameTab is not correct, it should be fullName.
Please ignore this post.
You need to drop the tabs part of the inside tab names. For instance, for dateSigned tabs the <xml> nodes need to look like this:
<dateSignedTabs>
<dateSigned>
...
</dateSigned>
</dateSignedTabs>
Same thing with your other tabs... the full name tabs need to be setup like this:
<fullNameTabs>
<fullName>
...
</fullName>
</fullNameTabs>
Give that a try and it should work.

How to add URL fragment HtmlOutcomeTargetLink?

I would like to add an URL fragment #top to a HtmlOutcomeTargetLink, but cant figure out how. For an HtmlOutputLink I just use the following:
HtmlOutputLink link = new HtmlOutputLink();
String urlWithFragment = url + "#top";
link.setValue(urlWithFragment);
How to acomplish this for a HtmlOutcomeTargetLink?
Unfortunately the following does not work:
HtmlOutcomeTargetLink link = new HtmlOutcomeTargetLink();
String urlWithFragment = context.getViewRoot().getViewId() + "#top";
link.setOutcome(urlWithFragment);
Thanks for your help!
The outcome of HtmlOutcomeTargetLink (the <h:link>) only takes navigation case outcomes, not URLs. The navigation case outcomes do not support URL fragments. Those needs to be set as a separate fragment attribute.
link.setFragment("top");
See also:
<h:link> tag documentation
Update: wait, there's no setter for that on the UIOutcomeTarget parent class. I suspect an oversight in the generated code (funnily it's mentioned here in Mojarra snapshot docs and here in a MyFaces testcase). You should be able to set it directly on the attribute map:
link.getAttributes().put("fragment", "top");

How to get specific information from the website and display it in a box?

I am quite newbie on AutoIT, I've done alot of things already.
But I can't find out the way to read specific information from the website that is between div or something. If thats not possible, maybe there is a way to read a raw *.txt(or php) file from the website?
You can use the following code example for your URL:
#include <IE.au3>
$oIE = _IECreate("http://test.com/check.php")
$divs = _IETagNameGetCollection($oIE, "div")
For $div In $divs
If $div.className == "content-container" Then
MsgBox(0, "Bestimmter Inhalt", $div.innerText)
EndIf
Next
_IEQuit($oIE)
You asked for the "raw Text", which is best read with the attribute innerText. See MSDN for more details.
This example basically opens a new IE window with the given URL. Then it extracts all the div-Elements and iterates through them in a loop. Once the className is "content-container" the content of this element is displayed in a message box. Finally the IE window is closed again.
You could add the parameters , 0, 0 to the _IECreate() function to hide the browser window in the end.
Instead of searching for a specific <div>-Element as shown here you could just use the following two lines...
$body = _IETagNameGetCollection($oIE, "body", 0)
MsgBox(0, "Komplette Webseite", $body.innerText)

Resources