Archive for June, 2009

jQuery and jCarousel in SharePoint

Posted in Sharepoint Server, Windows Sharepoint Services, jQuery on June 24th, 2009 by Alonso Robles – Be the first to comment

I recently had to integrate jCarousel into a SharePoint web part. Since jCarousel is a plugin for jQuery, it means I also had to get jQuery integrated with SharePoint. In order to accomplish this, I followed some good feature packaging instructions found from a few different blog posts:

After figuring out how to package jCarousel and jQuery using SharePoint delegate controls, I was ready for business with the implementation of the web part.

The web part itself was nothing fancy. I used a Repeater control to generate the list item (LI) elements with the content I needed in the carousel. I wrapped the Repeater in an unordered list (UL) which was wrapped in a DIV tag that had the runat attribute set to server. So basically, I just followed the mark up instructions provided in the jCarousel documentation.

The wrapping DIV tag was used in my webpart code to initialize jCarousel. The code snippet below shows how I implemented it:


protected override void OnLoad(EventArgs e)
{
  if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType(), this.ClientID))
  {
    Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, @"
      <script type=""text/javascript"">
        jQuery(document).ready(function() {
          jQuery('#" + carouselDiv.ClientID + @"').jcarousel({
            // Configuration goes here
            vertical: true,
            scroll: 2,
            visible: 4
          });
        });
      </script>
    ");
  }
}

Installing Rails 2.3.2 on Mac OS X 10.5

Posted in Ruby on Rails, Web Development on June 23rd, 2009 by Alonso Robles – Be the first to comment

Recently, I needed to update my local installation of Ruby and Rails to versions 1.8.7 and 2.3.2 respectively on an iMac at home. I am bit rusty on some of my *nix skills since I have been working in predominantly Microsoft based environment for a significant amount of time. Thankfully, I found a great step-by-step how-to blog post that walked me through the process flawlessly.

Rails Resources

Posted in Ruby on Rails on June 19th, 2009 by Alonso Robles – Be the first to comment

Sometimes, I have a bit of free time. Over the last few months, I have spent a few moments on some old projects of mine that have been essentially abandoned. These projects (which I may mention at some later date since they are not complete at this time) use some open source technologies since I can’t afford to personally purchase licensing for most of the technologies that I use professionally. In any case, I have spent some time getting reacquainted with Ruby on Rails. During this learning journey, I have come across a plethora of information (some good, some bad) that have helped me get familiar with this technology again. And now I will share these resources with you…

  • Ruby on Rails – The official web site has tons of goodies such as downloads, documentation, guides. This is a great place to get started.
  • Railscasts – The best source I found with free Ruby on Rails screen-casts.

The Vendor Client Relationship

Posted in Other Tidbits on June 10th, 2009 by Alonso Robles – Be the first to comment

A colleauge of mine recently pointed me to this video and it is great. The funny thing is I can relate to it from both ends. As a consultant, I usualy play the role of a vendor. However, out side of work I am usually a client. Either way, it’s a fun video to watch and it’s work safe. Enjoy!