Skip to main content

Project Server Help Blog

Go Search
Project Server Help Blog
Project Server Experts Community
MSProjectExperts
Training Schedule
Contact Us
  

Project Server Help Blog > Categories
Project Server 2007 Hack -- Sticky My Tasks Header Row

If the PWA 'My Tasks' page has more than a few tasks to display, the system forces you to scroll the data grid downward to view all of your tasks:

 

However, when you scroll downward, the column headings such as 'Task Name', 'Start', 'Finish', and 'Progress' scroll upward with the rest of the data in the table, making it easy to confuse the data in the columns:

 

To force the top (header) row in the 'My Tasks' web part to "stick" to the top while scrolling through tasks, follow these simple steps...

NOTE: You must be a Project Server administrator in order to implement this hack; if you are not, then please contact your local friendly Project Server admin!

1. Visit the PWA 'My Tasks' page and select Site Actions > Edit Page in the upper right corner of the page:

 

2. With the 'My Tasks' page in editing mode, click the 'Add a Web Part' bar that spans the top of the 'Main' web part zone:

 

3. In the 'Add Web Parts' dialog, scroll down the list of available web parts, select the 'Content Editor Web Part', then click the 'Add' button:

 

4. After the system adds the 'Content Editor Web Part' to the top of the 'Main' web part zone, click the 'open the tool pane' link within the web part:

 

5. In the 'Content Editor Web Part' panel that appears on the right side of the screen, click the 'Source Editor...' button:

 

6. In the 'Text Entry' dialog, enter the following text, then click the 'Save' button:

 

<style type="text/css">

tr.XmlGridTitleRow

{

top: expression(offsetParent.scrollTop);

left: -1px;

position:relative;

}

</style>

 

 

 

7. In the 'Content Editor Web Part' panel, expand the 'Appearance' section by clicking the [+] button, enter a 'Title' such as 'Sticky My Tasks WP Header', select 'None' from the 'Chrome Type' pick list, then click the 'OK' button:

 

8. If desired, rearrange the web parts on the page such that the new web part is located below the 'My Tasks' web part (this will prevent a white space above the 'My Tasks' web part), then click the 'Exit Edit Mode' link in the upper right corner of the page:

 

9. Rejoice as you scroll the list of tasks and find that the header row "sticks" to the top of the web part!

 

Good luck!

 

Project Server Trick -- Add Process Instructions to the New Issue and New Risk Forms

