Hot answers tagged

8

Check http://sharepoint.stackexchange.com/a/52877/35604: <script type="text/javascript"> function Custom_Submit(command) { SP.Ribbon.PageState.Handlers.showStateChangeDialog(command, SP.Ribbon.PageState.ImportedNativeData.CommandHandlers[command]); } </script> <input type="button" ...


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


3

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;"


3

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 = ...


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 ...


3

TL;DR The best way to remove a tab is to write and deploy a custom action. This can be done quite easily both in JavaScript and PowerShell. If for some reason you don't want a custom action (e.g. you want to remove the LIST tab for only one of the list views), you can still remove a tab after the page has loaded using JavaScript, but this usually makes up ...


3

EASY solution is the CSS. Just inspect element from browser and apply some css like display: none; If you need this across the site, then add these style into your master page. If you need this for a specific library only, then add these into that specific page using Content Editor Web Part. You can use this plugin in Chrome for generating css.


2

Use EnabledScript property in CommandUIHandler. Example: EnabledScript="javascript: function enableButton() { var items = SP.ListOperation.Selection.getSelectedItems(); var ci = CountDictionary(items); if (ci > 0) { return true; } } enableButton();"


2

You mean like using a link? Such as this one: {Site URL}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={List GUID}&View={View GUID}&CacheControl=1 from the post Create Link to Export Library Contents to Excel


2

Try the following CSS: /* Hide Calendar Ribbon Body */ #RibbonContainer ul[id$="Calendar"] { display: none !important; } /* To hide Calendar Ribbon tab */ #RibbonContainer li[id$="Calendar-title"] { display: none !important; } You can add the above CSS either to the Script Edito/Content Editor web part or embed into the page.


2

Create that Button in the Master Page and use javascript/jquery to hide it for pages whose current page URL do not contain "/Lists" or "/Forms". In this way you can have your button for only lists and libraries.


2

I just opened the new document set form by going to ribbon > files > new document > new document set, copied the url and created a quick launch link with the same url. It works fine for me. Steps : Go to ribbon > files > new document > new document set in the given list Copy the whole URL In the right, at the bottom of the quick launch ...


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"> ...


2

You specified a wrong Id. Use Ribbon.Documents.New.NewDocument instead of Ribbon.Library.Actions.NewDocument. Your code should look like this: $CustomAction = $list.UserCustomActions.Add() $CustomAction.Title = "Hide New Document" $CustomAction.Location = "CommandUI.Ribbon" $CustomAction.commandUIExtension = " <CommandUIExtension> ...


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

*Edited to actually provide a (hopefully) useful answer It is unfortunate that there is so much confusion in the MS developer community about what is allowed in custom actions in SharePoint 2013. Trying to be helpful, many have offered answers but given examples for SharePoint 2010. The solutions offered are not relevant to SharePoint 2013 add-in ...


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

https://books.google.co.in/books?id=q_L_jQ4VYpsC&pg=PT300&lpg=PT300&dq=create+features+elements+file,&source=bl&ots=2T5lGxMUfh&sig=D5G3Zp-_6rvt7Gs-XZHCoCjGMYQ&hl=en&sa=X&ved=0CEMQ6AEwBWoVChMIheak4vSbyAIVjFuOCh1RyASL#v=onepage&q=create%20features%20elements%20file%2C&f=false This may help. Gives an overview from ...


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

You could do it with javascript I guess, the name of View is Ribbon.Read, so this should work: SelectRibbonTab('Ribbon.Read', true);


1

Yes,You can edit by modifying the ms-core-brandingText class by seattle.master follow the steps given in below article to achieve the same. http://sharepoint.rackspace.com/sharepoint-2013-how-to-change-sharepoint-branding-text-in-the-upper-left-part-of-your-screen


1

Your CommandUIExtension should look like below: <CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/"> <CommandUIDefinitions> <CommandUIDefinition Location="Ribbon.List.CustomizeList.Controls._children"> <Button ...


1

Enabled SharePoint Server Publishing Infrastructure feature on the site collection level and then the SharePoint Server Publishing feature must be activated on the site level


1

You can use the EnabledScript attribute to enable the action just for your Meeting List. <CommandUIHandler Command="Ribbon.ListItem.CustomGroup.Controls.BtnSayHello.Command" CommandAction="javascript:doYourStuff();" EnabledScript="javascript: function isEnable(){ if(SP.ListOperation.Selection.getSelectedList() == "meeting list GUID"){ ...


1

Assigning a list guid to registration id is not possible. In your case you would need to have a specific list-template-id or content type assigned to this list and assign this to the registration id. You get a custom listtemplate-id if you create a list definition in a solution and create a new instance of this list. Otherwise you could use the ...


1

Yes, you can do by placing below CSS: #s4-titlerow { display:block !important; } #s4-titlerow is the default SharePoint class for showing the title row. When you open the ribbon it will make this div as hidden. As other approach you can go with your custom master page. Here is the custom starter masterpage available that you can use: Starter Master ...


1

You can update same solution and then deploy updated WSP file to server. That's it.


1

Are they anonymous sites? If so login to get the ribbon. If not, it could be some CSS issue. Get the help of developer tool in browser (F12) and ascertain the issue Let me know if you have any questions


1

If you want to enter the page in edit mode just add ?ControlMode=Edit&DisplayMode=Design to your URL. If you want the page list item in edit mode you can get the url via JS like this: var ctx = SP.ClientContext.get_current(); var list = ctx.get_lists().getById(_spPageContextInfo.pageListId); ctx.load(list, 'DefaultEditFormUrl'); ...


1

Please have a look at the three part series on how to customize Top Navigation: Customizing SharePoint 2010 global navigation with Css and jQuery – Part 1 Here is another great series on how to brand SharePoint 2010: Brand SharePoint: Global Navigation – The Journey Begins (Part 3) For the header like title and icon, you can create your own HTML instead ...



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