Tag Info

Hot answers tagged

8

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


5

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


3

Just hide the Content Type from the button: Go in to List Settings and click on "Change new button order and default Content type" under the Content Types headline. Set "Visible on new button" to false for your unwanted content type. Absolutely no need for a custom action More information: ...


3

in 2013 you have to edit the master page directly to style it beyond the built-in themes. better yet, you can "legally" design master pages from scratch (now a supported feature) and set the CSS howver you like. microsoft calls it the "design manager" option of publishing sites. check it out here: http://msdn.microsoft.com/en-us/library/jj822363.aspx the ...


3

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:


3

Can't you do a custom javascript to add the ms-cui-disabled class to the buttons you'd like to disable? Edit: This just makes the button appear disabled but it will in fact be clickable. You might need to add the ms-cui-disabled class and a custom class so you can bind an onclick function to that custom class to prevent default and return false.


2

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


2

Worked CAML (tested): <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="RemoveRibbonButton" Location="CommandUI.Ribbon" RegistrationId="0x" RegistrationType="ContentType"> <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition ...


2

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


2

In case of SharePoint 2010, you can edit your master page with Designer. Find the following node: <td class="s4-socialdata-notif"> <SharePoint:DelegateControl ControlId="GlobalSiteLink3" Scope="Farm" runat="server"/> </td> Then add another td before or after this one. For instance, this is what I ...


2

That image is part of an image sprite (where you have one image file containing many images) included in these two files: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\1033\IMAGES\formatmap16x16.png C:\Program Files\Common Files\microsoft shared\Web Server ...


2

I thought of giving it a try and came up with the below solution. Consider the name of the Boolean Field in the Library/List is BoolField. The following JSOM code will Enable/Disable the Ribbon Button based on the field value. Place the code in a JS file and refer it from ScriptSrc in CustomAction function EnableDemoButton() { var context = ...


2

You need to append 15 to _layouts i.e /_layouts/15 in order to get hold of the file as you are working on SP 2013. UPDATE Put the javascript file under CustomRibbonButton folder in your project and use /_layouts/15/CustomRibbonButton/JavaScript1.js. The hive folder for SharePoint 2013 is 15. It used to be 12 for MOSS and 14 for SP 2010. This needs to be ...


2

Yes i think you can do that: After you created your Action Button(or ribbon control), in "Elements.xml" of your control you need to add "EnabledScript" command to it, like this: <CustomAction Id="Shakib.EditPermissionForce" Location="CommandUI.Ribbon"> <CommandUIExtension> <CommandUIDefinitions> ...


2

thanks to this : Showing the tab on button click I created a function that click on my calendar. So, I simulate three clicks and it does what I wanted. Even though the ribbon is Hidden. click on webpart to make the contextual ribbon appear (still hidden) click on ribbon menu click on link in ribbon here is the code : function calendarClick(){ var ...


2

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


2

Try resizing your browser window (which browser are you using?) Change the browser zoom level (know bugs with that) Check for any JavaScript errors while loading the page Try to remove all custom CSS/branding - that is does it behave the same on a default non customized site?


1

sorry im not being clear!: there are two types of application pages! the first contains no inherited masterpage and contains a reference to the .cs page but that is about it... it has head, body tags, looks somthing like this: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Meeting.aspx.cs" Inherits="meeting.Meeting" %> <!DOCTYPE html ...


1

You have to use a custom action on your contenttype.. look at the answer on this thread How can I add button to ribbon that visible only for specific content type?


1

You cannot hide features after they have been deployed. Correction: Web Application is not a border for feature definition visibility in SharePoint 2010 SP2 as reflecting on Microsoft.SharePoint.WebControls.FeatureActivator shows. Actually, what you should have done is you should have deployed to the one and only web application that is supposed to ...


1

you could add a custom action, maybe a checkbox. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="MyRibbons.RibbonScript" ScriptSrc="~SiteCollection/_layouts/MyRibbonsScript.js" Location="ScriptLink"> </CustomAction> <CustomAction ...


1

If the idea is that some content should "fall behind" the Ribbon (such as a header, navigation, etc.) you can just place your markup in the with the ID "s4-titlerow". This gets automatically hidden when the Ribbon displays, giving the effect that the Ribbon falls "on top" of the content. Otherwise, I would give a try to any of the script proposed ...


1

this function: function IsRibbonHidden() { return document.getElementById('RibbonContainer_activeTabId').value == "Ribbon.Read"; } will return true when the ribbon is inactive, and false when it expanded (or null when the ribbon is absent). You can attach a javascript event receiver and hide/unhide the left menu depending on what the function returns.


1

You have an Out Of The Box behaviour that must be activated in the Welcome.ascx inside {SharePointRoot}\Template\CONTROLTEMPLATES folder. Localize this code in Welcome.ascx <SharePoint:MenuItemTemplate runat="server" id="ID_RequestAccess" Text="<%$Resources:wss,personalactions_requestaccess%>" ...


1

Try this instead: function RTEActions() { RTE.Cursor.update(); var html = 'testing'; RTE.Selection.getSelectionRange().pasteHtml(html); } A word of warning - this only works properly if the cursor is inside the RTE when the function runs - otherwise "testing" is inserted at the top of the page above everything else.


1

Place RTE actions in SP.SOD.executeOrDelayUntilScriptLoaded in order to execute the specified function if the file containing it is loaded (in your case sp.ui.rte.js): ExecuteOrDelayUntilScriptLoaded(RTEActions, "sp.ui.rte.js"); Example: function RTEActions() { var range = RTE.Cursor.get_range(); //Place your remaining code here... ...


1

<fulminating against='Microsoft'> I finally found the solution. Thanks to the article Removing objects from the SharePoint ribbon, I understood that I have to overwrite the existing definition instead of trying to hide it. So in my very specific case, I have to write this xml: <CustomAction Id="Hide.Ribbon.Link.Link.Behavior.PopUp" ...


1

As pointed by @Robert, Enabled script should return boolean value. Your Enabled script should look like this: "EnabledScript="javascript: function enableBulkApproveButton() { var context = SP.ClientContext.get_current(); return SP.ListOperation.Selection.getSelectedItems(context).length >= 1; } enableBulkApproveButton();" I guess you ...


1

Just a suggestion- I feel if you use for registering font from number -1 to 11 then somewhere it should be able to set it as default font as per the 1st link. Because as mentioned in the blog -1 to 11 are blocked for the defaut fonts. If you override them then you can set your font as default one.


1

I actually found an answer to that problem. Remove all querystring parameters. Then remove the corresponding filters. Now, add another webpart: a querystring filter. Set it up to use the parameter you need. Finally, connect both web parts (the querystring filter and the one displaying the list). Make it so that the querystring filter sends filter data do ...



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