Skip to content

Commit 5abb68f

Browse files
committed
gh-pages v2.0.11-71e4f2a
1 parent 7188740 commit 5abb68f

File tree

64 files changed

+4699
-1226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4699
-1226
lines changed

docs/grunt-scripts/prettify.js

+232-152
Large diffs are not rendered by default.

docs/js/docs-setup.js

+153-13
Large diffs are not rendered by default.

docs/js/docs.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ docsApp.directive.sourceEdit = function(getEmbeddedTemplate) {
120120
};
121121

122122

123-
docsApp.serviceFactory.loadedUrls = function($document, $window, versionedFiles) {
123+
docsApp.serviceFactory.loadedUrls = function($document, versionedFiles) {
124124
var urls = {};
125125

126126
angular.forEach($document.find('script'), function(script) {
@@ -139,7 +139,7 @@ docsApp.serviceFactory.loadedUrls = function($document, $window, versionedFiles)
139139
});
140140

141141
angular.forEach(versionedFiles.files, function(file) {
142-
urls.base.push(file.src.indexOf('/') === 0 ? $window.location.origin + file.src : file.src);
142+
urls.base.push(file.src);
143143
});
144144

145145
return urls;
@@ -622,4 +622,4 @@ angular.module('docsApp', ['bootstrap', 'bootstrapPrettify']).
622622
}).
623623
factory(docsApp.serviceFactory).
624624
directive(docsApp.directive).
625-
controller(docsApp.controller);
625+
controller(docsApp.controller);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h1><code ng:non-bindable="">ColDef</code>
2+
<span class="hint">(api in module <code ng:non-bindable="">ui.grid.cellNav</code>
3+
)</span>
4+
</h1>
5+
<div><h2 id="Description">Description</h2>
6+
<div class="description"><p>Column Definitions for cellNav feature</p></div>
7+
<div class="member property"><h2 id="Properties">Properties</h2>
8+
<ul class="properties"><li><h3 id="allowCellFocus">allowCellFocus</h3>
9+
<div class="allowcellfocus"><p>Enable focus on a cell.<br/>Defaults to true</p></div>
10+
</li>
11+
</ul>
12+
</div>
13+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<h1><code ng:non-bindable="">PublicApi</code>
2+
<span class="hint">(api in module <code ng:non-bindable="">ui.grid.cellNav</code>
3+
)</span>
4+
</h1>
5+
<div><h2 id="Description">Description</h2>
6+
<div class="description"><p>Public Api for cellNav feature</p></div>
7+
<div class="member method"><h2 id="Methods">Methods</h2>
8+
<ul class="methods"><li><h3 id="getFocusedCell">getFocusedCell()</h3>
9+
<div class="getfocusedcell"><p>returns the current (or last if Grid does not have focus) focused row and column
10+
<br> value is null if no selection has occurred</p></div>
11+
</li>
12+
<li><h3 id="scrollTo">scrollTo(rowEntity, colDef)</h3>
13+
<div class="scrollto"><p>(TODO) brings the row and column into view</p><h4 id="Parameters">Parameters</h4>
14+
<ul class="parameters"><li><code ng:non-bindable="">rowEntity – {object} – </code>
15+
<p>gridOptions.data[] array instance to make visible</p></li>
16+
<li><code ng:non-bindable="">colDef – {object} – </code>
17+
<p>to make visible</p></li>
18+
</ul>
19+
</div>
20+
</li>
21+
</ul>
22+
</div>
23+
<div class="member event"><h2 id="Events">Events</h2>
24+
<ul class="events"><li><h3 id="navigate">navigate</h3>
25+
<div class="navigate"><p>raised when the active cell is changed
26+
<pre class="prettyprint linenums">
27+
gridApi.cellNav.on.navigate(scope,function(newRowcol, oldRowCol){})
28+
</pre><div class="inline"></div>
29+
<div class="inline"></div>
30+
<h4 id="Parameters">Parameters</h4>
31+
<ul class="parameters"><li><code ng:non-bindable="">newRowCol – {object} – </code>
32+
<p>new position</p></li>
33+
<li><code ng:non-bindable="">oldRowCol – {object} – </code>
34+
<p>old position</p></li>
35+
</ul>
36+
</div>
37+
</li>
38+
</ul>
39+
</div>
40+
</div>

