Variable refactor, fix function and add glag icon img

This commit is contained in:
Claudio Boggian
2024-06-25 14:26:45 +02:00
parent e46c52033d
commit 5169257d20
15 changed files with 73 additions and 67 deletions
@@ -13,13 +13,13 @@
<Id>7badd9f2-c760-4498-acbf-059760660dd9</Id>
<!--Versione. Gli aggiornamenti dallo Store vengono attivati solo in caso di modifica della versione. -->
<Version>1.0.0.9</Version>
<ProviderName>[Nome provider]</ProviderName>
<Version>1.0.0.17</Version>
<ProviderName>PAL s.r.l.</ProviderName>
<DefaultLocale>it-IT</DefaultLocale>
<!-- Nome visualizzato del componente aggiuntivo. Viene usato nello Store e in altri punti dell'interfaccia utente di Office, come la finestra di dialogo dei componenti aggiuntivi. -->
<DisplayName DefaultValue="PAL Tools" />
<Description DefaultValue="PAL Tools"/>
<IconUrl DefaultValue="~remoteAppUrl/Images/icon64.png"/>
<DisplayName DefaultValue="Inserisci invito" />
<Description DefaultValue="Inserisci invito"/>
<IconUrl DefaultValue="~remoteAppUrl/Images/Icon64.png"/>
<SupportUrl DefaultValue="http://www.contoso.com" />
<!-- Domini che saranno consentiti durante gli spostamenti. Se ad esempio si usa ShowTaskpane ed è presente un collegamento href, gli spostamenti saranno consentiti solo se il dominio è incluso nell'elenco. -->
@@ -64,46 +64,45 @@
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<OfficeTab id="TabHome">
<Group id="Contoso.Group1">
<Label resid="Contoso.Group1Label" />
<Control xsi:type="Menu" id="Contoso.Menu">
<Label resid="Contoso.Menu.Label" />
<Group id="PAL.Group1">
<Label resid="PAL.Group1Label" />
<Control xsi:type="Menu" id="PAL.Menu">
<Label resid="PAL.Menu.Label" />
<Supertip>
<Title resid="Contoso.Menu.Label" />
<Description resid="Contoso.Menu.Tooltip" />
<Title resid="PAL.Menu.Label" />
<Description resid="PAL.Menu.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
<bt:Image size="16" resid="PAL.tpicon_16x16" />
<bt:Image size="32" resid="PAL.tpicon_32x32" />
<bt:Image size="80" resid="PAL.tpicon_80x80" />
</Icon>
<Items>
<Item id="itemExecuteFunction">
<Label resid="Contoso.Item2.LabelIta"/>
<Item id="itemExecuteFunctionItalian">
<Label resid="PAL.Item2.LabelIta"/>
<Supertip>
<Title resid="Contoso.Item2.LabelIta" />
<Description resid="Contoso.Item2.Tooltip" />
<Title resid="PAL.Item2.LabelIta" />
<Description resid="PAL.Item2.TooltipIta" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
<bt:Image size="16" resid="PAL.flag_it_16x16" />
<bt:Image size="32" resid="PAL.flag_it_32x32" />
<bt:Image size="80" resid="PAL.flag_it_80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>writeInviteIta</FunctionName>
</Action>
</Item>
<Item id="itemExecuteFunction2">
<Label resid="Contoso.Item2.LabelEng"/>
<Item id="itemExecuteFunctionEnglish">
<Label resid="PAL.Item2.LabelEng"/>
<Supertip>
<Title resid="Contoso.Item2.LabelEng" />
<Description resid="Contoso.Item2.Tooltip" />
<Title resid="PAL.Item2.LabelEng" />
<Description resid="PAL.Item2.TooltipEng" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
<bt:Image size="16" resid="PAL.flag_en_16x16" />
<bt:Image size="32" resid="PAL.flag_en_32x32" />
<bt:Image size="80" resid="PAL.flag_en_80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>writeInviteEng</FunctionName>
@@ -114,40 +113,38 @@
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/word/assets/icon-16.png" />
<bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/word/assets/icon-32.png" />
<bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/word/assets/icon-80.png" />
<bt:Image id="PAL.tpicon_16x16" DefaultValue="~remoteAppUrl/Images/Icon16.png" />
<bt:Image id="PAL.tpicon_32x32" DefaultValue="~remoteAppUrl/Images/Icon32.png" />
<bt:Image id="PAL.tpicon_80x80" DefaultValue="~remoteAppUrl/Images/Icon80.png" />
<bt:Image id="PAL.flag_it_16x16" DefaultValue="~remoteAppUrl/Images/Flag_It_Icon16.png" />
<bt:Image id="PAL.flag_it_32x32" DefaultValue="~remoteAppUrl/Images/Flag_It_Icon32.png" />
<bt:Image id="PAL.flag_it_80x80" DefaultValue="~remoteAppUrl/Images/Flag_It_Icon80.png" />
<bt:Image id="PAL.flag_en_16x16" DefaultValue="~remoteAppUrl/Images/Flag_En_Icon16.png" />
<bt:Image id="PAL.flag_en_32x32" DefaultValue="~remoteAppUrl/Images/Flag_En_Icon32.png" />
<bt:Image id="PAL.flag_en_80x80" DefaultValue="~remoteAppUrl/Images/Flag_En_Icon80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="~remoteAppUrl/commands.html" />
<bt:Url id="Contoso.Taskpane.Url" DefaultValue="~remoteAppUrl/taskpane.html" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show task pane" />
<bt:String id="Contoso.WriteValueButton.Label" DefaultValue="Show task pane" />
<bt:String id="Contoso.Item1.Label" DefaultValue="Show task pane v8" />
<bt:String id="Contoso.Item2.LabelIta" DefaultValue="Italano" />
<bt:String id="Contoso.Item2.LabelEng" DefaultValue="Inglese" />
<bt:String id="Contoso.Menu.Label" DefaultValue="Dropdown menu" />
<bt:String id="Contoso.Group1Label" DefaultValue="Commands group" />
<bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
<bt:String id="PAL.Item2.LabelIta" DefaultValue="Italano" />
<bt:String id="PAL.Item2.LabelEng" DefaultValue="Inglese" />
<bt:String id="PAL.Menu.Label" DefaultValue="Inserisci invito" />
<bt:String id="PAL.Group1Label" DefaultValue="Strumenti PAL" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Choose to show a task pane" />
<bt:String id="Contoso.Item1.Tooltip" DefaultValue="Choose to show a task pane" />
<bt:String id="Contoso.Item2.Tooltip" DefaultValue="Choose to show a task pane" />
<bt:String id="Contoso.Menu.Tooltip" DefaultValue="Show the dropdown menu" />
<bt:String id="Contoso.WriteValueButton.Tooltip" DefaultValue="Choose to write value to document" />
<bt:String id="Contoso.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and choose the 'Show task pane' button to get started." />
<bt:String id="PAL.Item2.TooltipIta" DefaultValue="Inserisci l'invito in Italiano" />
<bt:String id="PAL.Item2.TooltipEng" DefaultValue="Inserisci l'invito in Inglese" />
<bt:String id="PAL.Menu.Tooltip" DefaultValue="Inserisci l'invito alla registrazione al portale visitatori." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

