This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> | |
| <%@ Assembly Name="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> | |
| <%@ Assembly Name="Microsoft.SharePoint.IdentityModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> | |
| <%@ Import Namespace="Microsoft.SharePoint" %> | |
| <%@ Page Language="C#" AutoEventWireup="true" Inherits="Microsoft.SharePoint.IdentityModel.Pages.IdentityModelSignInPageBase" %> | |
| <script runat="server" type="text/C#"> | |
| protected void Page_Init(object sender, EventArgs e) | |
| { | |
| try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Source: http://josharepoint.com/2014/11/13/create-thumbnails-view-using-client-side-rendering-and-owa-in-sharepoint-2013/ | |
| (function () { | |
| ExecuteOrDelayUntilScriptLoaded(_registerSliderViewTemplate, 'clienttemplates.js'); | |
| })(); | |
| function _registerSliderViewTemplate() { | |
| // Initialize the variable that store the objects. | |
| var overrideCtx = {}; | |
| overrideCtx.Templates = {}; | |
| overrideCtx.Templates.Header = HeaderOverrideFun; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $siteUrl = "https://mysharepointsite.sharepoint.com/sites/subsite" | |
| # Set headers | |
| $headers = @{ | |
| "Authorization"="Bearer "; | |
| } | |
| $authRealm = ""; | |
| # Make an invalid request. We will extract the GUID from the Response. | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <configuration> | |
| ... | |
| <system.web> | |
| ... | |
| <browserCaps> | |
| <result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> | |
| <filter>isMobileDevice=false</filter> | |
| </browserCaps> | |
| </system.web> | |
| </configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var camlQuery = '<View Scope="RecursiveAll"><RowLimit>3</RowLimit><Query><Where><Eq><FieldRef Name="FSObjType" /><Value Type="Integer">0</Value></Eq></Where></Query></View>' | |
| return $.ajax({ | |
| url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/Lists/GetByTitle('Documents')/GetItems?$select=ID,Title,EncodedAbsUrl,File/Name&$expand=File", | |
| type: "POST", | |
| contentType: "application/json; odata=verbose", | |
| headers: { | |
| "X-RequestDigest": $("#__REQUESTDIGEST").val(), | |
| "Accept": "application/json; odata=verbose" | |
| }, | |
| data: JSON.stringify({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Works on desktop browsers only | |
| if (navigator.userAgent.match(/Trident\//) || navigator.userAgent.match(/Edge\//)) { | |
| document.body.addEventListener("mousewheel", function(evt) { | |
| evt.preventDefault(); | |
| var wd = evt.wheelDelta; | |
| var csp = window.pageYOffset; | |
| window.scrollTo(0, csp - wd); | |
| }); | |
| // If the code block above doesn't work, please try attaching the event to the window like so: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Function to pad month and day value | |
| function pad(number) { | |
| var r = String(number); | |
| if (r.length === 1) { | |
| r = '0' + r; | |
| } | |
| return r; | |
| } | |
| var d = new Date(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // http://stackoverflow.com/a/509965/7050564 | |
| // Warning Duplicate IDs | |
| $('[id]').each(function(){ | |
| var ids = $('[id="'+this.id+'"]'); | |
| if(ids.length>1 && ids[0]==this) | |
| console.warn('Multiple IDs #'+this.id); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // code copied from here - http://camljs.codeplex.com/discussions/646023 | |
| // CamlJS library hosted here - https://github.com/andrei-markeev/camljs | |
| var dd1_values = ['dd1op1','dd1op2']; | |
| var dd2_values = ['dd2op1']; | |
| var dd3_values = ['dd3op1','dd3op2','dd3op3','dd3op4']; | |
| var dd1_expr_array = []; | |
| for (var i=0;i<dd1_values.length;i++) | |
| { | |
| dd1_expr_array.push( CamlBuilder.Expression().TextField("Category1").EqualTo(dd1_values[i]) ); |
OlderNewer