I have a custom button on ribbon, which performs some action with current folder (download folder content as zip package). I want to disable this button in case if current folder doesn't contain any items - neither files nor subfolders. Could you please help me with JavaScript code for "EnabledScript" property of "CommandUIHandler"?
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
You could extract the current folder location from the RootFolder parameter of the URL of the current displayed view. Then load the folder like this:
|
||||
|
|