Define on dropdown menu, languages for invite
This commit is contained in:
@@ -13,12 +13,12 @@
|
||||
<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.6</Version>
|
||||
<Version>1.0.0.9</Version>
|
||||
<ProviderName>[Nome provider]</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="Tool Test v6" />
|
||||
<Description DefaultValue="Tool Test"/>
|
||||
<DisplayName DefaultValue="PAL Tools" />
|
||||
<Description DefaultValue="PAL Tools"/>
|
||||
<IconUrl DefaultValue="~remoteAppUrl/Images/icon64.png"/>
|
||||
|
||||
<SupportUrl DefaultValue="http://www.contoso.com" />
|
||||
@@ -60,42 +60,12 @@
|
||||
</Requirements>
|
||||
<Hosts>
|
||||
<Host xsi:type="MailHost">
|
||||
<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>-->
|
||||
|
||||
<DesktopFormFactor>
|
||||
<FunctionFile resid="Commands.Url"/>
|
||||
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
|
||||
<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">
|
||||
<!-- Label for your group. resid must point to a ShortString resource. -->
|
||||
<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">
|
||||
<Label resid="Contoso.Menu.Label" />
|
||||
|
||||
@@ -109,26 +79,10 @@
|
||||
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
|
||||
</Icon>
|
||||
<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">
|
||||
<Label resid="Contoso.Item2.Label"/>
|
||||
<Label resid="Contoso.Item2.LabelIta"/>
|
||||
<Supertip>
|
||||
<Title resid="Contoso.Item2.Label" />
|
||||
<Title resid="Contoso.Item2.LabelIta" />
|
||||
<Description resid="Contoso.Item2.Tooltip" />
|
||||
</Supertip>
|
||||
<Icon>
|
||||
@@ -137,7 +91,22 @@
|
||||
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
|
||||
</Icon>
|
||||
<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>
|
||||
</Item>
|
||||
</Items>
|
||||
@@ -149,24 +118,6 @@
|
||||
</DesktopFormFactor>
|
||||
</Host>
|
||||
</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>
|
||||
<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" />
|
||||
@@ -181,8 +132,9 @@
|
||||
<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" />
|
||||
<bt:String id="Contoso.Item2.Label" DefaultValue="Write value" />
|
||||
<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!" />
|
||||
|
||||
@@ -117,7 +117,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Componente usato per la visualizzazione delle notifiche -->
|
||||
<div class="MessageBanner" style="position:absolute;bottom: 0;">
|
||||
<div class="MessageBanner-content">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
* See LICENSE in the project root for license information.
|
||||
*/
|
||||
@@ -9,39 +9,44 @@ Office.onReady(() => {
|
||||
// If needed, Office.js is ready to be called
|
||||
});
|
||||
|
||||
/**
|
||||
* Writes the event source id to the document when ExecuteFunction runs.
|
||||
* @param event {Office.AddinCommands.Event}
|
||||
*/
|
||||
async function writeInviteIta(event) {
|
||||
Office.context.mailbox.item.body.setAsync(
|
||||
"<a href=\"www.google.com\">Google ITA</a>",
|
||||
{
|
||||
coercionType: "html", // Write text as HTML
|
||||
},
|
||||
|
||||
async function writeValue(event) {
|
||||
Word.run(async (context) => {
|
||||
// insert a paragraph at the end of the document.
|
||||
const paragraph = context.document.body.insertParagraph(
|
||||
"ExecuteFunction works. Button ID=" + event.source.id,
|
||||
Word.InsertLocation.end
|
||||
);
|
||||
// Callback method to check that setAsync succeeded
|
||||
function (asyncResult) {
|
||||
if (asyncResult.status ==
|
||||
Office.AsyncResultStatus.Failed) {
|
||||
write(asyncResult.error.message);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
function getGlobal() {
|
||||
return typeof self !== "undefined"
|
||||
? self
|
||||
: typeof window !== "undefined"
|
||||
? window
|
||||
: typeof global !== "undefined"
|
||||
? global
|
||||
: undefined;
|
||||
async function writeInviteEng(event) {
|
||||
Office.context.mailbox.item.body.setAsync(
|
||||
"<a href=\"www.google.com\">Google Eng</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);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
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