Noah Blumenthal's Blog

September 15, 2008

Windows Sidebar Gadget for Jewish Times

Filed under: Uncategorized — noahblu @ 6:10 pm

Recently, I was looking for a project to flex my Script# (http://projects.nikhilk.net/ScriptSharp/) skills.  I never built a Sidebar Gadget so I figured I\’d try that.  I\’m not very imaginative, but I am a religious Jew so I’ve come up with a Gadget for the Windows Sidebar that displays Halachic times (read: times according to Jewish law) for the current day.  This is my first stab at a Windows Sidebar Gadget and is also my first release (consider this an alpha release) so it may have some bugs, but I’d love for you to try it out and let me know what you think (and what bugs you encounter).

If anyone thinks they have a way of making it look nicer, please let me know.

To use this you’ll have to have Windows Vista (Sidebar is a new feature in Vista), and this currently only works in the USA (you need a zip code).  To start, install the gadget (I guarantee it’s virus free, though I can’t guarantee it will work – you can always uninstall it) and then set your zip code by clicking the little wrench icon that shows up when you hover over it (that’s button that brings up the settings menu and is the same for every gadget).  From there you can input your zip code.

Features:
1)    Pulls times from Chabad.org’s RSS feed
2)    Auto-updates when the new day comes – if you download zmanim on day 1 and your computer is on overnight, it (should) re-download the new day’s zmanim sometime shortly after 12am. I have my doubts as to whether this will work correctly for most people.
3)    Comes in an ugly shade of yellow with very little styling
4)    Lets you know when the last update was
5)    Doesn’t download zmanim more than it has to – less hit to Chabad.org and less use of your precious internet connection this way (I guess that’s not really a feature, but it’s not like this thing does all that much…).

Future Features (I hope to incorporate these sometime in the future):
2)    Give you some control over which times are displayed
3)    Allow 2 sets of displays – one short display and one longer display for the “flyout” version
4)    Give you control over which halachic (read: Jewish law) authority to use (right now I’m using Chabad.org’s rss feed for the times, so I don’t have much control there, but if I can find another rss feed…)
5)    International support
6)    Any other cool things I can think of (or that you suggest 😉

I\’d love to hear what people think.

And now the requisite screen shot:

Now if I can only figure out how to post to the Sidebar Gallery….

UPDATE: LINK

http://gallery.live.com/LiveItemDetail.aspx?li=b27c864b-211b-42f6-bad2-29e63662679b

And wordpress killed that screenshot, I don’t know why — it worked before

September 10, 2008

jQuery Accordion — whitespace issue with list

Filed under: Uncategorized — noahblu @ 6:07 pm
Tags: , ,

Choffi has this cool side-bar navigation using an accordion (the idea was taken mainly from apple’s website which has a similar thing) that’s supposed to look something like:

This is what it should look like

This is what it should look like

I’m using jQuery 1.2.6 and jQuery UI 1.5.2.  Everything looks fine in FF, but when I open it in IE7 it looks really bad (although it works):

What's with all the white space?

Ugggghhhh

After some tinkering, I tracked the issue down to the fact that the Accordion sticks a span element before and after each of my list items (<li>Test</li> becomes <span></span><li>Test</li><span></span>) which is forcing everything down I suppose because my li styles indicate the use of background images.  I just LOVE FireBug (https://addons.mozilla.org/en-US/firefox/addon/1843)

Anyway, I edited the ui.accordion.js file to read:
if (!this.options.disableLeftSpan)
$(“<span class=’ui-accordion-left’/>”).insertBefore(options.headers);
if (!this.options.disableRightSpan)
$(“<span class=’ui-accordion-right’/>”).appendTo(options.headers);

on lines 42-45 — basically I just added an if statement before both the left & right spans are added.  Now I can make my call like so (notice the disableLeftSpan & disableRightSpan):

$(“#nav_accordion”).accordion({
active: false,
event: ‘mouseover’,
fillSpace: true,
disableLeftSpan: true,
disableRightSpan: true
});

and it looks good even in IE7!

I submitted a bug to the jQuery UI team, but until someone integrates these changes, it’s easy to do yourself.

Blog’s finally here

Filed under: Uncategorized — noahblu @ 5:47 pm

So I’ve finally been motivated to put up a blog.  I’ve been stalling for a long time.  I constantly would ask myself, “how often am I really going to post?”  In the past my answer to that question was typically “never”, but recently I’ve been motivated quite frequently.  So here we go…  We’ll see if I can keep it up ;).

The purpose of this blog is to post rants, raves, tips, and reminders to myself that come up in my day to day life as a .NET developer.  I hope some of my future posts will help other developers.

Create a free website or blog at WordPress.com.