1. 程式人生 > >sharepoint 2010 如何在列表中新增功能選單操作項

sharepoint 2010 如何在列表中新增功能選單操作項

在做知識庫文件管理模組中,有一個需求,就是想要在自定義列表當中,增加一個,我的收藏功能。按照sharepoint預設的列表來做,我們可以在列表的標題欄位中,增加一個功能選單項,叫我的收藏.如下圖。

點選收藏,彈出一個提示框,點選確定,我們把這個紀錄新增到收藏記錄表。

1。新增一個空元素,CollectionMenuItem。在這個空元素裡面,新增一個CustomAction屬性

<CustomAction
    Id="CollectionMenuItem"
    RegistrationType="List"
    RegistrationId="100"
    Location="EditControlBlock"
    Sequence="301"
    Title="我的收藏"
    ImageUrl="/_layouts/images/ReportServer/editreport.gif">
    <UrlAction Url="javascript:if(confirm('確認要收藏嗎?')==false){ return false;}
               else{window.location.href='/_layouts/WebpartBarTest/CollectionEdit.aspx?scope=item&amp;ListId={ListId}&amp;Itemid={ItemId}&amp;CollectionType=CustomList'}"/>
 
  </CustomAction>

2。部署下project,我們會看到,所有的sharepoint custom list,都會有“我的收藏”這個選單項。點選我的收藏,會提交一條資料到收藏記錄表。

SharePoint 2010 List Template Type Registration IDs

 SharePoint RegistrationID's
Sl .No Name Registration ID
1 NoListTemplate 0
2 GenericList 100
3 DocumentLibrary 101
4 Survey 102
5 Links
103
6 Announcements 104
7 Contacts 105
8 Events 106
9 Tasks 107
10 DiscussionBoard 108
11 PictureLibrary 109
12 DataSources 110
13 WebTemplateCatalog 111
14 UserInformation 112
15 WebPartCatalog 113
16 ListTemplateCatalog 114
17 XMLForm
115
18 MasterPageCatalog 116
19 NoCodeWorkflows 117
20 WorkflowProcess 118
21 WebPageLibrary 119
22 CustomGrid 120
23 SolutionCatalog 121
24 NoCodePublic 122
25 ThemeCatalog 123
26 DataConnectionLibrary 130
27 WorkflowHistory 140
28 GanttTasks 150
29 Meetings 200
30 Agenda 201
31 MeetingUser 202
32 Decision 204
33 MeetingObjective 207
34 TextBox 210
35 ThingsToBring 211
36 HomePageLibrary 212
37 Posts 301
38 Comments 302
39 Categories 303
40 Facility 402
41 Whereabouts 403
42 CallTrack 404
43 Circulation 405
44 Timecard 420
45 Holidays 421
46 IMEDic 499
47 ExternalList 600
48 IssueTracking 1100
49 AdminTasks 1200
50 HealthRules 1220
51 HealthReports 1221
52 InvalidType -1
1 NoListTemplate 0

Attribute

Description

Command

Required. The name of a command. The value of this attribute matches the value of aCommand attribute on an element that defines a control.

CommandAction

Required. A script statement to execute when this handler is invoked. Microsoft SharePoint Foundation calls theeval method, passing in the value of this attribute.

The value of the attribute can contain substitution tokens that are transformed at rendering. The following tokens are recognized:

  • {ItemId} – ID (GUID) taken from the list view.

  • {ItemUrl} – Web-relative URL of the list item (Url).

  • {RecurrenceId} – ID of a recurrent item ().

  • {SiteUrl} – The fully qualified URL to the site (Url).

  • {ListId} – ID (GUID) of the list (ID).

  • {ListUrlDir} – Server-relative URL of the site plus the list's folder.

  • {Source} – Fully qualified request URL.

  • {SelectedListId} – ID (GUID) of the list that is currently selected from a list view.

  • {SelectedItemId} – ID of the item that is currently selected from the list view.

EnabledScript

Optional. A script statement that is executed to determine whether the command is enabled or disabled. The script expression should return aBoolean value,true if the command is enabled andfalse if not. If the ribbon is disabled, commands are grayed out and are not clickable.

As with the CommandAction attribute, theeval method is called with the value of this attribute as an argument. TheEnabledScript attribute does not support the substitution tokens that are described for theCommandAction attribute.

廣州京微資訊科技有限公司,.微軟sharepoint解決方案提供商。

相關推薦

sharepoint 2010 如何在列表新增功能選單操作

在做知識庫文件管理模組中,有一個需求,就是想要在自定義列表當中,增加一個,我的收藏功能。按照sharepoint預設的列表來做,我們可以在列表的標題欄位中,增加一個功能選單項,叫我的收藏.如下圖。 點選收藏,彈出一個提示框,點選確定,我們把這個紀錄新增到收藏記錄表。 1

Fiddler-會話列表新增顯示IP、相應時間功能

fiddler:新增顯示IP、相應時間功能方法 Ctrl+R 開啟 customerules 1.如果打不開 customerules,就是你的Fiddler上面沒有安裝該外掛,可以在此下載。(如圖) 2.可以自動下載,下載完成後安裝外掛。在此按照上面的流程操作進

修改SharePoint列表新增新專案”連結

        做SharePoint開發的時候,會新建很多的自定義列表,但是SharePoint預設所有的自定義列表的新建標籤都是“新增新專案”,但是很多地方我們都想改為自己想要的標籤,那麼怎麼更改呢?         其實有一種很簡單的方法,首先用SharePoint

