Tag Info

Hot answers tagged

7

You can do it with SharePoint Management shell: Set-SPSuiteBarBrandingElement -WebAppUrl http://sp2013.intranet.adventureworks.com -Text 'AdventureWorks Intranet' Just replace the AdventureWorks Intranetwith the text you want. More details here


4

you can use $().SPServices <script type="text/javascript" src="/sites/sprc/Resources%20%20jQuery/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="/sites/sprc/Resources%20%20jQuery/jQuery%20SP%20Services/jquery.SPServices-0.5.4.min.js"></script> <script type="text/javascript"> function StartWorkflow(ItemURL, ...


3

Using PowerShell you can do this using $spWeb = Get-SPWeb "http://sharepointSiteUrl" $spWeb.AllProperties["__DisplayShowHideRibbonActionId"] = $false.ToString() $spWeb.Update() C# spWeb.AllProperties["__DisplayShowHideRibbonActionId"] = false.ToString(); spWeb.Update();


3

Following are the steps to remove this button from Ribbon Create an empty SharePoint 2010 Solution, you may give your favorite name to it Add a feature by right clicking on the Features in Solution Explorer Right click on the Project and add a new item, choose empty element and name it Open the Elements.xml file from the newly added item Copy & paste ...


2

If the list contains only one content type then in the CustomAction you need to define following three properties: RegistrationType="ContentType" RegistrationId="YourContenttype" Location="CommandUI.Ribbon.ListView" In the CommandUIHandlers, there is EnabledScript attribute which helps in enabling and disabling a button. You can refer to an .js file which ...


2

You can use the SPRibbon.TrimById(controlId) method to hide controls. You can use other OM methods to determine the user's permission and call the TrimById method accordingly. For example, you could use DoesUserHavePermissions on the page's list item: ...


2

