Sol Web Solutions Blog

Sol Web Solutions Blog is aimed to help, inform, educate and enable our site visitors.

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Login
    Login Login form

Creating custom SharePoint 2013 templates could possibly render the page ribbon incorrectly.  

Why????

Custom styling can have a tendency to interfere with the default SharePoint 2013 styling...particularly the ribbon.  Box sizing has a lot to do with how dropdown lists and images are displayed in the ribbon.

Box-sizing allows us to specify how we want the browser to calculate the CSS box model. 

In particular, should the “width” of a box or container include padding and the border, or is the width just what is inside of the padding? 

Content-box means that the specified width and height do not include margins, borders, or padding. 

Border-box, on the other hand is similar to how Internet Explorer determines width and height when a document is rendered in Quirks mode

...meaning the width and height include the border and padding, but not the margin.

 The following CSS can help you with your ribbon displaying properly after using custom SharePoint design in your templates:

*, *:before, *:after {

   -webkit-box-sizing: content-box; /*border-box causes many issues with SP*/

   -moz-box-sizing: content-box; /*border-box causes many issues with SP*/

   box-sizing: content-box; /*border-box causes many issues with SP*/

}

* [class^="span"], * [class^="span"]:before, , * [class^="span"]:after {

   -webkit-box-sizing: border-box; /*re-enable border-box for framework spans*/

   -moz-box-sizing: border-box; /*re-enable border-box for framework spans*/

   box-sizing: border-box; /*re-enable border-box for framework spans*/

}

img {

   max-width: none;

   width: auto;

}

* [class^="span"] img {

   max-width: 100%; /*for images inside span grid*/

}

#scriptWPQ2 img, img.ms-webpart-menuArrowImg, #applist img {

   /*within a span may still need to have width of image not 100% for SP2013 OOTB features/imges*/

   width: auto;

   max-width: none;

}

.ms-siteactions-imgspan {

   float: none;

   margin: 0px;

}

 

 

/*Custom Styles to Fix Ribbon Layout Issues*/

 

#s4-ribbonrow [class*="span"] {

   float: none;

   margin-left: 0px;

   line-height: 1.2em;

}

input.ms-cui-cb-input {

   height: 21px; /*14 was from first try*/

   padding: 3px 7px 2px;

}

 

 

@media (min-width: 1200px) {

   header > .container-fluid, nav#topnav > .container-fluid, footer > .container-fluid,

   .footer-bottom  > .container-fluid  {

      max-width: 1160px;

      margin-left: auto;

      margin-right: auto;

   }

   #main {

      max-width: 1200px;

      margin-left: auto;

      margin-right: auto;

   }

}

 

/*Fix Absolutely Positioned divs in a Grid Framework*/

 

header > .container-fluid {

   position: relative;

}

header .searchbox {

   bottom: auto;

   right: auto;

   position: relative;

   float: right;

   margin-top: 60px;

   text-align: left;

   width: 260px;

}

header #searchInputBox input[type=text]{

   box-shadow: none;

   transition: none;

   -moz-transition: none;

   -webkit-transition: none;

}

Hits: 26288
0

Posted by on in SharePoint

To fix “Workflow failed on start (retrying)” error we did the following:

1. From the local machine/development machine, the Visual Studio solution property for “Assembly Deployment Target” is set as “GlobalAssemblyCache” shown below:

b2ap3_thumbnail_GAC.jpg

2. Double click the package file in the solution

3. Click "Advanced" tab near the bottom of the page

4. Click "Add" >> "Add Existing Assembly" from "Add" button near top of screen

5. Click ellipses button next to Source Path

6. Navigate to where you project's bin\Debug folder is located

7. Select the .dll file which holds the name of your project

8. From the "Add Existing Assembly" modal window, select "WebApplication" option

9. Click "Ok" and "Deploy"

10. Navigate to the bin/Debug folder for the Visual Studio project, and the .wsp file is what needs to be pushed to the SharePoint Server

Hits: 60176
0

In case you need to remove the SharePoint Library ribbon option of "Upload Document" to a library:

b2ap3_thumbnail_upload_document_link_ribbon.gif

...and have the following scenario presented to the user:

b2ap3_thumbnail_no_option_upload_ribbon.jpg

  1. Open the library in SharePoint designer
  2. Open the "All Documents" view (in our case)
  3. Find the ending tag for <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
  4. Just before </asp:Content> insert the following CSS as shown below:

</ZoneTemplate></WebPartPages:WebPartZone>

<style type="text/css">
/*
hide the New Document, Upload Document, New Folder on left side of ribbon, have to use the back slashes to escape the dots in the element ID
*/
#Ribbon\.Documents\.New {display:none;}
</style>

</asp:Content>

Hits: 100328
0

Some custom jQuery to autopopulate a text field via localStorage was used in a Content Editor on our NewForm.aspx page for a SharePoint 2010 list:

<script src="/.../jquery.js" type="text/j-avascript"></script>

<script type="text/j-avascript">
window.on-load = function(){
                window.setTimeout(readyCall, 1000);
}
function readyCall(){
     var piddata = localStorage.getItem('myPID');
$("#ctl00_m...TextField").focus();
$("#ctl00_m..._TextField").val(piddata);
}</script>

It's working as expected and auto-populating our field, but the top ribbon (especially the Attach File) in the ribbon was disabled.

The ribbon was finally enabled by using:

<script type="text/j-avascript">
$(document).ready(function()
{
   var e = $("input[id$='ctl00_m_g_..._TextField']");
   var piddata = localStorage.getItem('myPID');   
   e.val(piddata);   
});
</script>

Hits: 34346
0

When submitting a document to a Records Center with the "Send Document to Repository" workflow action, there is a parameter called "this destination router".

Click the "this destination router" link and enter the full URL to your SharePoint Records Center, including the suffix of _vti_bin/officialfile.asmx.

Hits: 44818
0

YOU ARE AWESOME!
I'm so blessed to
have people like you who
continue to make this
operation go.

Love the website.

Thanks for your hard work.

...thanks! I will pass it on to
our amazing web master
at Sol Web Solutions.

I LOVE the photos
on your web site.

It's really exciting to see the
site come together.
THANKS!!!

Get Started!

Help Today

Send an email here!

Sol Web Solutions will be glad to help you anytime with general or technical questions, suggestions or comments.

Website Hosting

Web Hosting

Sol News

We will not share, trade, or sell any of your information in any way. Your privacy is completely respected.