Pinning attachments

I was working one day and I used the attachment viewer to view a PDF a colleague had sent me.   Not realizing what I was doing, I switched back to the inbox to see what new email had come on. Guess what, the PDF disappears and a new selection was selected – I totally lost my place in the PDF. Doh..I just thought of a new cool feature!

I thought, how cool would it be if I could “pin” the attachment in the viewer so as long as its pinned the selected attachment never changes. This would allow me to navigate across many different documents and views and never lose the PDF I am reading. This was actually a dead simple feature and I hope to get this out on OpenNTF soon. I would be interested to hear if you think this is a good feature or not.

The pinning function is in the form of an icon that is put to the right of the page.  I just add a new boolean variable to the page and show the icons relative to its value:

function constructPin(){
 var headerArea = document.getElementById("header");

 if (_pinned){
      headerArea.innerHTML = "<img style="float: right;" title="Un-pin Attachment" src='icons/pinned-down.png' onClick="togglePin();"></img>";
 }else{
      headerArea.innerHTML = "<img style="float: right;" title="Pin Attachment" src='icons/pinned-up.png' onClick="togglePin();"></img>";
 }
}

The result is a clickable icon that toggles whether the current selection is pinned or not:

Pin Attachment

Unpin Attachment

Go ahead and install the following widget into your Notes client.  If you are not familiar with how to install the widget with the “extension.xml” below you can watch this video I posted that shows how to enable widgets and install the viewer.

Any and all feedback is greatly appreciated!

3 thoughts on “Pinning attachments

  1. Pingback: New Attachment Viewer posted! » Balfes.net

  2. Bob, FYI, I’ve experienced several problems installing the attachment viewer widget from the openntf.org. So, every time I must install the widget, I go to my delicious.com account and point to this post for install the widget succesfully.

    Regards, Albert.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s