Define on dropdown menu, languages for invite
This commit is contained in:
@@ -13,12 +13,12 @@
|
|||||||
<Id>7badd9f2-c760-4498-acbf-059760660dd9</Id>
|
<Id>7badd9f2-c760-4498-acbf-059760660dd9</Id>
|
||||||
|
|
||||||
<!--Versione. Gli aggiornamenti dallo Store vengono attivati solo in caso di modifica della versione. -->
|
<!--Versione. Gli aggiornamenti dallo Store vengono attivati solo in caso di modifica della versione. -->
|
||||||
<Version>1.0.0.6</Version>
|
<Version>1.0.0.9</Version>
|
||||||
<ProviderName>[Nome provider]</ProviderName>
|
<ProviderName>[Nome provider]</ProviderName>
|
||||||
<DefaultLocale>it-IT</DefaultLocale>
|
<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. -->
|
<!-- 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="Tool Test v6" />
|
<DisplayName DefaultValue="PAL Tools" />
|
||||||
<Description DefaultValue="Tool Test"/>
|
<Description DefaultValue="PAL Tools"/>
|
||||||
<IconUrl DefaultValue="~remoteAppUrl/Images/icon64.png"/>
|
<IconUrl DefaultValue="~remoteAppUrl/Images/icon64.png"/>
|
||||||
|
|
||||||
<SupportUrl DefaultValue="http://www.contoso.com" />
|
<SupportUrl DefaultValue="http://www.contoso.com" />
|
||||||
@@ -61,41 +61,11 @@
|
|||||||
<Hosts>
|
<Hosts>
|
||||||
<Host xsi:type="MailHost">
|
<Host xsi:type="MailHost">
|
||||||
<DesktopFormFactor>
|
<DesktopFormFactor>
|
||||||
|
|
||||||
<!-- Message Compose -->
|
|
||||||
<!--<ExtensionPoint xsi:type="MessageComposeCommandSurface">
|
|
||||||
<OfficeTab id="TabDefault">
|
|
||||||
<Group id="msgComposeCmdGroup">
|
|
||||||
<Label resid="CommandsGroup.Label"/>
|
|
||||||
<Control xsi:type="Button" id="msgComposeInsertGist">
|
|
||||||
<Label resid="TaskpaneButton.Label"/>
|
|
||||||
<Supertip>
|
|
||||||
<Title resid="TaskpaneButton.SupertipTitle"/>
|
|
||||||
<Description resid="TaskpaneButton.SupertipText"/>
|
|
||||||
</Supertip>
|
|
||||||
<Icon>
|
|
||||||
<bt:Image size="16" resid="Icon.16x16"/>
|
|
||||||
<bt:Image size="32" resid="Icon.32x32"/>
|
|
||||||
<bt:Image size="80" resid="Icon.80x80"/>
|
|
||||||
</Icon>
|
|
||||||
<Action xsi:type="ExecuteFunction">
|
|
||||||
<SourceLocation resid="Taskpane.Url"/>
|
|
||||||
</Action>
|
|
||||||
</Control>
|
|
||||||
</Group>
|
|
||||||
</OfficeTab>
|
|
||||||
</ExtensionPoint>-->
|
|
||||||
|
|
||||||
<FunctionFile resid="Commands.Url"/>
|
<FunctionFile resid="Commands.Url"/>
|
||||||
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
|
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
|
||||||
<OfficeTab id="TabHome">
|
<OfficeTab id="TabHome">
|
||||||
<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
|
|
||||||
<Group id="Contoso.Group1">
|
<Group id="Contoso.Group1">
|
||||||
<!-- Label for your group. resid must point to a ShortString resource. -->
|
|
||||||
<Label resid="Contoso.Group1Label" />
|
<Label resid="Contoso.Group1Label" />
|
||||||
<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
|
|
||||||
<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
|
|
||||||
|
|
||||||
<Control xsi:type="Menu" id="Contoso.Menu">
|
<Control xsi:type="Menu" id="Contoso.Menu">
|
||||||
<Label resid="Contoso.Menu.Label" />
|
<Label resid="Contoso.Menu.Label" />
|
||||||
|
|
||||||
@@ -109,26 +79,10 @@
|
|||||||
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
|
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
|
||||||
</Icon>
|
</Icon>
|
||||||
<Items>
|
<Items>
|
||||||
<Item id="itemShowTaskPane">
|
|
||||||
<Label resid="Contoso.Item1.Label"/>
|
|
||||||
<Supertip>
|
|
||||||
<Title resid="Contoso.Item1.Label" />
|
|
||||||
<Description resid="Contoso.Item1.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" />
|
|
||||||
</Icon>
|
|
||||||
<Action xsi:type="ShowTaskpane">
|
|
||||||
<!--<TaskpaneId>ButtonId1</TaskpaneId>-->
|
|
||||||
<SourceLocation resid="Contoso.Taskpane.Url" />
|
|
||||||
</Action>
|
|
||||||
</Item>
|
|
||||||
<Item id="itemExecuteFunction">
|
<Item id="itemExecuteFunction">
|
||||||
<Label resid="Contoso.Item2.Label"/>
|
<Label resid="Contoso.Item2.LabelIta"/>
|
||||||
<Supertip>
|
<Supertip>
|
||||||
<Title resid="Contoso.Item2.Label" />
|
<Title resid="Contoso.Item2.LabelIta" />
|
||||||
<Description resid="Contoso.Item2.Tooltip" />
|
<Description resid="Contoso.Item2.Tooltip" />
|
||||||
</Supertip>
|
</Supertip>
|
||||||
<Icon>
|
<Icon>
|
||||||
@@ -137,7 +91,22 @@
|
|||||||
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
|
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
|
||||||
</Icon>
|
</Icon>
|
||||||
<Action xsi:type="ExecuteFunction">
|
<Action xsi:type="ExecuteFunction">
|
||||||
<FunctionName>writeValue</FunctionName>
|
<FunctionName>writeInviteIta</FunctionName>
|
||||||
|
</Action>
|
||||||
|
</Item>
|
||||||
|
<Item id="itemExecuteFunction2">
|
||||||
|
<Label resid="Contoso.Item2.LabelEng"/>
|
||||||
|
<Supertip>
|
||||||
|
<Title resid="Contoso.Item2.LabelEng" />
|
||||||
|
<Description resid="Contoso.Item2.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" />
|
||||||
|
</Icon>
|
||||||
|
<Action xsi:type="ExecuteFunction">
|
||||||
|
<FunctionName>writeInviteEng</FunctionName>
|
||||||
</Action>
|
</Action>
|
||||||
</Item>
|
</Item>
|
||||||
</Items>
|
</Items>
|
||||||
@@ -149,24 +118,6 @@
|
|||||||
</DesktopFormFactor>
|
</DesktopFormFactor>
|
||||||
</Host>
|
</Host>
|
||||||
</Hosts>
|
</Hosts>
|
||||||
<!--<Resources>
|
|
||||||
<bt:Images>
|
|
||||||
<bt:Image id="Icon.16x16" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/hello-world/outlook-hello-world/assets/icon-16.png"/>
|
|
||||||
<bt:Image id="Icon.32x32" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/hello-world/outlook-hello-world/assets/icon-32.png"/>
|
|
||||||
<bt:Image id="Icon.80x80" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/hello-world/outlook-hello-world/assets/icon-80.png"/>
|
|
||||||
</bt:Images>
|
|
||||||
<bt:Urls>
|
|
||||||
<bt:Url id="Taskpane.Url" DefaultValue="~remoteAppUrl/taskpane.html"/>
|
|
||||||
</bt:Urls>
|
|
||||||
<bt:ShortStrings>
|
|
||||||
<bt:String id="CommandsGroup.Label" DefaultValue="Contoso Add-in"/>
|
|
||||||
<bt:String id="TaskpaneButton.Label" DefaultValue="Hello world"/>
|
|
||||||
<bt:String id="TaskpaneButton.SupertipTitle" DefaultValue="Hello world"/>
|
|
||||||
</bt:ShortStrings>
|
|
||||||
<bt:LongStrings>
|
|
||||||
<bt:String id="TaskpaneButton.SupertipText" DefaultValue="Open the Hello world add-in"/>
|
|
||||||
</bt:LongStrings>
|
|
||||||
</Resources>-->
|
|
||||||
<Resources>
|
<Resources>
|
||||||
<bt:Images>
|
<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_16x16" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/word/assets/icon-16.png" />
|
||||||
@@ -181,8 +132,9 @@
|
|||||||
<bt:ShortStrings>
|
<bt:ShortStrings>
|
||||||
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show task pane" />
|
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show task pane" />
|
||||||
<bt:String id="Contoso.WriteValueButton.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" />
|
<bt:String id="Contoso.Item1.Label" DefaultValue="Show task pane v8" />
|
||||||
<bt:String id="Contoso.Item2.Label" DefaultValue="Write value" />
|
<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.Menu.Label" DefaultValue="Dropdown menu" />
|
||||||
<bt:String id="Contoso.Group1Label" DefaultValue="Commands group" />
|
<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="Contoso.GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
|
||||||
|
|||||||
@@ -117,7 +117,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Componente usato per la visualizzazione delle notifiche -->
|
<!-- Componente usato per la visualizzazione delle notifiche -->
|
||||||
<div class="MessageBanner" style="position:absolute;bottom: 0;">
|
<div class="MessageBanner" style="position:absolute;bottom: 0;">
|
||||||
<div class="MessageBanner-content">
|
<div class="MessageBanner-content">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||||
* See LICENSE in the project root for license information.
|
* See LICENSE in the project root for license information.
|
||||||
*/
|
*/
|
||||||
@@ -9,39 +9,44 @@ Office.onReady(() => {
|
|||||||
// If needed, Office.js is ready to be called
|
// If needed, Office.js is ready to be called
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
async function writeInviteIta(event) {
|
||||||
* Writes the event source id to the document when ExecuteFunction runs.
|
Office.context.mailbox.item.body.setAsync(
|
||||||
* @param event {Office.AddinCommands.Event}
|
"<a href=\"www.google.com\">Google ITA</a>",
|
||||||
*/
|
{
|
||||||
|
coercionType: "html", // Write text as HTML
|
||||||
|
},
|
||||||
|
|
||||||
async function writeValue(event) {
|
// Callback method to check that setAsync succeeded
|
||||||
Word.run(async (context) => {
|
function (asyncResult) {
|
||||||
// insert a paragraph at the end of the document.
|
if (asyncResult.status ==
|
||||||
const paragraph = context.document.body.insertParagraph(
|
Office.AsyncResultStatus.Failed) {
|
||||||
"ExecuteFunction works. Button ID=" + event.source.id,
|
write(asyncResult.error.message);
|
||||||
Word.InsertLocation.end
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// change the paragraph color to blue.
|
|
||||||
paragraph.font.color = "blue";
|
|
||||||
|
|
||||||
await context.sync();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Calling event.completed is required. event.completed lets the platform know that processing has completed.
|
|
||||||
event.completed();
|
event.completed();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGlobal() {
|
async function writeInviteEng(event) {
|
||||||
return typeof self !== "undefined"
|
Office.context.mailbox.item.body.setAsync(
|
||||||
? self
|
"<a href=\"www.google.com\">Google Eng</a>",
|
||||||
: typeof window !== "undefined"
|
{
|
||||||
? window
|
coercionType: "html", // Write text as HTML
|
||||||
: typeof global !== "undefined"
|
},
|
||||||
? global
|
|
||||||
: undefined;
|
// Callback method to check that setAsync succeeded
|
||||||
|
function (asyncResult) {
|
||||||
|
if (asyncResult.status ==
|
||||||
|
Office.AsyncResultStatus.Failed) {
|
||||||
|
write(asyncResult.error.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
event.completed();
|
||||||
}
|
}
|
||||||
|
|
||||||
const g = getGlobal();
|
Office.actions.associate("writeInviteIta", writeInviteIta);
|
||||||
|
|
||||||
Office.actions.associate("writeValue", writeValue);
|
Office.actions.associate("writeInviteEng", writeInviteEng);
|
||||||
Reference in New Issue
Block a user