HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/CMS/CMSScripts/CMSModules/CMS.MessageBoards/MessageBoardsGrid.js
cmsdefine(['CMS/EventHub', 'CMS/AppList', 'CMS/GridActions'], function (eventHub, AppList, GridActions) {

    var appList = new AppList(),

        MessageBoardsGrid = function (data) {
            var that = this;

            this.pagesApplicationHash = data.pagesApplicationHash;

            var gridActions = new GridActions({
                gridSelector: data.gridSelector,
                actionButtonsActions: {
                    '.js-edit': function (actionData) {
                        that.editMessageBoard(actionData.nodeId, actionData.documentCulture);
                    },
                    '.js-viewDocument': function (actionData) {
                        that.openDocumentInPages(actionData.nodeId, actionData.documentCulture);
                    }
                }
            });
        };

    MessageBoardsGrid.prototype.openDocumentInPages = function (documentId, documentCulture) {
        appList.openApplication(undefined, undefined, '?nodeid=' + documentId + '&culture=' + documentCulture, this.pagesApplicationHash);
    };

    MessageBoardsGrid.prototype.editMessageBoard = function (eventId) {
        if (this.eventDetailUrl) {
            window.location.replace(this.eventDetailUrl + '&eventId=' + eventId + '&objectid=' + eventId);
        }
    };

    return MessageBoardsGrid;
});