Wes Preston DEV 202. Audience: Info Workers, Dev A deeper dive into use-cases where client-side rendering (CSR) and SharePoint’s JS Link property can.

Slides:



Advertisements
Similar presentations
SharePoint Forms All you ever wanted to know about forms but were afraid to ask.
Advertisements

Learn the techniques to create a SharePoint 2010 web site from an existing branded web site.
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
19 May 2012 SharePoint 2010 Tips and Tricks for Business Users Annelize Jonck – #SPSJHB The first ever all green SharePoint event on earth.
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
Turners SharePoint Web Site How we did it. 2 Page Anatomy Custom Search Web Part Custom Search Web Part Data Form Web Parts Content Query Web Part HTML.
Languages for Dynamic Web Documents
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Erich Kohtz – Micron Technology, Inc..  Site/Page/List Overviews  The Ribbon  Data Views  Workflows (High level)
Web Page Behavior IS 373—Web Standards Todd Will.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Creating a SharePoint App with Microsoft Access Services
Inline, Internal, and External FIle
1 Agenda Overview Review Roles Lists Libraries Columns.
Database Updates Made Easy In WebFocus Using SQL And HTML Painter Sept 2011 Lender Processing Services 1.
Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005.
XML on the Web: is it still relevant? O'Neil D. Delpratt.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
A GUIDE TO SHAREPOINT 2007 CUSTOMIZATION OPTIONS Heather Solomon, WSS MVP.
Michael Atkins. Note:  This is a non-technical overview  Some light technical background is given, to put things in context  Some of the content is.
Create with SharePoint 2010 Jen Dodd Sr. Solutions Consultant
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Wes Preston Agenda  Quick Intro  Overview  Site Details  Notes and Resources  Questions.
Computer Concepts 2014 Chapter 7 The Web and .
WordPress Web. WordPress Blogging system with full content management Personal publishing system Built on PHP scripting language and MySQL relational.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Marc Ziss Z Consulting Code Name 'Oryx' Web application scaffolding Easy to dynamically display pages based on the data model of.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Sustainable SharePoint 2010 Customizations By Bill Keys.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
HOME EVIDENCE EXECUTION MICROSOFT SOLUTIONS SERVICES PARTNERS Custom Field Controls and SharePoint Web Content Management Chakkaradeep Chandran Robert.
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
RSUG Community Member Profile Cherry Bekaert
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Office Server Specific Web content management –Page structure, layouts, and controls –Publishing.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
Building Dashboards SharePoint and Business Intelligence.
Notes Migrator for SharePoint 6.2 Support/Presales Training Steve Walch Product Manager.
HTML JAVASCRIPT. CONTENTS Javascript Example NOSCRIPT Tag Advantages Summary Exercise.
Microsoft ® Official Course Developing a Publishing Site for Web Content Microsoft SharePoint 2013 SharePoint Practice.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Chapter 6 Murach's JavaScript and jQuery, C6© 2012, Mike Murach & Associates, Inc.Slide 1.
Understanding Web-Based Digital Media Production Methods, Software, and Hardware Objective
Spice up Your Forms and Views Deep Dive into Client Side Rendering (CSR) Joe McShea Owner/Consultant IntelliPoint Solutions LLC.
Customizing Share Document Previews Will Abson Senior Integrations Engineer and Share Extras Project Lead
DYNAMIC FAQ AND DOCUMENTATION PAGES IN SHAREPOINT A modern, reusable, and easy-to-use model.
DEV103 – Web Part Transformers – More than meets the eye By: D’arce Hess.
JavaScript Invented 1995 Steve, Tony & Sharon. A Scripting Language (A scripting language is a lightweight programming language that supports the writing.
Making the Most of Search in SharePoint 2013 Christina Wheeler.
The Information Worker, Forms and More in a SharePoint 2013, Office 365, and post InfoPath world WES PRESTON.
Mark Rackley – PAIT Group –
Client-Side Rendering (CSR) demystified
Chrome Developer Tools
Custom Wiki Pages SharePoint 2010 September 18, 2018.
Cascading Style Sheets (Introduction)
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
Cascading Style Sheets (Introduction)
Presentation transcript:

Wes Preston DEV 202

Audience: Info Workers, Dev A deeper dive into use-cases where client-side rendering (CSR) and SharePoint’s JS Link property can be used – without managed code – to enhance the user experience by extending SharePoint’s view capabilities: Edit and format column content, change header text, change default web part messaging, hide columns, create custom column content, dynamically link to forms, etc.

Wes Preston, MVP, Consultant Co-Author: SharePoint 2010 Creating and Implementing Real-World Projects

Overview The Basics Examples and Templates Next steps

Improve user experience Need more control over formatting and display SharePoint Designer Design View Changes without deploying managed code Build more ‘web-user-friendly’ environments

Changing the way list data is displayed Does NOT change the data Same method SharePoint uses to display lists and pages JS Link property Code.

An app -> A view Create a document library: ‘Scripts’ JavaScript file JS Link property ~site/scripts/[ScriptName].js

PreRender – Modify client-side data before it is rendered Overrides – Overriding how different components of the Fields or View will be displayed PostRender – Traditional DOM manipulation

YES, you can use them jQuery and stuff Go to town Use a Script Editor Web Part to include external files:

Use F12 Developer tools Investigating the DOM (select element) Find hooks for use in pre/post render General troubleshooting

‘Good’ practices… Work with IT on rules/guidelines Where to store scripts When to engage developers Governance

If the JavaScript code is broken, the override won’t work… Use JavaScript ‘alert’ Check the column name Turn off MDS feature Start with a single List View on a page

Most common change made with CSR Formatting ‘Tweak’ Functionality Each column type is different Start with Text columns

Files to start from for these examples CSR_TextInline.js CSR_TextString.js CSR_TextArray.js Inline: 'Title':{'View':' '}

Functionality lost with SPD change Requires more JavaScript, but worth the effort Different column types require different handling…

Files to start from for these examples CSR_CondFormatField.js Blog post: JS Link – CSR View Conditional Formatting

Utility use case– Better view usability Columns typically named like database columns and may not be user friendly

Files to start from for these examples CSR_ColumnHeader.js We’ll call this our ‘v1’ solution…

File to start with for this example: CSR_ColumnHeader2.js

Utility use case When building dashboards, may be better user experience to have a specific message, or even action available when the view is empty

Files to start from for these examples CSR_EmptyList.js

User experience When building views or dashboards we try to keep the view clear and concise for users. A link usually means “more info here”. The default Lookup functionality is a little deceiving and usually doesn’t provide much value.

Files to start from for these examples CSR_ClearLookup.js Key is retaining the value of the Lookup field: ctx.CurrentItem.Theme[0].lookupValu e;

Forms, filtered pages, etc. More ‘web-like’ experience for users Direct links to non-standard forms (New, Display, Edit) Reference:

Files to start from for these examples CSR_CustomLinks.js

Utility use case May need the column data in a view (sorting, group by, calculated fields, connected web parts, etc.) but don’t want to display it Uses jQuery

Files to start from for these examples CSR_HideColumn.js Note: Sample template will affect ALL web parts on the page

Improved approach Works with multiple List Views on a page Uses jQuery Simple to use: HideColumnFromWebPart( "WebPartTitle", "Column Display Name") Still executes in PostRender because of timing

File to start with for this example: CSR_Utility.js CSR_HideColumnUtility.js

More control More work

Files to start from for these examples CSR_Item.js

SharePoint Library with sponsor logos Paid field (yes/no) CSR with Item override that outputs all images Combined with PostRender to rotate the images

Files to start from for these examples CSR_AdRotate1.js

Cleaner view Must rebuild the Item as well

Files to start from for these examples CSR_Groups.js

Lookup column link to filtered list view FAQ Add column in PreRender PostRender get external data View Attachments (see blog post) View associated files (in a different library) People properties

HTML CSS JavaScript

CSR is JavaScript JavaScript runs in the browser You have the source code!! Use Visual Studio Code (free) 51,565 lines of fun!

What will you use CSR for? Where should you *not* use CSR?

Blog reference page JS Link targeting web parts

Wes