I cannot find a list of all possible options for SharePoint 2013 Client Chrome Control. I found examples like this:
var options = {
'appIconUrl': hostlogourl,
'appTitle': document.title,
'appHelpPageUrl': 'Help.html?' + document.URL.split('?')[1],
'settingsLinks': [
{
'linkUrl': 'Account.html?' + document.URL.split('?')[1],
'displayName': 'Account settings'
},
{
'linkUrl': 'Contact.html?' + document.URL.split('?')[1],
'displayName': 'Contact us'
}
]
};
Could anybody provide the whole list of options?
Looking through SP.UI.Controls.Debug.js, here are the options:
siteTitle
siteUrl
clientTag
appWebUrl
onCssLoaded
assetId
appStartPage
rightToLeft
appTitle
appIconUrl
appTitleIconUrl
appHelpPageUrl
appHelpPageOnClick
settingsLinks
language
bottomHeaderVisible
topHeaderVisible
Some of these are provided and managed by the app framework. The type can be inferred by the option name. Unfortunately, there doesn't appear to be a page on MSDN that explains all of the options yet.
Related
Trying to block all but allow specific plugins. I have the okta one and the web password filler working, but not the logon assist. I've tried putting in (secret-server-logon-assist-ff57#thycotic.com), and {secret-server-logon-assist-ff57#thycotic.com}, and also without any extras. These codes come from just the numeric URL (ie https://addons.mozilla.org/firefox/downloads/file/1747490) which says "Secret Server Login Assist (secret-server-logon-assist-ff57#thycotic.com) is blocked by your system administrator. Extension not on OAI allowed list". Am I misreading this message, or missing something on this specific one?
I posted this on support.mozilla.org, but haven't gotten any replies yet...
{
"*": {
"blocked_install_message" : "Extension not on OAI allowed list",
"installation_mode": "blocked"
},
"dd1e31d5-3623-45cb-b1ad-64074d36b360#thycotic.com": {
"installation_mode": "allowed",
"install_url": "https://addons.mozilla.org/firefox/downloads/file/3906662/secret_server_web_password_filler-3.2-fx.xpi"
},
"secret-server-logon-assist-ff57#thycotic.com": {
"installation_mode": "allowed",
"install_url": "https://addons.mozilla.org/firefox/downloads/file/1747490/secret_server_login_assist-2.1.1-an+fx.xpi"
},
"plugin#okta.com": {
"installation_mode": "allowed",
"install_url": "https://addons.mozilla.org/firefox/downloads/file/3901586/okta_browser_plugin-6.8.0-an+fx.xpi"
}
}
snip
I built a small teams message extension which just uses some user input, builds a link from it, and returns a card with a button pointing to that link.
I need to add a Settings section, but I couldn't find proper instructions or a sample for this.
I tried to use this sample as example (which is JS, and I'm using TypeScript), but I could not get it to work.
Relevant portion in my class:
export class MessageExtensionBot extends TeamsActivityHandler {
...
protected handleTeamsMessagingExtensionConfigurationQuerySettingUrl(context: TurnContext, query: MessagingExtensionQuery): Promise<MessagingExtensionResponse> {
return Promise.resolve({
composeExtension: {
type: "config",
suggestedActions: {
actions: [
{
title: "Title",
type: ActionTypes.OpenUrl,
value: "https://" + `${process.env.PUBLIC_HOSTNAME}` + "/settings.html"
}
]
}
}
});
}
protected handleTeamsMessagingExtensionConfigurationSetting(context, settings): Promise<void> {
return Promise.resolve(undefined);
}
process.env.PUBLIC_HOSTNAME points to the temporary ngrok link, smth like xxx-yyy-zzz.ngrok.io.
When I access xxx-yyy-zzz.ngrok.io/settings.html, I get the correct content of that html file
I also added "canUpdateConfiguration": true, in my manifest file, and the Settings link is available.
THE PROBLEM: when I click the Settings link in my custom teams message extension, all I get is a pop-up with the error message Sorry, the setting of this compose extension is not available. Please try again later. and an OK button.
What is wrong/missing in my code ?
Thank you.
We also faced this issue. It is resolved after adding validDomains in the manifest. Please try updating the validDomains in manifest, hope this resolves the issue.
How is sorting and filtering implemented when using a custom header cell in the react-data-grid?
{
key: "myColumn1",
name: "My Column Name",
headerRenderer: this.renderHeader,
sortable: true,
filterable: true
},
{
key: "myColumn2",
name: "My Other Column Name",
sortable: true,
filterable: true
}
...
renderHeader(props){
return (<extra-stuff>
{props.column.name}
</extra-stuff>)
}
I have myColumn2 sorting fine but nothing happens with the custom header: myColumn1. What do I need to do in renderHeader(){} to get sorting (and filtering, but mainly sorting) working?
Instead of trying to call a function in headerRenderer, put a component instead:
{
key: "myColumn1",
name: "My Column Name",
headerRenderer: <renderHeader value={this.renderHeader()} />,
sortable: true,
filterable: true
},
Looks like a solution was checked-in for this almost a year ago. I do work on an intranet and don't have direct internet access for development so maybe i have an older version. Since I can't get the version in my environment I'll wait for someone to verify that the latest version works as expected before I accept my own answer (or I'll try to get the latest version with the change in there.)
One other thing I will have to do with the way the solution was implemented is stop propagation of the click event because in my custom header i have a ReactIcon that is clickable to change from status wording to a menu. So, if they click right on the icon in the header do the name/menu change and if they click anywhere else in the header then do the sort. I'll have to look up how to do that in React.
Update
I took the changes from the check-in in the link above and added them to my react-data-grid.js and it works great. I.e. I had to add the changes to the pure javascript version of the code that npm pulled into our node_modules.
I also did have to use e.stopPropagation() call in my headerRenderer like i thought i'd have to so that clicking the icon i have in the headerRenderer would not sort when click (but just do a different operation) but it was easy to add.
I do have one question about the change i made to my js which here is a piece of the change...
return React.createElement(
'div',
{className: className,
onClick: this.onClick,
style: {cursor: 'pointer'} },
React.createElement(
'span',
{ className: 'pull-right' },
this.getSortByText()
),
//change was here from just: this.props.column.name
this.props.column.headerRenderer? this.props.column.headerRenderer(this.props) : this.props.column.name
);
How would i have done this in JavaScript so that it would work whether my headerRenderer was ()=>{ return <span>...</span> } or <MyComponent /> ???
Since i always use functions for my headerRenderer i just did the change so that it worked the one way but would like to know how to make the change so it works both ways. Something like this? ...
this.props.column.headerRenderer?
(isFunction(this.props.column.headerRenderer)? this.props.column.headerRenderer(this.props) : React.createElement(this.props.column.headerRenderer, {...this.props}) )
:
this.props.column.name
????
I have created my firefox addon but when I install it, it doesn't create any icon on the tool bar of firefox.
I am unable to upload the image due to low reputation but posted the image at this link
I'm going to guess you're using the add-on SDK because of the tag. To do this, use ActionButton:
let { ActionButton } = require("sdk/ui/button/action");
let button = ActionButton({
id: "my-button-id",
label: "Button Label",
icon: {
"16": "./icon16.png",
"32": "./icon32.png"
},
onClick: function(state) {
console.log("button '" + state.label + "' was clicked");
}
});
[The full documentation is here[(https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_button_action)
Pay particular attention to the docs on icon files - files should be located in the data sub-directory in your add-on folder.
If you're not actually using the Add-on SDK, Noitidart's comment is more relevant to you.
I'm building a Firefox Extension. It's injecting CSS into one website. But I want to inject it accordingly to user preferences. This is the most important part in my add-on:
exports.main = function() {
var pageMod = require("page-mod");
var test = require("preferences-service");
pageMod.PageMod({
include: "http://example.org/*",
contentStyle: "something here"
});
};
But there's an error in Mozilla Firefox Error Console:
Error: Module: undefined located at undefined has no authority to load: preferences-service
And I don't know what I should do to make it work. Has anybody any ideas? :) Maybe there's other way?
Actually, I want to read preferences, and then generate adequate styles. I've got user preferences in defaults/preferences/prefs.js, if this is useful information.
Okay, now it works. If you've got the same or similar problem, edit harness-options.json file. After
"page-mod": {
"path": "addon-kit/lib/page-mod.js"
},
add:
"preferences-service": {
"path": "api-utils/lib/preferences-service.js"
}, /*with or without the comma, as the case may */
That's all :)