Custom text library --- custom document library right Menu

xiaoxiao2021-03-06  76

SPS document library context menu by Program FilesCommon FilesMicrosoft Sharedweb server extensions0TEMPLATELAYOUTS? Ows.js in 2 AddDocLibMenuItems directory function generation, the function may be used to provide a HOOK, the following function AddDocLibMenuItems (m, ctx) {if (typeof (Custom_AddDocLibMenuItems) ! = "undefined") {if (Custom_AddDocLibMenuItems (m, ctx)) return;} ...} by defining a name for the function Custom_AddDocLibMenuItems may be generated menu items they need, the following code snippet added a send message menu function Custom_AddDocLibMenuItems (m, ctx) {var strdisplaytext = "Send mail"; var straction = "sendemail ()"; var strimagepath = "; // add our new menu item Camopt (M, STRDISPLAYTEXT, STRACTION, STRIMAGEPATH); // AddPath; // Add A Separator to the menu camsep (m); // false means;} camopt function is provided at the} camopt function, the parameter m represents the menu object itself, strDisplaytext is the increased menu item Display name, Straction is the action executed by the menu item, and StrimagePath specifies the display icon Camsep function before the menu is available in the OWS.JS file, which shows a split line between the menu item When the custom CUSTOM_ADDDDDDDDOCLIBMENUITEMS function returns false, OWS.js The addDoclibMenuItems function will continue to execute the original menu item for the system, when a Custom_adddocLibMenuItems letter Number Returns True, the AddDocLibMenuItems function in OWS.JS stops execution, do not generate the original menu item I am in the actual purpose of IdddoClibMenuItems function Copy to Custom_AdddoClibMenuItems, which is not used in the project. remove the menu, and then returns a true value to AddDocLibMenuItems functions to interrupt the execution of AddDocLibMenuItems function of self-defined content editing Custom_AddDocLibMenuItems provided by SPS Webpart need to put the page to

转载请注明原文地址:https://www.9cbs.com/read-121633.html

New Post(0)