Installation for End Users

Cannot install a farm solution? Well hello there, government employee or contractor! Here are some instructions for adding a metro-pivot web part to your site:

  1. Locate or create your resource library. Add these files to the library:
    1. jQuery.MetroPivotWebPart.js
    2. MetroPivotWebPart.css
  2. In a CEWP (Content Editor Web Part) or an XML Viewer web part, add the following client code, replacing '<pathtoyourresourcelibrary>' with your resource library path:

<!--- CODE START -->
<!-- Can be removed if jQuery already added -->
<script type="text/javascript"> typeof ($) != "undefined" || document.write('<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js">\x3C/script>')</script>

<!--CSS-->
<style type="text/css">.s4-wpTopTable { visibility: hidden; }</style>
<link id="MetroPivotWebPart_CSS" rel="stylesheet" type="text/css" href="<path_to_your_resource_library>/MetroPivotWebPart.css" />

<!--jQuery Plugin -->
<script type="text/javascript">typeof($.metroPivotWebPart)!="undefined" || document.write('<script src="<path_to_your_resource_library>/jquery.MetroPivotWebPart.min.js">\x3C/script>');</script>

<script type="text/javascript">
$(document).ready(function () {
try {
$("#my_metroPivot").metroPivotWebPart({retainTab: true, headerFontSize: "220%"});
} catch(e){
//in case error, ensure things are visible
$(".s4-wpTopTable").css({visibility: "visible"});
}
});
</script>
<div id="my_metroPivot"></div>

<!--- CODE END -->

Last edited Mar 21, 2013 at 2:58 PM by chadschroeder, version 1

Comments

No comments yet.