SharePoint Online或SharePoint本地列表缺少功能區

服務器 SharePoint 您可能會遇到在SharePoint Online或SharePoint內部部署列表中看不到功能區的情況。功能區可以輕松訪問SharePoint列表中的常見任務。它還提供了有用的工具,例如連接到Outlook,導出到Excel和打開訪問。 Scenario #1在某些早期版

教學課件PPT新增圖片如何操作

教學課件PPT目前深受老師們的喜愛,各個科目、各個年齡層的老師都喜歡使用教學課件PPT進行授課。因為教學課件PPT使用起來很方便,上課效果也很好。大家都知道在教學課件PPT當中不單單只是教學文字內容,也會配以圖片,這樣不會顯得枯燥無味。今天小編就教給大家怎麼在教學課件PPT中新增圖片。 步驟如下: 老

python 在列表新增元組元素,按照元組第一個值進行排序

  >>> import bisect >>> scores = [(100, 'perl'), (200, 'tcl'), (400, 'lua'), (500, 'python')] >>> bisect.insort(scores,

已有的執行緒安全類新增功能

現在我們要擴充套件一個list,不能破壞它原本的安全性以及相關不變約束和後驗條件,並且不能修改原始碼,該如何做呢。 通常首先想到的方法是繼承list,擴充套件程式碼;其次稍微深入的會用到同步包裝器,然後客戶端加鎖,這種方法一般是可以的;最後可能想到的是使用組合,進而制定一套

JDK8新增原子性操作類LongAdder

LongAdder簡單介紹 LongAdder類似於AtomicLong是原子性遞增或者遞減類,AtomicLong已經通過CAS提供了非阻塞的原子性操作,相比使用阻塞演算法的同步器來說效能已經很好了,但是JDK開發組並不滿足,因為在非常高的併發請求下AtomicLong的效能不能讓他們接受,

C#讀取SharePoint的List的資料及操作SharePoint

一般SharePoint都有提供一個webservice來訪問、操作SharePoint的各項資料。 地址一般為http://server/_vti_bin/Lists.asmx 下面是一個簡單的讀取SharePoint List資料的例子:       &

46 jQuery-列表的導航選單

1. 效果圖 2.html程式碼 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>45 jQuery-列表中的導航選單</ti

關於js動態向下拉列表新增資料

在網上找的,經過試驗還不錯,反正很適合我,直接。 大體的思路就是: var objSelect = document.getElementById("leixingwx");//獲得select標籤物

python列表新增字典時,出現前面的覆蓋了後面的

主要問題就是,,字典存入到列表中,其實是將一個引用存入了列表,,如果你每次存入列表中的字典都是在同一個引用下,這時將列表中的字典的引用取出,然後去找對應的值,,,,,如果引用相同,就會出現,遍歷出來的都是最後一條資料的現象, 由於引用指向的地址的內容不斷被覆

Android 7.0 settings新增選單

需求: 在設定中,新增一級選單項,在裝置中加入“按鍵交換”,此項選單與“顯示”並列 由於android 7.0 settings網上資料還沒有,此需求在高通技術支援的幫助下加上自己的分析才實現(對高通技術支援小夥表示感謝),實現後發現特別簡單,但是實現前一直沒頭緒,希望記

怎樣修復grub開機引導以及在Ubuntu新增win7開機啟動

出自:http://blog.chinaunix.net/uid-27037833-id-3235145.html         由於裝Centos(我機子上已經有了win7和Ubuntu),結果Centos沒裝好,還把Ubuntu的引導給弄沒了。在win7 下用easy

django ModelForm新增非必填(not require)欄位方法

如一個form中,想要address這個欄位是一個非必填項。相關程式碼如下 class My_Form(ModelForm):     class Meta:         model = My_Class         fields = ('first

ListView新增CheckBox,進行多選擇,全選,反選,完美無Bug

新手筆記: 最近做一個列表,實現批量選擇刪除功能,用到了ListView中新增的CheckBox,來進行多項選擇,全選,反選等。因為用到了ListView,故對新手來說,有很多坑。 1、由於ListView採用了Recycler,即重複利用convertView,所以用Ch

grub2新增windows的啟動 安裝linux後新增windows系統的引匯入口

在/etc/grub2.cfg檔案的最後新增以下內容,然後用grub2-mkconfig>/etc/grub2.cfg 重定向到cfg檔案。即可。 menuentry "Windows 10 (loader)" --class windows --class os

修改學生資訊系統--實現新增選單和選擇選單操作功能

4.修改之前的學生管理系統,實現新增選單和選擇選單操作功能 選單: +-----------------------------------------------+ | 1)新增學生資訊 | |

sharepoint 2010 自定義列表資料的增刪改查常用操作 server object model

在sharepoint的開發過程中,用得最多的,就是獲取sharepoint的列表資料,以及對其進行一系列的增刪改查等操作,這裡主要是記錄一些常用的操作,通過物件模型方式對資料進行增刪改查。 由於sharepoint對列表的資料都有許可權要求,一般都是採取提升管理員許可權, //提升管理員許

Python列表新增二元列表、連線、查詢、排序、反序、賦值、刪除、分片操作、負索引、)

#_*_coding:UTF-8_*_ # 列表list_name=[element1,element2,element3...] # 1.新增元素 # append(value)使用者在List的尾部新增一個元素 # insert(index,value)第一個引數ind