08.08.2017 Views

designer

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

90 Chapter 3 Working with Lists and Libraries<br />

For example, in the browser, when you display an Announcements list and then select<br />

the arrow to the right of an announcement item, the list item menu contains the actions<br />

View Item, Edit Item, Alert Me, Manage Permissions, and Delete Item. On a site created<br />

using SharePoint Server, additional actions are displayed, such as Compliance Details.<br />

These default actions are also associated with a sequence number. The sequence numbers<br />

for the default actions are not visible in SharePoint Designer, but with some testing<br />

you can discover them by trying different numbers as the sequence number when you<br />

add your own actions. For example, if you want users to quickly create a new Task item<br />

by using the Tasks list’s NewForm.aspx page, choose a sequence number of 50 to place<br />

the New Task Item action at the top of the item menu. A sequence number of 2,000<br />

places the New Task Item action below the Delete Item action. To create the New Task<br />

Item action between the Edit Item and Alert Me actions, choose a sequence number between<br />

300 and 1,000.<br />

When you define your custom action, you can also specify a Rights Mask that defines<br />

which users can see the custom action. The Rights Mask can contain any of the<br />

SPBasePermission member names that are listed at http://msdn.microsoft.com/en-us/<br />

library/microsoft.sharepoint.spbasepermissions.aspx. When you want the custom action to<br />

appear for any user of the list, leave the Rights Mask empty or type EmptyMask.<br />

Using SharePoint Designer, you cannot remove a custom action, add other forms of<br />

actions (such as check boxes, combo boxes, drop-down lists, text boxes, and flyout anchors),<br />

or add tabs or groups. Developers can create such actions and extend the server<br />

ribbon on pages other than the view and form pages, as well as the list item menu, by<br />

creating a feature in Visual Studio 2010 with the SharePoint Ribbon project template,<br />

which can be found at http://code.msdn.microsoft.com/vsixforsp. This Web site also contains<br />

a hands-on lab and a walkthrough video.<br />

In this exercise, you upload new image files to the Site Assets library and then use those<br />

images when you add a custom action to a list item menu.<br />

SET UP Using SharePoint Designer, open the team site you used in the previous<br />

exercise, if it is not already open.<br />

Import Files<br />

1. In the Navigation pane, click Site Assets, and then click Import Files in the New<br />

group on the ribbon.<br />

The Import dialog box opens.<br />

2. Click Add File to display the File Open dialog box.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!