LanerBoxView.getHistoryWindow

Syntax

getHistoryWindow ();

Description

The getHistoryWindow method returns point history window.

Example

To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and also add the following code in the handler, that processes document opening event:

var getCellHistoryButt = new PP.Ui.Button({
	ParentNode: document.body, //DOM parent node
	Content: "Get add column settings", //Title
	Click: PP.Delegate(onClickGetCellHistory)     
}); 
function onClickGetCellHistory()
	{
		var gridView = workbookBox.getDataView().getGridView();
		if (!gridView.getHistoryWindow())
			gridView._HistoryWindow = new PP.TS.Ui.HistoryWindow();
			gridView.getHistoryWindow().showDialog();
		var source = workbookBox.getSource().getActiveSheet();//return instance of the PP.TS.Workbook class
		//Set object containing information about values of selected table cells
		var selCell = source.getSelectedTableCells().cells.c[0];
		var row, column;
		row = selCell['@row'];
		column = selCell['@column'];
		tsService.getCellHistory(source, row, column, PP.Delegate(function(sender, args)
			{ 
				gridView.getHistoryWindow().getRevisionsListBox().setRevisions(args.Revs);
				//Set timeout
				setTimeout(changeSize, 2000);
			})); 
		function changeSize() 
			{
				//Resize
				gridView.getHistoryWindow().setWidth(300);
				gridView.getHistoryWindow().setHeight(400);
				//Refresh
				gridView.getHistoryWindow().refresh();
			}
	}

After executing the example the WorkbookBox component and a button named Get Add Column Settings are placed in the HTML page. To show history window in the screen, select a cell in table display element and click button.

See also:

LanerBoxView