149 |
150 |
151 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Microsoft Graph Excel ASP.NET donations sample
2 |
3 | This sample shows how to read and write into an Excel document stored in your OneDrive for Business account by using the Excel REST APIs.
4 |
5 | ## Prerequisites
6 |
7 | This sample requires the following:
8 |
9 | * [Visual Studio 2017](https://www.visualstudio.com/en-us/downloads)
10 | * Either a [Microsoft account](https://www.outlook.com) or [work or school account](https://dev.office.com/devprogram)
11 |
12 | ## Register the application
13 |
14 | 1. Determine your ASP.NET app's URL. In Visual Studio's Solution Explorer, select the **Microsoft-Graph-ASPNET-Excel-Donations** project. In the **Properties** window, find the value of **SSL URL**. Copy this value.
15 |
16 | 
17 |
18 | 1. Open a browser and navigate to the [Azure Active Directory admin center](https://aad.portal.azure.com). Login using a **Work or School Account**.
19 |
20 | 1. Select **Azure Active Directory** in the left-hand navigation, then select **App registrations** under **Manage**.
21 |
22 | 
23 |
24 | 1. Select **New registration**. On the **Register an application** page, set the values as follows.
25 |
26 | - Set a preferred **Name** e.g. `Donations App`.
27 | - Set **Supported account types** to **Accounts in any organizational directory**.
28 | - Under **Redirect URI**, set the first drop-down to `Web` and set the value to the ASP.NET app SSL URL you copied in step 1. For this sample, *http://localhost:21942*
29 |
30 | 
31 |
32 | 1. Choose **Register**. On the **Donations App** page, copy the value of the **Application (client) ID** and save it, you will need it in the next step.
33 |
34 | 
35 |
36 | 1. Select **Authentication** under **Manage**. Locate the **Implicit grant** section and enable **ID tokens**. Choose **Save**.
37 |
38 | 
39 |
40 | The **Allow Implicit Flow** option enables the hybrid flow. During authentication, this enables the app to receive both sign-in info (the id_token) and artifacts (in this case, an authorization code) that the app can use to obtain an access token.
41 |
42 | 1. Select **Certificates & secrets** under **Manage**. Select the **New client secret** button. Enter a value in **Description** and select one of the options for **Expires** and choose **Add**.
43 |
44 | 
45 |
46 | 1. Copy the client secret value before you leave this page. You will need it in the next step.
47 |
48 | > [!IMPORTANT]
49 | > This client secret is never shown again, so make sure you copy it now.
50 |
51 | 
52 |
53 | ## Configure the app
54 | 1. Open **Microsoft-Graph-ASPNET-Excel-Donations.sln** file.
55 | 2. In Solution Explorer, open the **Web.config** file.
56 | 3. Replace *ENTER_YOUR_CLIENT_ID* with the client ID of your registered Azure application.
57 | 4. Replace *ENTER_YOUR_SECRET* with the key of your registered Azure application.
58 | 5. Upload the **WoodGroveBankExpenseTrendsWorkbook.xlsx** file included in this repo to the root OneDrive directory of your Office 365 tenant. The app won't work without this workbook, which stores the data in your donations list.
59 |
60 | ## Run the app
61 |
62 | 1. Press F5 to build and debug. Run the solution and sign in with your Office 365 account. The application launches on your localhost and shows the starter page.
63 | 
64 |
65 | > Note: Copy and paste the start page URL address **http://localhost:21942/home/index** to a different browser if you get the following error during sign in:**AADSTS70001: Application with identifier ad533dcf-ccad-469a-abed-acd1c8cc0d7d was not found in the directory**.
66 | 2. Select the `Get Started` button.
67 | 3. The application displays the donations page. Select the `Add New` link to add a new task. Fill in the form with the donation details.
68 | 4. After you add a donation, the app shows the updated donations list. If the newly added donation isn't updated, choose the `Refresh` link after a few moments.
69 | 
70 |
71 |
72 | ## Contributing ##
73 |
74 | If you'd like to contribute to this sample, see [CONTRIBUTING.MD](/CONTRIBUTING.md).
75 |
76 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
77 |
78 | ## Questions and comments
79 |
80 | We'd love to get your feedback about the Microsoft Graph Excel REST API ASP.NET Donations sample. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/aspnet-donations-rest-sample/issues) section of this repository.
81 |
82 | Questions about Office 365 development in general should be posted to [Stack Overflow](https://stackoverflow.com/questions/tagged/MicrosoftGraph). Make sure that your questions or comments are tagged with [MicrosoftGraph].
83 |
84 | ## Additional resources
85 |
86 | * [Microsoft Graph documentation](https://graph.microsoft.io)
87 | * [Other Microsoft Graph ASP.NET samples](https://github.com/MicrosoftGraph?utf8=%E2%9C%93&q=aspnet)
88 |
89 |
90 | ## Copyright
91 | Copyright (c) 2019 Microsoft. All rights reserved.
92 |
--------------------------------------------------------------------------------
/Microsoft-Graph-ASPNET-Excel-Donations/Scripts/jquery.validate.unobtrusive.min.js:
--------------------------------------------------------------------------------
1 | /* NUGET: BEGIN LICENSE TEXT
2 | *
3 | * Microsoft grants you the right to use these script files for the sole
4 | * purpose of either: (i) interacting through your browser with the Microsoft
5 | * website or online service, subject to the applicable licensing or use
6 | * terms; or (ii) using the files as included with a Microsoft product subject
7 | * to that product's license terms. Microsoft reserves all other rights to the
8 | * files not expressly granted by Microsoft, whether by implication, estoppel
9 | * or otherwise. Insofar as a script file is dual licensed under GPL,
10 | * Microsoft neither took the code under GPL nor distributes it thereunder but
11 | * under the terms set out in this paragraph. All notices and licenses
12 | * below are for informational purposes only.
13 | *
14 | * NUGET: END LICENSE TEXT */
15 | /*
16 | ** Unobtrusive validation support library for jQuery and jQuery Validate
17 | ** Copyright (C) Microsoft Corporation. All rights reserved.
18 | */
19 | (function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this),c="__jquery_unobtrusive_validation_form_reset";if(b.data(c))return;b.data(c,true);try{b.data("validator").resetForm()}finally{b.removeData(c)}b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(b){var c=a(b),f=c.data(e),i=a.proxy(n,b),g=d.unobtrusive.options||{},h=function(e,d){var c=g[e];c&&a.isFunction(c)&&c.apply(b,d)};if(!f){f={options:{errorClass:g.errorClass||"input-validation-error",errorElement:g.errorElement||"span",errorPlacement:function(){m.apply(b,arguments);h("errorPlacement",arguments)},invalidHandler:function(){l.apply(b,arguments);h("invalidHandler",arguments)},messages:{},rules:{},success:function(){k.apply(b,arguments);h("success",arguments)}},attachValidation:function(){c.off("reset."+e,i).on("reset."+e,i).validate(this.options)},validate:function(){c.validate();return c.valid()}};c.data(e,f)}return f}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(c){var b=a(c),e=b.parents().addBack().filter("form").add(b.find("form")).has("[data-val=true]");b.find("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});e.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){var d=a(b.form).find(":input").filter("[name='"+f(c)+"']");return d.is(":checkbox")?d.filter(":checked").val()||d.filter(":hidden").val()||"":d.is(":radio")?d.filter(":checked").val()||"":d.val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery);
--------------------------------------------------------------------------------
/Microsoft-Graph-ASPNET-Excel-Donations/Scripts/respond.js:
--------------------------------------------------------------------------------
1 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
2 | /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
3 | (function(w) {
4 | "use strict";
5 | w.matchMedia = w.matchMedia || function(doc, undefined) {
6 | var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
7 | div.id = "mq-test-1";
8 | div.style.cssText = "position:absolute;top:-100em";
9 | fakeBody.style.background = "none";
10 | fakeBody.appendChild(div);
11 | return function(q) {
12 | div.innerHTML = '';
13 | docElem.insertBefore(fakeBody, refNode);
14 | bool = div.offsetWidth === 42;
15 | docElem.removeChild(fakeBody);
16 | return {
17 | matches: bool,
18 | media: q
19 | };
20 | };
21 | }(w.document);
22 | })(this);
23 |
24 | /*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */
25 | (function(w) {
26 | "use strict";
27 | var respond = {};
28 | w.respond = respond;
29 | respond.update = function() {};
30 | var requestQueue = [], xmlHttp = function() {
31 | var xmlhttpmethod = false;
32 | try {
33 | xmlhttpmethod = new w.XMLHttpRequest();
34 | } catch (e) {
35 | xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
36 | }
37 | return function() {
38 | return xmlhttpmethod;
39 | };
40 | }(), ajax = function(url, callback) {
41 | var req = xmlHttp();
42 | if (!req) {
43 | return;
44 | }
45 | req.open("GET", url, true);
46 | req.onreadystatechange = function() {
47 | if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
48 | return;
49 | }
50 | callback(req.responseText);
51 | };
52 | if (req.readyState === 4) {
53 | return;
54 | }
55 | req.send(null);
56 | };
57 | respond.ajax = ajax;
58 | respond.queue = requestQueue;
59 | respond.regex = {
60 | media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
61 | keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
62 | urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
63 | findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
64 | only: /(only\s+)?([a-zA-Z]+)\s?/,
65 | minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,
66 | maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/
67 | };
68 | respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
69 | if (respond.mediaQueriesSupported) {
70 | return;
71 | }
72 | var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
73 | var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
74 | div.style.cssText = "position:absolute;font-size:1em;width:1em";
75 | if (!body) {
76 | body = fakeUsed = doc.createElement("body");
77 | body.style.background = "none";
78 | }
79 | docElem.style.fontSize = "100%";
80 | body.style.fontSize = "100%";
81 | body.appendChild(div);
82 | if (fakeUsed) {
83 | docElem.insertBefore(body, docElem.firstChild);
84 | }
85 | ret = div.offsetWidth;
86 | if (fakeUsed) {
87 | docElem.removeChild(body);
88 | } else {
89 | body.removeChild(div);
90 | }
91 | docElem.style.fontSize = originalHTMLFontSize;
92 | if (originalBodyFontSize) {
93 | body.style.fontSize = originalBodyFontSize;
94 | }
95 | ret = eminpx = parseFloat(ret);
96 | return ret;
97 | }, applyMedia = function(fromResize) {
98 | var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
99 | if (fromResize && lastCall && now - lastCall < resizeThrottle) {
100 | w.clearTimeout(resizeDefer);
101 | resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
102 | return;
103 | } else {
104 | lastCall = now;
105 | }
106 | for (var i in mediastyles) {
107 | if (mediastyles.hasOwnProperty(i)) {
108 | var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
109 | if (!!min) {
110 | min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
111 | }
112 | if (!!max) {
113 | max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
114 | }
115 | if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
116 | if (!styleBlocks[thisstyle.media]) {
117 | styleBlocks[thisstyle.media] = [];
118 | }
119 | styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
120 | }
121 | }
122 | }
123 | for (var j in appendedEls) {
124 | if (appendedEls.hasOwnProperty(j)) {
125 | if (appendedEls[j] && appendedEls[j].parentNode === head) {
126 | head.removeChild(appendedEls[j]);
127 | }
128 | }
129 | }
130 | appendedEls.length = 0;
131 | for (var k in styleBlocks) {
132 | if (styleBlocks.hasOwnProperty(k)) {
133 | var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
134 | ss.type = "text/css";
135 | ss.media = k;
136 | head.insertBefore(ss, lastLink.nextSibling);
137 | if (ss.styleSheet) {
138 | ss.styleSheet.cssText = css;
139 | } else {
140 | ss.appendChild(doc.createTextNode(css));
141 | }
142 | appendedEls.push(ss);
143 | }
144 | }
145 | }, translate = function(styles, href, media) {
146 | var qs = styles.replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
147 | href = href.substring(0, href.lastIndexOf("/"));
148 | var repUrls = function(css) {
149 | return css.replace(respond.regex.urls, "$1" + href + "$2$3");
150 | }, useMedia = !ql && media;
151 | if (href.length) {
152 | href += "/";
153 | }
154 | if (useMedia) {
155 | ql = 1;
156 | }
157 | for (var i = 0; i < ql; i++) {
158 | var fullq, thisq, eachq, eql;
159 | if (useMedia) {
160 | fullq = media;
161 | rules.push(repUrls(styles));
162 | } else {
163 | fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
164 | rules.push(RegExp.$2 && repUrls(RegExp.$2));
165 | }
166 | eachq = fullq.split(",");
167 | eql = eachq.length;
168 | for (var j = 0; j < eql; j++) {
169 | thisq = eachq[j];
170 | mediastyles.push({
171 | media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
172 | rules: rules.length - 1,
173 | hasquery: thisq.indexOf("(") > -1,
174 | minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
175 | maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
176 | });
177 | }
178 | }
179 | applyMedia();
180 | }, makeRequests = function() {
181 | if (requestQueue.length) {
182 | var thisRequest = requestQueue.shift();
183 | ajax(thisRequest.href, function(styles) {
184 | translate(styles, thisRequest.href, thisRequest.media);
185 | parsedSheets[thisRequest.href] = true;
186 | w.setTimeout(function() {
187 | makeRequests();
188 | }, 0);
189 | });
190 | }
191 | }, ripCSS = function() {
192 | for (var i = 0; i < links.length; i++) {
193 | var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
194 | if (!!href && isCSS && !parsedSheets[href]) {
195 | if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
196 | translate(sheet.styleSheet.rawCssText, href, media);
197 | parsedSheets[href] = true;
198 | } else {
199 | if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
200 | if (href.substring(0, 2) === "//") {
201 | href = w.location.protocol + href;
202 | }
203 | requestQueue.push({
204 | href: href,
205 | media: media
206 | });
207 | }
208 | }
209 | }
210 | }
211 | makeRequests();
212 | };
213 | ripCSS();
214 | respond.update = ripCSS;
215 | respond.getEmValue = getEmValue;
216 | function callMedia() {
217 | applyMedia(true);
218 | }
219 | if (w.addEventListener) {
220 | w.addEventListener("resize", callMedia, false);
221 | } else if (w.attachEvent) {
222 | w.attachEvent("onresize", callMedia);
223 | }
224 | })(this);
--------------------------------------------------------------------------------
/Microsoft-Graph-ASPNET-Excel-Donations/ExcelAPIHelper.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
2 | //See LICENSE in the project root for license information.
3 |
4 | using Newtonsoft.Json.Linq;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Net.Http;
9 | using System.Net.Http.Headers;
10 | using System.Threading.Tasks;
11 | using Microsoft_Graph_ASPNET_Excel_Donations.Models;
12 | using Newtonsoft.Json;
13 | using System.Drawing;
14 | using System.IO;
15 | using System.Web;
16 | using System.Web.Mvc;
17 |
18 | namespace Microsoft_Graph_ASPNET_Excel_Donations
19 | {
20 | public class ExcelApiHelper
21 | {
22 | private static string restURLBase = "https://graph.microsoft.com/v1.0/me/drive/items/";
23 | private static string fileId = null;
24 |
25 | private static async Task UpdateSummaryTable(string tableName, string field1Value, string field2Value, string worksheetsEndpoint, HttpClient client)
26 | {
27 | var summaryTableRowJson = "{" +
28 | "'values': [['" + field1Value + "', '" + field2Value + "']]" +
29 | "}";
30 | var summaryTableRowContentPostBody = new StringContent(summaryTableRowJson, System.Text.Encoding.UTF8);
31 | summaryTableRowContentPostBody.Headers.Clear();
32 | summaryTableRowContentPostBody.Headers.Add("Content-Type", "application/json");
33 | var summaryTableRowResponseMessage = await client.PostAsync(worksheetsEndpoint + "tables('" + tableName + "')/rows", summaryTableRowContentPostBody);
34 | }
35 |
36 |
37 | public static async Task> GetDonations(string accessToken)
38 | {
39 | List donations = new List();
40 |
41 | using (var client = new HttpClient())
42 | {
43 | //client.BaseAddress = new Uri(restURLBase);
44 | client.DefaultRequestHeaders.Accept.Clear();
45 | client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
46 | client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
47 |
48 | //Find file id
49 | var serviceEndpoint = "https://graph.microsoft.com/v1.0/me/drive/root/children";
50 | var filesResponse = await client.GetAsync(serviceEndpoint + "?$select=name,id");
51 |
52 | var filesContent = await filesResponse.Content.ReadAsStringAsync();
53 |
54 | JObject parsedResult = JObject.Parse(filesContent);
55 |
56 | foreach (JObject file in parsedResult["value"])
57 | {
58 |
59 | var name = (string)file["name"];
60 | if (name.Contains("WoodGroveBankExpenseTrendsWorkbook.xlsx"))
61 | {
62 | fileId = (string)file["id"];
63 | restURLBase = "https://graph.microsoft.com/v1.0/me/drive/items/" + fileId + "/workbook/worksheets('Donations')/";
64 |
65 | }
66 | }
67 |
68 | HttpResponseMessage response = await client.GetAsync(restURLBase + "tables('DonationsTable')/Rows");
69 | if (response.IsSuccessStatusCode)
70 | {
71 | string resultString = await response.Content.ReadAsStringAsync();
72 |
73 | dynamic x = Newtonsoft.Json.JsonConvert.DeserializeObject(resultString);
74 | JArray y = x.value;
75 |
76 | donations = BuildList(donations, y);
77 | }
78 | }
79 |
80 | return donations;
81 | }
82 |
83 | private static List BuildList(List donations, JArray y)
84 | {
85 | foreach (var item in y.Children())
86 | {
87 | var itemProperties = item.Children();
88 |
89 | //Get element that holds row collection
90 | var element = itemProperties.FirstOrDefault(xx => xx.Name == "values");
91 | JProperty index = itemProperties.FirstOrDefault(xxx => xxx.Name == "index");
92 |
93 | //The string array of row values
94 | JToken values = element.Value;
95 |
96 | //linq query to get rows from results
97 | var stringValues = from stringValue in values select stringValue;
98 | //rows
99 | foreach (JToken thing in stringValues)
100 | {
101 | IEnumerable rowValues = thing.Values();
102 |
103 | //Cast row value collection to string array
104 | string[] stringArray = rowValues.Cast().ToArray();
105 |
106 | try
107 | {
108 | Donation donation = new Donation(
109 | DateTime.FromOADate(Convert.ToDouble(stringArray[0])),
110 | Convert.ToDecimal(stringArray[1]),
111 | stringArray[2],
112 | stringArray[3]);
113 | donations.Add(donation);
114 | }
115 | catch (FormatException f)
116 | {
117 | //Handle exception
118 | }
119 | }
120 | }
121 |
122 | return donations;
123 |
124 | }
125 |
126 | public static async Task CreateDonation(
127 | string accessToken,
128 | string donationDate,
129 | string donationAmount,
130 | string organization)
131 | {
132 | Donation newDonation = new Donation();
133 |
134 |
135 | using (var client = new HttpClient())
136 | {
137 |
138 |
139 | client.BaseAddress = new Uri(restURLBase);
140 | client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
141 |
142 | //Find file id
143 | var serviceEndpoint = "https://graph.microsoft.com/v1.0/me/drive/root/children";
144 | var filesResponse = await client.GetAsync(serviceEndpoint + "?$select=name,id");
145 |
146 | var filesContent = await filesResponse.Content.ReadAsStringAsync();
147 |
148 | JObject parsedResult = JObject.Parse(filesContent);
149 |
150 | foreach (JObject file in parsedResult["value"])
151 | {
152 |
153 | var name = (string)file["name"];
154 | if (name.Contains("WoodGroveBankExpenseTrendsWorkbook.xlsx"))
155 | {
156 | fileId = (string)file["id"];
157 | restURLBase = "https://graph.microsoft.com/v1.0/me/drive/items/" + fileId + "/workbook/worksheets('Donations')/";
158 |
159 | }
160 | }
161 |
162 |
163 | using (var request = new HttpRequestMessage(HttpMethod.Post, restURLBase))
164 | {
165 |
166 | var donationMonth = "=TEXT([DATE], \"mmm - yyyy\")";
167 |
168 | //Create 2 dimensional array to hold the row values to be serialized into json
169 | object[,] valuesArray = new object[1, 4] { { donationDate, donationAmount, organization, donationMonth } };
170 |
171 | //Create a container for the request body to be serialized
172 | RequestBodyHelper requestBodyHelper = new RequestBodyHelper();
173 | requestBodyHelper.index = null;
174 | requestBodyHelper.values = valuesArray;
175 |
176 | //Serialize the final request body
177 | string postPayload = JsonConvert.SerializeObject(requestBodyHelper);
178 |
179 | //Add the json payload to the POST request
180 | request.Content = new StringContent(postPayload, System.Text.Encoding.UTF8);
181 |
182 |
183 |
184 | using (HttpResponseMessage response = await client.PostAsync("tables('DonationsTable')/rows", request.Content))
185 | {
186 | if (response.IsSuccessStatusCode)
187 | {
188 | string resultString = await response.Content.ReadAsStringAsync();
189 | dynamic x = Newtonsoft.Json.JsonConvert.DeserializeObject(resultString);
190 | }
191 |
192 | }
193 | DateTime donationDateTime = Convert.ToDateTime(donationDate);
194 | var donationMonthString = donationDateTime.ToString("MMM - yyyy");
195 |
196 | await UpdateSummaryTable("DonationsByOrgTable", organization, donationAmount, restURLBase, client);
197 | await UpdateSummaryTable("DonationsByMonthTable", donationMonthString, donationAmount, restURLBase, client);
198 | }
199 | }
200 | return newDonation;
201 | }
202 |
203 | }
204 |
205 | public class RequestBodyHelper
206 | {
207 | public object index;
208 | public object[,] values;
209 | }
210 | }
--------------------------------------------------------------------------------
/Microsoft-Graph-ASPNET-Excel-Donations/Scripts/respond.matchmedia.addListener.js:
--------------------------------------------------------------------------------
1 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
2 | /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
3 | (function(w) {
4 | "use strict";
5 | w.matchMedia = w.matchMedia || function(doc, undefined) {
6 | var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
7 | div.id = "mq-test-1";
8 | div.style.cssText = "position:absolute;top:-100em";
9 | fakeBody.style.background = "none";
10 | fakeBody.appendChild(div);
11 | return function(q) {
12 | div.innerHTML = '';
13 | docElem.insertBefore(fakeBody, refNode);
14 | bool = div.offsetWidth === 42;
15 | docElem.removeChild(fakeBody);
16 | return {
17 | matches: bool,
18 | media: q
19 | };
20 | };
21 | }(w.document);
22 | })(this);
23 |
24 | /*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */
25 | (function(w) {
26 | "use strict";
27 | if (w.matchMedia && w.matchMedia("all").addListener) {
28 | return false;
29 | }
30 | var localMatchMedia = w.matchMedia, hasMediaQueries = localMatchMedia("only all").matches, isListening = false, timeoutID = 0, queries = [], handleChange = function(evt) {
31 | w.clearTimeout(timeoutID);
32 | timeoutID = w.setTimeout(function() {
33 | for (var i = 0, il = queries.length; i < il; i++) {
34 | var mql = queries[i].mql, listeners = queries[i].listeners || [], matches = localMatchMedia(mql.media).matches;
35 | if (matches !== mql.matches) {
36 | mql.matches = matches;
37 | for (var j = 0, jl = listeners.length; j < jl; j++) {
38 | listeners[j].call(w, mql);
39 | }
40 | }
41 | }
42 | }, 30);
43 | };
44 | w.matchMedia = function(media) {
45 | var mql = localMatchMedia(media), listeners = [], index = 0;
46 | mql.addListener = function(listener) {
47 | if (!hasMediaQueries) {
48 | return;
49 | }
50 | if (!isListening) {
51 | isListening = true;
52 | w.addEventListener("resize", handleChange, true);
53 | }
54 | if (index === 0) {
55 | index = queries.push({
56 | mql: mql,
57 | listeners: listeners
58 | });
59 | }
60 | listeners.push(listener);
61 | };
62 | mql.removeListener = function(listener) {
63 | for (var i = 0, il = listeners.length; i < il; i++) {
64 | if (listeners[i] === listener) {
65 | listeners.splice(i, 1);
66 | }
67 | }
68 | };
69 | return mql;
70 | };
71 | })(this);
72 |
73 | /*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */
74 | (function(w) {
75 | "use strict";
76 | var respond = {};
77 | w.respond = respond;
78 | respond.update = function() {};
79 | var requestQueue = [], xmlHttp = function() {
80 | var xmlhttpmethod = false;
81 | try {
82 | xmlhttpmethod = new w.XMLHttpRequest();
83 | } catch (e) {
84 | xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
85 | }
86 | return function() {
87 | return xmlhttpmethod;
88 | };
89 | }(), ajax = function(url, callback) {
90 | var req = xmlHttp();
91 | if (!req) {
92 | return;
93 | }
94 | req.open("GET", url, true);
95 | req.onreadystatechange = function() {
96 | if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
97 | return;
98 | }
99 | callback(req.responseText);
100 | };
101 | if (req.readyState === 4) {
102 | return;
103 | }
104 | req.send(null);
105 | };
106 | respond.ajax = ajax;
107 | respond.queue = requestQueue;
108 | respond.regex = {
109 | media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
110 | keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
111 | urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
112 | findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
113 | only: /(only\s+)?([a-zA-Z]+)\s?/,
114 | minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,
115 | maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/
116 | };
117 | respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
118 | if (respond.mediaQueriesSupported) {
119 | return;
120 | }
121 | var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
122 | var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
123 | div.style.cssText = "position:absolute;font-size:1em;width:1em";
124 | if (!body) {
125 | body = fakeUsed = doc.createElement("body");
126 | body.style.background = "none";
127 | }
128 | docElem.style.fontSize = "100%";
129 | body.style.fontSize = "100%";
130 | body.appendChild(div);
131 | if (fakeUsed) {
132 | docElem.insertBefore(body, docElem.firstChild);
133 | }
134 | ret = div.offsetWidth;
135 | if (fakeUsed) {
136 | docElem.removeChild(body);
137 | } else {
138 | body.removeChild(div);
139 | }
140 | docElem.style.fontSize = originalHTMLFontSize;
141 | if (originalBodyFontSize) {
142 | body.style.fontSize = originalBodyFontSize;
143 | }
144 | ret = eminpx = parseFloat(ret);
145 | return ret;
146 | }, applyMedia = function(fromResize) {
147 | var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
148 | if (fromResize && lastCall && now - lastCall < resizeThrottle) {
149 | w.clearTimeout(resizeDefer);
150 | resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
151 | return;
152 | } else {
153 | lastCall = now;
154 | }
155 | for (var i in mediastyles) {
156 | if (mediastyles.hasOwnProperty(i)) {
157 | var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
158 | if (!!min) {
159 | min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
160 | }
161 | if (!!max) {
162 | max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
163 | }
164 | if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
165 | if (!styleBlocks[thisstyle.media]) {
166 | styleBlocks[thisstyle.media] = [];
167 | }
168 | styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
169 | }
170 | }
171 | }
172 | for (var j in appendedEls) {
173 | if (appendedEls.hasOwnProperty(j)) {
174 | if (appendedEls[j] && appendedEls[j].parentNode === head) {
175 | head.removeChild(appendedEls[j]);
176 | }
177 | }
178 | }
179 | appendedEls.length = 0;
180 | for (var k in styleBlocks) {
181 | if (styleBlocks.hasOwnProperty(k)) {
182 | var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
183 | ss.type = "text/css";
184 | ss.media = k;
185 | head.insertBefore(ss, lastLink.nextSibling);
186 | if (ss.styleSheet) {
187 | ss.styleSheet.cssText = css;
188 | } else {
189 | ss.appendChild(doc.createTextNode(css));
190 | }
191 | appendedEls.push(ss);
192 | }
193 | }
194 | }, translate = function(styles, href, media) {
195 | var qs = styles.replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
196 | href = href.substring(0, href.lastIndexOf("/"));
197 | var repUrls = function(css) {
198 | return css.replace(respond.regex.urls, "$1" + href + "$2$3");
199 | }, useMedia = !ql && media;
200 | if (href.length) {
201 | href += "/";
202 | }
203 | if (useMedia) {
204 | ql = 1;
205 | }
206 | for (var i = 0; i < ql; i++) {
207 | var fullq, thisq, eachq, eql;
208 | if (useMedia) {
209 | fullq = media;
210 | rules.push(repUrls(styles));
211 | } else {
212 | fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
213 | rules.push(RegExp.$2 && repUrls(RegExp.$2));
214 | }
215 | eachq = fullq.split(",");
216 | eql = eachq.length;
217 | for (var j = 0; j < eql; j++) {
218 | thisq = eachq[j];
219 | mediastyles.push({
220 | media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
221 | rules: rules.length - 1,
222 | hasquery: thisq.indexOf("(") > -1,
223 | minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
224 | maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
225 | });
226 | }
227 | }
228 | applyMedia();
229 | }, makeRequests = function() {
230 | if (requestQueue.length) {
231 | var thisRequest = requestQueue.shift();
232 | ajax(thisRequest.href, function(styles) {
233 | translate(styles, thisRequest.href, thisRequest.media);
234 | parsedSheets[thisRequest.href] = true;
235 | w.setTimeout(function() {
236 | makeRequests();
237 | }, 0);
238 | });
239 | }
240 | }, ripCSS = function() {
241 | for (var i = 0; i < links.length; i++) {
242 | var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
243 | if (!!href && isCSS && !parsedSheets[href]) {
244 | if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
245 | translate(sheet.styleSheet.rawCssText, href, media);
246 | parsedSheets[href] = true;
247 | } else {
248 | if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
249 | if (href.substring(0, 2) === "//") {
250 | href = w.location.protocol + href;
251 | }
252 | requestQueue.push({
253 | href: href,
254 | media: media
255 | });
256 | }
257 | }
258 | }
259 | }
260 | makeRequests();
261 | };
262 | ripCSS();
263 | respond.update = ripCSS;
264 | respond.getEmValue = getEmValue;
265 | function callMedia() {
266 | applyMedia(true);
267 | }
268 | if (w.addEventListener) {
269 | w.addEventListener("resize", callMedia, false);
270 | } else if (w.attachEvent) {
271 | w.attachEvent("onresize", callMedia);
272 | }
273 | })(this);
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contribute to this documentation
2 |
3 | Thank you for your interest in our documentation!
4 |
5 | * [Ways to contribute](#ways-to-contribute)
6 | * [Contribute using GitHub](#contribute-using-github)
7 | * [Contribute using Git](#contribute-using-git)
8 | * [How to use Markdown to format your topic](#how-to-use-markdown-to-format-your-topic)
9 | * [FAQ](#faq)
10 | * [More resources](#more-resources)
11 |
12 | ## Ways to contribute
13 |
14 | Here are some ways you can contribute to this documentation:
15 |
16 | * To make small changes to an article, [Contribute using GitHub](#contribute-using-github).
17 | * To make large changes, or changes that involve code, [Contribute using Git](#contribute-using-git).
18 | * Report documentation bugs via GitHub Issues
19 | * Request new documentation at the [Office Developer Platform UserVoice](http://officespdev.uservoice.com) site.
20 |
21 | ## Contribute using GitHub
22 |
23 | Use GitHub to contribute to this documentation without having to clone the repo to your desktop. This is the easiest way to create a pull request in this repository. Use this method to make a minor change that doesn't involve code changes.
24 |
25 | **Note** Using this method allows you to contribute to one article at a time.
26 |
27 | ### To Contribute using GitHub
28 |
29 | 1. Find the article you want to contribute to on GitHub.
30 |
31 | If the article is in MSDN, choose the **suggest and submit changes** link in the **Contribute to this content** section and you'll be taken to the same article on GitHub.
32 | 2. Once you are on the article in GitHub, sign in to GitHub (get a free account [Join GitHub](https://github.com/join).
33 | 3. Choose the **pencil icon** (edit the file in your fork of this project) and make your changes in the **<>Edit file** window.
34 | 4. Scroll to the bottom and enter a description.
35 | 5. Choose **Propose file change**>**Create pull request**.
36 |
37 | You now have successfully submitted a pull request. Pull requests are typically reviewed within 10 business days.
38 |
39 |
40 | ## Contribute using Git
41 |
42 | Use Git to contribute substantive changes, such as:
43 |
44 | * Contributing code.
45 | * Contributing changes that affect meaning.
46 | * Contributing large changes to text.
47 | * Adding new topics.
48 |
49 | ### To Contribute using Git
50 |
51 | 1. If you don't have a GitHub account, set one up at [GitHub](https://github.com/join).
52 | 2. After you have an account, install Git on your computer. Follow the steps in [Setting up Git Tutorial](https://help.github.com/articles/set-up-git/).
53 | 3. To submit a pull request using Git, follow the steps in [Use GitHub, Git, and this repository](#use-github-git-and-this-repository).
54 | 4. You will be asked to sign the Contributor's License Agreement if you are:
55 |
56 | * A member of the Microsoft Open Technologies group.
57 | * A contributors who doesn't work for Microsoft.
58 |
59 | As a community member, you must sign the Contribution License Agreement (CLA) before you can contribute large submissions to a project. You only need to complete and submit the documentation once. Carefully review the document. You may be required to have your employer sign the document.
60 |
61 | Signing the CLA does not grant you rights to commit to the main repository, but it does mean that the Office Developer and Office Developer Content Publishing teams will be able to review and approve your contributions. You will be credited for your submissions.
62 |
63 | Pull requests are typically reviewed within 10 business days.
64 |
65 | ## Use GitHub, Git, and this repository
66 |
67 | **Note:** Most of the information in this section can be found in [GitHub Help] articles. If you're familiar with Git and GitHub, skip to the **Contribute and edit content** section for the specifics of the code/content flow of this repository.
68 |
69 | ### To set up your fork of the repository
70 |
71 | 1. Set up a GitHub account so you can contribute to this project. If you haven't done this, go to [GitHub](https://github.com/join) and do it now.
72 | 2. Install Git on your computer. Follow the steps in the [Setting up Git Tutorial] [Set Up Git].
73 | 3. Create your own fork of this repository. To do this, at the top of the page, choose the **Fork** button.
74 | 4. Copy your fork to your computer. To do this, open Git Bash. At the command prompt enter:
75 |
76 | git clone https://github.com//.git
77 |
78 | Next, create a reference to the root repository by entering these commands:
79 |
80 | cd
81 | git remote add upstream https://github.com/microsoftgraph/.git
82 | git fetch upstream
83 |
84 | Congratulations! You've now set up your repository. You won't need to repeat these steps again.
85 |
86 | ### Contribute and edit content
87 |
88 | To make the contribution process as seamless as possible, follow these steps.
89 |
90 | #### To contribute and edit content
91 |
92 | 1. Create a new branch.
93 | 2. Add new content or edit existing content.
94 | 3. Submit a pull request to the main repository.
95 | 4. Delete the branch.
96 |
97 | **Important** Limit each branch to a single concept/article to streamline the work flow and reduce the chance of merge conflicts. Content appropriate for a new branch includes:
98 |
99 | * A new article.
100 | * Spelling and grammar edits.
101 | * Applying a single formatting change across a large set of articles (for example, applying a new copyright footer).
102 |
103 | #### To create a new branch
104 |
105 | 1. Open Git Bash.
106 | 2. At the Git Bash command prompt, type `git pull upstream master:`. This creates a new branch locally that is copied from the latest MicrosoftGraph master branch.
107 | 3. At the Git Bash command prompt, type `git push origin `. This alerts GitHub to the new branch. You should now see the new branch in your fork of the repository on GitHub.
108 | 4. At the Git Bash command prompt, type `git checkout ` to switch to your new branch.
109 |
110 | #### Add new content or edit existing content
111 |
112 | You navigate to the repository on your computer by using File Explorer. The repository files are in `C:\Users\\`.
113 |
114 | To edit files, open them in an editor of your choice and modify them. To create a new file, use the editor of your choice and save the new file in the appropriate location in your local copy of the repository. While working, save your work frequently.
115 |
116 | The files in `C:\Users\\` are a working copy of the new branch that you created in your local repository. Changing anything in this folder doesn't affect the local repository until you commit a change. To commit a change to the local repository, type the following commands in GitBash:
117 |
118 | git add .
119 | git commit -v -a -m ""
120 |
121 | The `add` command adds your changes to a staging area in preparation for committing them to the repository. The period after the `add` command specifies that you want to stage all of the files that you added or modified, checking subfolders recursively. (If you don't want to commit all of the changes, you can add specific files. You can also undo a commit. For help, type `git add -help` or `git status`.)
122 |
123 | The `commit` command applies the staged changes to the repository. The switch `-m` means you are providing the commit comment in the command line. The -v and -a switches can be omitted. The -v switch is for verbose output from the command, and -a does what you already did with the add command.
124 |
125 | You can commit multiple times while you are doing your work, or you can commit once when you're done.
126 |
127 | #### Submit a pull request to the main repository
128 |
129 | When you're finished with your work and are ready to have it merged into the main repository, follow these steps.
130 |
131 | #### To submit a pull request to the main repository
132 |
133 | 1. In the Git Bash command prompt, type `git push origin `. In your local repository, `origin` refers to your GitHub repository that you cloned the local repository from. This command pushes the current state of your new branch, including all commits made in the previous steps, to your GitHub fork.
134 | 2. On the GitHub site, navigate in your fork to the new branch.
135 | 3. Choose the **Pull Request** button at the top of the page.
136 | 4. Verify the Base branch is `microsoftgraph/@master` and the Head branch is `/@`.
137 | 5. Choose the **Update Commit Range** button.
138 | 6. Add a title to your pull request, and describe all the changes you're making.
139 | 7. Submit the pull request.
140 |
141 | One of the site administrators will process your pull request. Your pull request will surface on the microsoftgraph/ site under Issues. When the pull request is accepted, the issue will be resolved.
142 |
143 | #### Create a new branch after merge
144 |
145 | After a branch is successfully merged (that is, your pull request is accepted), don't continue working in that local branch. This can lead to merge conflicts if you submit another pull request. To do another update, create a new local branch from the successfully merged upstream branch, and then delete your initial local branch.
146 |
147 | For example, if your local branch X was successfully merged into the OfficeDev/microsoft-graph-docs master branch and you want to make additional updates to the content that was merged. Create a new local branch, X2, from the OfficeDev/microsoft-graph-docs master branch. To do this, open GitBash and execute the following commands:
148 |
149 | cd microsoft-graph-docs
150 | git pull upstream master:X2
151 | git push origin X2
152 |
153 | You now have local copies (in a new local branch) of the work that you submitted in branch X. The X2 branch also contains all the work other writers have merged, so if your work depends on others' work (for example, shared images), it is available in the new branch. You can verify that your previous work (and others' work) is in the branch by checking out the new branch...
154 |
155 | git checkout X2
156 |
157 | ...and verifying the content. (The `checkout` command updates the files in `C:\Users\\microsoft-graph-docs` to the current state of the X2 branch.) Once you check out the new branch, you can make updates to the content and commit them as usual. However, to avoid working in the merged branch (X) by mistake, it's best to delete it (see the following **Delete a branch** section).
158 |
159 | #### Delete a branch
160 |
161 | Once your changes are successfully merged into the main repository, delete the branch you used because you no longer need it. Any additional work should be done in a new branch.
162 |
163 | #### To delete a branch
164 |
165 | 1. In the Git Bash command prompt, type `git checkout master`. This ensures that you aren't in the branch to be deleted (which isn't allowed).
166 | 2. Next, at the command prompt, type `git branch -d `. This deletes the branch on your computer only if it has been successfully merged to the upstream repository. (You can override this behavior with the `–D` flag, but first be sure you want to do this.)
167 | 3. Finally, type `git push origin :` at the command prompt (a space before the colon and no space after it). This will delete the branch on your github fork.
168 |
169 | Congratulations, you have successfully contributed to the project!
170 |
171 | ## How to use Markdown to format your topic
172 |
173 | ### Article template
174 |
175 | The [markdown template](/articles/0-markdown-template-for-new-articles.md) contains the basic Markdown for a topic that includes a table of contents, sections with subheadings, links to other Office developer topics, links to other sites, bold text, italic text, numbered and bulleted lists, code snippets, and images.
176 |
177 |
178 | ### Standard Markdown
179 |
180 | All of the articles in this repository use Markdown. A complete introduction (and listing of all the syntax) can be found at [Markdown Home] [].
181 |
182 | ## FAQ
183 |
184 | ### How do I get a GitHub account?
185 |
186 | Fill out the form at [Join GitHub](https://github.com/join) to open a free GitHub account.
187 |
188 | ### Where do I get a Contributor's License Agreement?
189 |
190 | You will automatically be sent a notice that you need to sign the Contributor's License Agreement (CLA) if your pull request requires one.
191 |
192 | As a community member, **you must sign the Contribution License Agreement (CLA) before you can contribute large submissions to this project**. You only need complete and submit the documentation once. Carefully review the document. You may be required to have your employer sign the document.
193 |
194 | ### What happens with my contributions?
195 |
196 | When you submit your changes, via a pull request, our team will be notified and will review your pull request. You will receive notifications about your pull request from GitHub; you may also be notified by someone from our team if we need more information. We reserve the right to edit your submission for legal, style, clarity, or other issues.
197 |
198 | ### Can I become an approver for this repository's GitHub pull requests?
199 |
200 | Currently, we are not allowing external contributors to approve pull requests in this repository.
201 |
202 | ### How soon will I get a response about my change request or issue?
203 |
204 | We typically review pull requests and respond to issues within 10 business days.
205 |
206 | ## More resources
207 |
208 | * To learn more about Markdown, go to the Git creator's site [Daring Fireball].
209 | * To learn more about using Git and GitHub, first check out the [GitHub Help section] [GitHub Help].
210 |
211 | [GitHub Home]: http://github.com
212 | [GitHub Help]: http://help.github.com/
213 | [Set Up Git]: http://help.github.com/win-set-up-git/
214 | [Markdown Home]: http://daringfireball.net/projects/markdown/
215 | [Daring Fireball]: http://daringfireball.net/
216 |
--------------------------------------------------------------------------------
/Microsoft-Graph-ASPNET-Excel-Donations/Microsoft-Graph-ASPNET-Excel-Donations.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Debug
8 | AnyCPU
9 |
10 |
11 | 2.0
12 | {9BF6B5A7-5A84-49EF-A992-66544DAA159D}
13 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
14 | Library
15 | Properties
16 | Microsoft_Graph_ASPNET_Excel_Donations
17 | Microsoft-Graph-ASPNET-Excel-Donations
18 | v4.5.2
19 | false
20 | true
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | true
32 | full
33 | false
34 | bin\
35 | DEBUG;TRACE
36 | prompt
37 | 4
38 |
39 |
40 | pdbonly
41 | true
42 | bin\
43 | TRACE
44 | prompt
45 | 4
46 |
47 |
48 |
49 | ..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll
50 | True
51 |
52 |
53 | ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
54 |
55 |
56 |
57 | ..\packages\Microsoft.Identity.Client.2.7.1\lib\net45\Microsoft.Identity.Client.dll
58 |
59 |
60 | ..\packages\Microsoft.IdentityModel.Protocol.Extensions.1.0.2.206221351\lib\net45\Microsoft.IdentityModel.Protocol.Extensions.dll
61 | True
62 |
63 |
64 | ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll
65 | True
66 |
67 |
68 | ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll
69 | True
70 |
71 |
72 | ..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll
73 | True
74 |
75 |
76 | ..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll
77 | True
78 |
79 |
80 | ..\packages\Microsoft.Owin.Security.OpenIdConnect.3.0.1\lib\net45\Microsoft.Owin.Security.OpenIdConnect.dll
81 | True
82 |
83 |
84 | ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll
85 | True
86 |
87 |
88 | ..\packages\Owin.1.0\lib\net40\Owin.dll
89 | True
90 |
91 |
92 |
93 |
94 |
95 |
96 | ..\packages\System.IdentityModel.Tokens.Jwt.4.0.2.206221351\lib\net45\System.IdentityModel.Tokens.Jwt.dll
97 | True
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | True
118 | ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
119 |
120 |
121 |
122 |
123 |
124 |
125 | True
126 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll
127 |
128 |
129 | True
130 | ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll
131 |
132 |
133 | ..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll
134 |
135 |
136 | True
137 | ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll
138 |
139 |
140 | True
141 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll
142 |
143 |
144 | True
145 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll
146 |
147 |
148 | True
149 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll
150 |
151 |
152 | ..\packages\WebGrease.1.6.0\lib\WebGrease.dll
153 | True
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 | Global.asax
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 | Designer
202 |
203 |
204 | Web.config
205 |
206 |
207 | Web.config
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 | Designer
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 | 10.0
241 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 | True
254 | True
255 | 21942
256 | /
257 | http://localhost:21942/
258 | False
259 | False
260 |
261 |
262 | False
263 |
264 |
265 |
266 |
267 |
268 |
269 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
270 |
271 |
272 |
273 |
274 |
280 |
--------------------------------------------------------------------------------
/Microsoft-Graph-ASPNET-Excel-Donations/Scripts/jquery.validate.min.js:
--------------------------------------------------------------------------------
1 | /*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
2 | * http://jqueryvalidation.org/
3 | * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
4 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
--------------------------------------------------------------------------------
/Microsoft-Graph-ASPNET-Excel-Donations/Scripts/jquery.validate.unobtrusive.js:
--------------------------------------------------------------------------------
1 | /* NUGET: BEGIN LICENSE TEXT
2 | *
3 | * Microsoft grants you the right to use these script files for the sole
4 | * purpose of either: (i) interacting through your browser with the Microsoft
5 | * website or online service, subject to the applicable licensing or use
6 | * terms; or (ii) using the files as included with a Microsoft product subject
7 | * to that product's license terms. Microsoft reserves all other rights to the
8 | * files not expressly granted by Microsoft, whether by implication, estoppel
9 | * or otherwise. Insofar as a script file is dual licensed under GPL,
10 | * Microsoft neither took the code under GPL nor distributes it thereunder but
11 | * under the terms set out in this paragraph. All notices and licenses
12 | * below are for informational purposes only.
13 | *
14 | * NUGET: END LICENSE TEXT */
15 | /*!
16 | ** Unobtrusive validation support library for jQuery and jQuery Validate
17 | ** Copyright (C) Microsoft Corporation. All rights reserved.
18 | */
19 |
20 | /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
21 | /*global document: false, jQuery: false */
22 |
23 | (function ($) {
24 | var $jQval = $.validator,
25 | adapters,
26 | data_validation = "unobtrusiveValidation";
27 |
28 | function setValidationValues(options, ruleName, value) {
29 | options.rules[ruleName] = value;
30 | if (options.message) {
31 | options.messages[ruleName] = options.message;
32 | }
33 | }
34 |
35 | function splitAndTrim(value) {
36 | return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
37 | }
38 |
39 | function escapeAttributeValue(value) {
40 | // As mentioned on http://api.jquery.com/category/selectors/
41 | return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
42 | }
43 |
44 | function getModelPrefix(fieldName) {
45 | return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
46 | }
47 |
48 | function appendModelPrefix(value, prefix) {
49 | if (value.indexOf("*.") === 0) {
50 | value = value.replace("*.", prefix);
51 | }
52 | return value;
53 | }
54 |
55 | function onError(error, inputElement) { // 'this' is the form element
56 | var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"),
57 | replaceAttrValue = container.attr("data-valmsg-replace"),
58 | replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;
59 |
60 | container.removeClass("field-validation-valid").addClass("field-validation-error");
61 | error.data("unobtrusiveContainer", container);
62 |
63 | if (replace) {
64 | container.empty();
65 | error.removeClass("input-validation-error").appendTo(container);
66 | }
67 | else {
68 | error.hide();
69 | }
70 | }
71 |
72 | function onErrors(event, validator) { // 'this' is the form element
73 | var container = $(this).find("[data-valmsg-summary=true]"),
74 | list = container.find("ul");
75 |
76 | if (list && list.length && validator.errorList.length) {
77 | list.empty();
78 | container.addClass("validation-summary-errors").removeClass("validation-summary-valid");
79 |
80 | $.each(validator.errorList, function () {
81 | $("").html(this.message).appendTo(list);
82 | });
83 | }
84 | }
85 |
86 | function onSuccess(error) { // 'this' is the form element
87 | var container = error.data("unobtrusiveContainer"),
88 | replaceAttrValue = container.attr("data-valmsg-replace"),
89 | replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
90 |
91 | if (container) {
92 | container.addClass("field-validation-valid").removeClass("field-validation-error");
93 | error.removeData("unobtrusiveContainer");
94 |
95 | if (replace) {
96 | container.empty();
97 | }
98 | }
99 | }
100 |
101 | function onReset(event) { // 'this' is the form element
102 | var $form = $(this),
103 | key = '__jquery_unobtrusive_validation_form_reset';
104 | if ($form.data(key)) {
105 | return;
106 | }
107 | // Set a flag that indicates we're currently resetting the form.
108 | $form.data(key, true);
109 | try {
110 | $form.data("validator").resetForm();
111 | } finally {
112 | $form.removeData(key);
113 | }
114 |
115 | $form.find(".validation-summary-errors")
116 | .addClass("validation-summary-valid")
117 | .removeClass("validation-summary-errors");
118 | $form.find(".field-validation-error")
119 | .addClass("field-validation-valid")
120 | .removeClass("field-validation-error")
121 | .removeData("unobtrusiveContainer")
122 | .find(">*") // If we were using valmsg-replace, get the underlying error
123 | .removeData("unobtrusiveContainer");
124 | }
125 |
126 | function validationInfo(form) {
127 | var $form = $(form),
128 | result = $form.data(data_validation),
129 | onResetProxy = $.proxy(onReset, form),
130 | defaultOptions = $jQval.unobtrusive.options || {},
131 | execInContext = function (name, args) {
132 | var func = defaultOptions[name];
133 | func && $.isFunction(func) && func.apply(form, args);
134 | }
135 |
136 | if (!result) {
137 | result = {
138 | options: { // options structure passed to jQuery Validate's validate() method
139 | errorClass: defaultOptions.errorClass || "input-validation-error",
140 | errorElement: defaultOptions.errorElement || "span",
141 | errorPlacement: function () {
142 | onError.apply(form, arguments);
143 | execInContext("errorPlacement", arguments);
144 | },
145 | invalidHandler: function () {
146 | onErrors.apply(form, arguments);
147 | execInContext("invalidHandler", arguments);
148 | },
149 | messages: {},
150 | rules: {},
151 | success: function () {
152 | onSuccess.apply(form, arguments);
153 | execInContext("success", arguments);
154 | }
155 | },
156 | attachValidation: function () {
157 | $form
158 | .off("reset." + data_validation, onResetProxy)
159 | .on("reset." + data_validation, onResetProxy)
160 | .validate(this.options);
161 | },
162 | validate: function () { // a validation function that is called by unobtrusive Ajax
163 | $form.validate();
164 | return $form.valid();
165 | }
166 | };
167 | $form.data(data_validation, result);
168 | }
169 |
170 | return result;
171 | }
172 |
173 | $jQval.unobtrusive = {
174 | adapters: [],
175 |
176 | parseElement: function (element, skipAttach) {
177 | ///
178 | /// Parses a single HTML element for unobtrusive validation attributes.
179 | ///
180 | /// The HTML element to be parsed.
181 | /// [Optional] true to skip attaching the
182 | /// validation to the form. If parsing just this single element, you should specify true.
183 | /// If parsing several elements, you should specify false, and manually attach the validation
184 | /// to the form when you are finished. The default is false.
185 | var $element = $(element),
186 | form = $element.parents("form")[0],
187 | valInfo, rules, messages;
188 |
189 | if (!form) { // Cannot do client-side validation without a form
190 | return;
191 | }
192 |
193 | valInfo = validationInfo(form);
194 | valInfo.options.rules[element.name] = rules = {};
195 | valInfo.options.messages[element.name] = messages = {};
196 |
197 | $.each(this.adapters, function () {
198 | var prefix = "data-val-" + this.name,
199 | message = $element.attr(prefix),
200 | paramValues = {};
201 |
202 | if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
203 | prefix += "-";
204 |
205 | $.each(this.params, function () {
206 | paramValues[this] = $element.attr(prefix + this);
207 | });
208 |
209 | this.adapt({
210 | element: element,
211 | form: form,
212 | message: message,
213 | params: paramValues,
214 | rules: rules,
215 | messages: messages
216 | });
217 | }
218 | });
219 |
220 | $.extend(rules, { "__dummy__": true });
221 |
222 | if (!skipAttach) {
223 | valInfo.attachValidation();
224 | }
225 | },
226 |
227 | parse: function (selector) {
228 | ///
229 | /// Parses all the HTML elements in the specified selector. It looks for input elements decorated
230 | /// with the [data-val=true] attribute value and enables validation according to the data-val-*
231 | /// attribute values.
232 | ///
233 | /// Any valid jQuery selector.
234 |
235 | // $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one
236 | // element with data-val=true
237 | var $selector = $(selector),
238 | $forms = $selector.parents()
239 | .addBack()
240 | .filter("form")
241 | .add($selector.find("form"))
242 | .has("[data-val=true]");
243 |
244 | $selector.find("[data-val=true]").each(function () {
245 | $jQval.unobtrusive.parseElement(this, true);
246 | });
247 |
248 | $forms.each(function () {
249 | var info = validationInfo(this);
250 | if (info) {
251 | info.attachValidation();
252 | }
253 | });
254 | }
255 | };
256 |
257 | adapters = $jQval.unobtrusive.adapters;
258 |
259 | adapters.add = function (adapterName, params, fn) {
260 | /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.
261 | /// The name of the adapter to be added. This matches the name used
262 | /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
263 | /// [Optional] An array of parameter names (strings) that will
264 | /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and
265 | /// mmmm is the parameter name).
266 | /// The function to call, which adapts the values from the HTML
267 | /// attributes into jQuery Validate rules and/or messages.
268 | ///
269 | if (!fn) { // Called with no params, just a function
270 | fn = params;
271 | params = [];
272 | }
273 | this.push({ name: adapterName, params: params, adapt: fn });
274 | return this;
275 | };
276 |
277 | adapters.addBool = function (adapterName, ruleName) {
278 | /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
279 | /// the jQuery Validate validation rule has no parameter values.
280 | /// The name of the adapter to be added. This matches the name used
281 | /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
282 | /// [Optional] The name of the jQuery Validate rule. If not provided, the value
283 | /// of adapterName will be used instead.
284 | ///
285 | return this.add(adapterName, function (options) {
286 | setValidationValues(options, ruleName || adapterName, true);
287 | });
288 | };
289 |
290 | adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {
291 | /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
292 | /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and
293 | /// one for min-and-max). The HTML parameters are expected to be named -min and -max.
294 | /// The name of the adapter to be added. This matches the name used
295 | /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
296 | /// The name of the jQuery Validate rule to be used when you only
297 | /// have a minimum value.
298 | /// The name of the jQuery Validate rule to be used when you only
299 | /// have a maximum value.
300 | /// The name of the jQuery Validate rule to be used when you
301 | /// have both a minimum and maximum value.
302 | /// [Optional] The name of the HTML attribute that
303 | /// contains the minimum value. The default is "min".
304 | /// [Optional] The name of the HTML attribute that
305 | /// contains the maximum value. The default is "max".
306 | ///
307 | return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
308 | var min = options.params.min,
309 | max = options.params.max;
310 |
311 | if (min && max) {
312 | setValidationValues(options, minMaxRuleName, [min, max]);
313 | }
314 | else if (min) {
315 | setValidationValues(options, minRuleName, min);
316 | }
317 | else if (max) {
318 | setValidationValues(options, maxRuleName, max);
319 | }
320 | });
321 | };
322 |
323 | adapters.addSingleVal = function (adapterName, attribute, ruleName) {
324 | /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
325 | /// the jQuery Validate validation rule has a single value.
326 | /// The name of the adapter to be added. This matches the name used
327 | /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).
328 | /// [Optional] The name of the HTML attribute that contains the value.
329 | /// The default is "val".
330 | /// [Optional] The name of the jQuery Validate rule. If not provided, the value
331 | /// of adapterName will be used instead.
332 | ///
333 | return this.add(adapterName, [attribute || "val"], function (options) {
334 | setValidationValues(options, ruleName || adapterName, options.params[attribute]);
335 | });
336 | };
337 |
338 | $jQval.addMethod("__dummy__", function (value, element, params) {
339 | return true;
340 | });
341 |
342 | $jQval.addMethod("regex", function (value, element, params) {
343 | var match;
344 | if (this.optional(element)) {
345 | return true;
346 | }
347 |
348 | match = new RegExp(params).exec(value);
349 | return (match && (match.index === 0) && (match[0].length === value.length));
350 | });
351 |
352 | $jQval.addMethod("nonalphamin", function (value, element, nonalphamin) {
353 | var match;
354 | if (nonalphamin) {
355 | match = value.match(/\W/g);
356 | match = match && match.length >= nonalphamin;
357 | }
358 | return match;
359 | });
360 |
361 | if ($jQval.methods.extension) {
362 | adapters.addSingleVal("accept", "mimtype");
363 | adapters.addSingleVal("extension", "extension");
364 | } else {
365 | // for backward compatibility, when the 'extension' validation method does not exist, such as with versions
366 | // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for
367 | // validating the extension, and ignore mime-type validations as they are not supported.
368 | adapters.addSingleVal("extension", "extension", "accept");
369 | }
370 |
371 | adapters.addSingleVal("regex", "pattern");
372 | adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");
373 | adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range");
374 | adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength");
375 | adapters.add("equalto", ["other"], function (options) {
376 | var prefix = getModelPrefix(options.element.name),
377 | other = options.params.other,
378 | fullOtherName = appendModelPrefix(other, prefix),
379 | element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0];
380 |
381 | setValidationValues(options, "equalTo", element);
382 | });
383 | adapters.add("required", function (options) {
384 | // jQuery Validate equates "required" with "mandatory" for checkbox elements
385 | if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") {
386 | setValidationValues(options, "required", true);
387 | }
388 | });
389 | adapters.add("remote", ["url", "type", "additionalfields"], function (options) {
390 | var value = {
391 | url: options.params.url,
392 | type: options.params.type || "GET",
393 | data: {}
394 | },
395 | prefix = getModelPrefix(options.element.name);
396 |
397 | $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
398 | var paramName = appendModelPrefix(fieldName, prefix);
399 | value.data[paramName] = function () {
400 | var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']");
401 | // For checkboxes and radio buttons, only pick up values from checked fields.
402 | if (field.is(":checkbox")) {
403 | return field.filter(":checked").val() || field.filter(":hidden").val() || '';
404 | }
405 | else if (field.is(":radio")) {
406 | return field.filter(":checked").val() || '';
407 | }
408 | return field.val();
409 | };
410 | });
411 |
412 | setValidationValues(options, "remote", value);
413 | });
414 | adapters.add("password", ["min", "nonalphamin", "regex"], function (options) {
415 | if (options.params.min) {
416 | setValidationValues(options, "minlength", options.params.min);
417 | }
418 | if (options.params.nonalphamin) {
419 | setValidationValues(options, "nonalphamin", options.params.nonalphamin);
420 | }
421 | if (options.params.regex) {
422 | setValidationValues(options, "regex", options.params.regex);
423 | }
424 | });
425 |
426 | $(function () {
427 | $jQval.unobtrusive.parse(document);
428 | });
429 | }(jQuery));
--------------------------------------------------------------------------------
/Microsoft-Graph-ASPNET-Excel-Donations/Content/bootstrap-theme.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.6 (http://getbootstrap.com)
3 | * Copyright 2011-2015 Twitter, Inc.
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
6 | /*# sourceMappingURL=bootstrap-theme.min.css.map */
--------------------------------------------------------------------------------