As I mentioned in my previous post, 'Hacking PWA with Web Parts' (http://www.projectserverhelp.com/Lists/Posts/Post.aspx?ID=7), many pages in PWA and in the Project Workspaces are web part pages, and you can manipulate them easily through your web browser. You can add, remove, and rearrange web parts on these pages quite easily without any programming. You can usually identify the editable web part pages quite easily by simply pulling open the 'Site Actions' menu located near the upper right corner of a page; editable web part pages show the 'Edit Page' option under the 'Site Actions' menu:

 

However, if you pull open the 'Site Actions' menu on any of the 'New Item' pages in a Project Workspace, such as the new Risk form shown here, you see that the menu has no 'Edit Page' option:

 

The 'New Item' pages in a Project Workspace are in fact editable web part pages, but we need to perform a javascript trick in order to switch the page into edit mode.

While displaying a 'New Item' page in your web browser, enter the following directly into the web browser address bar, then hit the [Enter] key...

javascript:MSOLayout_ToggleLayoutMode()

...and voila, the javascript switches the page into edit mode!

 

You can now add any web parts you like to the 'New Item' page, such as a Content Editor Web Part (or CEWP... one of my favorites!) to display process information or instructions for logging a new project risk:

 

When you are finished manipulating the page, click the 'Exit Edit Mode' link in the upper right corner of the page, located immediately below the 'Site Actions' menu:

 

You will then see your beautifully re-crafted 'New Item' page... ready for use:

 

For more information about how to add, remove, or rearrange web parts on a web part page, see my previous post, 'Hacking PWA with Web Parts' (http://www.projectserverhelp.com/Lists/Posts/Post.aspx?ID=7).

Good luck!

How to Delete a Project Workspace Site Template from Project Server 2007

As mentioned in my previous post, "Illustrated Guide to Updating the Project Server 2007 Workspace Template" (http://www.projectserverhelp.com/Lists/Posts/Post.aspx?ID=21), you may choose to tweak the site template that is used to generate new Project Workspaces based on your business process needs (implementing new functionality, changing existing functionality, etc.), then register that new template for use with Project Server 2007. Over time, however, you may need to update the site template numerous times, and each time you update the Project Workspace site template and register it with Project Server, it appears in the list of available templates on the PWA Project Workspace Provisioning Settings page:

 

To clean the old, washed-up site templates out of the list, perform the following steps:

NOTE: You will need to log directly on to the Project Server to perform these steps (i.e. with Remote Desktop Connection software).

 

1. Log directly on to the Project Server machine and open a command prompt window:

Start > Run > cmd > OK

 

2. From the command prompt, navigate to the "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN" directory:

 

3. From the command prompt, execute the following STSADM command, replacing the title of the template (shown here as "Custom Project Workspace 01") with the title of your template to be deleted:

stsadm -o deletetemplate -t "Custom Project Workspace 01"

 

The following message should be displayed:

Operation completed successfully.

IIS must be restarted before this change will take effect. To restart IIS, open a command prompt window and type iisreset.

 

4. Repeat the STSADM deletetemplate command for each Project Workspace template that you would like to remove from the system, then execute an iisreset from the command prompt.

iisreset

 

The following message should be displayed:

Attempting to stop...

Internet services successfully stopped

Attempting to start...

Internet services successfully restarted

 

If you return to the PWA Project Workspace Provisioning Settings page (PWA > Server Settings > Project Workspace Provisioning Settings) and pull open the Default Project Workspace Template drop-down list, you should no longer see the templates that you removed using the STSADM command:

 

Good luck!

Monitor Your Project Server Investment by Measuring Project Web Access Traffic and Usage

When it comes to implementing Project Server, many would agree that installing and configuring the tool is the easy part; the hard part comes when you try to 'motivate' everyone in the organization to use the system properly and consistently. Although forcing some people to log their task progress or view the online reports that you spent hours building can be an exercise in futility, at least we can monitor usage patterns to get some insight into who IS using the system and which features or reports / views they are using on a regular basis.

This technique is for PWA only and will not allow you to see Project Professional usage, and it will not allow you to see ALL areas of PWA that people are accessing. Although this technique is limited to monitoring usage of any PWA web part page that is editable via the web browser, it does not require any direct server-level access to implement. Here's how it works:

  • Create a somewhat hidden custom SharePoint list ('traffic log') within the PWA web site to track page visits.
  • Switch one or more PWA pages into edit mode and drop some javascript into a Content Editor Web Part (CEWP); the javascript will grab the page's address whenever the page is visited and create a new entry in the 'traffic log' list.

That's it... nothing to it! Let's get started...

 

Create the Traffic Log

1. Visit PWA and select Site Actions > Create:

 

2. On the Create page, select Custom List:

 

3. On the New page, enter a Name for the list (such as trafficlog), select No for Display this list on the Quick Launch, then click the Create button:

 

4. On the trafficlog page, select Settings > List Settings:

 

5. On the Customize trafficlog page, in the Columns section, select the Title column:

 

6. On the Change Column page, change the Column name to page, then click the OK button:

 

7. On the Customize trafficlog page, scroll down to the Views section and click the All Items view:

 

8. On the Edit View page, select the Display check box next to the Created and Created By columns, then click the OK button:

 

Add Javascript to Pages for Tracking (Using PWA Home Page as Example)

1. Visit the desired PWA page (the PWA Home page, in this example) and select Site Actions > Edit Page:

 

2. With the page in edit mode, click the orange Add a Web Part bar that spans the entire width of the Header web part zone above the Reminders web part:

 

3. In the Add Web Parts to Header dialog, scroll down to the Miscellaneous section, select the Content Editor Web Part, then click the Add button:

 

4. With the CEWP on the page, open the edit menu (located in the upper right corner of the new web part) and select Modify Shared Web Part:

 

5. In the newly-opened Content Editor Web Part panel on the right side of the page, click the Source Editor... button:

 

6. In the Text Entry dialog box, paste the following javascript, then click the Save button:

 

//********** START COPY JAVASCRIPT BELOW THIS LINE **********

<script language="javascript">

function PostToTrafficLog()

{

var siteurl = "http://yourprojectserver/pwa";

var trafficlogname = "trafficlog";

try

{

wsURL = siteurl + "/_vti_bin/Lists.asmx";

//SOAP Action and XML

var wsSoapAction = "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems";

var wsXML = '<?xml version="1.0" encoding="utf-8"?>';

wsXML += '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ';

wsXML += 'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ';

wsXML += 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';

wsXML += '<soap:Body>';

wsXML += '<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">';

wsXML += '<listName>' + trafficlogname + '</listName>';

wsXML += '<updates>';

wsXML += '<Batch OnError="Continue" ListVersion="1">';

wsXML += '<Method ID="1" Cmd="New">';

wsXML += '<Field Name="ID">New</Field>';

wsXML += '<Field Name="Title">'+ window.location.href + '</Field>';

wsXML += '</Method>';

wsXML += '</Batch>';

wsXML += '</updates>';

wsXML += '</UpdateListItems>';

wsXML += '</soap:Body>';

wsXML += '</soap:Envelope>';

//Create XML Document and get HTTP response using XMLHTTP object

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");

var httpResponse = getServiceResults(wsURL, wsSoapAction, wsXML);

}

catch(Exception)

{

// Suppress any excess script errors to avoid user confusion.

}

}

function getServiceResults(url, soap, xml) {

//Send XML packet to web service and return HTTP response text

try {

if (xml.length > 0) {

xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");

xmlHttp.open("POST", url, false);

xmlHttp.setRequestHeader("SOAPAction", soap);

xmlHttp.setRequestHeader("Content-Type", "text/xml");

xmlHttp.send(xml);

if (parseInt(xmlHttp.status) == 404) {

return 404;

}

else {

return xmlHttp.responseText;

}

}

}

catch(e) {

alert(e.message);

}

}

PostToTrafficLog();

</script>

//********** END COPY JAVASCRIPT ABOVE THIS LINE **********

 

NOTE: You will need to change the following two values in the javascript, located on lines 4 and 5:

var siteurl = "http://yourprojectserver/pwa";

var trafficlogname = "trafficlog";

siteurl is the URL of your PWA site, and trafficlogname is the name of the custom traffic log list that you created previously. Update the values between the quotation marks to reflect your system.

 

7. In the Content Editor Web Part panel, expand the Appearance section, then enter a Title for the CEWP (such as Traffic Logger) and select None for Chrome Type (you may need to scroll the panel downward) and click the OK button:

 

8. Select Exit Edit Mode in the upper right corner of the page:

 

Repeat steps 1-8 in this section for every PWA page that you would like to monitor.

 

View the Traffic Log

If you chose to hide the trafficlog list from the Quick Launch menu, there is no direct way to access it; here is one option:

1. Click on the Documents heading in the PWA Quick Launch menu:

 

2. On the All Site Content page, click View All Site Content at the top of the Quick Launch menu:

 

3. On the All Site Content page, click trafficlog, located below the Lists heading:

 

Each time someone visits a PWA with the javascript tracking code, a new entry will be added to the trafficlog list:

 

Pages That Will Accept the Tracking Code Easily

Not all PWA pages are editable within the web browser; here are a few pages that are:

  • Home
  • My Work (tabbed Tasks, Timesheet, and Schedule page)
  • My Tasks
  • My Timesheet (not My Timesheets!)
  • Project Center
  • Resource Center
  • Resource Assignments
  • Data Analysis
  • Task Updates Approvals
  • Administrative Time Approvals
  • My Queued Jobs

 

Extra Credit

You may also notice that the Project Details page (ProjectDrillDown.aspx) is not editable out of the box; however, if you are careful and if you have direct access to the Project Server, you can make the page editable by using the information posted in Brian Smith's blog post here:

http://blogs.msdn.com/brismith/archive/2008/11/24/project-server-2007-where-did-my-web-part-go.aspx

If you DO choose to add the tracking code to the Project Details page, I would advise you to immediately remove the ability to edit the page after you are done.

Happy hacking!

Project Workspace Hack -- Prevent Users From Reversing Deliverable Start and Deliverable Finish Dates

When using the Deliverables feature in Project Professional 2007, the tool prevents us from creating a deliverable that has a finish date that is prior to its start date:

 

However, when creating or editing a deliverable directly in the Project Workspace Deliverables list, there is no such validation. Fortunately for us, this is easily remedied with a little SharePoint trickery, our good friend the Content Editor Web Part (CEWP), and a little javascript. To prevent users from reversing the Deliverable Start and Deliverable Finish dates when creating deliverables (via the new deliverable page / form) or editing deliverables (via the edit deliverable page / form) in the Project Workspace, follow these steps:

1. Visit the Project Workspace.

 

2. Open the new deliverable page / form by visiting the following URL:

http://servername/pwainstancename/projectworkspacename/Lists/Deliverables/NewForm.aspx

(You will need to replace "servername", "pwainstancename", and "projectworkspacename" with your own values.)

 

3. On the 'Deliverables: New Item' page, we need to switch the page into editing mode; however, unlike other web part pages in SharePoint, the 'Site Actions' menu (upper right corner of the page) does not give us the option to edit this page. To force the page into editing mode, add the following to the end of the page URL in the web browser:

?PageView=Shared&ToolPaneView=2

 

4. With the page in editing mode, in the 'Add Web Parts' control panel, browse through the web parts list, locate the Content Editor Web Part (CEWP), and add it to the 'Main' web part zone in the page.

Note: You may need to page through the listed web parts to locate the CEWP.

 

5. In the upper right corner of the newly added CEWP, select 'Edit' > 'Modify Shared Web Part'.

 

6. In the CEWP control panel, click the 'Source Editor' button:

 

7. Paste the following javascript into the 'Text Entry' dialog box, then click the 'Save' button:

<script type=text/javascript>

function getTagFromIdentifierAndTitle(tagName, identifier, title){

var len = identifier.length;

var tags = document.getElementsByTagName(tagName);

for (var i=0; i < tags.length; i++) {

var tempString = tags[i].id;

if (tags[i].title == title && (identifier == "" || tempString.indexOf(identifier) == tempString.length - len)){

return tags[i];

}

}

return null;

}

function PreSaveAction()

{

var date1 = getTagFromIdentifierAndTitle("INPUT","DateTimeFieldDate","Deliverable Start");

var date2 = getTagFromIdentifierAndTitle("INPUT","DateTimeFieldDate","Deliverable Finish");

var arrDate1 = date1.value.split("/");

var useDate1 = new Date(arrDate1[2], arrDate1[1]-1, arrDate1[0]);

var arrDate2 = date2.value.split("/");

var useDate2 = new Date(arrDate2[2], arrDate2[1]-1, arrDate2[0]);

if(useDate1 > useDate2){

alert("The deliverable finish date occurs before the start date.");

return false; // Cancel the item save process

}

return true; // OK to proceed with the save item

}

</script>

 

7. Click the 'OK' button at the bottom of the CEWP control panel.

 

8. Open the edit deliverable page / form by visiting the following URL:

http://servername/pwainstancename/projectworkspacename/Lists/Deliverables/EditForm.aspx

(You will need to replace "servername", "pwainstancename", and "projectworkspacename" with your own values.)

Note: The title of this page ('Deliverables: New Item') is a bit misleading!

 

9. On the 'Deliverables: New Item' page, we need to switch the page into editing mode; however, unlike other web part pages in SharePoint, the 'Site Actions' menu (upper right corner of the page) does not give us the option to edit this page. To force the page into editing mode, add the following to the end of the page URL in the web browser:

?PageView=Shared&ToolPaneView=2

 

10. With the page in editing mode, in the 'Add Web Parts' control panel, browse through the web parts list, locate the Content Editor Web Part (CEWP), and add it to the 'Main' web part zone in the page.

Note: You may need to page through the listed web parts to locate the CEWP.

 

11. In the upper right corner of the newly added CEWP, select 'Edit' > 'Modify Shared Web Part'.

 

12. In the CEWP control panel, click the 'Source Editor' button:

 

13. Paste the previously listed javascript into the 'Text Entry' dialog box, then click the 'Save' button:

 

14. Click the 'OK' button at the bottom of the CEWP control panel:

 

Now when users attempt to create a new deliverable (on the NewForm.aspx page) in the Project Workspace with a Deliverable Finish date that precedes the Deliverable Start date, the page will display the following message and prevent the new deliverable from being saved:

 

Also, since we added the same validation code to the EditForm.aspx page, when someone attempts to edit an existing deliverable and place the finish prior to the start, the same message is displayed.

Note: This will only prevent reversed deliverable start and finish dates in a single Project Workspace. If you would like to add this validation to all subsequent workspaces that are created in your Project Server, you will need to update the Project Workspace template. To learn how this is done, read my previous article on the topic, 'Illustrated Guide to Updating the Project Server 2007 Workspace Template':

http://www.projectserverhelp.com/Lists/Posts/Post.aspx?ID=21

Happy hacking!

Who Said There’s no Free Quick Launch? New Custom Web Parts for Project Server 2007 Released Including a Very Cool Freebie

Yesterday we released a bunch of new web parts for Project Server 2007 including the first in our series for the My Timesheet page and a new Quick Launch Toggle web part that you can obtain for free just by downloading our trial versions. For the My Timesheet page, we released the following:

My Timesheet Tamer: Allows you to control many aspects of the grid display such as relabeling any field name in the grid, changing the Page Header, relabeling buttons, setting justification to the left and hiding planned work rows. The ability to hide the planned work rows allows you to compact the display significantly, which makes time entry much easier.

My Timesheet Totals: Displays totals by day, by week and by project without having to click the Recalculate button. While the My Timesheet page does display daily totals, as well as a total for the entire period, it doesn't sum these up by project and administrative time. The My Timesheet Totals web part updates as you make your entries giving you instant feedback and doesn't require page reloads, and we designed this to be printer friendly for users who want or must have a printed summary.

We're also working on a version of our constant filter web part for the My Timesheet page, which should be ready soon. This web part allows you to filter out assignments the same way the My Tasks version works. Finally, we also introduced a new web part for the My Tasks page:

My Tasks Not New: A hidden web part that removes the New Task icon from the grid display in the My Tasks page. Now that we've eliminated the need for users to visit the Assignment Details page with our web parts for My Tasks, users wanted a way to remove the new task icon without having to drill down on each task. This new web part gets this nuisance out of your way simply by adding it to the page.

Finally, we released a very cool and totally free web part called the Quick Launch Toggle. The QL Toggle can be added to any SharePoint, MOSS or Project Server page to allow users to collapse the Quick Launch menu. This is superb for pages with grid displays like the Project Center, Resource Center, My Tasks and My Timesheet. The toggle web part allows you to reclaim valuable display real estate, which is particularly important for users with laptops or screens that support only 10 X 7 or slightly higher resolutions. It's also great when you're presenting Project Server screens on a projector. I'll be using it for all my demos!

Find both trial versions and full versions in our web store

Display the My Tasks page as a Folder in Microsoft Office Outlook 2007

In Project Server 2003, Microsoft offered users two ways to display tasks from the PWA View My Tasks page in Microsoft Office Outlook. These two ways included:

  • Install the Project Server 2003 Add-In for Outlook, which allowed users to see their PWA tasks on the Outlook calendar as appointments.
  • Display the View My Tasks page as a folder inside of Outlook.

In Project Server 2007, Microsoft retained the first option and expanded it, allowing users to display PWA tasks as appointments in their Outlook calendar or as To-Do List items in the Tasks page in Outlook. Microsoft eliminated the second option, although many users believed that this option was the more "user friendly" of the two. The good news is that this option is not eliminated entirely; however, users must manually create a new Outlook folder and "point" the folder at the My Tasks page in PWA.

To add a folder in Microsoft Office Outlook that displays the My Tasks page from PWA, users must complete the following steps:

1.  Launch the Internet Explorer application and navigate to the Project Web Access home page.

2.  Click the My Tasks link in the Quick Launch menu.

3.  In the Address Bar, select the URL for the My Tasks page and press Control + C to copy the URL to the Windows Clipboard.

4.  Close the Internet Explorer application.

5.  Launch Microsoft Office Outlook 2007, if not already open.

6.  Click File > New > Folder.

The system displays the Create New Folder dialog shown in Figure 1.

Figure 1: Create New Folder dialog

7.  In the Create New Folder dialog, enter a name for the folder, such as PWA My Tasks.

8.  Click the OK button to create the new folder.

9.  Right-click on the new folder and then select the Properties item on the shortcut menu.

The system displays the Properties dialog shown in Figure 2.

Figure 2: Properties dialog for
the new Outlook folder

10.  In the Properties dialog, select the Home Page tab.

11.  Click in the Address field and then press Control + V to paste the URL of the My Tasks page from PWA.

12.  At the end of the URL text, add the following text information (do not add a space after the URL):

?SimpleUI=15

13.  Select the Show home page by default for this folder option at the top of the Home Page tab in the Properties dialog.

Figure 3 shows the completed information on the Home Page tab of the Properties dialog.

Figure 3: Completed information
in the Properties dialog

14.  Click the OK button.

The system refreshes the information shown in the new PWA My Tasks folder and now displays the My Tasks page from Project Web Access, such as shown in Figure 4. Notice in Figure 4 that the system removed all of the header information at the top of the My Tasks page, along with the Quick Launch menu, as a result of entering the ?SimpleUI=15 text string in the URL for the folder. By doing this, I can now see more of the My Tasks page, making it easier for me to enter and update task progress in the PWA My Tasks page inside of Microsoft Outlook.

NOTE: If you use Microsoft Office Outlook 2003, the steps are similar to those documented in this Help blog.

Figure 4: My Tasks page display in an Outlook folder

Update for Project Server SP2 Fixes Expiration Date Bug
The Microsoft SharePoint team has released an update for the Office Servers (including Project Server 2007) Service Pack 2 (SP2), fixing the expiration date bug as mentioned here:
 
 
When applying SP2 for Project Server 2007, an expiration date is improperly activated, thus causing the product to lock users out of the system after a trial period has elapsed.
 
As stated on the Microsoft SharePoint Team Blog, Project Server 2007 users can download an update (patch) which will resolve this issue; the update can be applied before or after SP2 is applied to your Project Server 2007 environment:
 
 
To visit the original Microsoft KnowledgeBase (KB) article and review the details of the issue, as well as download the SP2 update:
 
 
According to the SharePoint team blog post, they plan to update the SP2 download package with the bug fix in the next 4-6 weeks.
 
What is your experience with this issue, as well as any other issues with SP2? Please share by leaving a comment.
 
Good luck!
 
Need to Re-Enter License Key After Upgrade to SharePoint and Project Server 2007 SP2
Per Christophe Fiessinger's blog, an issue has emerged within the SharePoint and Project Server 2007 Service Pack 2 update; after applying the SP2 upgrade, a 180-day expiration date will be in effect:
 
 
If the software is allowed to expire, people will no longer be able to log in and use the system, but the system configuration and the user data stored in the system will not be lost.
 
Brian Smith has published a simple work-around which involves visiting the SharePoint Central Administration web site and re-entering the license key, thus disabling the software expiration:
 
 
According to a post on the SharePoint team blog, they are working on a hotfix to automatically fix the issue:
 
 
Also according to the SharePoint team, the product license key will only need to be entered once for the entire SharePoint farm, and it does not affect any of the other normal functionality of the system.
 
The following products are affected by the SP2 product key issue:
  • Project Server 2007
  • Office SharePoint Server 2007
  • Form Server 2007
  • Search Server 2008
  • Search Server 2008 Express
 
More Project Server Hacks -- Disable Acceptance of Task Updates in PWA

 

Although many Project Managers have grown accustomed to accepting Task Updates via PWA, some companies choose to adopt a process in which the PMs only accept those updates from within Project Professional 2007. They may have chosen to follow this process because they prefer to use the publishing engine within Project Pro. They may also prefer to accept the updates and immediately proceed to reschedule work, analyze variances, and perform other adjustments within the schedule prior to publishing.

Whatever the reason, the following process describes how to hide the 'Accept' option on the 'Task Updates' page within PWA, while still displaying the option when processing the same updates within Project Pro.

If you are not familiar with manipulating SharePoint pages with web parts, see my primer on the topic ('Hacking PWA with Web Parts') here:

http://www.projectserverhelp.com/Lists/Posts/Post.aspx?ID=7

 

Note: this procedure will hide the 'Accept' option for ALL Project Managers.

 

Hiding the 'Accept' Option on the PWA 'Task Updates' Page

1. Visit the 'Task Updates' page in PWA, pull open the 'Site Actions' menu near the upper right corner of the page, then select the 'Edit Page' option:

 

 

2. With the 'Task Updates' page in edit mode, click the 'Add a Web Part' button, which spans the entire width of the 'Main' web part zone:

 

 

 

3. In the 'Add Web Parts to Main' dialog box, select the checkbox next to the 'Content Editor Web Part' item, then click the 'OK' button:

 

4. After the 'Content Editor Web Part' has been added to the page, pull open the 'edit' menu near the upper right corner of the newly-added web part, then select the 'Modify Shared Web Part' option:

 

 

5. In the 'Content Editor Web Part' editing panel which has opened on the right side of the page, click the 'Source Editor...' button:

 

 

6. In the source editor dialog box, enter the following text, then click the 'Save' button:

 

<script language="JavaScript">

if ((window.location.search.match('SimpleUI')==null) && (window.location.search.match('ProjectUID')==null))

{

var menuitems = document.getElementsByTagName('ie:menuitem');

for (var i=0; i<menuitems.length; i++)

{

itm = menuitems(i)

if ((itm.id.match('Accept')!=null) && (itm.id.match('Preview')==null))

{

itm.hidden = "true";

}

}

var tbls = document.getElementsByTagName('table');

for (idx in tbls)

{

if (tbls[idx].className == 'pwa-toolbar2')

{

var cells = tbls[idx].getElementsByTagName('td');

for (var j=0; j<cells.length; j++)

{

if ((cells(j).id.match('Accept')!=null) && (cells(j).id.match('Preview')==null))

{

cells(j).style.display = "none";

}

}

}

}

}

</script>

 

 

7. In the 'Content Editor Web Part' editing panel which should still be open on the right side of the page, expand the 'Appearance' heading by clicking [+], then enter 'Hide Accept' as the 'Title' of the web part:

 

 

8. In the 'Content Editor Web Part' editing panel which should still be open on the right side of the page, select 'None' for the 'Chrome Type' of the web part, then click the 'OK' button at the bottom of the panel:

 

 

9. After the 'Content Editor Web Part' editing panel is closed, hover the mouse cursor over the header of the 'Task Update Requests' web part until the 4-way cursor is displayed, click and drag the header until it is positioned above the new 'Hide Accept' web part header (as indicated by the colored 'I-beam'), then drop the web part into the upper position in the web part zone:

 

 

The 'Hide Accept' web part will now appear below the 'Task Update Requests' web part on the page:

 

10. Exit 'edit mode' by clicking the 'Exit Edit Mode' link near the upper right corner of the page:

 

As you can now see, the 'Accept' feature no longer appears on the toolbar above the data grid (normally located between the 'Preview' and 'Reject' buttons):

 

 

Additionally, the 'Accept' feature no longer appears on the 'Actions' menu (normally located between the 'Preview' and 'Reject' options):

 

 

However, the option is still available when reviewing and accepting task updates via Project Pro (Collaborate > Update Project Progress):

 

 

In Summary...

 

No Server Access Required, and No Custom Coding Required

As long as you have the permission to edit PWA pages, you can perform this hack, regardless of whether you have direct access to the server. This will work in hosted environments (such as ProjectHosts) as well!

 

Be Careful!

Remember... this hack affects all Project Managers, so be sure that there isn't anyone who will miss the 'Accept' feature on the page.

To unhide the 'Accept' option, simply delete the 'Hide Accept' web part from the page. To learn how this is done, review my PWA web parts primer ('Hacking PWA with Web Parts') here:

 

http://www.projectserverhelp.com/Lists/Posts/Post.aspx?ID=7

 

Happy hacking!

1 - 10 Next