This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Date: 03-Oct-2014 | |
Purpose: Show project plans in customized way to be presented on dashboard | |
--> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
version="1.0" | |
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> | |
<xsl:include href="/_layouts/xsl/main.xsl"/> |
This file contains 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 ISODateString (stringDate){ | |
function pad(n){return n<10 ? '0'+n : n} | |
function parseDate(input) { | |
var parts = input.split('/'); | |
var y = parseInt(parts[2]); | |
var m = parseInt(parts[0]); | |
var d = parseInt(parts[1]); |
This file contains 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
public static class StringHelper | |
{ | |
public static string ToTitleCase(this string s) | |
{ | |
// Return empty if input is null or empty | |
if (string.IsNullOrEmpty(s)) return string.Empty; | |
// This will hold our processing value | |
// and finally have string in title case. | |
var sb = new StringBuilder(); |
This file contains 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
private SPListItemCollection GetItemsUsingView() | |
{ | |
// Get view | |
var list = SPContext.Current.Web.Lists.TryGetList("[MyList]"); | |
var view = list.Views["[MyView]"]; | |
#region Get "Where" filter expression from list view | |
// Get the filter expression from view | |
string filterCaml = string.Empty; |
This file contains 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
// Converts the html text to plain text | |
public static string RemoveHtmlStuffs(string htmlText) | |
{ | |
var rx = new Regex(@"<(.|\n)*?>"); | |
return SPEncode.HtmlDecode( // remove characters like , & etc | |
rx.Replace(htmlText, string.Empty) // remove html tags lik <p>,<div> etc | |
); | |
} |
This file contains 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
public static string AddToUrlQuerystring(HttpRequest req, string paramName, object paramValue, bool encodeValue) | |
{ | |
var sb = new StringBuilder(); | |
string ParamValue; | |
// Encode parameter value or not | |
if (encodeValue) | |
ParamValue = SPEncode.UrlEncode(paramValue.ToString()); | |
else | |
ParamValue = paramValue.ToString(); |