docs/partials/api/ui.grid.class.Grid.html

+14-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ <h1><code ng:non-bindable="">Grid</code>
33
)</span>
44
</h1>
55
<div><h2 id="Description">Description</h2>
6-
<div class="description"><p>Grid defines a logical grid. Any non-dom properties and elements needed by the grid should
7-
be defined in this class</p></div>
6+
<div class="description"><p>Grid is the main viewModel. Any properties or methods needed to maintain state are defined in
7+
* this prototype. One instance of Grid is created per Grid directive instance.</p></div>
88
<h2 id="Usage">Usage</h2>
99
<div class="usage"><pre class="prettyprint linenums">Grid(options);</pre>
1010
<h3 id="Parameters">Parameters</h3>
@@ -36,6 +36,13 @@ <h3 id="Parameters">Parameters</h3>
3636
<p>An array of GridColumn objects</p></div>
3737
</div>
3838
</li>
39+
<li><h3 id="getRow">getRow(rowEntity)</h3>
40+
<div class="getrow"><p>returns the GridRow that contains the rowEntity</p><h4 id="Parameters">Parameters</h4>
41+
<ul class="parameters"><li><code ng:non-bindable="">rowEntity – {object} – </code>
42+
<p>the gridOptions.data array element instance</p></li>
43+
</ul>
44+
</div>
45+
</li>
3946
<li><h3 id="modifyRows">modifyRows()</h3>
4047
<div class="modifyrows"><p>creates or removes GridRow objects from the newRawData array. Calls each registered
4148
rowBuilder to further process the row</p>
@@ -60,10 +67,10 @@ <h4 id="Returns">Returns</h4>
6067
</ul>
6168
</div>
6269
</li>
63-
<li><h3 id="registerRowBuilder">registerRowBuilder(columnsProcessor)</h3>
70+
<li><h3 id="registerRowBuilder">registerRowBuilder(rowBuilder)</h3>
6471
<div class="registerrowbuilder"><p>When the build creates rows from gridOptions.data, the rowBuilders will be called to add
6572
additional properties to the row.</p><h4 id="Parameters">Parameters</h4>
66-
<ul class="parameters"><li><code ng:non-bindable="">columnsProcessor – {function(colDef, col, gridOptions)} – </code>
73+
<ul class="parameters"><li><code ng:non-bindable="">rowBuilder – {function(colDef, col, gridOptions)} – </code>
6774
<p>function to be called</p></li>
6875
</ul>
6976
</div>
@@ -82,7 +89,9 @@ <h4 id="Returns">Returns</h4>
8289
</div>
8390
</li>
8491
<li><h3 id="registerStyleComputation">registerStyleComputation(styleComputation)</h3>
85-
<div class="registerstylecomputation"><p>registered a styleComputation function</p><h4 id="Parameters">Parameters</h4>
92+
<div class="registerstylecomputation"><p>registered a styleComputation function</p>
93+
94+
<p>If the function returns a value it will be appended into the grid's <code>&lt;style&gt;</code> block</p><h4 id="Parameters">Parameters</h4>
8695
<ul class="parameters"><li><code ng:non-bindable="">styleComputation – {function($scope)} – </code>
8796
<p>function</p></li>
8897
</ul>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<h1><code ng:non-bindable="">GridApi</code>
2+
<span class="hint">(class in module <code ng:non-bindable="">ui.grid</code>
3+
)</span>
4+
</h1>
5+
<div><h2 id="Description">Description</h2>
6+
<div class="description"><p>GridApi provides the ability to register public methods events inside the grid and allow
7+
for other components to use the api via featureName.methodName and featureName.on.eventName(function(args){}</p></div>
8+
<h2 id="Usage">Usage</h2>
9+
<div class="usage"><pre class="prettyprint linenums">GridApi(grid);</pre>
10+
<h3 id="Parameters">Parameters</h3>
11+
<ul class="parameters"><li><code ng:non-bindable="">grid – {object} – </code>
12+
<p>grid that owns api</p></li>
13+
</ul>
14+
</div>
15+
<div class="member method"><h2 id="Methods">Methods</h2>
16+
<ul class="methods"><li><h3 id="registerEvent">registerEvent(featureName, eventName)</h3>
17+
<div class="registerevent"><p>Registers a new event for the given feature</p><h4 id="Parameters">Parameters</h4>
18+
<ul class="parameters"><li><code ng:non-bindable="">featureName – {string} – </code>
19+
<p>name of the feature that raises the event</p></li>
20+
<li><code ng:non-bindable="">eventName – {string} – </code>
21+
<p>name of the event</p></li>
22+
</ul>
23+
</div>
24+
</li>
25+
<li><h3 id="registerEventsFromObject">registerEventsFromObject(eventObjectMap)</h3>
26+
<div class="registereventsfromobject"><p>Registers features and events from a simple objectMap.
27+
eventObjectMap must be in this format (multiple features allowed)
28+
<pre class="prettyprint linenums">
29+
{featureName:
30+
{
31+
eventNameOne:function(args){},
32+
eventNameTwo:function(args){}
33+
}
34+
}
35+
</pre><h4 id="Parameters">Parameters</h4>
36+
<ul class="parameters"><li><code ng:non-bindable="">eventObjectMap – {object} – </code>
37+
<p>map of feature/event names</p></li>
38+
</ul>
39+
</div>
40+
</li>
41+
<li><h3 id="registerMethod">registerMethod(featureName, methodName, callBackFn)</h3>
42+
<div class="registermethod"><p>Registers a new event for the given feature</p><h4 id="Parameters">Parameters</h4>
43+
<ul class="parameters"><li><code ng:non-bindable="">featureName – {string} – </code>
44+
<p>name of the feature</p></li>
45+
<li><code ng:non-bindable="">methodName – {string} – </code>
46+
<p>name of the method</p></li>
47+
<li><code ng:non-bindable="">callBackFn – {object} – </code>
48+
<p>function to execute</p></li>
49+
</ul>
50+
</div>
51+
</li>
52+
<li><h3 id="registerMethodsFromObject">registerMethodsFromObject(eventObjectMap)</h3>
53+
<div class="registermethodsfromobject"><p>Registers features and methods from a simple objectMap.
54+
eventObjectMap must be in this format (multiple features allowed)
55+
<br>
56+
{featureName:
57+
{
58+
methodNameOne:function(args){},
59+
methodNameTwo:function(args){}
60+
}</p><h4 id="Parameters">Parameters</h4>
61+
<ul class="parameters"><li><code ng:non-bindable="">eventObjectMap – {object} – </code>
62+
<p>map of feature/event names</p></li>
63+
</ul>
64+
</div>
65+
</li>
66+
<li><h3 id="suppressEvents">suppressEvents(listenerFuncs, callBackFn)</h3>
67+
<div class="suppressevents"><p>Used to execute a function while disabling the specified event listeners.
68+
Disables the listenerFunctions, executes the callbackFn, and then enables
69+
the listenerFunctions again</p><h4 id="Parameters">Parameters</h4>
70+
<ul class="parameters"><li><code ng:non-bindable="">listenerFuncs – {object} – </code>
71+
<p>listenerFunc or array of listenerFuncs to suppress. These must be the same
72+
functions that were used in the .on.eventName method</p></li>
73+
<li><code ng:non-bindable="">callBackFn – {object} – </code>
74+
<p>function to execute</p></li>
75+
</ul>
76+
<h4 id="Example">Example</h4>
77+
<div class="example"><pre class="prettyprint linenums">
78+
var navigate = function (newRowCol, oldRowCol){
79+
//do something on navigate
80+
}
81+
82+
gridApi.cellNav.on.navigate(scope,navigate);
83+
84+
85+
//call the scrollTo event and suppress our navigate listener
86+
//scrollTo will still raise the event for other listeners
87+
gridApi.suppressEvents(navigate, function(){
88+
gridApi.cellNav.scrollTo(aRow, aCol);
89+
});
90+
91+
</pre></div>
92+
</div>
93+
</li>
94+
</ul>
95+
</div>
96+
</div>

docs/partials/api/ui.grid.class.GridColumn.html

+21-6
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ <h1><code ng:non-bindable="">GridColumn</code>
33
)</span>
44
</h1>
55
<div><h2 id="Description">Description</h2>
6-
<div class="description"><p>Wrapper for the GridOptions.colDefs items. Allows for needed properties and functions
7-
to be assigned to a grid column</p></div>
6+
<div class="description"><p>Represents the viewModel for each column. Any state or methods needed for a Grid Column
7+
are defined on this prototype</p></div>
88
<h2 id="Usage">Usage</h2>
9-
<div class="usage"><pre class="prettyprint linenums">GridColumn(colDef, index);</pre>
9+
<div class="usage"><pre class="prettyprint linenums">GridColumn(colDef, index, grid);</pre>
1010
<h3 id="Parameters">Parameters</h3>
1111
<ul class="parameters"><li><code ng:non-bindable="">colDef – {ColDef} – </code>
12-
<p>Column definition.
12+
<p>Column definition.</p></li>
13+
<li><code ng:non-bindable="">index – {number} – </code>
14+
<p>the current position of the column in the array</p></li>
15+
<li><code ng:non-bindable="">grid – {Grid} – </code>
16+
<p>reference to the grid
1317
<br/>Required properties</p>
1418

1519
<ul>
@@ -31,8 +35,19 @@ <h3 id="Parameters">Parameters</h3>
3135
<li>sortingAlgorithm - Algorithm to use for sorting this column. Takes 'a' and 'b' parameters like any normal sorting function.</li>
3236
<li>todo: add other optional fields as implementation matures</li>
3337
</ul></li>
34-
<li><code ng:non-bindable="">index – {number} – </code>
35-
<p>the current position of the column in the array</p></li>
38+
</ul>
39+
</div>
40+
<div class="member method"><h2 id="Methods">Methods</h2>
41+
<ul class="methods"><li><h3 id="getColClass">getColClass(prefixDot)</h3>
42+
<div class="getcolclass"><p>Returns the class name for the column</p><h4 id="Parameters">Parameters</h4>
43+
<ul class="parameters"><li><code ng:non-bindable="">prefixDot – {bool} – </code>
44+
<p>if true, will return .className instead of className</p></li>
45+
</ul>
46+
</div>
47+
</li>
48+
<li><h3 id="getColClassDefinition">getColClassDefinition()</h3>
49+
<div class="getcolclassdefinition"><p>Returns the class definition for th column</p></div>
50+
</li>
3651
</ul>
3752
</div>
3853
</div>

docs/partials/api/ui.grid.class.GridOptions.html

+16
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ <h2 id="Usage">Usage</h2>
4040
you do not want this at all you can disable this setting but you will take a performance hit if you are using large numbers of rows
4141
and are altering the data set often.</p></div>
4242
</li>
43+
<li><h3 id="excludeProperties">excludeProperties</h3>
44+
<div class="excludeproperties"><p>(optional) Array of property names in data to ignore when auto-generating column names. defaults to ['$$hashKey']
45+
If columnDefs is defined, this will be ignored.</p></div>
46+
</li>
4347
<li><h3 id="getRowIdentity">getRowIdentity</h3>
4448
<div class="getrowidentity"><p>(optional) This function returns the identity value uniquely identifying this row.</p>
4549

@@ -52,4 +56,16 @@ <h2 id="Usage">Usage</h2>
5256
</li>
5357
</ul>
5458
</div>
59+
<h2 id="Example">Example</h2>
60+
<div class="example"><p>To provide default options for all of the grids within your application, use an angular
61+
decorator to modify the GridOptions factory.
62+
<pre class="prettyprint linenums">app.config(function($provide){
63+
$provide.decorator('GridOptions',function($delegate){
64+
return function(){
65+
var defaultOptions = new $delegate();
66+
defaultOptions.excludeProperties = ['id' ,'$$hashKey'];
67+
return defaultOptions;
68+
};
69+
})
70+
})</pre></div>
5571
</div>

docs/partials/api/ui.grid.class.GridRow.html

+26-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ <h1><code ng:non-bindable="">GridRow</code>
33
)</span>
44
</h1>
55
<div><h2 id="Description">Description</h2>
6-
<div class="description"><p>Wrapper for the GridOptions.data rows. Allows for needed properties and functions
7-
to be assigned to a grid row</p></div>
6+
<div class="description"><p>GridRow is the viewModel for one logical row on the grid. A grid Row is not necessarily a one-to-one
7+
relation to gridOptions.data.</p></div>
88
<h2 id="Usage">Usage</h2>
99
<div class="usage"><pre class="prettyprint linenums">GridRow(entity, index);</pre>
1010
<h3 id="Parameters">Parameters</h3>
@@ -15,7 +15,18 @@ <h3 id="Parameters">Parameters</h3>
1515
</ul>
1616
</div>
1717
<div class="member method"><h2 id="Methods">Methods</h2>
18-
<ul class="methods"><li><h3 id="getQualifiedColField">getQualifiedColField(col)</h3>
18+
<ul class="methods"><li><h3 id="getEntityQualifiedColField">getEntityQualifiedColField(col)</h3>
19+
<div class="getentityqualifiedcolfield"><p>returns the qualified field name minus the row path
20+
ie: entity.fieldA</p><h4 id="Parameters">Parameters</h4>
21+
<ul class="parameters"><li><code ng:non-bindable="">col – {GridCol} – </code>
22+
<p>column instance</p></li>
23+
</ul>
24+
<h4 id="Returns">Returns</h4>
25+
<div class="returns"><code ng:non-bindable="">{string}</code>
26+
<p>resulting name that can be evaluated against a row</p></div>
27+
</div>
28+
</li>
29+
<li><h3 id="getQualifiedColField">getQualifiedColField(col)</h3>
1930
<div class="getqualifiedcolfield"><p>returns the qualified field name as it exists on scope
2031
ie: row.entity.fieldA</p><h4 id="Parameters">Parameters</h4>
2132
<ul class="parameters"><li><code ng:non-bindable="">col – {GridCol} – </code>
@@ -28,4 +39,16 @@ <h4 id="Returns">Returns</h4>
2839
</li>
2940
</ul>
3041
</div>
42+
<div class="member property"><h2 id="Properties">Properties</h2>
43+
<ul class="properties"><li><h3 id="entity">entity</h3>
44+
<div class="entity"><p>A reference to an item in gridOptions.data[]</p></div>
45+
</li>
46+
<li><h3 id="index">index</h3>
47+
<div class="index"><p>the index of the GridRow. It should always be unique and immutable</p></div>
48+
</li>
49+
<li><h3 id="visible">visible</h3>
50+
<div class="visible"><p>If true, the row will be rendered</p></div>
51+
</li>
52+
</ul>
53+
</div>
3154
</div>

