Building a Communication Center for your Users – Part 2

featured_buidling_comm_center_pt2

In part 1 of this series, I explained why I approached building a simple sub-site for our content managers. It was simply to bring a better UI experience than what they were expecting within the site contents section. I use this approach to allow our content managers to update three different lists that display information within our main intranet landing page.

news_table_display_building_comm_center_part2The page is currently set up so that an ajax query executes on page load and pulls all of the news list items. These items are displayed in a table. The table consists of a checkbox to select the item, text areas to review or update the text of the item, and a drop-down menu to select whether or not the item is promoted to the top of the page.

At the bottom of the table are the three buttons to Add, Update, or Delete news items. The update and delete buttons both execute JavaScript functions when they are selected. The ‘Add News’ button is tied to a jQuery selector that executes the process of adding a news item. When editing, or deleting, an item, the respective checkbox must be selected or nothing will happen. The checkbox is actually storing the list item’s Id which is then passed to the JavaScript function during the operation. I will get more into the code side of things in the third post.

add_news_item_building_comm_center_pt2To add a news item, the content manager simply clicks on ‘Add News.’ A modal then displays containing all of the appropriate fields to add an item. When the content manager is complete with their item, they simply select the button ‘Add Item’ which, like to update and delete buttons, is tied to an onclick property that executes a JavaScript function adding the news item to the list.

One extra step of functionality that I included in this was the ability to promote this item to the top of the page and then set all of the other items to ‘No.’ This is part of the ‘Add Item’ function and it’s main goal is to ensure that there are no news items that are set so that both are promoted to the top.

In the next post, I will walk through the main pieces of the script and tie all of these pieces together. I will discuss what my thoughts were when I was building the code that makes all of this function.

Need help with SharePoint? Feel free to contact me.

Have a bigger project? Check out my company, UDig, LLC.