This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
When looping Multiple items from a SharePoint List | |
and You want to render them on UI into individual rows | |
containing only a specific number of columns. :) | |
*/ | |
$(function() { | |
var $render = function (myarr){ | |
console.dir(myarr); // rendering logic. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
1. The best Idea is that the File Even when Updating other items, | |
will be overwritten, so no need to worry about the update code. | |
:) | |
--> | |
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function(){ | |
//your code goes here... | |
<div id="message"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Get a SharePoint List Metadata for Use in REST API code. | |
1. Create a List and Add one item into it. | |
2. Create a SitePage and Insert a Script Editor into it. | |
3. Edit the WebPart to insert the code below inside. | |
4. Save the File. | |
5. Open Fiddler and inspect the Data from JSON tab. | |
6. You are good. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dynamic Image Slider for SharePoint | |
// Image Carousel | |
// SharePoint Image Slider | |
$(document).ready(function () { | |
// ### Fecth Data from The List | |
var resourcez = "/_api/web/lists/GetByTitle('SlideMagic')/items?$select=Title,EncodedAbsUrl,Description,Alive"; | |
//var eureka = "$top=3"; | |
var orient = "$orderby=Created desc"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to Create a React Sub Component | |
a. Create File | |
b. Import React Library | |
c. Use createClass() to Define the Component | |
d. Export Component | |
var React = require('react'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add data into a list using CSOM | |
function apbObjectivesSection() { | |
alert("We are in the first function"); | |
var currentCrx = SP.ClientContext.get_current(); | |
var web = currentCrx.get_web(); | |
try { | |
var list = web.get_lists().getByTitle("MyObjectives"); | |
var itemInfoObj = new SP.ListItemCreationInformation(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
uglify = require('gulp-uglify'), | |
concat = require('gulp-concat'), | |
gulpif = require('gulp-if'), | |
gutil = require('gulp-util'), | |
browserify = require('gulp-browserify'), | |
compass = require('gulp-compass'), | |
htmlmin = require('gulp-htmlmin'), | |
cssmin = require('gulp-minify-css'), | |
connect = require('gulp-connect'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Demonstarting function callbacks | |
*/ | |
function foo(Goon) { | |
console.warn("Hello from: "+Goon); | |
} | |
function galon(company){ | |
console.log("Greatings from: "+company); | |
} |