Thursday, December 17, 2009

Windows 7 - Change theme font properties

Just a quick tip: If you want to change your desktop/theme font, you are looking for the old windows properties tab. You can easily get this on the screen by opening a Run dialog box (Windows + R keys) and then type Control Color and hit enter to directly open Window Color and Appearance box.

Tuesday, December 15, 2009

Terminating XMBC remotely on Ubuntu

Last few weeks I have been testing XMBC 9.11 Alpha/Beta on my Ubuntu Media system. Personally I think it is the best Media manager/player ever :).. But due to the fact it is still a beta release, the application sometimes does not respond or hangs and completely blocks the system.

The easies way to kill it and free your system without a reboot, is just open putty.exe and login remotely to your ubuntu system and issue the following command:

killall -9 xbmc.bin

This will terminate XBMC and will free your system. In my case I just restart XBMC :)

Merging items with same title in gantt view in Sharepoint

Today, got a challenge with Sharepoint where a user wanted to see multiple entries in a gannt view in Sharepoint. Below is the jquery magic you can use in a CEWP.

function docready() {

var row = [];
var ix=0;



$('tr.ms-ganttTaskRow th').each(
  function() {
    row[ix] = $(this).parent();
    ix++;
  }
);


ix=0;
for(ix=1; ix< row.length; ix++){
   var $prevrow = row[ix].prev();
   var prevtxt = $prevrow.find('th').text();
   var curtxt  = row[ix].find('th').text();
   if (prevtxt == curtxt) {
     var colix =0;
     row[ix].find('td').each(
       function() {
         var ht = $(this).html();
         if (ht.length > 0){
           $prevrow.find('td:eq('+colix+')').html(ht);
         }
         colix++;
       }
     );
     row[ix].remove();
   }
}

}

_spBodyOnLoadFunctionNames.push("docready");


Explanation of the code:

  1. Trigger the docready on load
  2. Store all the rows in an jquery array for easy processing
  3. Walk through the rows array starting from second item and match the row header with previous row, if so, copy the contents of the columns to the row above and remove after processed.
There is only one catch, the gantt view needs to be sorted on the row header column.