The ITHit Ajax Browser function right-click “Update file…” our users consider very dangerous. For example it is possible to update a .doc file with a .xls file resulting in a "corrupt" word file which in fact contains Excel workbook so we have been removing this menu item in ITHitAJAXFileBrowser.js file at each new Ajax Browser release. Will it be possible to improve or remove the feature by customization? Thanks
Asked
Active
Viewed 222 times
1 Answers
0
To remove the menu item in Ajax File Browser you can use the following code:
ITHit.Events.AddListener(ajaxFileBrowser.GetMenuManager(), 'OnShowMenu', onShowMenu);
...
function onShowMenu(menu, aContextMenuHierarchyItems) {
var index = getMenuIndexByMenuId(menu, 'CustomProperties');
if (index != -1) {
menu.Children.splice(index, 1);
}
}
function getMenuIndexByMenuId(menu, menuId) {
for (var i = 0, l = menu.Children.length; i < l; i++) {
if (menu.Children[i].Id == menuId) {
return i;
}
}
return -1;
}
Please find more info here: http://www.webdavsystem.com/ajaxfilebrowser/programming/context_menu_customization http://www.ajaxbrowser.com/?menudlgdemo

IT Hit WebDAV
- 5,652
- 12
- 61
- 98