After

Width:  |  Height:  |  Size: 3.6 KiB

+16 -15
View File
@@ -5,34 +5,35 @@
/* global global, Office, self, window, Word */
Office.onReady(() => {
Office.onReady((data) => {
// If needed, Office.js is ready to be called
});
async function writeInviteIta(event) {
Office.context.mailbox.item.body.setAsync(
"<a href=\"www.google.com\">Google ITA</a>",
{
coercionType: "html", // Write text as HTML
},
// Callback method to check that setAsync succeeded
function (asyncResult) {
if (asyncResult.status ==
Office.AsyncResultStatus.Failed) {
write(asyncResult.error.message);
}
Office.context.mailbox.item.body.prependAsync(
"<a href=\"https://portal.pal.it/General/VisitorRegistration\">Registrati come visitatore per agevolare il tuo ingresso in PAL s.r.l.</a><br/><br/>",
{
coercionType: "html",
},
// Callback method to check that setAsync succeeded
function (asyncResult) {
if (asyncResult.status ==
Office.AsyncResultStatus.Failed) {
write(asyncResult.error.message);
}
}
);
event.completed();
}
async function writeInviteEng(event) {
Office.context.mailbox.item.body.setAsync(
"<a href=\"www.google.com\">Google Eng</a>",
Office.context.mailbox.item.body.prependAsync(
"<a href=\"https://portal.pal.it/General/VisitorRegistration\">Register as a visitor to facilitate your entry into PAL s.r.l.</a><br/><br/>",
{
coercionType: "html", // Write text as HTML
coercionType: "html",
},
// Callback method to check that setAsync succeeded
@@ -111,6 +111,14 @@
<Content Include="Functions\FunctionFile.html" />
<Content Include="Functions\FunctionFile.js" />
<Content Include="Images\Close.png" />
<Content Include="Images\Flag_En_Icon16.png" />
<Content Include="Images\Flag_En_Icon32.png" />
<Content Include="Images\Flag_En_Icon64.png" />
<Content Include="Images\Flag_En_Icon80.png" />
<Content Include="Images\Flag_It_Icon16.png" />
<Content Include="Images\Flag_It_Icon32.png" />
<Content Include="Images\Flag_It_Icon64.png" />
<Content Include="Images\Flag_It_Icon80.png" />
<Content Include="Images\Icon16.png" />
<Content Include="Images\Icon32.png" />
<Content Include="Images\Icon64.png" />