Posts

Showing posts from 2016

Central notification bar for non coder users in SharePoint 2013 (or 2010)

We wanted a central place to notify people of any important news - planned outages, where the donuts are, etc. This marquee banner had to appear on every site and subsite using our template. I added a content editor webpart, pointing to a file in the SiteAssets of the root site. That worked and allowed me to add CSS, javascript, jquery, etc. in one location and all was right and good. I set up a marquee for those announcements, but since it was in my external file, i was a little uneasy when they decided that the night shift should be able to edit my marquee bar. The night shift usually can't be trusted to close the refrigerator door, let alone any HTML tags, so I needed to lock them down while preventing them from breaking the site as much as possible. I looked into SPServices - "GetListItems", but that seems to always be a local list.  I use this to my advantage when working with "Announcements" and " Links " and that works well, but I couldn...

Creating Buttons from any Link Library in SharePoint 2013

Here's a fun little trick to create buttons from the contents of a SharePoint 2013 Link List. First here's the finished code. <script type="text/javascript" src="/SiteAssets/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/SiteAssets/jquery.SPServices-0.5.4.min.js"></script> <link rel="stylesheet" type="text/css" href="/SiteAssets/std_Buttons.css"/> <script language="javascript" type="text/javascript"> $(document).ready(function() {   $().SPServices({     operation: "GetListItems",     async: false,     listName: "Links",     CAMLViewFields: "<ViewFields><FieldRef Name='URL' /></ViewFields>",     completefunc: function (xData, Status) {       $(xData.responseXML).find("[nodeName='z:row']").each(function() { var urlstr =  $(this).attr("ows...

Creating SharePoint 2010/2013 themed buttons

Image
In my new job we are making use of the SharePoint 2013 themes.  This will allow us to quickly identify which SharePoint portal we are using at a glance.  I wanted to create a customized CSS button which would match the SharePoint theme. To do this, I needed to apply two styles to the same link; my own to create the button, and the Microsoft SharePoint style for color. First, my style: <style type="text/css"> .btn_1line_xSma{   padding:2px 2px 2px 2px; height:15px; margin:1px 5px 5px 5px; display: inline-block;  width:300px; font-family:Arial,sans-serif; text-align:center; text-transform:uppercase; float:none; color: white !important; font-weight:normal; font-size:13px; vertical-align:middle; text-decoration:none !important; opacity:1.0;  filter:alpha(opacity=100); } .btn_1line_xSma:hover{ color:#DCDCDC !important; opacity:0.85;  filter:alpha(opacity=85); } This creates a button that I find visuall...