From ed660c1d8152d9e63081aff1129787734fdab732 Mon Sep 17 00:00:00 2001 From: Jonathan Enzinna Date: Fri, 16 Mar 2012 10:28:40 -0400 Subject: [PATCH] Added Extra Time Sheet Info mashup --- Extra Time Sheet Info/ExtraTimeSheetInfo.cfg | 1 + Extra Time Sheet Info/ExtraTimeSheetInfo.js | 19 +++++++++ Extra Time Sheet Info/README.mkd | 41 ++++++++++++++++++++ README.mkd | 9 +++++ 4 files changed, 70 insertions(+) create mode 100644 Extra Time Sheet Info/ExtraTimeSheetInfo.cfg create mode 100644 Extra Time Sheet Info/ExtraTimeSheetInfo.js create mode 100644 Extra Time Sheet Info/README.mkd diff --git a/Extra Time Sheet Info/ExtraTimeSheetInfo.cfg b/Extra Time Sheet Info/ExtraTimeSheetInfo.cfg new file mode 100644 index 0000000..d576bbb --- /dev/null +++ b/Extra Time Sheet Info/ExtraTimeSheetInfo.cfg @@ -0,0 +1 @@ +Placeholders:Default_TimeSheet diff --git a/Extra Time Sheet Info/ExtraTimeSheetInfo.js b/Extra Time Sheet Info/ExtraTimeSheetInfo.js new file mode 100644 index 0000000..071d3a6 --- /dev/null +++ b/Extra Time Sheet Info/ExtraTimeSheetInfo.js @@ -0,0 +1,19 @@ +tau.mashups.addDependency('libs/jquery/jquery').addMashup( +function (config) { + function extraTimeSheetInfo() {} + extraTimeSheetInfo.prototype = { + render: function () { + $('div#ctl00_mainArea_pnlUpd > table:first').find('tr.dataRow').each(function() { + /* gather IDs */ + var id = $(this).find('td:eq(2) > a:first').attr('href').match(/View\.aspx\?[A-Za-z]+ID=(\d+)/)[1]; + $(this).find('td:eq(2)').prepend('
#'+id+'
'); + }); + }, + } + /* make it happen! */ + $(document).ready(function() { + new extraTimeSheetInfo().render(); + }); + } +) + diff --git a/Extra Time Sheet Info/README.mkd b/Extra Time Sheet Info/README.mkd new file mode 100644 index 0000000..8729718 --- /dev/null +++ b/Extra Time Sheet Info/README.mkd @@ -0,0 +1,41 @@ +Extra Time Sheet Info +===================== + +The Extra Time Sheet Info Mashup is a simple Mashup for [TargetProcess](http://www.targetprocess.com) +that adds more information to the listings in your time sheet. Currently, the Mashup only adds the entity +ID to the row, but can be easily expanded to display more information, such as custom fields. + +[Download the Mashup's ZIP Archive](https://github.com/downloads/TargetProcess/MashupsLibrary/Extra%20Time%20Sheet%20Info.zip) + + +How To Install and Use the Mashup +--------------------------------- + +1. Download the Mashup file either by cloning this repository or + downloading a ZIP. +2. Extract/copy the "Extra Time Sheet Info" folder to your + _/JavaScript/Mashups/_ folder. +3. Sit back and enjoy! + + +Installing the Mashup with TargetProcess OnDemand +------------------------------------------------- + +1. In your OnDemand site, navigate to ```Settings > (System Settings) > Mashups``` +2. Click "Add New Mashup" +3. In the "Name" field, enter a name unique to this Mashup - for example "Link Scrubber" +4. In the "Placeholders" field, enter ```Default_TimeSheet``` +5. Copy and paste the contents of the [Extra Time Sheet Info.js](https://github.com/TargetProcess/MashupsLibrary/raw/master/Extra%20Time%20Sheet%20Info/Extra%20Time%20Sheet%20Info.js) file in the "Code" box. +6. Click Save + + +Troubleshooting +--------------- + +**I don't have a _JavaScript/Mashups/_ folder in my TP install path!** + +1. Make sure that you are running TargetProcess version 2.22 or newer. +2. By default, this folder can be found at _C:\inetpub\wwwroot\TargetProcess2\wwwroot\JavaScript\Mashups_ + + + diff --git a/README.mkd b/README.mkd index 9acde34..7f8cc90 100644 --- a/README.mkd +++ b/README.mkd @@ -122,3 +122,12 @@ The Kanban Board comment count Mashup adds an icon with the current comment count to each of your cards in similar fashion as to the task and bug count icons. [(Download)](https://github.com/downloads/TargetProcess/MashupsLibrary/Kanban%20Board%20Comment%20Counts.zip) + +[**Extra Time Sheet Info**](https://github.com/TargetProcess/MashupsLibrary/tree/master/Extra%20Time%20Sheet%20Info) + +The Extra Time Sheet Info Mashup is a simple Mashup for TargetProcess that adds +more information to the listings in your time sheet. Currently, the Mashup only adds the entity +ID to the row, but can be easily expanded to display more information, such as custom +fields. [(Download)](https://github.com/downloads/TargetProcess/MashupsLibrary/Extra%20Time%20Sheet%20Info.zip) + +