FluentRibbon CommandJavaScript

                CommandJavaScript = "" 
                + "function getAllSelectedItems() {"
                + "var ctx = SP.ClientContext.get_current();"
                + "var items = SP.ListOperation.Selection.getSelectedItems(ctx);"
                + "var ids = '';"
                + "var i;"
                + "for (i in items)"
                + "{"
                    + "ids += items[i].id + '|';"
                + "}"
                + "return ids;"
                + "};"             
                + "SP.UI.ModalDialog.showModalDialog({title: 'Настройка выгружаемого файла', width: 800,height:800,url: '" + SPUrlUtility.CombineUrl(web.Url, "/_layouts/Report.aspx") + "?SiteUrl={SiteUrl}&SPListId={ListId}&Ids=' + getAllSelectedItems() });"
                + " ",​

Ribbon URL Tokens

  • ~site - Web site (SPWeb) relative link.
  • ~sitecollection - site collection (SPSite) relative link.
  • In addition, you can use the following tokens within a URL:
  • {ItemId} - Integer ID that represents the item within a list.
  • {ItemUrl} - URL of the item being acted upon. Only work for documents in libraries. [Not functional in Beta 2]
  • {ListId} - GUID that represents the list.
  • {SiteUrl} - URL of the Web site (SPWeb).
  • {RecurrenceId} - Recurrence index. This token is not supported for use in the context menus of list items.​

Добавить комментарий

Loading