SharePoint driven rich text dashboard using jqueryui.


I had a task to update a dashboard created by another developer.  The functionality was
  • Groupings of buttons on the page with multiple colors
  • When clicked, the button opens a dialog window which displays either rich text or a webpage
  • There are up to three optional buttons at the bottom of the rich text.
  • When one of the optional buttons is clicked, you either see more rich text in another dialog, a webpage content in the dialog, or a link to a new page in a new tab

The previous developer wrote this in HTML and javascript using jqueryui to generate some nice looking in-page dialog boxes.  My goal was to make this content driven by a SharePoint list so the end user could maintain the dashboard.

I created a list with the following fields
I added descriptions to make it easier to understand.  The new entry form (below) is out of the box SharePoint with no InfoPath customization. Title must be unique, and section is limited to whole numbers 1-10.  The color choices are case sensitive and must match the CSS [black, red, orange, green, blue].  The Optional Button choices are also case sensitive and must match the javascript [Off, Link, Text, Link - New Window]





The Javascript file can be seen here.
The CSS file can be seen here.

That code will add to divs by name (case sensitive as well).  I suggest even these be in separate files and add a content editor web part for each one:

<div id="divregion" align="center"></div>
<div id="Section_1" align="center"></div>
<div id="Section_2"></div>
<div id="Section_3"></div>
<div id="Section_4"></div>
<div id="Section_5"></div>
<div id="Section_6"></div>
<div id="Section_7"></div>
<div id="Section_8"></div>
<div id="Section_9"></div>
<div id="Section_10"></div>

The last step is to add everything to a web part page.  Pick one that gives you a good looking layout.  I used the first option [header, three columns, footer]. The page has 13 Content editor Web Parts, and each one links to a file in the siteassets.

If you found this useful, please add comments below



Comments

Popular posts from this blog

Setting SharePoint announcements to auto delete after expiration

Updating a single field in a SharePoint List using Power Automate Flows

SharePoint driven rich text dashboard using jqueryui. (JQuery file)