Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = function(grunt) {
'build/js/**/*.js',
'build/assets/css/**/*.css',
'src/demo/**/*',
'doc/**/*',
],
tasks: ['copy:install', 'jasmine_node']
},
Expand Down Expand Up @@ -98,6 +99,13 @@ module.exports = function(grunt) {
dest: path.join(installDir, 'demo'),
filter: 'isFile'
},
{
expand: true,
cwd: 'doc/',
src: ['**/*'],
dest: path.join(installDir, 'doc'),
filter: 'isFile'
},
]
}
},
Expand Down
126 changes: 1 addition & 125 deletions src/demo/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,131 +226,7 @@ <h1>Theme</h1>
</div>
</div>
<div id="api_page" style="display:none">
<h2>Class</h2>
<hr/>
<table class="table">
<thead>
<tr>
<td><b>name</b></td><td><b>type</b></td><td><b>description</b></td>
</tr>
</thead>
<tbody>
<tr>
<td>Microsoft.Office.Controls.ListControl</td><td>class</td><td>Used to create a grid object</td>
</tr>
<tr>
<td>Microsoft.Office.Controls.SelectionMode</td><td>enum</td><td>Values: SingleRow, MultipleRows, Cell, Range</td>
</tr>
<tr>
<td>Microsoft.Office.Controls.Theme</td><td>class</td><td>Used to create a theme object from json</td>
</tr>
</tbody>
</table>
<h2>Methods on ListControl</h2>
<hr/>
<table class="table">
<thead>
<tr>
<td><b>signature</b></td><td><b>description</b></td>
</tr>
</thead>
<tbody>
<tr>
<td>height(height[optional])</td><td>set/get the height of list control</td>
</tr>
<tr>
<td>width(width[optional])</td><td>set/get the width of list control</td>
</tr>
<tr>
<td>rowCount(rowCount[optional])</td><td>set/get the rowCount of list control</td>
</tr>
<tr>
<td>rows(rows[optional])</td><td>set/get the rows of list control, rows is an array of json object</td>
</tr>
<tr>
<td>theme(theme[optional])</td><td>set/get the theme of list control, theme is object of Microsoft.Office.Controls.Theme</td>
</tr>
<tr>
<td>selectionMode(selectionMode[optional])</td><td>set/get the selectionMode of list control, selectionMode is object of Microsoft.Office.Controls.SelectionMode</td>
</tr>
<tr>
<td>getRowById(rowId)<br/>getRowByIndex(rowIndex)<br/>getRowsByIndex(topRowIndex, count)</td><td>get the specified row(s) from list control</td>
</tr>
<tr>
<td>updateRowById(row, rowId)<br/>updateRowByIndex(row, rowIndex)<br/>updateRowsByIndex(rows, topRowIndex, count[optional])</td><td>update the specified row(s) from list control</td>
</tr>
<tr>
<td>removeRowById(rowId)<br/>removeRowByIndex(rowIndex)<br/>removeRowsByIndex(topRowIndex, count)</td><td>remove the specified row(s) from list control</td>
</tr>
<tr>
<td>insertRowById(row, rowId)<br/>insertRowByIndex(row, rowIndex)<br/>insertRowsByIndex(rows, topRowIndex, count[optional])</td><td>insert the specified row(s) from list control</td>
</tr>
<tr>
<td>selectedRanges()</td><td>get the current selected ranges</td>
</tr>
<tr>
<td>cursor(position[optional])</td><td>get/set the cursor position</td>
</tr>
<tr>
<td>select(range, keepSelectedRange)</td><td>select a specifed range</td>
</tr>
<tr>
<td>deselect(range)</td><td>deselect a specifed range</td>
</tr>
<tr>
<td>rtl(rtl[optional])</td><td>set/get the state of rtl</td>
</tr>
<tr>
<td>addColumn(column)</td><td>add a column definition into list control</td>
</tr>
<tr>
<td>on(eventName, handler)<br/>off(eventName, handler)</td><td>add/remove event handler</td>
</tr>
<tr>
<td>scrollTo(top, front)</td><td>scroll the list control viewport to a given position</td>
</tr>
</tbody>
</table>
<h2>Events</h2>
<table class="table">
<thead>
<tr>
<td><b>eventName</b></td><td><b>description</b></td>
</tr>
</thead>
<tbody>
<tr>
<td>beforeRender</td><td>fire when user scrolls viewport to a area and list control will render it. Used for lazy data loading from server side.</td>
</tr>
<tr>
<td>rowClick</td><td>fire when users click on a row</td>
</tr>
<tr>
<td>headerRowClick</td><td>fire when user clicks on a header row</td>
</tr>
<tr>
<td>headerRowContextMenu</td><td>fire when user right clicks on a header row</td>
</tr>
<tr>
<td>beforeColumnReorder</td><td>fire before user reorders a column from UI</td>
</tr>
<tr>
<td>beforeCursorChange</td><td>fire before user changes cursor position from UI</td>
</tr>
<tr>
<td>beforeSelect</td><td>fire before user selects range from UI</td>
</tr>
<tr>
<td>beforeDeselect</td><td>fire before user deselects range from UI</td>
</tr>
<tr>
<td>cursorChange</td><td>fire after user changes cursor position from UI</td>
</tr>
<tr>
<td>selectionChange</td><td>fire after user selects/deselects range from UI</td>
</tr>
</tbody>
</table>
<iframe id="ifr" frameborder="0" width="100%" height = "75%" src="doc/index.html"></iframe>
</div>
</div>
</div>
Expand Down
Loading