SharePoint – Dynamic Webparts driven from other SP Lists

Posted in Tech on March 6, 2010 by gkerswell

Problem – The need to build report pages that won’t change in design, but are controlled by other SP Lists.

Here is my solution – I used a few Content Editor Web Parts to make the changes to the UI along with the corresponding dataview webparts that are Xml/Xslt based to drive the content from a SharePoint list to the report page.

Each of these are slightly different…Exceptions web part expands and collapses like the others, the content is driven from a list to display a file in the report library with custom tags and text that determine the location, the alt properties and title of the link.

The volumes container like the others expand and collapse. The content is a collection of dataviews that display the count of records in the webpart, then the link and image are dynamically generate by a seperate SP List.

Another sample with dynamic content.

Advertisements

SharePoint – Modal window

Posted in Tech on March 6, 2010 by gkerswell

Problem – The need to display dynamic help or a key legend to reporting pages that displays the description  of the key terms used on that given page.

Here is my solution – I used a Content Editor Web Part to make the changes to the UI while rendering a filtered dataview webpart that gets the content from a SharePoint list.

SharePoint – JavaScript – Toggle Webparts

Posted in Tech on March 2, 2010 by gkerswell

Problem – The need to display expand and collapse web parts by the link (that displays the title of the webpart). 

Here is my solution.  To complete this I used a Content Editor Web Part to change the functionality or the Title link.  Here is the code to toggle the images.

function WPToggle(thisId, ImageId)
        {
        if (document.getElementById(thisId).style.display==”none”)
        {
        document.getElementById(thisId).style.display=””;
        document.getElementById(ImageId).src = “/_layouts/images/minus.gif”;
        }
        else
        {
        document.getElementById(thisId).style.display=”none”;
        document.getElementById(ImageId).src = “/_layouts/images/plus.gif”;
        }
        }
         
        function ExpandCollapseBody()
        {
        var i = 1;
        var WPid = “WebPartWPQ20” ;
        var WPtitleid = “WebPartTitleWPQ20” ;
        var Toggleid = “ToggleImage20” ;
        do
        {
        try
        {
        document.getElementById(WPtitleid).innerHTML = ‘<IMG id=”‘ + Toggleid + ‘” onClick=”WPToggle(\” + WPid + ‘\’,\” + Toggleid + ‘\’)” alt=”Expand/Collapse” src=”/_layouts/images/minus.gif” />&nbsp;<a href=”#” onClick=”WPToggle(\” + WPid + ‘\’,\” + Toggleid + ‘\’)” alt=”Expand/Collapse” style=”font-size:xx-small; font-weight:bold; color:navy;”>’ + document.getElementById(WPtitleid).title + ‘</a>’;

        if (document.getElementById(WPid).style.display==”none”)
        {
        document.getElementById(Toggleid).src = “/_layouts/images/plus.gif”;
        }
        }
        catch(err) {}
        i = i + 1;
        WPid = “WebPartWPQ” + i ;
        WPtitleid = “WebPartTitleWPQ” + i;
        Toggleid = “ToggleImage” + i;
        } while (i <= 22)
        }
         
        _spBodyOnLoadFunctionNames.push(“ExpandCollapseBody()”);
        </script>
Here is the result with web parts 20 to 22 modified.

SharePoint – JQuery

Posted in Tech on March 2, 2010 by gkerswell

Problem – The need to display webparts or summarys from webparts and want to be able to dynamically change the background color, text color, ordering of items. 

Here is my solution.  To complete this I used a SharePoint list as a “Controller” (dataview web part), and a Content Editor Web Part(to render the results from the dataview).

Add a dataview to the  page, you can set the columns of data that you want to display.  Please note that you also have to display the properties of columns that you want to manipulate.

Here is the link to the code for rendoring of the slider tab.

http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_slide_toggle

Enjoy!!

Mobile Organiztion

Posted in Tech on December 3, 2009 by gkerswell

Ok, I thought I would ask for input on how the masses (you all) organize your phone apps.

What categories would you group by?

Communication
Games
Search
Local interests

Let me know post your comments or send me your emails.

Hockey Update

Posted in Sports on July 1, 2009 by gkerswell

Ok, it been a while since my last post. As I had mentioned I was planning to take a short break and then start some training, however that all changed when I found out that I had blown out my acl near then end of the season and literally limped to the finish line.

I needed surgery and had that at the end of may (28th). I have been working hard on the rehab and the doctors say it will take 9 months to a year for recovery. I am hoping that I can push it and be back by December at least.

Besides the hockey, I added a member to my family, Charlie (my new 2 year old dog). I have also completed my deck project and picked up my grill.

I will try to keep you all posted better.

Hockey Wrap

Posted in Sports on April 28, 2009 by gkerswell

Ok, so the two main seasons have ended.  All in all, I played in about 60 regular season games and just over a dozen playoff games and the all-star game at the Q.  I finished at just over 2 points per game on average, which was a great start coming back to the game after not skating for 17 years.  I was also surprised that my goal scoring was alot higher then I expected.  In the past I would assist on goals more then scoring and this year my assist were alot lower but I did manage to average more then 1 goal per game.  Next year I will focus more on the assists.

I was also the scoring leader on my teams, which is nice but I would prefer to play with stronger players and have more of a balance.  I will be off most of this month before starting to gear up and make plans for summer training and finding ice in prep for a tournament in Nashville in the begginning of August.

Happy Hockey to all…..