class RefreshOnChange { /** * * @param {object} properties * @param {string} properties.tab_menu * @param {string} properties.tab_name * @param {string} properties.table_name * @param {string} properties.table_row_id */ constructor(properties) { for (let key in properties) { this[key] = properties[key]; } } /** * Get object as string to encode in jQuery data object. * @return {string} JSON */ getJSON() { return JSON.stringify({ tab_menu: this.tab_menu, tab_name: this.tab_name, table_name: this.table_name, table_row_id: this.table_row_id }); } /** * Process event. */ process() { if (this.tab_menu) { Core.UI.TabMenu.get(this.tab_menu).refresh(this.tab_name); } if (this.table_name) { Page.activePage.table.loadRow(this.table_row_id, Page.activePage); } } }