This can be achieved to a certain extent if you, for example, create a list view with appropriately formatted list items and a SharePoint Designer custom action with a javascript like javascript:{ (function() { var myctx = SP.ClientContext.get_current(), selected = SP.ListOperation.Selection.getSelectedItems(myctx), list = []; for (var item in ...


2

You can use EnabledScript parameter in CommandUIHandler, where you can put javascript code and check if specific page/list/view is loaded. Example: <CommandUIHandler Command="Ribbon.ListItem.CustomGroup.Controls.BtnSayHello.Command" CommandAction="javascript:alert('Hello');" EnabledScript="javascript: function isEnable(){ ...


2

var clientContext = SP.ClientContext.get_current(); // Gets current site context var id = GetItemID(); //retrieve selected list item id to update data var listId = SP.ListOperation.Selection.getSelectedList(); var oList = context.get_web().get_lists().getById(listId); this.oListItem = oList.getItemById(id); function GetItemID() { var selectedItems ...


2

Firstly just to warn you that trying to hide the "Share with" option in SharePoint 2013 can be a bit like playing 'whack-a-mole'. The following CSS will hide this option on the context menu and also the ribbon bar (which was probably going to be your next question:-)). We normally have this in a CSS file that's loaded by a custom master page used in all ...


2

Yes this option was removed in 2013, it was introduced in 2010, but now to add the list you have to follow the 2 steps of creating it then add it to your page.


2

You can do it with PowerShell to. $webApp = get-spwebApplication "http://yourWebapplicationUrl" $webApp.SuiteBarBrandingElementHtml = "<div class='ms-core-brandingText'>Insert new title here</div>" $webApp.Update() Or you could change the text and create a link out of it. I've done this so users can just click the title and get back to the ...


2

By using the hints Anders provided and the reference here. I can make it work with below script. Simply put it into a Script Editor Webpart for the page you need it. <script language="javascript" type="text/javascript"> function DoSomethingWithRibbon() { // Gets a reference to a CUI.Ribbon object (CUI.js) var ribbon = ...


2

Make sure that the content type of the missing page layout is set properly to "Page Layout" If you are deploying it from visual studio it should be something like below <File Path="PageLayouts\PageLayoutOneCol.aspx" Url="WABOneCol.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" Level="Published" ReplaceContent="true"> ...


1

SharePoint Designer 2013 can be used to create a ribbon button for SharePoint list or library. Once clicked, the button will perform a custom action function. Step 1: In SharePoint Designer 2013, open the site containing the library or list where the custom action button on the ribbon will be deployed. Step 2: Open the library or list from the left ...


1

The location attributive "CommandUI.Ribbon.ListView" will make the button appear in List view only. Its CommandUI.Ribbon.DisplayForm which shows it in Display form. You have perhaps some old artifact in the site. Try it on a new site collection and see what happens.


1

The problem with your hide custom action is that the Rights attribute says that the custom action must be active for every user having the ViewListItems permission, even if they have further permissions (like EditListItems) as well. AFAIK, there is no declarative way to restrict the custom action using sime kind of exclusive OR (XOR), for example, for ...


1

I think you are almost there except that you have used assignment operator which will always return TRUE. Instead you have to use comparison '==' or '===' operators. update in below line EnabledScript="javascript:SP.ListOperation.Selection.getSelectedItems().length === 1;"


1

I think you're command handler lacks one character. Instead of doing 'length = 1', you should do 'length == 1'. Now you're assigning 1 to length, which always results in a positive result. The > 1 works because that's a compare operator and not an assign one :) I verified and this seems to work.


1

I used the following and it works to enable/disable the button when only one item is selected. <CommandUIHandlers> <CommandUIHandler Command="GCMS.CreateActionCommand" EnabledScript="javascript:var EnableDisable = function() { this.clientContext = SP.ClientContext.get_current(); ...


1

I'm not sure if this solution is possible in SPD. But in xml definition you can use EnabledScript parameter in CommandUIHandler, where you can put javascript code and check if specific page/list/view is loaded. link to similar answer Example: <CommandUIHandler Command="Ribbon.ListItem.CustomGroup.Controls.BtnSayHello.Command" ...


1

Yeah, it is pretty common problem. No matter how you try to edit your code it will be difficult to read, debug, manage, and update, when it is written inside elements.xml. I know that question is about the editor itself, but sometimes it is much better to write your JavaScript code in another .js file, and use only reference in CommandAction. You can load ...


1

Listed below is a possible surrogate solution as mentioned by SPArchaeologist that involves modifying the "Read" permission level and giving it the "Manage Personal Views" permission. Click on "Site Actions -> Site Permissions" On the ribbon select the "Permission Tools" tab and press the "Permission Levels" button under the "Manage" group on the far right ...


1

please create a javascript function PreSaveAction() in your page layout. In presave action will fire when you click on save button. You can write any javascript code in this function which needs to be perform just before saving the page. This is working fine in sharepoint list, but I have not tried in publishing page


1

CommandUIHandler has not only Command and CommandAction attributes but also EnabledScript attribute. It may contains javascript function returning true/false. You may use javascript CSOM to get content type of the item(s) and enable/disable your button. Hiding button completely is different story and is not usual in SP. <CommandUIHandler ...


1

Use tokens in your custom action definition to pass values to the new form. More on this here: https://msdn.microsoft.com/en-us/library/office/ff458385%28v=office.15%29.aspx Add another custom action with code behind to handle the new form OnLoad event: <CustomAction Id="NewFormCustomActionId" Location="NewFormToolbar" ...


1

You can use CSS to hide the elements from Ribbon. Here is an article which explains how to find the ID and how to hide it http://blog.sharepointexperience.com/2014/06/hide-from-sharepoint-ribbon/ #Ribbon\.EditingTools\.CPEditTab\.Styles { display:none; }


1

This view is usually because the browser window is being squeezed. If you have your resolution low or browser window small, it can do that. Also if you have any custom masterpage that sizes down that control that will do it.


1

All the ICONS on the ribbon has a unique ID. You can use browser developer tools to find it. Once you have the ID, you can change the image using CSS #IconId { background-image: url('new icon url'); }


1

Well, this is for the dummies like me who do not know how to scroll. If you scroll down on the list page you will find the Custom Actions section. Editing on Custom Ribbon Actions is done here...



Only top voted, non community-wiki answers of a minimum length are eligible