docs/partials/api/ui.grid.directive.uiGrid.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ <h3 id="Parameters">Parameters</h3>
2323
</div>
2424
<h2 id="Example">Example</h2>
2525
<div class="example"><h4>Source</h4>
26-
<div source-edit="app" source-edit-deps="angular.js app.js" source-edit-html="index.html-11" source-edit-css="" source-edit-js="app.js" source-edit-unit="" source-edit-scenario=""></div>
26+
<div source-edit="app" source-edit-deps="angular.js app.js" source-edit-html="index.html-12" source-edit-css="" source-edit-js="app.js" source-edit-unit="" source-edit-scenario=""></div>
2727
<div class="tabbable"><div class="tab-pane" title="index.html">
28-
<pre class="prettyprint linenums" ng-set-text="index.html-11" ng-html-wrap-loaded="app angular.js app.js"></pre>
29-
<script type="text/ng-template" id="index.html-11">
28+
<pre class="prettyprint linenums" ng-set-text="index.html-12" ng-html-wrap-loaded="app angular.js app.js"></pre>
29+
<script type="text/ng-template" id="index.html-12">
3030
<div ng-controller="MainCtrl">
3131
<div ui-grid="{ data: data }"></div>
3232
</div>
@@ -46,5 +46,5 @@ <h2 id="Example">Example</h2>
4646
</script>
4747
</div>
4848
</div><h4>Demo</h4>
49-
<div class="well doc-example-live animator-container" ng-embed-app="app" ng-set-html="index.html-11" ng-eval-javascript="app.js"></div></div>
49+
<div class="well doc-example-live animator-container" ng-embed-app="app" ng-set-html="index.html-12" ng-eval-javascript="app.js"></div></div>
5050
</div>

0 commit comments

Comments
 (0)