Hot answers tagged

15

They have a JavaScript API for this: http://msdn.microsoft.com/en-us/library/office/ff408647(v=office.14).aspx You can even add command ui extension like you have them. var context = new SP.ClientContext.get_current(); this.site = context.get_web(); var customAction = this.site.get_userCustomActions().add(); customAction.set_location('CommandUI.Ribbon....


11

Site Actions -> Navigation -> Show and Hide Ribbon Setting Make "Show Ribbon" and "Hide Ribbon" commands available to No should prevent the ribbon from disabling and requiring folks to enable it. It should also make it available all the time for everyone.


10

I know you asked for 2013 but I'm leaving the 2010 one here too in case anyone go crazy like you did. 2010 When any ribbon tab is open (other than the 'browse' one) it forces a 135px height on its container, which is a sibling of the #s4-workspace container, see where I am going? #s4-ribbonrow[style='height: 135px;'] ~ #s4-workspace #s4-leftpanel { ...


9

This is not a bug. If you have more than one web part on a page then you must click the one you want the ribbon for.


9

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


8

Check https://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" onclick="javascript:Custom_Submit('...


7

Apparently, this is a common problem (I'm surprised that nobody already had a custom solution). Apparently, this is what causes the problem: When you add a web part to the standard list views, the page is no longer classified as a list view page, but instead it is classed as an application page. Katrina over on Stack Exchange posted this solution. ...


7

You can use SP.ListOperation.Selection.getSelectedItems() to get the currently selected item. Here is a code sample: var context = SP.ClientContext.get_current(); var selectedItems = SP.ListOperation.Selection.getSelectedItems(context); var item; for (i in selectedItems) { alert(selectedItems[i].id); } Once you have the id of the item, you will ...


7

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


6

Have you added another Webpart to the AllItems Section? I get this behavior as soon as I add any Webpart to a View. Removing all other webparts except for the List View Webpart itself should bring you back the desired behavior. UPDATE This answer describes a way to get things actually working. Putting the mentioned code inside a $(function() {...}) ...


6

Create a JS file (HideScript.js) and paste the following code in it, which hides the ribbon for a certain page. Upload the JS file to some document library for e.g. "SiteAssets" function HideRibbon() { $("#s4-ribbonrow").hide(); var newHeight = $(document).height(); if ($.browser.msie) {newHeight = newHeight - 3; } $("#s4-workspace")....


6

Yes it is possible, check this tutorial out that is demonstrating how to create a Visual WebPart as a Text editor and it's also connected to Ribbon as claimed by author, however it's for SharePoint 2010 but I am pretty sure it will work as it is or with some changes for SharePoint 2013 as well. Develop a custom editable Visual Web Part (WebPart) Helpful ...


6

My complete solution for SharePoint 2013 - style ribbon-based rich-text editor. I made this some time ago, so I certainly borrowed some code from google. ASPX / ASCX: <div id="editor"> <div id="RTEDiv" tabindex="0"></div> <asp:HiddenField ID="RTEDivHidden" runat="server" /> <div class="commands"> <asp:...


6

SharePoint Designer 2013 can be used to create a ribbon button for SharePoint list or library. When clicked, the button will perform a custom action. 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 navigation ...


6

here the answer: <script type="text/javascript"> function hideEdit() { var edit = document.getElementById("Ribbon.ListForm.Display.Manage.EditItem-Large"); edit.style.display = "none"; } _spBodyOnLoadFunctionNames.push("hideEdit"); </script> Or Enable/Disable ribbon button based on current item value of a ...


6

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.


6

Add following css in your newpage.aspx, this way the ribbon will only be hidden in dialog view, and still usable in normal view. <style type="text/css"> .ms-dialog #s4-ribbonrow, .ms-dialog .ms-cui-topBar2, .ms-dialog .s4-notdlg, .ms-dialog .s4-pr s4-ribbonrowhidetitle, .ms-dialog .s4-notdlg noindex, .ms-dialog #ms-cui-ribbonTopBars, .ms-dialog ...


6

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


5

As I posted in the question, the class Microsoft.SharePoint.Publishing.WebControls.ConsoleVisibleUtilities - which seems to control ribbon visibility - contains some check that require the user to have specific permission on the site. This means that server side the ribbon is already "removed" if the user fails to match certain requirements - thus giving no ...


5

You might also want to try this little jQuery plugin It allows you to enable Ribbon WYSIWYG editor while you are in edit mode. It works simply like this: $("#myDiv").SPEditable(); And the result might look like this: And this is a real life example where this can be really useful: Update: Now this plugin supports SP 2013:


5

Follow this guide from Waldek, it is for 2010 but should work just as well from 2013: http://blog.mastykarz.nl/consistent-content-authoring-sharepoint-2010-rich-text-editor/ Basically: <PublishingWebControls:RichHtmlField FieldName="PublishingPageContent" HasInitialFocus="True" AllowFonts="false" AllowTextMarkup="false" AllowParagraphFormatting="...


5

Since those are new to SharePoint 2013, you should know the terminologies and it will be easy to find.. The Green one is called "Suite Bar", while the grey one (with Share, Follow buttons) are called "Promoted Actions".. Using delegate you can have your custom Suite Bar or Promoted Actions.. Following tutorials should help: Add,Remove Links in Top ...


5

I was able to do this using pure CSS, but had to escape the "." As follows: <style type="text/css"> #Ribbon\.ListForm\.Display\.Manage\.EditItem-Large {display:none !important;} </style>


5

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();


5

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


5

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


5

Solution in 1 line: EnabledScript="javascript:SP.ListOperation.Selection.getSelectedItems().length > 0;"


5

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


5

Ok so in order to start branding SharePoint (Office 365) you need 3 things: A CSS file A place to store the CSS file Register/associate the CSS file with the site / master page The CSS file You can use this simple styles.css proof-of-concept to tell you it is working. body { background-color:red; } Storage There are many options but it is often ...


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