Skip to content

Instantly share code, notes, and snippets.

@RainerAtSpirit
Created August 23, 2012 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RainerAtSpirit/3436301 to your computer and use it in GitHub Desktop.
Save RainerAtSpirit/3436301 to your computer and use it in GitHub Desktop.
SharePointApp1
var context;
var web;
var user;
// This code runs when the DOM is ready. It ensures the SharePoint
// script file sp.js is loaded and then executes sharePointReady()
$(document).ready(function () {
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
});
// This function creates a context object which is needed to use the SharePoint object model
function sharePointReady() {
context = new SP.ClientContext.get_current();
web = context.get_web();
getUserName();
}
// This function prepares, loads, and then executes a SharePoint query to get the current users information
function getUserName() {
user = web.get_currentUser();
context.load(user);
context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
}
// This function is executed if the above call is successful
// It replaces the contents of the 'helloString' element with the user name
function onGetUserNameSuccess() {
$('#message').text('Hello ' + user.get_title());
}
// This function is executed if the above call fails
function onGetUserNameFail(sender, args) {
alert('Failed to get user name. Error:' + args.get_message());
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" lang="en-US">
<head><meta name="GENERATOR" content="Microsoft SharePoint" /><meta http-equiv="Content-type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=10" /><meta http-equiv="Expires" content="0" /><meta content="width=device-width, initial-scale=1" name="viewport" /><meta name="msApplication-TileImage" value="/_layouts/15/images/SharePointMetroAppTile.png" /><meta name="msApplication-TileColor" value="0072C6" /><title>
SharePointApp1
</title><link rel="shortcut icon" href="/_layouts/15/images/favicon.ico" type="image/vnd.microsoft.icon" id="favicon" /><link rel="stylesheet" type="text/css" href="https://spirit2013preview.sharepoint.com/sites/dev/_layouts/15/defaultcss.ashx?ctag=0"/>
<script type="text/javascript" src="https://cdn.sharepointonline.com/2776/_layouts/15/init.js?rev=msptCBHw90mLJ2YXhvPe5Q%3D%3D"></script>
<script type="text/javascript" src="/ScriptResource.axd?d=sFXIQ1C9c6GxIl3-37xAHth45JkhR9zOeXlbgCaJYHCRMazv9u4CzA8mYMlxfTdT4-s-lmJWZdVkYaAv1UEkH4RVKOBJZ93bCXL60XzeECMNri4rY6xdTT_zilPJSkCZSZh8yp5q7uZZ74UMT1IvxxgBBadfcnNvRjfTr6o1TOY_4hpHLWhos1AgCO8ee3Sk0&amp;t=4e6ba05"></script>
<script type="text/javascript" src="https://cdn.sharepointonline.com/2776/_layouts/15/blank.js?rev=ZaOXZEobVwykPO9g8hq%2F8A%3D%3D"></script>
<script type="text/javascript" src="/ScriptResource.axd?d=NdlJ2qoAw1E44KJUTqSc68pxVK6Cq1WCV9IVJMcgsUC_BGGuSK7Ytrz-6BprESWLY-K03TwzfkTohUVs7gnRdD0d1CSlXwzJMuZuGtqyXhYAO4mjmtZoWU_u_JlUTZ4PC6X2mKp3hLix9u3RVcDKjZ-My2Ge2ZsENV3Y7TOwHOmEf0xX50aWdy1CWHYrAqju0&amp;t=4e6ba05"></script>
<script type="text/javascript">RegisterSod("initstrings.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002f1033\u002finitstrings.js?rev=rsz16PrBMKemGwppU2HBgg\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("strings.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002f1033\u002fstrings.js?rev=QvKJSzJfcoHC\u00252FgrGL5l\u00252FLg\u00253D\u00253D");RegisterSodDep("strings.js", "initstrings.js");</script>
<script type="text/javascript">RegisterSod("sp.init.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.init.js?rev=wIbXIAPR\u00252BGWwyrxz9aBh2A\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.res.resx", "\u002f_layouts\u002f15\u002fScriptResx.ashx?culture=en\u00252Dus\u0026name=SP\u00252ERes\u0026rev=9AwbokIGn7tHTCsM7k1n9Q\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.ui.dialog.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.ui.dialog.js?rev=rWas\u00252B1oHc80\u00252BE1wOOi4wCQ\u00253D\u00253D");RegisterSodDep("sp.ui.dialog.js", "sp.init.js");RegisterSodDep("sp.ui.dialog.js", "sp.res.resx");</script>
<script type="text/javascript">RegisterSod("core.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fcore.js?rev=MSSaFJ2qAg5ThaMq2rfM9A\u00253D\u00253D");RegisterSodDep("core.js", "strings.js");</script>
<script type="text/javascript">RegisterSod("menu.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fmenu.js?rev=\u00252F5hczz4B7\u00252B\u00252BOEa4RJFP5YQ\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("mQuery.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fmquery.js?rev=VYAJYBo5H8I3gVSL3MzD6A\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("callout.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fcallout.js?rev=nfgzkoCaM0H7Ok4Pfm9OUg\u00253D\u00253D");RegisterSodDep("callout.js", "strings.js");RegisterSodDep("callout.js", "mQuery.js");RegisterSodDep("callout.js", "core.js");</script>
<script type="text/javascript">RegisterSod("clienttemplates.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fclienttemplates.js?rev=QzOwHx7wALOnAj1jyPpTqg\u00253D\u00253D");RegisterSodDep("clienttemplates.js", "initstrings.js");</script>
<script type="text/javascript">RegisterSod("sharing.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsharing.js?rev=2Y7MyA2SF\u00252BLscFB66jA7tw\u00253D\u00253D");RegisterSodDep("sharing.js", "strings.js");RegisterSodDep("sharing.js", "mQuery.js");RegisterSodDep("sharing.js", "clienttemplates.js");RegisterSodDep("sharing.js", "core.js");</script>
<script type="text/javascript">RegisterSod("suitelinks.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsuitelinks.js?rev=AwayPkB6aSrsIqxJe54Qlw\u00253D\u00253D");RegisterSodDep("suitelinks.js", "strings.js");RegisterSodDep("suitelinks.js", "core.js");</script>
<script type="text/javascript">RegisterSod("sp.core.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.core.js?rev=Bg1bRJyDXNTOzgOurmQV\u00252FQ\u00253D\u00253D");RegisterSodDep("sp.core.js", "strings.js");RegisterSodDep("sp.core.js", "sp.init.js");RegisterSodDep("sp.core.js", "core.js");</script>
<script type="text/javascript">RegisterSod("sp.runtime.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.runtime.js?rev=jTPU9h61j5EEFB0\u00252Fdxqv5A\u00253D\u00253D");RegisterSodDep("sp.runtime.js", "sp.res.resx");</script>
<script type="text/javascript">RegisterSod("sp.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.js?rev=N1zh9ZH9xS8vVAcPRSIjOA\u00253D\u00253D");RegisterSodDep("sp.js", "sp.runtime.js");RegisterSodDep("sp.js", "sp.ui.dialog.js");RegisterSodDep("sp.js", "sp.res.resx");</script>
<script type="text/javascript">RegisterSod("cui.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fcui.js?rev=tsG2fO0KVNrm8EosTMQTCw\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("inplview", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002finplview.js?rev=KiBfyFNem76a4Z15OhWnXg\u00253D\u00253D");RegisterSodDep("inplview", "strings.js");RegisterSodDep("inplview", "core.js");RegisterSodDep("inplview", "sp.js");</script>
<script type="text/javascript">RegisterSod("ribbon", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.ribbon.js?rev=v\u00252BZE7nd61KbQtGOcHHMLDQ\u00253D\u00253D");RegisterSodDep("ribbon", "strings.js");RegisterSodDep("ribbon", "core.js");RegisterSodDep("ribbon", "sp.core.js");RegisterSodDep("ribbon", "sp.js");RegisterSodDep("ribbon", "cui.js");RegisterSodDep("ribbon", "sp.res.resx");RegisterSodDep("ribbon", "sp.runtime.js");RegisterSodDep("ribbon", "inplview");</script>
<script type="text/javascript">RegisterSod("socialdata.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsocialdata.js?rev=4VEMFDuAK03Krlz2A\u00252BgXWg\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.ui.socialribbon.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.ui.socialribbon.js?rev=co3qUuYxhXAF2S0oJNMPGg\u00253D\u00253D");RegisterSodDep("sp.ui.socialribbon.js", "ribbon");RegisterSodDep("sp.ui.socialribbon.js", "socialdata.js");</script>
<script type="text/javascript">RegisterSod("userprofile", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.userprofiles.js?rev=dCfU\u00252BBHUjIkTD9wTpYYIOA\u00253D\u00253D");RegisterSodDep("userprofile", "sp.runtime.js");</script>
<script type="text/javascript">RegisterSod("followingcommon.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002ffollowingcommon.js?rev=42M1jm4aCxagS7l8omTLAA\u00253D\u00253D");RegisterSodDep("followingcommon.js", "strings.js");RegisterSodDep("followingcommon.js", "sp.js");RegisterSodDep("followingcommon.js", "userprofile");RegisterSodDep("followingcommon.js", "core.js");RegisterSodDep("followingcommon.js", "mQuery.js");</script>
<script type="text/javascript">RegisterSod("profilebrowserscriptres.resx", "\u002f_layouts\u002f15\u002fScriptResx.ashx?culture=en\u00252Dus\u0026name=ProfileBrowserScriptRes\u0026rev=\u00252FdTCEey3VIbvR0sd8kunIw\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.ui.mysitecommon.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.ui.mysitecommon.js?rev=Y3xm\u00252FXCnDmok1bi6VqIdQQ\u00253D\u00253D");RegisterSodDep("sp.ui.mysitecommon.js", "sp.runtime.js");RegisterSodDep("sp.ui.mysitecommon.js", "userprofile");RegisterSodDep("sp.ui.mysitecommon.js", "profilebrowserscriptres.resx");</script>
<script type="text/javascript">RegisterSod("browserScript", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fie55up.js?rev=GjzN9sySCqlMuWAOJxU92w\u00253D\u00253D");RegisterSodDep("browserScript", "strings.js");</script>
<script type="text/javascript">RegisterSod("/online/scripts/sposuitenav.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002f\u002fonline\u002fscripts\u002fsposuitenav.js?rev=MvAdIOHShc8OC8lZqPuM\u00252Fw\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.ui.mysitenavigation.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fsp.ui.mysitenavigation.js?rev=AH2D4Dumw8TlJCGRkdojxw\u00253D\u00253D");RegisterSodDep("sp.ui.mysitenavigation.js", "sp.js");RegisterSodDep("sp.ui.mysitenavigation.js", "sp.core.js");</script>
<script type="text/javascript">RegisterSod("WPAdderClass", "https:\u002f\u002fcdn.sharepointonline.com\u002f2776\u002f_layouts\u002f15\u002fwpadder.js?rev=vjRBMIKl1E7U0oafNyyU2w\u00253D\u00253D");</script>
<link type="text/xml" rel="alternate" href="/sites/dev/SharePointApp1/_vti_bin/spsdisco.aspx" />
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js" type="text/javascript"></script>
<!-- Add your CSS styles to the following file -->
<link rel="Stylesheet" type="text/css" href="../Content/App.css" />
<!-- Add your JavaScript to the following file -->
<script type="text/javascript" src="../Scripts/App.js"></script>
<script type="text/javascript">
var bglImgElmId = "background";
var bglHelperElmIds = [];
</script>
</head>
<body>
<div id="imgPrefetch" style="display:none">
<img src="/_layouts/15/images/favicon.ico" />
<img src="/_layouts/15/images/siteIcon.png" />
</div>
<noscript><div class='noindex'>You may be trying to access this site from a secured browser on the server. Please enable scripts and reload this page.</div></noscript>
<form method="post" action="Default.aspx?SPHostUrl=https%3a%2f%2fspirit2013preview.sharepoint.com%2fsites%2fdev&amp;SPLanguage=en-US&amp;SPAppWebUrl=https%3a%2f%2fSpirit2013Preview-b0204c96e900c8.sharepoint.com%2fsites%2fdev%2fSharePointApp1" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
<div class="aspNetHidden">
<input type="hidden" name="_wpcmWpid" id="_wpcmWpid" value="" />
<input type="hidden" name="wpcmVal" id="wpcmVal" value="" />
<input type="hidden" name="MSOWebPartPage_PostbackSource" id="MSOWebPartPage_PostbackSource" value="" />
<input type="hidden" name="MSOTlPn_SelectedWpId" id="MSOTlPn_SelectedWpId" value="" />
<input type="hidden" name="MSOTlPn_View" id="MSOTlPn_View" value="0" />
<input type="hidden" name="MSOTlPn_ShowSettings" id="MSOTlPn_ShowSettings" value="False" />
<input type="hidden" name="MSOGallery_SelectedLibrary" id="MSOGallery_SelectedLibrary" value="" />
<input type="hidden" name="MSOGallery_FilterString" id="MSOGallery_FilterString" value="" />
<input type="hidden" name="MSOTlPn_Button" id="MSOTlPn_Button" value="none" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__REQUESTDIGEST" id="__REQUESTDIGEST" value="0x6E6E7DBAB249BF534E8BC779C293E6DE90BCA0150AFC9E8A8376218AB8C90AFF396EB0445A3EFA6C0C875925B82ECF9E1314E86AC4C6761B3A5A86B538C61542,23 Aug 2012 12:42:59 -0000" />
<input type="hidden" name="MSOSPWebPartManager_DisplayModeName" id="MSOSPWebPartManager_DisplayModeName" value="Browse" />
<input type="hidden" name="MSOSPWebPartManager_ExitingDesignMode" id="MSOSPWebPartManager_ExitingDesignMode" value="false" />
<input type="hidden" name="MSOWebPartPage_Shared" id="MSOWebPartPage_Shared" value="" />
<input type="hidden" name="MSOLayout_LayoutChanges" id="MSOLayout_LayoutChanges" value="" />
<input type="hidden" name="MSOLayout_InDesignMode" id="MSOLayout_InDesignMode" value="" />
<input type="hidden" name="_wpSelected" id="_wpSelected" value="" />
<input type="hidden" name="_wzSelected" id="_wzSelected" value="" />
<input type="hidden" name="MSOSPWebPartManager_OldDisplayModeName" id="MSOSPWebPartManager_OldDisplayModeName" value="Browse" />
<input type="hidden" name="MSOSPWebPartManager_StartWebPartEditingName" id="MSOSPWebPartManager_StartWebPartEditingName" value="false" />
<input type="hidden" name="MSOSPWebPartManager_EndWebPartEditing" id="MSOSPWebPartManager_EndWebPartEditing" value="false" />
<input type="hidden" name="_maintainWorkspaceScrollPosition" id="_maintainWorkspaceScrollPosition" value="0" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPBSpWU0tleTpkN2Y5NGEzNC1lMjBmLTRjNmQtOTRhMy04YmE3ZTUxOGZkZGJk0Mc9gOP3WmsNCxdcj6Lgcv4/nJvEMGsftmOm4/1cwsY=" />
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script src="/WebResource.axd?d=M9tPs8zKLKpJI1mEeNCuXFkTXnnvwIP84BKlI6BJHc7LaiUhDjIrmT9E4O0Uwz3MCcigNWUj672yLqR2AwMXcsht5i9uV4I_oFIvFjKoGMg1&amp;t=634714028940000000" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var MSOWebPartPageFormName = 'aspnetForm';
var g_presenceEnabled = true;
var g_wsaEnabled = false;
var g_wsaQoSEnabled = false;
var g_wsaQoSDataPoints = [];
var g_wsaLCID = 1033;
var g_wsaListTemplateId = null;
var g_wsaSiteTemplateId = 'APP#0';
var ULS;if (!ULS) ULS=new Object();ULS.enable=true;ULS.Correlation="ea5ac69b-0679-40fc-4b46-2bef0933ed14";var _fV4UI=true;var _spPageContextInfo = {webServerRelativeUrl: "\u002fsites\u002fdev\u002fSharePointApp1", webAbsoluteUrl: "https:\u002f\u002fSpirit2013Preview-b0204c96e900c8.sharepoint.com\u002fsites\u002fdev\u002fSharePointApp1", siteAbsoluteUrl: "https:\u002f\u002fspirit2013preview-b0204c96e900c8.sharepoint.com\u002fsites\u002fdev", serverRequestPath: "\u002fsites\u002fdev\u002fSharePointApp1\u002fPages\u002fDefault.aspx", layoutsUrl: "_layouts\u002f15", webTitle: "SharePointApp1", webTemplate: "17", tenantAppVersion: "0", webLogoUrl: "_layouts\u002f15\u002fimages\u002fsiteicon.png", webLanguage: 1033, currentLanguage: 1033, currentUICultureName: "en-US", currentCultureName: "en-US", clientServerTimeDelta: new Date("2012-08-23T12:42:59.9036374Z") - new Date(), siteClientTag: "0$$15.0.4128.1020", crossDomainPhotosEnabled:false, webUIVersion:15, webPermMasks:{High:2147483647,Low:4294967295}, pagePersonalizationScope:1,userId:8, systemUserKey:"i:0h.f|membership|10037ffe8245927f@live.com", alertsEnabled:true, siteServerRelativeUrl: "\u002fsites\u002fdev", allowSilverlightPrompt:'True'};var __SafeRunFunctionLoadedScripts = new Array();function SafeRunFunction(fnc, script, type){ if (!_spBodyOnLoadCalled) { __QueueFunctionForSafeRunFunction(fnc, script, type); return; } var executed = ExecuteOrDelayUntilScriptLoaded(fnc, script); if (executed) { return; } var loaded = false; for (var i = 0; i < __SafeRunFunctionLoadedScripts.length; i++) { if (__SafeRunFunctionLoadedScripts[i].toLowerCase() != script.toLowerCase()) { continue; } loaded = true; break; } if (loaded) { return; } __SafeRunFunctionLoadedScripts.push(script); SP.SOD.executeFunc(script, type, function(){});}var __SafeRunFunctionQueue = null;function __QueueFunctionForSafeRunFunction(fnc, script, type){ if (!__SafeRunFunctionQueue) { __SafeRunFunctionQueue = new Array(); } var container = new Object(); container['Function'] = fnc; container['Script'] = script; container['Type'] = type; __SafeRunFunctionQueue.push(container);}function __ProcessQueuedFunctions(){ if (!__SafeRunFunctionQueue || __SafeRunFunctionQueue.length <= 0) { return; } for (var i = 0; i < __SafeRunFunctionQueue.length; i++) { var container = __SafeRunFunctionQueue[i]; var fnc = container['Function']; var script = container['Script']; var type = container['Type']; SafeRunFunction(fnc, script, type); } __SafeRunFunctionQueue = null;}_spBodyOnLoadFunctionNames.push('__ProcessQueuedFunctions');var L_Menu_BaseUrl="/sites/dev/SharePointApp1";
var L_Menu_LCID="1033";
var L_Menu_SiteTheme="null";
//]]>
</script>
<script src="https://cdn.sharepointonline.com/2776/_layouts/15/blank.js?rev=ZaOXZEobVwykPO9g8hq%2F8A%3D%3D" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
(function(){
if (typeof(_spBodyOnLoadFunctions) === 'undefined' || _spBodyOnLoadFunctions === null) {
return;
}
_spBodyOnLoadFunctions.push(function() {
if (typeof(SPClientTemplates) === 'undefined' || SPClientTemplates === null) {
return;
}
var renderFollowFooter = function(renderCtx, calloutActionMenu)
{
if (renderCtx.ListTemplateType == 700)
myDocsActionsMenuPopulator(renderCtx, calloutActionMenu);
else
CalloutOnPostRenderTemplate(renderCtx, calloutActionMenu);
var listItem = renderCtx.CurrentItem;
if (typeof(listItem) === 'undefined' || listItem === null) {
return;
}
if (listItem.FSObjType == 0) {
calloutActionMenu.addAction(new CalloutAction({
text: Strings.STS.L_CalloutFollowAction,
tooltip: Strings.STS.L_CalloutFollowAction_Tooltip,
onClickCallback: function (calloutActionClickEvent, calloutAction) {
var callout = GetCalloutFromRenderCtx(renderCtx);
if (!(typeof(callout) === 'undefined' || callout === null))
callout.close();
SP.SOD.executeFunc('followingcommon.js', 'FollowSelectedDocument', function() { FollowSelectedDocument(renderCtx); });
}
}));
}
};
var registerOverride = function(id) {
var followingOverridePostRenderCtx = {};
followingOverridePostRenderCtx.BaseViewID = 'Callout';
followingOverridePostRenderCtx.ListTemplateType = id;
followingOverridePostRenderCtx.Templates = {};
followingOverridePostRenderCtx.Templates.Footer = function(renderCtx) {
var renderECB;
if (typeof(isSharedWithMeView) === 'undefined' || isSharedWithMeView === null) {
renderECB = true;
} else {
var viewCtx = getViewCtxFromCalloutCtx(renderCtx);
renderECB = !isSharedWithMeView(viewCtx);
}
return CalloutRenderFooterTemplate(renderCtx, renderFollowFooter, renderECB);
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(followingOverridePostRenderCtx);
}
registerOverride(101);
registerOverride(700);
});
})();
function EnableLaunch()
{
if (listCtx.CurrentSelectedItems!=1)
{
return false;
}
var items = SP.ListOperation.Selection.getSelectedItems();
var currItem = GetDraftAppListItemByID(listCtx, items[0].id);
if(currItem.AppLaunchUrl == null)
{
return false;
}
return true;
}
function EnableDelete()
{
return (listCtx != null && listCtx.CurrentSelectedItems != null && listCtx.CurrentSelectedItems > 0);
}
if (typeof(DeferWebFormInitCallback) == 'function') DeferWebFormInitCallback();function WebForm_OnSubmit() {
UpdateFormDigest('\u002fsites\u002fdev\u002fSharePointApp1', 1440000);
var workspaceElem = GetCachedElement("s4-workspace");
if (workspaceElem != null)
{
var scrollElem = GetCachedElement("_maintainWorkspaceScrollPosition");
if (scrollElem != null)
{
scrollElem.value = workspaceElem.scrollTop;
}
};
if (typeof(_spFormOnSubmitWrapper) != 'undefined') {return _spFormOnSubmitWrapper();} else {return true;};
return true;
}
//]]>
</script>
<div class="aspNetHidden">
<input type="hidden" name="__SCROLLPOSITIONX" id="__SCROLLPOSITIONX" value="0" />
<input type="hidden" name="__SCROLLPOSITIONY" id="__SCROLLPOSITIONY" value="0" />
</div>
<script type="text/javascript"> var submitHook = function () { return false; }; theForm._spOldSubmit = theForm.submit; theForm.submit = function () { if (!submitHook()) { this._spOldSubmit(); } }; </script>
<span id="ctl00_DeltaSPWebPartManager">
</span>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager', 'aspnetForm', ['fctl00$WebPartAdderUpdatePanel',''], [], ['ctl00$WebPartAdder',''], 90, 'ctl00');
//]]>
</script>
<div id="TurnOnAccessibility" style="display:none" class="s4-notdlg noindex">
<a id="linkTurnOnAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();document.getElementById('linkTurnOffAcc').focus();return false;">Turn on more accessible mode</a>
</div>
<div id="TurnOffAccessibility" style="display:none" class="s4-notdlg noindex">
<a id="linkTurnOffAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();document.getElementById('linkTurnOnAcc').focus();return false;">Turn off more accessible mode</a>
</div>
<div class="s4-notdlg s4-skipribbonshortcut noindex">
<a href="javascript:;" onclick="javascript:this.href=&#39;#startNavigation&#39;;" class="ms-accessible ms-acc-button" accesskey="Y">Skip Ribbon Commands</a>
</div>
<div class="s4-notdlg noindex">
<a href="javascript:;" onclick="javascript:this.href=&#39;#mainContent&#39;;" class="ms-accessible ms-acc-button">Skip to main content</a>
</div>
<div id="TurnOffAnimation" style="display:none;" class="s4-notdlg noindex">
<a id="linkTurnOffAnimation" href="#" class="ms-accessible ms-acc-button" onclick="ToggleAnimationStatus();return false;">Turn off Animations</a>
</div>
<div id="TurnOnAnimation" style="display:none;" class="s4-notdlg noindex">
<a id="linkTurnOnAnimation" href="#" class="ms-accessible ms-acc-button" onclick="ToggleAnimationStatus();return false;">Turn on Animations</a>
</div>
<a id="HiddenAnchor" href="javascript:;" style="display:none;"></a>
<script type="text/javascript">
var mpfb_version = 4128;
function fbHideFeedback()
{
var fbFeedbackButton = fbGetFeedbackElement();
if (fbFeedbackButton)
{
fbFeedbackButton.style.display = "none";
}
}
function fbShowFeedback()
{
var fbFeedbackButton = fbGetFeedbackElement();
if (fbFeedbackButton)
{
fbFeedbackButton.style.display = "";
}
}
function fbCustomizeFeedback(formId, tooltip)
{
var fbFeedbackButton = fbGetFeedbackElement();
if (fbFeedbackButton)
{
if (formId == null)
{
formId = 608;
}
fbFeedbackButton.href = "http://mymfe.microsoft.com/Office 15/Feedback.aspx?formID=" + String(formId) + "&Locale=";
if (tooltip != null)
{
fbFeedbackButton.title = tooltip;
}
}
}
function fbGetFeedbackElement()
{
return document.querySelector("#FeedbackLinkWrapper > span > a.ms-core-feedbackLink");
}
</script>
<div id="suiteBar" class="ms-dialogHidden">
<div class="ms-tableRow">
<div id="suiteBarLeft">
<div class="ms-table ms-fullWidth">
<div class="ms-tableRow">
<div class="ms-tableCell ms-verticalAlignMiddle">
<div id="suiteBrandingBox" class="ms-core-brandingBox"><img id="suiteBrandingIcon" src="/_layouts/15/images/O365BrandSuite.95x30x32.png"/></div>
</div>
<div class="ms-tableCell ms-alignRight">
<div id="ctl00_DeltaSuiteLinks">
<div id="suiteLinksBox">
</div>
</div>
</div>
</div>
</div>
</div>
<div id="suiteBarRight">
<div id="ctl00_DeltaSuiteBarRight" class="ms-core-deltaSuiteBarRight">
<div id="welcomeMenuBox">
</div>
<div class="ms-displayInlineBlock ms-positionRelative" id="suiteBarButtons">
<span id="ms-help">
<a onmouseover="this.firstChild.firstChild.firstChild.style.left=&#39;-185px&#39;; this.firstChild.firstChild.firstChild.style.top=&#39;-150px&#39;;" onmouseout="this.firstChild.firstChild.firstChild.style.left=&#39;-249px&#39;; this.firstChild.firstChild.firstChild.style.top=&#39;-156px&#39;;" id="ctl00_TopHelpLink" accesskey="6" title="Help" onclick="TopHelpButtonClick(&#39;HelpHome&#39;,event);return false" href="../_catalogs/masterpage/#" style="display:inline-block;height:30px;width:30px;"><span style="display:inline-block;overflow:hidden;height:16px;width:16px;padding-left:7px;padding-top:7px;padding-right:7px;padding-bottom:7px;"><span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust"><img src="/_layouts/15/images/spcommon.png" alt="Help" style="border:0;position:absolute;left:-249px;top:-156px;" /></span></span></a>
</span>
<span id="FeedbackLinkWrapper">
<a onmouseover="this.firstChild.firstChild.firstChild.style.left=&#39;-255px&#39;; this.firstChild.firstChild.firstChild.style.top=&#39;-30px&#39;;" onmouseout="this.firstChild.firstChild.firstChild.style.left=&#39;-55px&#39;; this.firstChild.firstChild.firstChild.style.top=&#39;-207px&#39;;" id="ctl00_FeedbackLink" title="Give Feedback" class="ms-core-feedbackLink" onclick="window.open(this.href + _spPageContextInfo.currentLanguage + &#39;&amp;Build=&#39; + mpfb_version + &#39;&amp;UrlReferrer=&#39; + escape(window.location.href), &#39;Feedback&#39;,&#39;scrollbars=yes,menubar=no,titlebar=no,location=no,width=700,height=710,resizable=no&#39;);return false;" href="http://mymfe.microsoft.com/Office%20%2015/Feedback.aspx?formID=608&amp;Locale=" style="display:inline-block;height:30px;width:30px;"><span style="display:inline-block;overflow:hidden;height:16px;width:16px;padding-left:7px;padding-top:7px;padding-right:7px;padding-bottom:7px;"><span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust"><img src="/_layouts/15/images/spcommon.png" alt="Give Feedback" style="border:0;position:absolute;left:-55px;top:-207px;" /></span></span></a>
</span>
</div>
</div>
</div>
</div>
</div>
<div id="ms-hcTest"></div>
<div id="s4-ribbonrow">
<div id="globalNavBox">
<div id="ribbonBox">
<div id="s4-ribboncont">
<div id="ctl00_DeltaSPRibbon">
<input id="RibbonContainer_activeTabId" name="ctl00$ctl46" type="hidden" value=""></input><div id='RibbonContainer'><div class="ms-cui-ribbon ms-cui-needIEFilter" id="Ribbon" unselectable="on" aria-describedby="ribboninstructions" oncontextmenu="return false" role="toolbar"><span class="ms-cui-hidden" id="ribboninstructions" unselectable="on">To navigate through the Ribbon, use standard browser navigation keys. To skip between groups, use Ctrl+LEFT or Ctrl+RIGHT. To jump to the first Ribbon tab use Ctrl+[. To jump to the last selected command use Ctrl+]. To activate a command, use Enter.</span><div class="ms-cui-ribbonTopBars" unselectable="on"><div class="ms-cui-topBar1" unselectable="on" style="display:none"><div class="ms-cui-qat-container" unselectable="on"></div></div><div class="ms-cui-topBar2" unselectable="on"><div class="ms-cui-jewel-container" id="jewelcontainer" unselectable="on" style="display:none"></div><div class="ms-cui-TabRowLeft ms-core-defaultFont ms-dialogHidden" id="RibbonContainer-TabRowLeft" unselectable="on">
<span class="ms-app-backLink ms-uppercase ms-core-defaultFont" id="appBackLink">
<a href="/sites/dev" class='ms-calloutLink' id="ctl00_BackToParentLink" onmouseover="SwapImage('ctl00_BackToParentLink-image', '/_layouts/15/images/scrollbar-mousein-leftarrow.png');" onmouseout="SwapImage('ctl00_BackToParentLink-image', '/_layouts/15/images/scrollbar-mouseout-leftarrow.png');"><img src="/_layouts/15/images/scrollbar-mouseout-leftarrow.png" id="ctl00_BackToParentLink-image" alt="" /> Developer Site</a>
</span>
</div><ul class="ms-cui-tts" unselectable="on" role="tablist"><li class="ms-cui-tt ms-browseTab ms-cui-tt-s" id="Ribbon.Read-title" unselectable="on" role="tab"><a class="ms-cui-tt-a" unselectable="on" href="javascript:;" onclick="_ribbonStartInit('Ribbon.Read',false, event);" title="Browse" onkeydown="if(event != null && event.keyCode == 13){ if(typeof(_ribbon) != 'undefined') _ribbon.launchedByKeyboard = true; _ribbonStartInit('Ribbon.Read',false, event); }"><span class="ms-cui-tt-span" unselectable="on">Browse</span><span class="ms-cui-hidden" unselectable="on">Tab 1 of 1.</span></a></li></ul><div class="ms-cui-TabRowRight s4-trc-container s4-notdlg ms-core-defaultFont" id="RibbonContainer-TabRowRight" unselectable="on">
<span id="fullscreenmodebox" class="ms-qatbutton">
<span id="fullscreenmode">
<a onmouseover="this.firstChild.firstChild.firstChild.style.left=&#39;-251px&#39;; this.firstChild.firstChild.firstChild.style.top=&#39;-120px&#39;;" onmouseout="this.firstChild.firstChild.firstChild.style.left=&#39;-195px&#39;; this.firstChild.firstChild.firstChild.style.top=&#39;-168px&#39;;" id="ctl00_fullscreenmodeBtn" title="Focus on Content" onclick="SetFullScreenMode(true);PreventDefaultNavigation();return false;" href="../_catalogs/masterpage/#" style="display:inline-block;height:30px;width:30px;"><span style="display:inline-block;overflow:hidden;height:16px;width:16px;padding-left:7px;padding-top:7px;padding-right:7px;padding-bottom:7px;"><span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust"><img src="/_layouts/15/images/spcommon.png" alt="Focus on Content" style="border:0;position:absolute;left:-195px;top:-168px;" /></span></span></a>
</span>
<span id="exitfullscreenmode">
<a onmouseover="this.firstChild.firstChild.firstChild.style.left=&#39;-251px&#39;; this.firstChild.firstChild.firstChild.style.top=&#39;-102px&#39;;" onmouseout="this.firstChild.firstChild.firstChild.style.left=&#39;-195px&#39;; this.firstChild.firstChild.firstChild.style.top=&#39;-186px&#39;;" id="ctl00_exitfullscreenmodeBtn" title="Focus on Content" onclick="SetFullScreenMode(false);PreventDefaultNavigation();return false;" href="../_catalogs/masterpage/#" style="display:inline-block;height:30px;width:30px;"><span style="display:inline-block;overflow:hidden;height:16px;width:16px;padding-left:7px;padding-top:7px;padding-right:7px;padding-bottom:7px;"><span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust"><img src="/_layouts/15/images/spcommon.png" alt="Focus on Content" style="border:0;position:absolute;left:-195px;top:-186px;" /></span></span></a>
</span>
</span>
</div></div></div></div></div>
</div>
</div>
<span id="ctl00_DeltaSPNavigation">
</span>
</div>
<div id="ctl00_DeltaWebPartAdderUpdatePanelContainer" class="ms-core-webpartadder">
<div id="WebPartAdderUpdatePanelContainer">
<div id="ctl00_WebPartAdderUpdatePanel">
<span id="ctl00_WebPartAdder"></span>
</div>
</div>
</div>
</div>
</div>
<div id="s4-workspace" class="ms-core-overlay">
<div id="s4-bodyContainer">
<div id="s4-titlerow"
class="ms-dialogHidden ms-core-header ms-app-titlerowBorder s4-titlerowhidetitle">
<div id="titleAreaBox"
class="ms-noList ms-table ms-core-tableNoSpace">
<div id="titleAreaRow"
class="ms-tableRow">
<div id="siteIcon" class="ms-tableCell ms-verticalAlignTop">
<div id="ctl00_DeltaSiteLogo">
<a id="ctl00_onetidProjectPropertyTitleGraphic" title="SharePointApp1" class="ms-siteicon-a" href="/sites/dev/SharePointApp1"><img id="ctl00_onetidHeadbnnr2" class="ms-siteicon-img" name="onetidHeadbnnr0" src="/_layouts/15/images/siteIcon.png" alt="SharePointApp1" /></a>
</div>
</div>
<div class="ms-breadcrumb-box ms-tableCell ms-verticalAlignTop">
<div
class="mp-breadcrumb-top ms-app-topnav">
<span name="onetidProjectPropertyTitle" class="ms-core-siteTitle">
<span id="ctl00_DeltaPlaceHolderSiteName">
<a id="ctl00_PlaceHolderSiteName_onetidProjectPropertyTitle" href="/sites/dev/SharePointApp1/">
SharePointApp1
</a>
</span>
</span>
</div>
<h1 id="pageTitle" class="ms-core-pageTitle">
<span id="ctl00_DeltaPlaceHolderPageTitleInTitleArea">
<span><a href="#ctl00_PlaceHolderPageTitleInTitleArea_ctl00_SkipLink"><img alt="Skip Navigation Links" src="/WebResource.axd?d=G83L0lES-YZuo3-sfl89FvDYyYJwcQXgWnVa948cwco-FjGoSM_nVbRGZ44w5zkGWo9wkP8UJTodNAM-iNGnCu9dCm5r5bWwCvQJLrdzOFA1&amp;t=634714028940000000" width="0" height="0" style="border-width:0px;" /></a><a id="ctl00_PlaceHolderPageTitleInTitleArea_ctl00_SkipLink"></a></span>
</span>
<div id="ctl00_DeltaPlaceHolderPageDescription" class="ms-displayInlineBlock ms-normalWrap">
<a href="javascript:;" id="ms-pageDescriptionDiv">
<span id="ms-pageDescriptionImage" style="display:none">&#160;</span>
</a>
<span class="ms-accessible" id="ms-pageDescription">
</span>
<script type="text/javascript">// <![CDATA[
_spBodyOnLoadFunctionNames.push("setupPageDescriptionCallout");
// ]]>
</script>
</div>
</h1>
</div>
<div class="ms-tableCell ms-verticalAlignTop">
<div id="ctl00_DeltaPlaceHolderSearchArea" class="ms-mpSearchBox ms-floatRight">
</div>
</div>
</div>
</div>
</div>
<div id="contentRow">
<div id="sideNavBox"
class="ms-dialogHidden ms-forceWrap ms-noList">
<div id="ctl00_DeltaPlaceHolderLeftNavBar" class="ms-core-navigation" role="navigation">
<style type="text/css">
#contentBox
{
margin-left: 40px;
}
</style>
</div>
</div>
<div id="contentBox"
aria-live="polite" aria-relevant="all">
<div id="notificationArea" class="ms-notif-box"></div>
<div id="ctl00_DeltaPageStatusBar">
<div id="pageStatusBar"></div>
</div>
<div id="ctl00_DeltaPlaceHolderMain">
<a name="mainContent" tabindex="-1"></a>
<div>
<p id="message">
<!-- The following content will be replaced with the user name when you run the app - see App.js -->
initializing...
</p>
</div>
<div style='display:none' id='hidZone'><menu id="MSOMenu_WebPartMenu" class="ms-hide">
<ie:menuitem title="Collapse this web part." id="MSOMenu_Minimize" onmenuclick="javascript:MSOLayout_MinimizeRestore(MenuWebPart)" text="Minimize" type="option">
</ie:menuitem><ie:menuitem title="Expand this web part." id="MSOMenu_Restore" onmenuclick="javascript:MSOLayout_MinimizeRestore(MenuWebPart)" text="Restore" type="option">
</ie:menuitem><ie:menuitem title="Close this Web Part. You can still find it under closed Web Parts section in the insert ribbon. These changes will apply to all users." id="MSOMenu_Close" onmenuclick="javascript:MSOLayout_RemoveWebPart(MenuWebPart)" text="Close" type="option">
</ie:menuitem><ie:menuitem title="Delete this Web Part from the page. These changes will apply to all users." id="MSOMenu_Delete" iconsrc="/_layouts/15/images/DelItem.gif" onmenuclick="if(confirm('You are about to permanently delete this Web Part. Are you sure you want to do this?')) {MSOWebPartPage_partDeleted = MenuWebPartID;MSOWebPartPage_MenuDoPostBack('ctl00$ctl35', MenuWebPartID + ';MSOMenu_Delete');}" text="Delete" type="option">
</ie:menuitem><ie:menuitem type="separator"></ie:menuitem><ie:menuitem title="Change properties of this shared Web Part. These changes will apply to all users." id="MSOMenu_Edit" iconsrc="/_layouts/15/images/EditItem.gif" onmenuclick="javascript:MSOTlPn_ShowToolPane2Wrapper('Edit', 16, MenuWebPartID)" text="Edit Web Part" type="option">
</ie:menuitem><ie:menuitem title="Show connections options for this Web Part. These changes will apply to all users." id="MSOMenu_Connections" onmenuclick="" text="Connections" type="option">
</ie:menuitem><ie:menuitem type="separator"></ie:menuitem><ie:menuitem title="Export this Web Part. These changes will apply to all users." id="MSOMenu_Export" onmenuclick="javascript:MSOWebPartPage_ExportCheckWarning(&#39;\u002fsites\u002fdev\u002fSharePointApp1\u002f_vti_bin\u002fexportwp.aspx?pageurl=https\u00253A\u00252F\u00252Fspirit2013preview\u00252Db0204c96e900c8\u00252Esharepoint\u00252Ecom\u00252Fsites\u00252Fdev\u00252FSharePointApp1\u00252FPages\u00252FDefault\u00252Easpx\u00253FSPHostUrl\u00253Dhttps\u0025253A\u0025252F\u0025252Fspirit2013preview\u0025252Esharepoint\u0025252Ecom\u0025252Fsites\u0025252Fdev\u002526SPLanguage\u00253Den\u0025252DUS\u002526SPAppWebUrl\u00253Dhttps\u0025253A\u0025252F\u0025252FSpirit2013Preview\u0025252Db0204c96e900c8\u0025252Esharepoint\u0025252Ecom\u0025252Fsites\u0025252Fdev\u0025252FSharePointApp1\u0026guidstring=&#39;+ escape(MenuWebPartID), MenuWebPart.getAttribute(&#39;HasPers&#39;) == &#39;true&#39;)" text="Export..." type="option">
</ie:menuitem><ie:menuitem id="MSOMenu_Help" iconsrc="/_layouts/15/images/HelpIcon.gif" onmenuclick="MSOWebPartPage_SetNewWindowLocation(MenuWebPart.getAttribute('helpLink'), MenuWebPart.getAttribute('helpMode'))" text="Help" type="option" style="display:none">
</ie:menuitem>
</menu></div>
</div>
</div>
<div id="ctl00_DeltaFormDigest">
</div>
<div class="ms-hide">
</div>
</div>
</div>
</div>
<div id="background-ie8" class="ms-dialogHidden"></div>
<div id="background" class="ms-dialogHidden"></div>
<script type="text/javascript">
//<![CDATA[
var _spFormDigestRefreshInterval = 1440000;function GetPageNormalizedUrl(){ alert('This SharePoint Tags And Notes Tool link is out of date. To get the latest Tags And Notes Tool, click OK. In the Tags and Note Board dialog, click the My Tags link. From here you can access the new SharePoint Tags And Notes tool.'); return document.location.href;}var _openTagDialog_DialogUrl = '';function OpenTagDialog(dialogUrl){ _openTagDialog_DialogUrl = dialogUrl; SafeRunFunction(_OpenTagDialogInternal, 'SocialData.js', 'TagDialogOpener');}function _OpenTagDialogInternal(){ var normalizer = PageUrlNormalizer.GetInstance(); normalizer.GetUrl('https:\u002f\u002fspirit2013preview-b0204c96e900c8.sharepoint.com\u002fsites\u002fdev\u002fSharePointApp1\u002fPages\u002fDefault.aspx?SPHostUrl=https\u00253A\u00252F\u00252Fspirit2013preview\u00252Esharepoint\u00252Ecom\u00252Fsites\u00252Fdev\u0026SPLanguage=en\u00252DUS\u0026SPAppWebUrl=https\u00253A\u00252F\u00252FSpirit2013Preview\u00252Db0204c96e900c8\u00252Esharepoint\u00252Ecom\u00252Fsites\u00252Fdev\u00252FSharePointApp1', function(normalizedUrl) { var url = _openTagDialog_DialogUrl + '?Title=' + encodeURIComponent(document.title) + '&Src=' + 'bm' + '&DisplayUrl=' + encodeURIComponent(document.location.href) + '&Url=' + encodeURIComponent(normalizedUrl); var options = 'toolbar=0,status=0,resizable=0,scrollbars=1,width=650,height=400'; if (!window.open(url, null, options)) { document.location.href = url; } });}
WebForm_InitCallback();function InitializeSocialRibbonComponentWrapper_ctl00_ctl22(){ SafeRunFunction(InitializeSocialRibbonComponent_ctl00_ctl22, 'sp.ui.socialribbon.js', 'SP.UI.SocialData.TRCRibbonComponent');}function InitializeSocialRibbonComponent_ctl00_ctl22(){ SP.UI.SocialData.TRCRibbonComponent.RegisterWithPageManager(); var ribbonComponent = SP.UI.SocialData.TRCRibbonComponent.get_Instance(); ribbonComponent['EnableSocialComment'] = true; ribbonComponent['EnableSocialTag'] = true; ribbonComponent['ListID'] = 'undefined'; ribbonComponent['ResAddMessage'] ='Add Tag...'; ribbonComponent['ResVerifyTypeMessage'] ='Verifying ...'; ribbonComponent.AddQuickTag = function(quickTagId) { SafeRunFunction(function () { var adder = new SocialQuickTag('ctl00_ctl22'); adder.title = document.title; adder.url = 'https:\u002f\u002fspirit2013preview-b0204c96e900c8.sharepoint.com\u002fsites\u002fdev\u002fSharePointApp1\u002fPages\u002fDefault.aspx?SPHostUrl=https:\u002f\u002fspirit2013preview.sharepoint.com\u002fsites\u002fdev\u0026SPLanguage=en-US\u0026SPAppWebUrl=https:\u002f\u002fSpirit2013Preview-b0204c96e900c8.sharepoint.com\u002fsites\u002fdev\u002fSharePointApp1'; adder.tagged_text = 'Tagged this page with \u0027I Like It.\u0027'; adder.failure_text = 'Failed tagging this page.'; adder.AddQuickTag(quickTagId); }, 'SocialData.js', 'SocialQuickTag'); }; ribbonComponent.AddQuickTagToListItem = function(quickTagId) { var notificationId = addNotification("Add Tag...", true); var listAndItemIds = this.SelectedListAndItemIds().split('|'); var request = new Object(); request.listid = listAndItemIds[0]; request.itemids = listAndItemIds[1]; request.id = quickTagId; WebForm_DoCallback('ctl00$ctl22',Sys.Serialization.JavaScriptSerializer.serialize(request),Function.createDelegate(ribbonComponent, ribbonComponent._OnSucceededCallback),notificationId,Function.createDelegate(ribbonComponent, ribbonComponent._OnFailedCallback),true); }; return ribbonComponent;}ExecuteOrDelayUntilScriptLoaded(InitializeSocialRibbonComponentWrapper_ctl00_ctl22, 'sp.ribbon.js');function ctl00_ctl22_SocialNavControl_insertMyProfileMenu() { var menus = document.getElementsByTagName('menu'); if (menus == null) return; var menu = null; for (var i=0, len=menus.length; i<len; i++) { if (menus[i].id.lastIndexOf('PersonalActionMenu') != -1) { menu = menus[i]; break; } } if (menu == null) return; var sep = null; for (var i=0, len=menu.childNodes.length; i<len; i++) { if (menu.childNodes[i].id == undefined || menu.childNodes[i].id == '') { sep = menu.childNodes[i]; break; } } var menuItems = menu.getElementsByTagName('ie:menuitem'); if (menuItems.length == 0) menuItems = menu.getElementsByTagName('menuitem'); var mySettingsMenuItem = null; for (var i=0, len=menuItems.length; i<len; i++) { if (menuItems[i] != null && menuItems[i].id != null && menuItems[i].id.lastIndexOf('PersonalInformation') != -1) { mySettingsMenuItem = menuItems[i]; break; } } var anchorElement = mySettingsMenuItem;if (anchorElement != null) { var elm = mySettingsMenuItem.cloneNode(true); elm.setAttribute('menugroupid', '100'); elm.setAttribute('description', 'View and manage your profile.'); elm.setAttribute('text', 'About Me'); elm.setAttribute('onmenuclick', 'STSNavigate2(event,\'https:\u002f\u002fspirit2013preview-my.sharepoint.com\u002fPerson.aspx\')'); elm.setAttribute('id', 'ID_AboutMe'); elm.removeAttribute('iconSrc'); menu.replaceChild(elm, mySettingsMenuItem); anchorElement = elm;}};if (typeof(_spBodyOnLoadFunctionNames) != 'undefined' && _spBodyOnLoadFunctionNames != null) { _spBodyOnLoadFunctionNames.push('ctl00_ctl22_SocialNavControl_insertMyProfileMenu'); }var _fV4UI = true;
function _RegisterWebPartPageCUI()
{
var initInfo = {editable: true,isEditMode: false,allowWebPartAdder: false};
SP.Ribbon.WebPartComponent.registerWithPageManager(initInfo);
var wpcomp = SP.Ribbon.WebPartComponent.get_instance();
var hid;
hid = document.getElementById("_wpSelected");
if (hid != null)
{
var wpid = hid.value;
if (wpid.length > 0)
{
var zc = document.getElementById(wpid);
if (zc != null)
wpcomp.selectWebPart(zc, false);
}
}
hid = document.getElementById("_wzSelected");
if (hid != null)
{
var wzid = hid.value;
if (wzid.length > 0)
{
wpcomp.selectWebPartZone(null, wzid);
}
}
};
function __RegisterWebPartPageCUI() {
ExecuteOrDelayUntilScriptLoaded(_RegisterWebPartPageCUI, "sp.ribbon.js");}
_spBodyOnLoadFunctionNames.push("__RegisterWebPartPageCUI");var __wpmExportWarning='This Web Part Page has been personalized. As a result, one or more Web Part properties may contain confidential information. Make sure the properties contain information that is safe for others to read. After exporting this Web Part, view properties in the Web Part description file (.WebPart) by using a text editor such as Microsoft Notepad.';var __wpmCloseProviderWarning='You are about to close this Web Part. It is currently providing data to other Web Parts, and these connections will be deleted if this Web Part is closed. To close this Web Part, click OK. To keep this Web Part, click Cancel.';var __wpmDeleteWarning='You are about to permanently delete this Web Part. Are you sure you want to do this? To delete this Web Part, click OK. To keep this Web Part, click Cancel.';_spBodyOnLoadFunctions.push(function() { EnsureScriptParams('/online/scripts/SpoSuiteNav.js', 'RenderSuiteLinksFromShellData', 'suiteLinksBox'); });var _spWebPermMasks = {High:2147483647,Low:4294967295};var slNavUrl = '\u002fsites\u002fdev\u002fSharePointApp1';_spBodyOnLoadFunctionNames.push('_cUpdonetidProjectPropertyTitleGraphic');function _cUpdonetidProjectPropertyTitleGraphic(){var myd = null; if (typeof(dataonetidProjectPropertyTitleGraphic) != 'undefined') {myd = dataonetidProjectPropertyTitleGraphic;} var myc = document.getElementById('ctl00_onetidProjectPropertyTitleGraphic');_cUpdconetidProjectPropertyTitleGraphic(myd, myc);}function _cUpdconetidProjectPropertyTitleGraphic(data, ctrl){ctrl.href = slNavUrl;}function _cUpdonetidHeadbnnr2(){var myd = null; if (typeof(dataonetidHeadbnnr2) != 'undefined') {myd = dataonetidHeadbnnr2;} var myc = document.getElementById('ctl00_onetidHeadbnnr2');_cUpdconetidHeadbnnr2(myd, myc);}function _cUpdconetidHeadbnnr2(data, ctrl){SiteLogoImagePageUpdate(ctrl, data);}var g_clientIdDeltaPlaceHolderMain = "ctl00_DeltaPlaceHolderMain";
var g_clientIdDeltaPlaceHolderPageTitleInTitleArea = "ctl00_DeltaPlaceHolderPageTitleInTitleArea";
var g_clientIdDeltaPlaceHolderUtilityContent = "ctl00_DeltaPlaceHolderUtilityContent";
theForm.oldSubmit = theForm.submit;
theForm.submit = WebForm_SaveScrollPositionSubmit;
theForm.oldOnSubmit = theForm.onsubmit;
theForm.onsubmit = WebForm_SaveScrollPositionOnSubmit;
function _ribbonInitFunc1()
{
EnsureScriptParams('core.js', '_ribbonInitFunc1Wrapped', '', '', '\u002fsites\u002fdev\u002fSharePointApp1\u002f_layouts\u002f15\u002fcommandui.ashx', '1120131184', '1033', 'RibbonContainer', {'Ribbon.Read':true,'Ribbon.WebPartPage':true}, null, {'Ribbon.WebPartInsert.InsertRelatedDataToListForm':true},
null, false, 0, false, 'SP.Ribbon.PageManager.get_instance()', false, null, null, null, '394279408', 0, '.');
}
function _ribbonStartInit(initialTabId, buildMinimized, e)
{
EnsureScriptParams('core.js', '_ribbonStartInitWrapped', initialTabId, buildMinimized, e, true, 'EnsureScriptParams("core.js", "RibbonControlInitWrapped");EnsureScriptFunc("ribbon", "SP.Ribbon.PageManager", function () { _registerCUIEComponentWrapped( "\u002fsites\u002fdev\u002fSharePointApp1\u002f_layouts\u002f15\u002fcommandui.ashx", "1033", "1120131184");});EnsureScript("ribbon", Boolean(typeof(SP.Ribbon.PageManager)) ? SP.Ribbon.PageManager : "undefined", _ribbonInitFunc1);');
}
function _ribbonKeyboardTitleShortcut(e)
{
EnsureScriptParams('core.js', '_ribbonKeyboardTitleShortcutWrapped', e, 'tff[', 'Ribbon.Read-title');
}
function _ribbonDataInit(p6, p7)
{
_ribbon = new Object();
_ribbon.initialTabId = p6;
_ribbon.buildMinimized = p7;
_ribbon.initStarted = false;
_ribbon.initialTabSelectedByUser = false;
_ribbon.launchedByKeyboard = false;
}
function _ribbonWaitForBodyEvent()
{
if (false)
_ribbonStartInit();
function _ribbonOnWindowResizeForHeaderScaling(evt)
{
_ribbonOnWindowResizeForHeaderScalingWrapped(evt, 'RibbonContainer', false);
}
EnsureScriptParams('core.js', '_ribbonInitResizeHandlers', _ribbonOnWindowResizeForHeaderScaling, 'RibbonContainer', true, false);
EnsureScriptParams('core.js', '_ribbonAddEventListener', _ribbonKeyboardTitleShortcut);
}
_ribbonDataInit('Ribbon.Read', true);
EnsureScriptFunc('ribbon', 'SP.Ribbon.PageStateActionButton', _ribbonWaitForBodyEvent);
var g_commandUIHandlers = {"name":"CommandHandlers","attrs":{},"children":[]};
//]]>
</script>
</form>
<span id="ctl00_DeltaPlaceHolderUtilityContent">
</span>
<script type="text/javascript">// <![CDATA[
var g_Workspace = "s4-workspace";
// ]]>
</script>
</body>
</html>
<%-- The following 4 lines are ASP.NET directives needed when using SharePoint components --%>
<%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" language="C#" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%-- The markup and script in the following Content element will be placed in the <head> of the page --%>
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js" type="text/javascript"></script>
<!-- Add your CSS styles to the following file -->
<link rel="Stylesheet" type="text/css" href="../Content/App.css" />
<!-- Add your JavaScript to the following file -->
<script type="text/javascript" src="../Scripts/App.js"></script>
</asp:Content>
<%-- The markup and script in the following Content element will be placed in the <body> of the page --%>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<div>
<p id="message">
<!-- The following content will be replaced with the user name when you run the app - see App.js -->
initializing...
</p>
</div>
</asp:Content>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment